- Rename network card to
peth0
(http://lists.xen.org/archives/html/xen-users/2012-02/msg00535.html). Edit/etc/udev/rules.d/70-persistent-net.rules
to set the name of the physical interface topeth0
. - Edit
/etc/network/interfaces
:
auto eth0
iface eth0 inet static
bridge_ports peth0
address XXX.XXX.XXX.XXX
netmask 255.255.255.0
gateway XXX.XXX.XXX.XXX
- Use the following when configuring your DomU's
/etc/xen/domain.cfg
. Note: Vif MAC address must start with 00:16:3e
vif = [ 'bridge=eth0,mac=00:16:3e:xx:xx:xx' ] # (vif mac setup works only with the beginning of 00:16:3e!, change xx:xx:xx to valid mac-address characters, 0-9 and a-f)
- Edit
/etc/network/interfaces
auto eth0
iface eth0 inet static
address XXX.XXX.XXX.XXX
gateway XXX.XXX.XXX.XXX
netmask 255.255.255.0
- Edit
/etc/network/interfaces
auto xenbr1
iface xenbr1 inet static
address 10.0.0.1
netmask 255.255.255.0
bridge_stp off
bridge_waitport 0
bridge_fd 0
- Use the following when configuring your DomU's
/etc/xen/domain.cfg
. Note: Vif MAC address must start with 00:16:3e
vif = [ 'bridge=xenbr1,mac=00:16:3e:xx:xx:xx' ] # (vif mac setup works only with the beginning of 00:16:3e!)
- Edit
/etc/network/interfaces
auto eth0
iface eth0 inet static
address 10.0.0.2
netmask 255.255.255.0
When you have your eth0
and xenbr1
, configure your DomU
s /etc/xen/domain.cfg
to handle both:
vif = [ 'mac=00:16:3e:xx:xx:xx,bridge=xenbr1', 'mac=00:16:3e:xx:xx:xx,bridge=eth0']
Now your internal network for DomU
will be eth0
and the external eth1
, edit /etc/network/interfaces
:
auto eth0
iface eth0 inet static
address 10.0.0.X
netmask 255.255.255.0
auto eth1
iface eth1 inet static
address XXX.XXX.XXX.XXX
gateway XXX.XXX.XXX.XXX
netmask 255.255.255.0
You can also try to add it via script instead, this actually works better for me:
brctl addbr xenbr1
brctl stp xenbr1 off
brctl setfd xenbr1 0
ip link set xenbr1 up
ifconfig xenbr1 up 10.0.0.1 netmask 255.255.255.0