Bug 750542 - Error in creating vlan tagged bridge
Summary: Error in creating vlan tagged bridge
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Peter Krempa
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-01 14:44 UTC by Stanislav Petr
Modified: 2012-04-23 13:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-23 13:09:05 UTC


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.