:#
| 2a03:4000:0006:1034:0000:0000:0000:0002/64 |
http://[2a03:4000:6:1034::2] http://[2a03:4000:17:f9::2]You may add a port and folder
http://[2a03:4000:6:1034::2]:8080/opencms/opencms/Sepcial IPv6 addresses
| 2001:... | global IPv6 adress provided by ISP |
| 2002:... | global IPv6 adress via 6to4 tunnel |
| fd00:... | Unique Local Address - ULA |
| fe80:... | Link Local Addresses (also fe9, fea, ?) |
| fec0:... | Site-local addresses |
#| Netcup: | A | AAAA | MX | CNAME | TXT | SRV | |
| Strato: | A | AAAA | MX | TXT | SRV | SPF |
Note: Forwarding at Strato is a simple frame embedding over the full screen. Use A (and AAAA) record for a real IP <> Domain alias!
Bad:
> ifconfig
eth0 Link encap:Ethernet HWaddr 52:54:94:c2:02:9f
inet addr:5.45.105.135 Bcast:5.45.107.255 Mask:255.255.252.0
inet6 addr: fe80::5054:94ff:fec2:29f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3348380 errors:0 dropped:0 overruns:0 frame:0
TX packets:118969 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:215618085 (215.6 MB) TX bytes:32442461 (32.4 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:40925 errors:0 dropped:0 overruns:0 frame:0
TX packets:40925 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:64815633 (64.8 MB) TX bytes:64815633 (64.8 MB)
Important is that you have not only a "Scope:Link", but a "Scope:Host" IPv6 entry at your network card (eth0 here).
Good:
eth0 Link encap:Ethernet HWaddr 52:54:94:c2:02:9f
inet addr:5.45.105.135 Bcast:5.45.107.255 Mask:255.255.252.0
inet6 addr: fe80::5054:94ff:fec2:29f/64 Scope:Link
inet6 addr: 2a03:4000:6:1034::2/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:673309 errors:0 dropped:0 overruns:0 frame:0
TX packets:37852 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46646319 (46.6 MB) TX bytes:6810126 (6.8 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3214 errors:0 dropped:0 overruns:0 frame:0
TX packets:3214 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5223703 (5.2 MB) TX bytes:5223703 (5.2 MB)
Good:
> ip address show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 52:54:94:c2:02:9f brd ff:ff:ff:ff:ff:ff
inet 5.45.105.135/22 brd 5.45.107.255 scope global eth0
inet6 fe80::5054:94ff:fec2:29f/64 scope link
valid_lft forever preferred_lft forever
> netstat -pan --tcp Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 634/sshd tcp6 0 0 :::80 :::* LISTEN 16730/java
Test
> ping -6 google.de > nslookup -query=AAAA google.de > traceroute6 ipv6.google.com > ip -6 route (?) host -t AAAA www.google.de (?) dig www.google.com AAAA
on the server directly (SSH).
Bad:
> ping6 ipv6.google.com PING ipv6.google.com(ham02s12-in-x13.1e100.net) 56 data bytes From 2a03:4000:6:1034::2 icmp_seq=1 Destination unreachable: Address unreachable
Good:
> ping6 ipv6.google.com PING ipv6.google.com(muc03s02-in-x10.1e100.net) 56 data bytes 64 bytes from muc03s02-in-x10.1e100.net: icmp_seq=1 ttl=53 time=14.9 ms
NOTE: At netcup you need to "poweroff" the server and start it again to enable new network settings. A reboot is not sufficient !!!
You can read this extensive setup guide
.
This is the shortcut for my configuration:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 5.45.105.135
netmask 255.255.252.0
broadcast 5.45.107.255
gateway 5.45.104.1
dns-nameservers 46.38.225.230 46.38.252.230
iface eth0 inet6 static
address 2a03:4000:6:1034::2
netmask 64
#gateway wird hier keines benötigt, da dieses automatisch definiert wird
gateway fe80::1
dns-nameservers 2a03:4000:0:1::e1e6 2a03:4000:8000::fce6
to /etc/network/interfaces
dns-nameservers 46.38.225.230 46.38.252.230 dns-nameservers 2a03:4000:0:1::e1e6 2a03:4000:8000::fce6
# The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 5.45.105.135 yourserver.domain.com yourserver
There are some other commands to check IPv6
> netstat -pan --tcp > ifconfig -a > ip -6 route > tcpdump -i eth0 ip6 -vv > netstat -r > ip -6 neigh show > traceroute6 ipv6.google.com > modprobe ipv6 > lsmod > ip address show > lsof -i TCP > netstat -ln
Regrading IPv6 all connectors support it from scratch, e.g. the server must simply provide IPv6 (see above). I tested IPv6 connecttions to the server with BIO and APR successfully without modification to the default settings.
Generally the BIO one is taken, see catalina.out:
Jan 12, 2014 12:33:23 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib Jan 12, 2014 12:33:23 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-bio-80"]With the "protocol" attribute you can specify the connector type in <tom>/conf/server.xml
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
| protocol=HTTP/1.1" | auto |
| protocol="org.apache.coyote.http11.Http11Protocol" | (BIO) blocking Java connector |
| protocol="org.apache.coyote.http11.Http11NioProtocol" | (NIO) non blocking Java connector |
| protocol="org.apache.coyote.http11.Http11AprProtocol" | (APR) the APR/native connector |
APR is the best choice, BUT needs a native compiled lib. This can be done this way on Linux (Ubuntu 12.04):
There are some instructions, see at liferay
or at Apache
.
Requirements (according to Tomcat docu
)
> apt-get install libapr1-dev > apt-get install libssl-dev > apt-get install makeYou will find the native source code in the <tom>/bin/tomcat-native.tar.gz file in your installation.
gunzip tomcat-native.tar.gz tar xvf *When you have extracted it go to folder .../tomcat-native-1.1.29-src/jni/native. Make sure you have set the JAVA_HOME. Simply try configure:
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64;export JAVA_HOME cd /markus/native/tomcat-native-1.1.29-src/jni/native > ./configure --with-apr=/usr/bin/apr-configThis must return without errors or warnings ! Follow instructions if there are any. I got this one
Cannot find jni_md.h in /usr/lib/jvm/java-7-openjdk-amd64/You can check at Ubuntu
in which package the file is provided. In my case I needed the full JDK package:
apt-get install openjdk-7-jdk
> make
> make install
==> result:
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/apr/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Add to <tom>/bin/startup.sh
LD_LIBRARY_PATH=/usr/local/apr/lib;export LD_LIBRARY_PATHRestart:
Jan 07, 2014 8:33:59 PM org.apache.catalina.core.AprLifecycleListener init INFO: Loaded APR based Apache Tomcat Native library 1.1.29 using APR version 1.4.6. Jan 07, 2014 8:33:59 PM org.apache.catalina.core.AprLifecycleListener init INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. Jan 07, 2014 8:33:59 PM org.apache.catalina.core.AprLifecycleListener initializeSSL INFO: OpenSSL successfully initialized (OpenSSL 1.0.1 14 Mar 2012) Jan 07, 2014 8:33:59 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-apr-0.0.0.0-80"]Additional comment:
.
You may specify it with the "address" attribute, but as I set above, the server is the main point regarding IPv6. If you specify IPv6 with address="::0" and your server does not support it you may get something like this
SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-apr-0:0:0:0:0:0:0:0-80"]
org.apache.tomcat.jni.Error: 670009: Address family for hostname not supported
at org.apache.tomcat.jni.Address.info(Native Method)
Generally NIO/BIO (and APR) connector binds to both IPv4 and IPv6 when no "address" is specified. When you specify two then Tomcat says following
SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-bio-0:0:0:0:0:0:0:0-80"]
java.net.BindException: Address already in use /0:0:0:0:0:0:0:0:80
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:406)
Note: For Windows or other Linux distrubutions it seems to be different, see here
. If you want to prefer IPv4 this is suggested
JAVA_OPTS="Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true" CATALINA_OPTS="Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true"
I have a connection from Kabel Deutschland.
Kabel Deutschland statements (Juni 2012):
Kabel Deutschland hat sein Netz bereits auf die gleichzeitige Verwendung von IPv4 und IPv6 (sog. DualStack) umgestellt. Ab sofort erhalten alle Neukunden mit einem Kabelrouter, die im DOCSIS3-Ausbaugebiet wohnen, zusätzlich öffentliche IPv6-Adressen zugewiesen.
Welchen Präfix bekommt der Kunde zugewiesen?:
Ein Kunde kann minimal einen/64 und maximal /56 Prefix vom DHCP anfordern. Welche Prefixgröße er letztendlich abfragt hängt hauptsächlich vom Endgerät ab. Im Normalfall wird tatsächlich aber nur ein /64 angefordert.
Here are some pro&cons
my connection should be enabled for IPv6.
fails with my connection
==> UPDATE