Bug 750542

Summary: Error in creating vlan tagged bridge
Product: [Community] Virtualization Tools Reporter: Stanislav Petr <glux>
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: crobinso, dallan, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-23 13:09:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Stanislav Petr 2011-11-01 14:44:06 UTC
Whet i try o create v vlan tagged bridge with command:

virsh iface-define interface-vbr102

adn with interface-vbr file:
<interface type='bridge' name='vbr102'>
  <start mode='onboot'/>
  <mtu size='1500'/>
  <bridge stp='off' delay='0'>
    <interface type='ethernet' name='eth0.102'>
      <start mode='onboot'/>
      <vlan tag='102'>
        <interface name='eth0'/>
      </vlan>
    </interface>
  </bridge>
</interface>

then is /etc/sysconfig/network-scripts/ifcfg-eth0.102 created with content:
DEVICE=eth0.102
BOOTPROTO=none
ONBOOT=yes

But expected result is
DEVICE=eth0.102
BOOTPROTO=none
ONBOOT=yes
VLAN=yes   # (This line i missing!!!).

Comment 1 Stanislav Petr 2011-11-01 14:48:20 UTC
Sorry, fix:

/etc/sysconfig/network-scripts-ifcfg-eth0.102 is created with content:
DEVICE=eth0.102
ONBOOT=yes
MTU=1500
BRIDGE=vbr102

but expected is:
DEVICE=eth0.102
ONBOOT=yes
MTU=1500
BRIDGE=vbr102
VLAN=yes # (This line i missing!!!).

Comment 2 Peter Krempa 2012-03-08 14:28:31 UTC
If you set your interface type to "bridge" libvirt does not parse the VLAN definitions. I'll look into it if we can fix this somehow.

Comment 3 Peter Krempa 2012-04-23 13:09:05 UTC
The XML file of the network you provided in the bug description is not quite right:

You're specifying that the eth0.102 is of type "ethernet" which causes netcf to ignore the vlan definition. You need to specify that eth0.102 is of type vlan and is built upon eth0. You can see this in action in  the example xml file for netcf ( http://git.fedorahosted.org/git/?p=netcf.git;a=blob;f=tests/interface/bridge-vlan.xml;hb=HEAD ).

With this configuration the VLAN=yes option gets configured correctly:
DEVICE=eth0.42
VLAN=yes
ONBOOT=yes
BRIDGE=br0

I'm closing this as NOTABUG as libvirt actualy does not touch the XML file while being send to netcf.