Search code examples
interfacexen

setup xen on two phisical interfaces


does anybody know how to setup XEN to use 2 interfaces? I have a subnet of local IPs on eth0 and subnet of external IPs on eth1. I want containers to be as on a dom0: eth0 and eth1 routed respectivly.

Thanks in advance


Solution

  • I found solution by myself. I'll discribe it in case of someone need it

    So far I had eth0 interface and br0 configured.

    On dom0 I add additinal bridge. I call it br1

    addbr addbr br1
    

    Then I bind it to physical interface eth1

    addif br1 eth1
    

    Next, I am on Debaian, I configure /etc/network as follows

    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    The primary network interface
    auto br0
    iface br0 inet static
            address 172.16.15.240
            netmask 255.255.255.0
            network 172.16.15.0
            gateway 172.16.15.1
            broadcast 172.16.15.255
            bridge_ports eth0
            bridge_stp on
            bridge_maxwait 0
            bridge_fd 0
    
    auto br1
    iface br1 inet static
            address 91.135.xxx.xxx
            netmask 255.255.255.240
            network 91.135.xxx.xxx
            broadcast 91.135.xxx.xxx
            gateway 91.135.xxx.xxx
            bridge_ports eth1
            bridge_stp on
            bridge_maxwait 0
            bridge_fd 0
            dns-nameservers 8.8.8.8
    

    Then in config file for container add virtual interface as follows

    vif         = [ 'ip=172.16.15.243 ,mac=00:16:3E:18:AF:C3,bridge=br0',
                    'ip=91.135.xxx.xxx ,mac=00:16:3E:DD:2D:00,bridge=br1'
                 ]
    

    That's it. After reboot both dom0 and domN, you will have container connected to phisical interfaces