Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to configure xen guest to act as a router for 2 more guests. Here is the configuration:

xenbr0
    IP: 192.168.1.100
    netmask 255.255.255.0
    gw 192.168.1.1

domain router

router0 (its already bridged to xenbr0 and have internet access)
    IP: 192.168.1.101
    netmask: 255.255.255.0
    gw 192.168.1.100
router1
    IP: 10.10.10.1
    netmask 255.255.255.0

domain web

web0
    IP: 10.10.10.2
    netmask 255.255.255.0
    gw 10.10.10.1

domain filetransfer

filetransfer0
    IP: 10.10.10.3
    netmask 255.255.255.0
    gw 10.10.10.1

which is the right way to configure the networking in that case? Domains web and filetransfer will be accessible through port forwarding from the internet, but I'm unable to give them internet access to the outside...

/proc/sys/net/ipv4/ip_forwarding is already set to 1 in the router, and masquerade is created for router1 => router0 and the 2 domains still do not have internet.

EDIT #1

The xen server have only 1 physical NIC

share|improve this question
add comment

1 Answer

  1. Where is your physical interface (eth0)?
  2. Where do you actually bridging your xenbr0 to your physical NIC?

For DHCP bridge you use it like so:

NOTE: this creates xenbr0 as DHCP bridging to phys. NIC e@ eth0

/*
iface xenbr0 inet dhcp
    bridge_ports eth0
*/

for static you do this 
/*
iface xenbr0 inet static
        bridge_ports eth0
        address 192.168.1.2
        broadcast 192.168.1.255
        netmask 255.255.255.0
        gateway 192.168.1.1
*/

In both cases you still need entry for primary interface:

/*
# The primary network interface needs to remain but set it to manual
auto eth0
iface eth0 inet manual 
*/

Referencing: http://wiki.xen.org/wiki/Network_Configuration_Examples_(Xen_4.1%2B).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.