Mon 14 Jan 2008
This will be one of those posts I’d like to publish primarily to be able to coma back later and check it out instead of reading docs again
So, we have a server with two (or more) network interfaces are we need to be able to use more than one interface in our VDS machines. How do we set it up?
First of all, I’d like to say that this method was tested and works for bridged configurations where host and guest machines’ interfaces are connected to bridges and you assign IPs on your guest machines w/o routing.
So, we need to create two bridges in our host environment. In Debian it is simple - here is my /etc/network/interfaces file:
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet manual
auto xenbr0
iface xenbr0 inet static
bridge_ports eth0
bridge_maxwait 1
bridge_stp no
address XXX.XXX.150.235
netmask 255.255.255.248
gateway XXX.XXX.150.233
# The backbone interface
auto eth1
iface eth1 inet manual
auto xenbr1
iface xenbr1 inet static
bridge_ports eth1
bridge_maxwait 1
bridge_stp no
address 192.168.0.40
netmask 255.255.255.0
With this configuration we have two bridges and each of them has physical interface connected to it. Next our step is guest machine setup. In /etx/xen/our-machine.cfg we add:
# Networking
#
vif = [ 'bridge=xenbr0', 'bridge=xenbr1' ]
And in /etc/xen/xend-config.sxp we need to comment out all “(network-script *)” lines and use “(vif-script vif-bridge)” for virtual interfaces initialization.
And our last step is to configure guest machine’s network. Again, Debian’s config file:
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
up route add -host XXX.XXX.150.233 dev eth0
up route add default gw XXX.XXX.150.233
address XXX.XXX.152.127
netmask 255.255.255.255
auto eth1
iface eth1 inet static
address 192.168.0.126
netmask 255.255.255.0
That is it - pretty simple and straightforward configuration.
- How to clone virtual machine with VmWare Server
- How to create IP-IP tunnel between FreeBSD and Linux
- Berkeley lectures as podcasts
- How to run GUI-programs on a server without any monitor
- How To Get Data For Mrtg Without Running SNMP Daemon?
Add New Comment
Viewing 1 Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment
Trackbacks