WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] dummy interfaces on a bridge?

On 7/10/06, Chris Fanning <christopher.fanning@xxxxxxxxx> wrote:
Hi,

Well, I'm ready to try this and here are my first problems.
the box already has two physical nic. eth0 and eth1. these work fine.

*****************************
So I do on dom0:

/etc/network/interfaces
auto dummy0
iface dummy0 inet static
        address 192.168.6.1
        netmask 255.255.255.0
        network 192.168.6.0
        broadcast 192.168.6.255

/etc/xen/scripts/my-network-bridge
#!/bin/bash
case "$1" in
        start)
                /etc/xen/scripts/network-bridge start bridge=xenbr0
netdev=eth0 vifnum=0 antispoof=no
                /etc/xen/scripts/network-bridge start bridge=xenbr1
netdev=eth1 vifnum=1 antispoof=no
                /etc/xen/scripts/network-bridge start bridge=xenbr2
netdev=dummy0 vifnum=2 antispoof=no
        ;;
        stop)
                /etc/xen/scripts/network-bridge stop bridge=xenbr0
netdev=eth0 vifnum=0
                /etc/xen/scripts/network-bridge stop bridge=xenbr1
netdev=eth1 vifnum=1
                /etc/xen/scripts/network-bridge stop bridge=xenbr2
netdev=dummy0 vifnum=2
        ;;
        restart)
                $0 stop
                $0 start
        ;;
        *)
        echo "usage: $0 {start|stop|restart}"
esac
exit 0

Alternatively, you could just skip the my-network-bridge custom script and put it all in /etc/network/interfaces. For example:


auto eth0
iface eth0 inet manual
        pre-up ip link set eth1 addr fe:ff:ff:ff:ff arp off

auto xenbr0
iface xenbr0 inet manual
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

auto eth1
iface eth1 inet manual
        pre-up ip link set eth1 addr fe:ff:ff:ff:ff arp off

auto xenbr1
iface xenbr1 inet manual
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0

auto dummy0
iface dummy0 inet static
        address 192.168.6.1
        netmask 255.255.255.0
        network 192.168.6.0
        broadcast 192.168.6.255

auto xenbr2
iface xenbr2 inet manual
        bridge_ports dummy0
        bridge_stp off
        bridge_fd 0





_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>