OpenVZ Forum

Home » Mailing lists » Users » IPv6 on veth interface (almost)SOLVED
IPv6 on veth interface (almost)SOLVED [message #14622] Tue, 03 July 2007 14:12
Jan Tomasek is currently offline  Jan Tomasek
Messages: 44
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 \
--netif_add eth0,00:0C:29:63:A6:73,veth012.0,00:0C:29:63:A6:74

MAC adreses are created by [1] program. After that I had to
edit /etc/network/interfaces for VE:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

eth0 inet6 static
iface eth0 inet6 static
address 2001:718:1:e::23:3012
post-up /sbin/sysctl -w "net.ipv6.conf.eth0.autoconf=0"
gateway 2001:718:1:e::23:3004
netmask 64

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
ifconfig eth0 add 2001:718:1:e::23:3004/64
brctl addif br0 eth0

ifconfig br0
ifconfig br0 broadcast
ifconfig br0 netmask

/sbin/sysctl -w "net.ipv6.conf.br0.autoconf=0"
/sbin/sysctl -w "net.ipv6.conf.eth0.autoconf=0"

route add default gw

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 [2] 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
right place?

[2] -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.

Best regards
Jan Tomasek aka Semik
Previous Topic: Network slowness
Next Topic: kernel errors in syslog
Goto Forum:

Current Time: Mon Jul 23 13:22:39 GMT 2018