[Users] IPv6 again but this time with veth

Jan Tomasek jan at tomasek.cz
Wed Jun 27 11:42:06 EDT 2007


Hello,

few weeks ago I was trying to setup IPv6, but that doesn't work.
http://forum.openvz.org/index.php?t=msg&goto=12809&&srch=IPv6#msg_12809

I would really like to have this feature. So I'm trying to experiment 
with veth devices, but not much success again :(

My host node has IPv6 support:

> staj-dev:~# ifconfig 
> eth0      Link encap:Ethernet  HWaddr 00:13:72:1B:0B:97  
>           inet addr:195.113.233.4  Bcast:195.113.233.255  Mask:255.255.255.0
>           inet6 addr: 2001:718:1:e::23:3004/64 Scope:Global
>           inet6 addr: fe80::213:72ff:fe1b:b97/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:2136 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:1304 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000 
>           RX bytes:211656 (206.6 KiB)  TX bytes:138480 (135.2 KiB)
>           Interrupt:17 

It is accessible on IPv6:

 > semik at staff:~$ ping6 -c1 2001:718:1:e::23:3004
 > PING 2001:718:1:e::23:3004(2001:718:1:e::23:3004) 56 data bytes
 > 64 bytes from 2001:718:1:e::23:3004: icmp_seq=0 ttl=63 time=0.129 ms

I setup IPv4 part this way:

 > staj-dev:~# ifconfig veth012.0 0
 > staj-dev:~# echo 1 > /proc/sys/net/ipv4/conf/veth012.0/forwarding
 > staj-dev:~# echo 1 > /proc/sys/net/ipv4/conf/veth012.0/proxy_arp
 > staj-dev:~# echo 1 > /proc/sys/net/ipv4/conf/eth0/forwarding
 > staj-dev:~# echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
 > staj-dev:~# ip route add 195.113.233.012 dev veth012.0

and it works:

 > semik:~$ping -c1 195.113.233.12
 > PING 195.113.233.12 (195.113.233.12): 56 data bytes
 > 64 bytes from 195.113.233.12: icmp_seq=0 ttl=61 time=0.252 ms

I'm trying to follow 
http://wiki.openvz.org/Virtual_Ethernet_device#Virtual_ethernet_device_with_IPv6

but after executing (2nd, 3rd) lines

 > staj-dev:~# echo 1 > /proc/sys/net/ipv6/conf/veth012.0/forwarding
 > staj-dev:~# echo 1 > /proc/sys/net/ipv6/conf/eth0/forwarding
 > staj-dev:~# echo 1 > /proc/sys/net/ipv6/conf/all/forwarding

host node stop responding to ping6. I'm stuck here... I also do not want 
run router advertisement daemon (if that is possible). My VE should have 
address 2001:718:1:e::23:3012.

Inside VE I setup:

> root at ip6v2-test:~# ifconfig 
> eth0      Link encap:Ethernet  HWaddr 00:0C:29:63:A6:73  
>           inet addr:195.113.233.12  Bcast:195.113.233.255  Mask:255.255.255.0
>           inet6 addr: 2001:718:1:e::23:3012/64 Scope:Global
>           inet6 addr: fe80::20c:29ff:fe63:a673/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:88 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:88 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0 
>           RX bytes:7012 (6.8 KiB)  TX bytes:6948 (6.7 KiB)

> 
> root at ip6v2-test:~# cat /etc/network/interfaces 
> auto lo
> iface lo inet loopback
> 
> auto eth0
> iface eth0 inet static
>         address 195.113.233.12
>         netmask 255.255.255.0
>         network 195.113.233.0
>         broadcast 195.113.233.255
>         gateway 195.113.233.4
>         dns-nameservers 195.113.144.233 195.113.144.194
>         dns-search cesnet.cz
> 
> 
> eth0 inet6 static
>         iface eth0 inet6 static
>         address 2001:718:1:e::23:3012
>         netmask 64

veth interface is configured this way:

> NETIF="ifname=eth0,mac=00:0C:29:63:A6:73,host_ifname=veth012.0,host_mac=00:0C:29:63:A6:74"

inside VE I see reasonable routes:

> root at ip6v2-test:~# route -6
> Kernel IPv6 routing table
> Destination                                 Next Hop                                Flags Metric Ref    Use Iface
> ::1/128                                     ::                                      U     0      1        1 lo      
> 2001:718:1:e::23:3004/128                   2001:718:1:e::23:3004                   UC    0      49       0 eth0    
> 2001:718:1:e::23:3012/128                   ::                                      U     0      142       1 lo      
> 2001:718:1:e::/64                           ::                                      U     256    0        0 eth0    
> fe80::20c:29ff:fe63:a673/128                ::                                      U     0      0        1 lo      
> fe80::/64                                   ::                                      U     256    0        0 eth0    
> ff02::16/128                                ff02::16                                UC    0      5        0 eth0    
> ff00::/8                                    ::                                      U     256    0        0 eth0    

but I'm not able even to ping to my host:

> root at ip6v2-test:~# ping6 2001:718:1:e::23:3004
> PING 2001:718:1:e::23:3004(2001:718:1:e::23:3004) 56 data bytes
> From 2001:718:1:e::23:3012 icmp_seq=1 Destination unreachable: Address unreachable

it is very interesting, that host node see my ping requests:

> staj-dev:~# tcpdump -i veth012.0
> tcpdump: WARNING: veth012.0: no IPv4 address assigned
> tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
> listening on veth012.0, link-type EN10MB (Ethernet), capture size 96 bytes
> 18:48:53.301938 IP6 2001:718:1:e::23:3012 > ff02::1:ff23:3004: ICMP6, neighbor solicitation, who has staj-dev6.cesnet.cz, length 32
> 18:48:54.301800 IP6 2001:718:1:e::23:3012 > ff02::1:ff23:3004: ICMP6, neighbor solicitation, who has staj-dev6.cesnet.cz, length 32
> 18:48:55.302659 IP6 2001:718:1:e::23:3012 > ff02::1:ff23:3004: ICMP6, neighbor solicitation, who has staj-dev6.cesnet.cz, length 32

but do not respond to ping :(

I'm trying this on 2.6.18-028stab035 system with vzctl version 3.0.16-5dso1.

Could anybody help? Thanks.

-- 
-----------------------
Jan Tomasek aka Semik
http://www.tomasek.cz/



More information about the Users mailing list