Klaus Darilion
2013-Mar-29 15:02 UTC
Yet another networking script for Openvswitch and VLAN support
Hi! I had some hard times to get XEN 4.1 (Debian) working with Openvswitch (1.4.2). If found some references in the Internet, but none of them worked for me - so I hacked them myself, using the idea the of http://lists.xen.org/archives/html/xen-users/2011-08/msg00071.html. So, please find attached the network scripts. xen-network-common.sh: Originally I wanted to write a new script and configure in xend-config.sxp the new "vif-script". But this does nto work, as xen sometimes also calls the default vif-script, which of course fails (maybe because I use HVM). Thus I changed the default vif-script. qemu-ifup: This is necessary if you use HVM The scripts are capable of VLANs, this means, OVS is configured with the proper VLAN when adding an interface to the bridge. This is done by adding .vlantag to the bridge interface name, e.g.: vif = [ ''model=e1000,mac=00:16:3E:AA:BB:00,bridge=br0.627'' ] This will add the interface to br0 with VLAN 627. Note: My scripts will not try to fix the network setup when it is broken. Thus, the basic network setup has to be done outside of XEN with OS means. regards Klaus _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Klaus Darilion
2013-Mar-29 15:41 UTC
Re: Yet another networking script for Openvswitch and VLAN support
Ups. There was a typo in xen-network-common.sh. Please use these scripts. regards Klaus On 29.03.2013 16:02, Klaus Darilion wrote:> Hi! > > I had some hard times to get XEN 4.1 (Debian) working with Openvswitch > (1.4.2). If found some references in the Internet, but none of them > worked for me - so I hacked them myself, using the idea the of > http://lists.xen.org/archives/html/xen-users/2011-08/msg00071.html. > > So, please find attached the network scripts. > > xen-network-common.sh: Originally I wanted to write a new script and > configure in xend-config.sxp the new "vif-script". But this does nto > work, as xen sometimes also calls the default vif-script, which of > course fails (maybe because I use HVM). Thus I changed the default > vif-script. > > qemu-ifup: This is necessary if you use HVM > > The scripts are capable of VLANs, this means, OVS is configured with the > proper VLAN when adding an interface to the bridge. This is done by > adding .vlantag to the bridge interface name, e.g.: > > vif = [ ''model=e1000,mac=00:16:3E:AA:BB:00,bridge=br0.627'' ] > > This will add the interface to br0 with VLAN 627. > > Note: My scripts will not try to fix the network setup when it is > broken. Thus, the basic network setup has to be done outside of XEN with > OS means. > > regards > Klaus > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
jacek burghardt
2013-Mar-29 18:20 UTC
Re: Yet another networking script for Openvswitch and VLAN support
This looks interesting. I wonder how tap interface gets attached and detached with your script? Are you using openvswich in bridged emulation mode it seems that is no longer supported by openvswitch ? what is your network configuration for hvm ? _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Klaus Darilion
2013-Apr-09 09:38 UTC
Re: Yet another networking script for Openvswitch and VLAN support
On 29.03.2013 19:20, jacek burghardt wrote:> This looks interesting. I wonder how tap interface gets attached and > detached with your script?What do you mean with "tap" interfaces? The "normal" vif interfaces created by xen or something different?> Are you using openvswich in bridged emulation mode it seems that is no > longer supported by openvswitch ?No. I use "ovsctrl" to configure the bridge. Using "brctl" with ovs compatibility module wouldn''t allow you to set the VLANs.> what is your network configuration for hvm ?# we have 2 NICs. e1000 works fine, the # default (RealtekXXXX) had problems. vif = [ ''model=e1000,mac=00:16:3E:AA:BB:00,bridge=br1'',''model=e1000,mac=00:16:3E:AA:BB:01,bridge=br0'' ] regards Klaus
Klaus Darilion
2013-Apr-09 12:02 UTC
Re: Yet another networking script for Openvswitch and VLAN support
On 09.04.2013 11:38, Klaus Darilion wrote:> > > On 29.03.2013 19:20, jacek burghardt wrote: >> This looks interesting. I wonder how tap interface gets attached and >> detached with your script? > > What do you mean with "tap" interfaces? The "normal" vif interfaces > created by xen or something different? > >> Are you using openvswich in bridged emulation mode it seems that is no >> longer supported by openvswitch ? > > No. I use "ovsctrl" to configure the bridge. Using "brctl" with ovs > compatibility module wouldn''t allow you to set the VLANs.Of course it is "ovs-vsctl". not "ovsctrl".> >> what is your network configuration for hvm ? > > # we have 2 NICs. e1000 works fine, the > # default (RealtekXXXX) had problems. > vif = [ > ''model=e1000,mac=00:16:3E:AA:BB:00,bridge=br1'',''model=e1000,mac=00:16:3E:AA:BB:01,bridge=br0'' > ]Sorry, above config is an HVM with standard Linux bridge (2 bridges). The HVM config for a single bridge with VLAN tagged ports (using ovs) is: # we have 2 NICs. e1000 works fine, the # default (RealtekXXXX) had problems. vif = [ ''model=e1000,mac=00:16:3E:AA:BB:00,bridge=br0.627'',''model=e1000,mac=00:16:3E:AA:BB:01,bridge=br0.71'' ] Klaus