|IPv6 on veth interface (almost)SOLVED [message #14622]
||Tue, 03 July 2007 14:12
Registered: December 2006
with help Vitaliy and Kirill I managed to get my setup working. In final
it works, but it is very tricky to me. I'm not going to use this. To
save time of anyone who will decide to play this I will try to sumarize
my experiences. I'm using Debian etch systems.
HW node have addresses
VE should have
I created VE 233012 without IP addres after that issued command:
vzctl set 233012 \
MAC adreses are created by easymac.sh  program. After that I had to
edit /etc/network/interfaces for VE:
iface lo inet loopback
iface eth0 inet static
dns-nameservers 188.8.131.52 184.108.40.206
eth0 inet6 static
iface eth0 inet6 static
post-up /sbin/sysctl -w "net.ipv6.conf.eth0.autoconf=0"
Note: sysctl is not going to work it says "Operation not permitted", I
was not trying to solve that. So VE have autoconfigured IP
2001:718:1:e:20c:29ff:fe63:a673 and static 2001:718:1:e::23:3004.
On HW node is situation bit more complicated. I had to comment out all
/etc/network/interfaces and configure it manualy. I created script
/etc/init.d/bridged-networking which is started when machine starts. It
is doing this:
brctl addbr br0
ifconfig eth0 0.0.0.0
ifconfig eth0 add 2001:718:1:e::23:3004/64
brctl addif br0 eth0
ifconfig br0 220.127.116.11
ifconfig br0 broadcast 18.104.22.168
ifconfig br0 netmask 255.255.255.0
/sbin/sysctl -w "net.ipv6.conf.br0.autoconf=0"
/sbin/sysctl -w "net.ipv6.conf.eth0.autoconf=0"
route add default gw 22.214.171.124
The reason why IPv4 address is assigned to bridge br0 is that when I
leave it on eth0 then system quickly lost IPv4 connectivity because ARP
stops working. Network specialist here says me that no IP should be on
bridge Vitaliy and my experiences from home bridge networking show that
at least for IPv4 IP address is needed on bridge.
IPv6 address on eth0 work just fine. It works as sort of backup when
IPv4 failure. ;) Actually it have problems when in br0 is only eth0
interface, it simply doesn't work.
After starting VE I have to execute `brctl addif br0 veth012.0` I didn't
figured how to do it automatically. <VEID>.start script is started in
context of VE and <VEID>.mount script is started before veth012.0 is
created. Document  seams to provide guide.
It is posible to create another VE with similar setup, with just another
IP addresses. Bit problematic is when last VE using veth is stopped, at
that moment IPv4 hangs approximately for 1 minute. After that period
system start to be responsible again. IPv6 is not affected by this.
Problems come when I try to mix veth and venet VE. When last VE using
veth is stoped than venet enabled VE stops responding on IPv4 (no IPv6
there). I didn't figure how to workaround this. Maybe some ARP ping to
 http://wiki.openvz.org/Virtual_Ethernet_device#Making_a_veth -device_persistent
Uff... that is all I managed to discover. As I said on beginning I'm
writing this just for record. I'm not going to use this setup, it is
complicated and mistakes can simply take down all VE including HW node.
Jan Tomasek aka Semik