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

[Xen-users] Setting up bonding + bridges in Debian /etc/network/interfac

To: xen-users List <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-users] Setting up bonding + bridges in Debian /etc/network/interfaces
From: Marco Nenciarini <mnencia@xxxxxxxxxxxxxx>
Date: Thu, 08 Jul 2010 19:52:00 +0200
Delivery-date: Thu, 08 Jul 2010 10:53:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Openpgp: id=F095E5E4; url=http://www.prato.linux.it/~mnencia/mnencia.asc
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100620 Icedove/3.0.5
My needing was to configure eth0 eth1 as slave of bond0 with xen.
network-bridge script didn't work because it calls ifdown/ifup on the
interface, so after a bit of playing I managed to figure out how to set
up it in the Debian Way.

However it's possible to configure as many interfaces as you want in
this way.

Here's the content of my /etc/network/interfaces
----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<---

# The bridge interface.
# The lines with pre-up and post-down are to bring up the
# bond before the bridge. The '--allow "$IFACE"' parameter to
# ifup/ifdown and the corresponding "allow-br0 bond0" line aren't
# really needed, but I like them.

auto br0
iface br0 inet static
        address 192.168.1.10
        netmask 255.255.255.0
        gateway 192.168.1.1
        bridge_ports bond0
        bridge_maxwait 0
        pre-up ifup --allow "$IFACE" bond0
        post-down ifdown --allow "$IFACE" bond0

# The bond interface
# notice it's set as manual to allow the scripts in ifenslave-2.6
# package to create the master interface and enslave the slaves.

allow-br0 bond0
iface bond0 inet manual
        bond_slaves eth0 eth1
        bond_miimon 100
        bond_mode balance-tlb

# Physical interfaces.
# Notice they are set as manual to permit you to add up/down commands
# and special directives such as wifi configurations.
# Lines beginning with allow-bond0 are required if you want to do
# something with these interfaces, otherwise you can remove both of
# them as they are brought up when they are enslaved to their master.

allow-bond0 eth0
iface eth0 inet manual

allow-bond0 eth1
iface eth1 inet manual

---->8---->8---->8---->8---->8---->8---->8---->8---->8---->8---->8---

I hope this helps.

Kind regards,
Marco

-- 
---------------------------------------------------------------------
|    Marco Nenciarini    | Debian/GNU Linux Developer - Plug Member |
| mnencia@xxxxxxxxxxxxxx | http://www.prato.linux.it/~mnencia       |
---------------------------------------------------------------------
Key fingerprint = FED9 69C7 9E67 21F5 7D95  5270 6864 730D F095 E5E4


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] Setting up bonding + bridges in Debian /etc/network/interfaces, Marco Nenciarini <=