How do you properly configure vlan bridges on RHEL5 or OEL5?

I've tried the following network-scripts, but no packets are recieved on the bridge. If I add an ip address to vlan60 I'm unable to reach the gateway for that subnet.

If I add the same address to eth0.60 it works fine.

I also notice that vlan60 has hardware address 00:00:00:00:00:00. Shouldnt the bridge inherit the hardware address of the physical controller/vlan interface?

What am I missing?

/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes

/etc/sysconfig/network-scripts/ifcfg-eth0.60

DEVICE=eth0.60
BOOTPROTO=none
ONBOOT=yes
VLAN=yes
TYPE=Ethernet
Bridge=vlan60 <-- This one should be BRIDGE=vlan60

/etc/sysconfig/network-scripts/ifcfg-vlan60

DEVICE=vlan60
BOOTPROTO=none
ONBOOT=yes
TYPE=Bridge

Here's the output from ifconfig, notice the 0 RX packets and the empty hardware address:

[root@hydrogen]# ifconfig vlan60
vlan60    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:69 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:8512 (8.3 KiB)

[root@hydrogen]# ifconfig eth0.60
eth0.60   Link encap:Ethernet  HWaddr 00:26:12:FB:80:0D
          inet addr:192.168.0.201  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8616 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11472 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:546437 (533.6 KiB)  TX bytes:2283066 (2.1 MiB)

Update:

[root@hydrogen network-scripts]# brctl show
bridge name     bridge id               STP enabled     interfaces
vlan60          8000.000000000000       no
link|improve this question

Gee I wish one could downvote comments. Juliano, you're just plain wrong. Roy, output of brctl show would be handy, as well as the ip addr list output when it's not working (as opposed to when it is, as you've shown here) – womble Nov 22 '09 at 17:50
Thanks womble, that was very polite of you. I deleted the comment, if that was bothering you so much. – Juliano Nov 22 '09 at 18:25
What, you want some sort of kudos for posting factually incorrect information? – womble Nov 22 '09 at 18:37
Good suggestion, Womble. I found the problem after going through the actual bridge configuration. – Roy Nov 22 '09 at 18:41
1  
It is factually incorrect that a bridge with a single interface has very little use? Please, provide the source of your "facts". My source is the three first paragraphs of 'man brctl'. You are too full of yourself. Next time, you can just say "I disagree because of..." than "you're just plain wrong" without giving an explanation. – Juliano Nov 22 '09 at 18:56
show 3 more comments
feedback

1 Answer

up vote 1 down vote accepted

The output from brctl lists the bridge, but not the vlan interface (eth0.60)

Turns out the Bridge=vlan60 statement should have BRIDGE in all caps, while the TYPE=Bridge statement should be mixed case. Since I had the first one wrong, the vlan interface was simply never added to the bridge.

Solution: Change Bridge=vlan60 to BRIDGE=vlan60 in ifcfg-eth0.60 and bounce the interface.

[root@hydrogen]# brctl show
bridge name     bridge id               STP enabled     interfaces
vlan60          8000.002612fb800d       no              eth0.60
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.