Hurricane Electric's IPv6 Tunnel Broker Forums

General IPv6 Topics => IPv6 Software Applications & Hardware Appliances => Topic started by: fibbs on May 28, 2009, 08:34:21 AM

Title: Openvz - can't get working ipv6 in VE (HN works)
Post by: fibbs on May 28, 2009, 08:34:21 AM
Hi folks,

i am a real newbie in the ipv6 world, and i wanted to equip my rootserver with ipv6 so i can use a ipv4/ipv6 mixed playground VE.

I am using Ubuntu "Hardy" with the following Kernel: 2.6.24-19-openvz


In the HN (hardware node, hostname august) everything works fine:


root@august:~# ping6 ipv6.google.com
PING ipv6.google.com(fx-in-x68.google.com) 56 data bytes
64 bytes from fx-in-x68.google.com: icmp_seq=1 ttl=58 time=30.0 ms
64 bytes from fx-in-x68.google.com: icmp_seq=2 ttl=58 time=30.7 ms
64 bytes from fx-in-x68.google.com: icmp_seq=3 ttl=58 time=30.7 ms

--- ipv6.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2006ms
rtt min/avg/max/mdev = 30.084/30.530/30.784/0.347 ms



root@august:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:21:85:15:32:0b 
          inet addr:78.46.87.175  Bcast:78.46.87.191  Mask:255.255.255.0
          inet6 addr: fe80::221:85ff:fe15:320b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3053905 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5162178 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:330025682 (314.7 MB)  TX bytes:6692928761 (6.2 GB)
          Interrupt:254 Base address:0x2000

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:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1248 (1.2 KB)  TX bytes:1248 (1.2 KB)

sit0      Link encap:IPv6-in-IPv4 
          inet6 addr: ::172.16.112.1/96 Scope:Compat
          inet6 addr: ::78.46.87.175/96 Scope:Compat
          inet6 addr: ::127.0.0.1/96 Scope:Unknown
          inet6 addr: ::10.10.11.1/96 Scope:Compat
          UP RUNNING NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sit1      Link encap:IPv6-in-IPv4 
          inet6 addr: fe80::ac10:7001/64 Scope:Link
          inet6 addr: fe80::4e2e:57af/64 Scope:Link
          inet6 addr: 2001:470:1f12:113::2/64 Scope:Global
          inet6 addr: fe80::a0a:b01/64 Scope:Link
          UP POINTOPOINT RUNNING NOARP  MTU:1480  Metric:1
          RX packets:644 errors:0 dropped:0 overruns:0 frame:0
          TX packets:222 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:66145 (64.5 KB)  TX bytes:36060 (35.2 KB)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          inet addr:10.10.11.1  P-t-P:10.10.11.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

tun1      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          inet addr:172.16.112.1  P-t-P:172.16.112.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 B)  TX bytes:152 (152.0 B)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          inet6 addr: fe80::1/128 Scope:Link
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:1784430 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1460245 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1342084135 (1.2 GB)  TX bytes:341902674 (326.0 MB)



Now, i have ipv6 forwarding active:

root@august:~# cat /proc/sys/net/ipv6/conf/all/forwarding
1



So i create a new VE with id 504 giving it the IPv6 address 2001:470:1f13:113::2, which is whithin my routed /64 subnet The VE is called "ipv6".

From within the virtual machine i see the following:


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:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:416 (416.0 B)  TX bytes:416 (416.0 B)

sit0      Link encap:IPv6-in-IPv4 
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          inet addr:127.0.0.1  P-t-P:127.0.0.1  Bcast:0.0.0.0  Mask:255.255.255.255
          inet6 addr: ::1/128 Scope:Host
          inet6 addr: 2001:470:1f13:113::2/128 Scope:Global
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


...and i can ping6 my own ipv6 address from within the virtual machine:


root@ipv6 / $ ping6 2001:470:1f13:113::2   
PING 2001:470:1f13:113::2(2001:470:1f13:113::2) 56 data bytes
64 bytes from 2001:470:1f13:113::2: icmp_seq=1 ttl=64 time=0.035 ms
64 bytes from 2001:470:1f13:113::2: icmp_seq=2 ttl=64 time=0.040 ms


But i CAN NOT ping ANY other ipv6 address such as for example my hn:

root@ipv6 / $ ping6 2001:470:1f12:113::2
connect: Network is unreachable


Checking the routing from whithin the VE shows me that this is true as NO route except a "host route" to the own address is set:


root@ipv6 / $ route -6n
Kernel IPv6 routing table
Destination                    Next Hop                   Flag Met Ref Use If
::1/128                        ::                         U    256 0     0 venet0
2001:470:1f13:113::2/128       ::                         U    256 0     0 venet0
fe80::/64                      ::                         U    256 0     0 venet0
::/0                           ::                         !n   -1  1  2245 lo
::1/128                        ::                         Un   0   1     3 lo
::1/128                        ::                         Un   0   1     0 lo
2001:470:1f13:113::2/128       ::                         Un   0   1    10 lo
ff00::/8                       ::                         U    256 0     0 venet0
::/0                           ::                         !n   -1  1  2245 lo


Now i do not know this openvz style venet stuff so good to know what route to set. A default route is what i would need, but which nexthop? There is none reachable....

Any ideas how to do that?


Thanks in advance

Christian
Title: Re: Openvz - can't get working ipv6 in VE (HN works)
Post by: sttun on July 15, 2009, 09:22:08 AM
Hello
I looked at your routing table from the guest and it looks like youre default route is set to lo (loop back) try changing it to venet0 then you will have more luck? bleace report back on youre progress
Title: Re: Openvz - can't get working ipv6 in VE (HN works)
Post by: broquea on July 15, 2009, 12:07:56 PM
definitely need an entry like:

::/0                                        ::                                      U     1      0        0 venet0