Mark Schneider
2011-Aug-27 21:16 UTC
[Xen-users] debian wheezy interface bonding (dom0) / xen 4.1.2*
Hello Pasi,
Thank you for your hints due to my questions about interface bonding and
xen HVMs.
I have commented out the network-script line in /etc/xen/xend-config.sxp
and tested a bit around (s. below):
### (network-script network-bridge)
### (network-script ''network-bridge netdev=bond0
antispoof=yes'')
I have tried to use "bridge_ports bond0" and activated config for
bond0
but it didn''t worked as I expected. *Would you expect that such
"bond0-config" also should work?*
Maybe you would like to put some parts of my config into your wiki
xen-networking pages.
# /etc/network/interfaces
# ---
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo
iface lo inet loopback
#auto bond0
#iface bond0 inet static
# address 192.168.1.150
# netmask 255.255.255.0
# network 192.168.1.0
# broadcast 192.168.1.255
# gateway 192.168.1.1
# slaves eth0 eth2
# bond-mode active-backup
# #bond-mode 802.3ad
# bond-miimon 100
# bond-downdelay 200
# bond-updelay 200
auto xenbr0
iface xenbr0 inet static
address 192.168.1.150
network 192.168.1.0
broadcast 192.168.1.255
netmask 255.255.255.0
gateway 192.168.1.1
bridge_ports eth0 eth2
#bridge_ports bond0
#auto bond1
#iface bond1 inet static
# address 10.0.1.150
# netmask 255.255.255.0
# network 10.0.1.0
# broadcast 10.0.1.255
# gateway 10.0.1.1
# slaves eth1 eth3
# bond-mode active-backup
# #bond-mode 802.3ad
# bond-miimon 100
# bond-downdelay 200
# bond-updelay 200
auto xenbr1
iface xenbr1 inet static
address 10.0.1.150
network 10.0.1.0
broadcast 10.0.1.255
netmask 255.255.255.0
gateway 10.0.1.1
bridge_ports eth1 eth3
#bridge_ports bond1
#auto xenbr0
#iface xenbr0 inet static
# bridge_ports eth0 eth2
# address 192.168.1.150
# broadcast 192.168.1.255
# netmask 255.255.255.0
# gateway 192.168.1.1
#auto xenbr1
#iface xenbr1 inet static
# bridge_ports eth1
# address 192.168.1.151
# broadcast 192.168.1.255
# netmask 255.255.255.0
# gateway 192.168.1.1
#
#auto xenbr2
#iface xenbr2 inet static
# bridge_ports eth2
# address 10.0.1.152
# broadcast 10.0.1.255
# netmask 255.255.255.0
# gateway 10.0.1.1
#
#auto xenbr3
#iface xenbr3 inet static
# bridge_ports eth3
# address 10.0.1.153
# broadcast 10.0.1.255
# netmask 255.255.255.0
# gateway 10.0.1.1
# ---
root@xen411dom0:/ftp/HVM# brctl show
bridge name bridge id STP enabled interfaces
xenbr0 8000.b499bac12736 no eth0
eth2
vif4.0
vif5.0
xenbr1 8000.b499bac12738 no eth1
eth3
vif5.1
root@xen411dom0:/ftp/HVM# xm list
Name ID Mem VCPUs State
Time(s)
Domain-0 0 1536 2 r-----
527.2
squeezehvm.born2b3.net 4 8192 4
-b---- 14.9
wheezyhvm.born2b3.net 5 8192 8
-b---- 23.3
Best regards,
Mark
--
ms@it-infrastrukturen.org
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Pasi Kärkkäinen
2011-Aug-28 10:18 UTC
[Xen-users] Re: debian wheezy interface bonding (dom0) / xen 4.1.2*
On Sat, Aug 27, 2011 at 11:16:09PM +0200, Mark Schneider wrote:> Hello Pasi, > > Thank you for your hints due to my questions about interface bonding and > xen HVMs. > I have commented out the network-script line in /etc/xen/xend-config.sxp > and tested a bit around (s. below): > ### (network-script network-bridge) > ### (network-script ''network-bridge netdev=bond0 antispoof=yes'') > > I have tried to use "bridge_ports bond0" and activated config for bond0 > but it didn''t worked as I expected. *Would you expect that such > "bond0-config" also should work?* >You should do one step at a time. First get the bond0 working without any Xen stuff. When bond0 works from dom0, then add bond0 to the bridge.> Maybe you would like to put some parts of my config into your wiki > xen-networking pages. > > > auto xenbr0 > iface xenbr0 inet static > address 192.168.1.150 > network 192.168.1.0 > broadcast 192.168.1.255 > netmask 255.255.255.0 > gateway 192.168.1.1 > bridge_ports eth0 eth2 > #bridge_ports bond0 >This looks dangerous. Having both eth0 and eth2 in the same bridge could cause a loop in the network! -- Pasi> #auto bond1 > #iface bond1 inet static > # address 10.0.1.150 > # netmask 255.255.255.0 > # network 10.0.1.0 > # broadcast 10.0.1.255 > # gateway 10.0.1.1 > # slaves eth1 eth3 > # bond-mode active-backup > # #bond-mode 802.3ad > # bond-miimon 100 > # bond-downdelay 200 > # bond-updelay 200 > > auto xenbr1 > iface xenbr1 inet static > address 10.0.1.150 > network 10.0.1.0 > broadcast 10.0.1.255 > netmask 255.255.255.0 > gateway 10.0.1.1 > bridge_ports eth1 eth3 > #bridge_ports bond1 > > > #auto xenbr0 > #iface xenbr0 inet static > # bridge_ports eth0 eth2 > # address 192.168.1.150 > # broadcast 192.168.1.255 > # netmask 255.255.255.0 > # gateway 192.168.1.1 > > #auto xenbr1 > #iface xenbr1 inet static > # bridge_ports eth1 > # address 192.168.1.151 > # broadcast 192.168.1.255 > # netmask 255.255.255.0 > # gateway 192.168.1.1 > # > #auto xenbr2 > #iface xenbr2 inet static > # bridge_ports eth2 > # address 10.0.1.152 > # broadcast 10.0.1.255 > # netmask 255.255.255.0 > # gateway 10.0.1.1 > # > #auto xenbr3 > #iface xenbr3 inet static > # bridge_ports eth3 > # address 10.0.1.153 > # broadcast 10.0.1.255 > # netmask 255.255.255.0 > # gateway 10.0.1.1 > > # --- > > root@xen411dom0:/ftp/HVM# brctl show > bridge name bridge id STP enabled interfaces > xenbr0 8000.b499bac12736 no eth0 > eth2 > vif4.0 > vif5.0 > xenbr1 8000.b499bac12738 no eth1 > eth3 > vif5.1 > > root@xen411dom0:/ftp/HVM# xm list > Name ID Mem VCPUs State > Time(s) > Domain-0 0 1536 2 r----- > 527.2 > squeezehvm.born2b3.net 4 8192 4 -b---- > 14.9 > wheezyhvm.born2b3.net 5 8192 8 -b---- > 23.3 > > > Best regards, > Mark > > -- > ms@it-infrastrukturen.org >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Schneider
2011-Aug-28 17:56 UTC
Re: [Xen-users] Re: debian wheezy interface bonding (dom0) / xen 4.1.2*
Am 28.08.2011 12:18, schrieb Pasi Kärkkäinen:> On Sat, Aug 27, 2011 at 11:16:09PM +0200, Mark Schneider wrote: > >> Hello Pasi, >> >> Thank you for your hints due to my questions about interface bonding and >> xen HVMs. >> I have commented out the network-script line in /etc/xen/xend-config.sxp >> and tested a bit around (s. below): >> ### (network-script network-bridge) >> ### (network-script ''network-bridge netdev=bond0 antispoof=yes'') >> >> I have tried to use "bridge_ports bond0" and activated config for bond0 >> but it didn''t worked as I expected. *Would you expect that such >> "bond0-config" also should work?* >> >> > You should do one step at a time. > > First get the bond0 working without any Xen stuff. > When bond0 works from dom0, then add bond0 to the bridge. >Bond0 works already (without xen)>> Maybe you would like to put some parts of my config into your wiki >> xen-networking pages. >> >> >> auto xenbr0 >> iface xenbr0 inet static >> address 192.168.1.150 >> network 192.168.1.0 >> broadcast 192.168.1.255 >> netmask 255.255.255.0 >> gateway 192.168.1.1 >> bridge_ports eth0 eth2 >> #bridge_ports bond0 >> > This looks dangerous. Having both eth0 and eth2 in the same > bridge could cause a loop in the network! >I use Extreme switch cluster with sharing group for eth0 and eth2 (VLAN LAN1 ports 1:9 and 2:9) so there is no danger to get any loops as they act only with one MAC-address (s. below). The second entry is another VLAN (ICON) with ports 1:19 and 2.19. Slot-1 Stack.1 # show fdb Mac Vlan Age Flags Port / Virtual Port List ----------------------------------------------------------------------------- b4:99:ba:c1:27:36 LAN1(0010) 0034 d m 1:9 b4:99:ba:c1:27:38 ICON(0070) 0031 d m 1:19 The question is if e.g. setting with "bridge_ports bond1" should work for xen (like below)? # --- auto bond1 iface bond1 inet static slaves eth1 eth3 bond-mode active-backup #bond-mode 802.3ad bond-miimon 100 bond-downdelay 200 bond-updelay 200 auto xenbr1 iface xenbr1 inet static address 10.0.1.150 network 10.0.1.0 broadcast 10.0.1.255 netmask 255.255.255.0 gateway 10.0.1.1 #bridge_ports eth1 eth3 bridge_ports bond1 # --- Thank you / regards, Mark> -- Pasi > > > >> #auto bond1 >> #iface bond1 inet static >> # address 10.0.1.150 >> # netmask 255.255.255.0 >> # network 10.0.1.0 >> # broadcast 10.0.1.255 >> # gateway 10.0.1.1 >> # slaves eth1 eth3 >> # bond-mode active-backup >> # #bond-mode 802.3ad >> # bond-miimon 100 >> # bond-downdelay 200 >> # bond-updelay 200 >> >> auto xenbr1 >> iface xenbr1 inet static >> address 10.0.1.150 >> network 10.0.1.0 >> broadcast 10.0.1.255 >> netmask 255.255.255.0 >> gateway 10.0.1.1 >> bridge_ports eth1 eth3 >> #bridge_ports bond1 >> >> >> #auto xenbr0 >> #iface xenbr0 inet static >> # bridge_ports eth0 eth2 >> # address 192.168.1.150 >> # broadcast 192.168.1.255 >> # netmask 255.255.255.0 >> # gateway 192.168.1.1 >> >> #auto xenbr1 >> #iface xenbr1 inet static >> # bridge_ports eth1 >> # address 192.168.1.151 >> # broadcast 192.168.1.255 >> # netmask 255.255.255.0 >> # gateway 192.168.1.1 >> # >> #auto xenbr2 >> #iface xenbr2 inet static >> # bridge_ports eth2 >> # address 10.0.1.152 >> # broadcast 10.0.1.255 >> # netmask 255.255.255.0 >> # gateway 10.0.1.1 >> # >> #auto xenbr3 >> #iface xenbr3 inet static >> # bridge_ports eth3 >> # address 10.0.1.153 >> # broadcast 10.0.1.255 >> # netmask 255.255.255.0 >> # gateway 10.0.1.1 >> >> # --- >> >> root@xen411dom0:/ftp/HVM# brctl show >> bridge name bridge id STP enabled interfaces >> xenbr0 8000.b499bac12736 no eth0 >> eth2 >> vif4.0 >> vif5.0 >> xenbr1 8000.b499bac12738 no eth1 >> eth3 >> vif5.1 >> >> root@xen411dom0:/ftp/HVM# xm list >> Name ID Mem VCPUs State >> Time(s) >> Domain-0 0 1536 2 r----- >> 527.2 >> squeezehvm.born2b3.net 4 8192 4 -b---- >> 14.9 >> wheezyhvm.born2b3.net 5 8192 8 -b---- >> 23.3 >> >> >> Best regards, >> Mark >> >> -- >> ms@it-infrastrukturen.org >> >> > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >-- ms@it-infrastrukturen.org _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Peter Viskup
2011-Aug-28 21:14 UTC
Re: [Xen-users] Re: debian wheezy interface bonding (dom0) / xen 4.1.2*
Good news for you Mark!
It is working and we are using that on our Debian Lenny/Squeeze servers:
auto xenin
iface xenin inet static
bridge_ports bond1
bridge_stp no
address 192.168.0.254
netmask 255.255.255.0
skupko@server1:~$ ip link show xenin
12: xenin: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UNKNOWN
link/ether 00:1b:21:57:72:96 brd ff:ff:ff:ff:ff:ff
skupko@server1:~$ ip addr show xenin
12: xenin: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UNKNOWN
link/ether 00:1b:21:57:72:96 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.254/24 brd 192.168.0.255 scope global xenin
inet6 fe80::21b:21ff:fe57:7296/64 scope link
valid_lft forever preferred_lft forever
Best regards,
--
Peter Viskup
On 08/28/2011 07:56 PM, Mark Schneider wrote:> The question is if e.g. setting with "bridge_ports bond1" should
work
> for xen (like below)?
>
> # ---
> auto bond1
> iface bond1 inet static
> slaves eth1 eth3
> bond-mode active-backup
> #bond-mode 802.3ad
> bond-miimon 100
> bond-downdelay 200
> bond-updelay 200
>
> auto xenbr1
> iface xenbr1 inet static
> address 10.0.1.150
> network 10.0.1.0
> broadcast 10.0.1.255
> netmask 255.255.255.0
> gateway 10.0.1.1
> #bridge_ports eth1 eth3
> bridge_ports bond1
> # ---
>
> Thank you / regards, Mark
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Dmitriy Sirant
2011-Aug-29 07:03 UTC
Re: [Xen-users] debian wheezy interface bonding (dom0) / xen 4.1.2*
Here my working config from Debian Squeezy, but it''s also support
vlans.
auto eth0
iface eth0 inet manual
auto eth1
iface eth1 inet manual
auto bond0
iface bond0 inet manual
slaves eth0 eth1
bond_mode 802.3ad
bond_miimon 100
bond_downdelay 200
bond_updelay 200
pre-up /bin/ip link set eth0 mtu 9000
pre-up /bin/ip link set eth1 mtu 9000
up /bin/ip link set bond0 mtu 9000
auto vlan114
iface vlan114 inet manual
vlan_raw_device bond0
up /bin/ip link set vlan114 mtu 9000
auto br0
iface br0 inet static
bridge_ports bond0
address 192.168.132.250
netmask 255.255.255.0
network 192.168.132.0
# gateway 192.168.132.254
dns-nameservers 192.168.132.254
dns-search xxx.xxx
bridge_stp on
bridge_fd 0
up /bin/ip link set br0 mtu 9000
auto br114
iface br114 inet static
bridge_ports vlan114
address 193.xxx.xxx.xxx
netmask 255.255.255.xxx
network 193.xxx.xxx.xxx
gateway 193.xxx.xxx.xxx
dns-search xxx.xxx
bridge_stp on
bridge_fd 0
up /bin/ip link set br114 mtu 9000
After that in xen i use:
vif = [
''model=e1000,mac=00:16:3E:CA:75:9C,bridge=br0'',''model=e1000,mac=00:16:3E:CA:75:9D,bridge=br114''
]
br0 for local lan and br114 for external wan.
--
With best regards,
Dmitriy Sirant
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Mark Schneider
2011-Aug-29 19:49 UTC
Re: [Xen-users] Re: debian wheezy interface bonding (dom0) / xen4.1.2*
Am 28.08.2011 23:14, schrieb Peter Viskup:> Good news for you Mark! > It is working and we are using that on our Debian Lenny/Squeeze servers: > > auto xenin > iface xenin inet static > bridge_ports bond1 > bridge_stp no > address 192.168.0.254 > netmask 255.255.255.0 > > skupko@server1:~$ ip link show xenin > 12: xenin: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue > state UNKNOWN > link/ether 00:1b:21:57:72:96 brd ff:ff:ff:ff:ff:ff > skupko@server1:~$ ip addr show xenin > 12: xenin: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue > state UNKNOWN > link/ether 00:1b:21:57:72:96 brd ff:ff:ff:ff:ff:ff > inet 192.168.0.254/24 brd 192.168.0.255 scope global xenin > inet6 fe80::21b:21ff:fe57:7296/64 scope link > valid_lft forever preferred_lft forever > > Best regards, > -- > Peter Viskup > > On 08/28/2011 07:56 PM, Mark Schneider wrote: >> The question is if e.g. setting with "bridge_ports bond1" should work >> for xen (like below)? >> >> # --- >> auto bond1 >> iface bond1 inet static >> slaves eth1 eth3 >> bond-mode active-backup >> #bond-mode 802.3ad >> bond-miimon 100 >> bond-downdelay 200 >> bond-updelay 200 >> >> auto xenbr1 >> iface xenbr1 inet static >> address 10.0.1.150 >> network 10.0.1.0 >> broadcast 10.0.1.255 >> netmask 255.255.255.0 >> gateway 10.0.1.1 >> #bridge_ports eth1 eth3 >> bridge_ports bond1 >> # ---Thanks a lot Peter and Pasi for your kindly hints. I have tested some configs for debian wheezy and figured the following working one out (s. below). Best regards, Mark # --- #root@xen411dom0:/etc/xen# sed -n ''/^[^#]/p'' /etc/network/interfaces auto lo iface lo inet loopback auto bond0 iface bond0 inet static address 192.168.1.150 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 #gateway 192.168.1.1 slaves eth0 eth2 bond-mode active-backup bond-miimon 100 bond-downdelay 200 bond-updelay 200 auto xenbr0 iface xenbr0 inet static bridge_ports bond0 bridge_stp no address 192.168.1.150 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 #gateway 192.168.1.1 #bridge_ports eth0 eth2 auto bond1 iface bond1 inet static address 10.0.1.150 netmask 255.255.255.0 network 10.0.1.0 broadcast 10.0.1.255 #gateway 10.0.1.1 slaves eth1 eth3 bond-mode active-backup #bond-mode 802.3ad bond-miimon 100 bond-downdelay 200 bond-updelay 200 auto xenbr1 iface xenbr1 inet static bridge_ports bond1 address 10.0.1.150 network 10.0.1.0 broadcast 10.0.1.255 netmask 255.255.255.0 #gateway 10.0.1.1 #bridge_ports eth1 eth3 ## # To bridge network traffic, like this: # # dom0: ----------------- bridge -> real eth0 -> the network # | # domU: fake eth0 -> vifN.0 -+ # # use # # (network-script network-bridge) # # Your default ethernet device is used as the outgoing interface, by default. # To use a different one (e.g. eth1) use # # (network-script ''network-bridge netdev=eth1'') # # The bridge is named xenbr0, by default. To rename the bridge, use # # (network-script ''network-bridge bridge=<name>'') # # It is possible to use the network-bridge script in more complicated # scenarios, such as having two outgoing interfaces, with two bridges, and # two fake interfaces per guest domain. To do things like this, write # yourself a wrapper script, and call network-bridge from it, as appropriate. # ### (network-script network-bridge) ### (network-script ''network-bridge netdev=bond0 antispoof=yes'') ### (network-script ''network-bridge antispoof=yes'') ### (network-script ''network-bridge bridge=xenbr0 netdev=bond0 antispoof=yes'') ### (network-script ''network-bridge bridge=xenbr0 antispoof=yes'') root@xen411dom0:/etc/xen# brctl show bridge name bridge id STP enabled interfaces xenbr0 8000.b499bac12736 no bond0 vif2.0 xenbr1 8000.b499bac12738 no bond1 vif2.1 Slot-1 Stack.1 # show fdb Mac Vlan Age Flags Port / Virtual Port List ----------------------------------------------------------------------------- b4:99:ba:c1:27:36 LAN1(0010) 0028 d m 1:9 b4:99:ba:c1:27:38 ICON(0070) 0089 d m 1:19 root@xen411dom0:/etc/xen# grep "^vif" hvm-squeeze.born2b3.net.cfg vif = [''bridge=xenbr0,model=e1000,mac=00:16:3E:27:07:67'',''bridge=xenbr1,model=e1000,mac=00:16:3E:07:07:67''] root@squeezehvm:~# ip addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:16:3e:27:07:67 brd ff:ff:ff:ff:ff:ff inet 192.168.1.175/24 brd 192.168.1.255 scope global eth0 inet6 fe80::216:3eff:fe27:767/64 scope link valid_lft forever preferred_lft forever 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:16:3e:07:07:67 brd ff:ff:ff:ff:ff:ff inet 10.0.1.175/24 brd 10.0.1.255 scope global eth1 inet6 fe80::216:3eff:fe07:767/64 scope link valid_lft forever preferred_lft forever -- ms@it-infrastrukturen.org _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users