Bug 507147 - 802.1q vlan interface not working when using xen kernel
802.1q vlan interface not working when using xen kernel
Status: CLOSED DUPLICATE of bug 514492
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen (Show other bugs)
5.3
All Linux
low Severity medium
: rc
: 5.6
Assigned To: Michal Novotny
Virtualization Bugs
:
Depends On:
Blocks: 514500
  Show dependency treegraph
 
Reported: 2009-06-21 05:08 EDT by Andreas Thienemann
Modified: 2014-02-02 17:37 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-18 07:55:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andreas Thienemann 2009-06-21 05:08:21 EDT
Description of problem:
The system in question is configured to setup a bridge called storage0 to bridge DomUs with the tagged vlan with the ID 60.

The network configuration looks as follows:

[root@king ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0.60 
DEVICE=eth0.60
PHYSDEV=eth0
BOOTPROTO=static
ONBOOT=yes
VLAN=yes
BRIDGE=storage0
[root@king ~]# cat /etc/sysconfig/network-scripts/ifcfg-storage0 
DEVICE=storage0
BOOTPROTO=static
IPADDR=172.16.4.100
NETMASK=255.255.254.0
ONBOOT=yes
TYPE=Bridge
[root@king ~]# 

After configuring the changes at runtime and calling service network restart, the network configuration looks as expected and works.
After bootup however the hosts on the network 172.16.4.0/23 are unreachable.

Analysis shows the following difference:


[root@king ~]# cat /proc/net/vlan/config 
VLAN Dev name    | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
eth0.60        | 60  | eth0
[root@king ~]# 

vs.

[root@king ~]# cat /proc/net/vlan/config
VLAN Dev name | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
eth0.60 | 60 | peth0
[root@king ~]# 

The working configuration configures the vlan with the underlying interface as eth0, the not working configuration after bootup uses peth0 as the underlying interface.

Version-Release number of selected component (if applicable):
initscripts-8.45.25-1.el5

How reproducible:
Always

Additional info:
A workaround is to have the vlan interface recreated:
ifdown eth0.60; rmmod 8021q; ifup eth0.60
Comment 1 Bill Nottingham 2009-06-22 12:55:10 EDT
I believe the xen scripts are rejiggering the network devices on startup, which is breaking them.b
Comment 4 Michal Novotny 2010-05-10 06:28:34 EDT
(In reply to comment #0)
> Description of problem:
> The system in question is configured to setup a bridge called storage0 to
> bridge DomUs with the tagged vlan with the ID 60.
> 
> The network configuration looks as follows:
> 
> [root@king ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0.60 
> DEVICE=eth0.60
> PHYSDEV=eth0
> BOOTPROTO=static
> ONBOOT=yes
> VLAN=yes
> BRIDGE=storage0

I used almost the same configuration (the same except I am having it connected to eth1 port instead of eth0).

> [root@king ~]# cat /etc/sysconfig/network-scripts/ifcfg-storage0 
> DEVICE=storage0
> BOOTPROTO=static
> IPADDR=172.16.4.100
> NETMASK=255.255.254.0
> ONBOOT=yes
> TYPE=Bridge

For that I did use DHCP:
DEVICE=br0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Bridge 

> [root@king ~]# 
> 
> After configuring the changes at runtime and calling service network restart,
> the network configuration looks as expected and works.

Well, I don't really know what setup are you having. According to presence of ifcfg-storage0 file in network-scripts you are having the bridge set up manually, right ? However, since you are writing about change of eth0 name to peth0 in /proc/net/vlan/config it seems you are using automatic network bridge creation in xend-config.sxp as well, could you please look for the '(network-script' entry in the /etc/xen/xend-config.sxp file?

If you want to use manual bridge setup (like you want to here according to presence of ifcfg-storage0 file) you have to disable automatic network bridge creation in xend-config file by setting "(network-script '/bin/true')" in the /etc/xen/xend-config.sxp configuration file instead of "(network-script 'network-bridge')" which is set by default.

> After bootup however the hosts on the network 172.16.4.0/23 are unreachable.
> 
> Analysis shows the following difference:
> 
> 
> [root@king ~]# cat /proc/net/vlan/config 
> VLAN Dev name    | VLAN ID
> Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
> eth0.60        | 60  | eth0
> [root@king ~]# 
> 
> vs.
> 
> [root@king ~]# cat /proc/net/vlan/config
> VLAN Dev name | VLAN ID
> Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
> eth0.60 | 60 | peth0
> [root@king ~]# 
> 

Like I wrote above this looks like you are having both xen automatic network bridge enabled and using the manual bridge setup. When I disabled the automatic network bridge creation as described above and used the configuration files for manual bridge and VLAN configuration it was working fine for me even to access the same subnet.

Since it looks like you are having the manual bridge setup done but the automatic network bridge creation for xen is enabled too (as it should not). Could you please try to change the "(network-script 'network-bridge')" line to "(network-script '/bin/true')" to disable the network bridge creation, reboot and try again?

Thanks a lot,
Michal
Comment 6 Andreas Thienemann 2010-05-31 08:45:03 EDT
Hmm. I checked. The system in question is indeed using the automatic bridging in addition to one manual bridge.

Let's try the fully manual step.
Comment 7 Michal Novotny 2010-05-31 09:25:35 EDT
(In reply to comment #6)
> Hmm. I checked. The system in question is indeed using the automatic bridging
> in addition to one manual bridge.
> 
> Let's try the fully manual step.    

Yeah, according to the scripts you've shared with us (ifcfg-storage0) you're using the manual bridge configuration. You can't be using both manual and automatic bridge configuration at the same time so please disable it and try rebooting your dom0.

Let me know the test results,
Michal
Comment 8 Michal Novotny 2010-06-04 06:39:23 EDT
Andreas, anything new with this one? Did you try the fully manual settings with no automatic bridge creation enabled?

Thanks,
Michal
Comment 9 Miroslav Rezanina 2010-08-18 07:55:22 EDT
This is duplicate of bz 514492. network-bridge script does not change vlan based on bridged interface. You can try fixed script attached to that bz, it should fix your problem.

*** This bug has been marked as a duplicate of bug 514492 ***

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