[PVE-User] Problems with networking (routing) of a transfered container from pve3 to pve4
Christian Blaich
christian at blaich.eu
Sat Jul 16 21:43:38 CEST 2016
Hey,
got some problems with a second eth inside a container. The second interface
is not pingable.
my setup:
Server Pve3:
Fresh installed Ovz Container Ubuntu 14.04, Template from
https://wiki.openvz.org/Download/template/precreated
2 Ip addresses, using the venet
Interfaces:
auto venet0
iface venet0 inet manual
up ifconfig venet0 up
up ifconfig venet0 127.0.0.2
up route add default dev venet0
down route del default dev venet0
down ifconfig venet0 down
iface venet0 inet6 manual
up route -A inet6 add default dev venet0
down route -A inet6 del default dev venet0
auto venet0:0
iface venet0:0 inet static
address xx.xx.xx.xx
netmask 255.255.255.255
auto venet0:1
iface venet0:1 inet static
address xx.xx.xx.xx
netmask 255.255.255.255
Steps:
* Backup via gui
* Transfer archive to Server Pve4
* Restore archive on Pve4
* Setting up eth0 and eth1 with former ip addresses, mac and gateway
via gui
Server Pve4:
eth0 is pingable, eth1 doesn't respond
Config in gui is here:
http://www.evernote.com/shard/s221/sh/187f760b-f865-4ef1-8dfb-8766e22ac907/c
6d99fa8e8b6111343c5c47c33da7069
Interfaces:
# Auto generated lo interface
auto lo
iface lo inet loopback
# Auto generated venet0 interface
auto venet0
iface venet0 inet manual
up ifconfig venet0 up
up ifconfig venet0 127.0.0.2
up route add default dev venet0
down route del default dev venet0
down ifconfig venet0 down
iface venet0 inet6 manual
up route -A inet6 add default dev venet0
down route -A inet6 del default dev venet0
auto venet0:0
iface venet0:0 inet static
address xx.xx.xx.xx
netmask 255.255.255.255
auto eth0
iface eth0 inet static
address xx.xx.xx.xx
netmask 255.255.255.255
# --- BEGIN PVE ---
post-up ip route add xx.xx.xx.254 dev eth0
post-up ip route add default via xx.xx.xx.254 dev eth0
pre-down ip route del default via xx.xx.xx.254 dev eth0
pre-down ip route del xx.xx.xx.254 dev eth0
# --- END PVE ---
auto eth1
iface eth1 inet static
address xx.xx.xx.xx
netmask 255.255.255.255
When i switch the entry of the gateway in the gui, the other ip is reachable
but not the former one.
What can i do to run both ip addresses in the container?
A precreated container from the lxc sources works perfect with the 2 ips. I
guess it must be a routing problem in the container - there is no firewall
activated on the whole system.
chris
More information about the pve-user
mailing list