1
I'm trying to setup a multi ip, multi subnet environment using xen on debian wheezy host. I have only one NIC and the guests are also debian wheezy.
this is my original, working, /etc/network/interfaces on dom0
# physical server IP
auto eth0
iface eth0 inet static
address a.b.197.140
netmask 255.255.255.0
gateway a.b.197.1
# Aliases all working when setup like this in dom0
auto eth0:1
iface eth0:1 inet static
address a.b.197.141
netmask 255.255.255.0
auto eth0:2
iface eth0:2 inet static
address a.b.197.139
netmask 255.255.255.0
auto eth0:3
iface eth0:3 inet static
address a.b.193.149 #new subnet
netmask 255.255.255.0
auto eth0:4
iface eth0:4 inet static
address a.b.192.23 #new subnet
netmask 255.255.255.0
I've changed dom0 interface config to a routed (not bridged I think?) setup as follows.
# Main interface - working
auto eth0
iface eth0 inet static
address a.b.197.140
netmask 255.255.255.0
gateway a.b.197.1
# second interface - working in a.b.192.* on domU
auto xenbr0
iface xenbr0 inet static
bridge_ports none
address a.b.192.254 #no address provided by ISP - its made up by me for gateway in domU
netmask 255.255.255.0
# third interface - working in a.b.193.* on domU
auto xenbr1
iface xenbr1 inet static
bridge_ports none
address a.b.193.254 #no address provided by ISP - its made up by me for gateway in domU
netmask 255.255.255.0
I've enabled packet forwarding and ARP in xen config file.
My domUs are: domA, domB and domC
I want to assign addresses as follows. I've found out there are some limitations with this setup and I need help to solve this.
domA (a.b.197.141)
domB (a.b.193.149)
domC (a.b.197.139, a.b.192.23)
The only working above is domB with the following configs in /etc/xen/domB.cfg
vif = ['bridge=xenbr1, ip=a.b.193.149, mac=some mac']
/etc/network/interfaces (domB)
auto eth0
iface eth0 inet static
address a.b.193.149
netmask 255.255.255.0
gateway a.b.193.254 #made up by me in dom0
domA, which is supposed to have ip in same subnet as dom0, only works when I use normal bridging as they suggest here: http://wiki.xenproject.org/wiki/Xen_Beginners_Guide#Setup_Linux_Bridge_for_guest_networking
I've tried every possible setup that I could think of including:
1) use same gateway as in dom0
2) set up own interface (xenbr2) with address a.b.197.254 and use as gateway
3) use dom0 eth0 address (a.b.197.140) as gateway
domC, which is supposed to have ip in multiple subnets, doesn't work in either setup (routed or bridged).
Any help would be appreciated. Thanks /M