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
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.