Modify

Opened 4 years ago

Last modified 3 years ago

#12377 new defect

VLAN tagging / bridge default configuration on WZR-HP-AG300H

Reported by: trick@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

I have a few of these routers and found that whenever I tried to set the CPU port (0) to tagged so I could create multiple VLANs, I lost access to VLAN 1: https://lists.openwrt.org/pipermail/openwrt-devel/2012-October/017142.html

After a lot of investigation and trying a lot of things, I found the problem is quite simple...the default bridge configuration for the lan interface uses eth0, not eth0.1:

config interface 'lan'
	option ifname 'eth0'
	option type 'bridge'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
config switch_vlan            
        option device 'eth0'  
        option vlan '1' 
        option ports '0 1 2 3 4' 
root@OpenWrt:~# brctl show
bridge name	bridge id		STP enabled	interfaces
br-lan		8000.4ce676c4cc86	no		eth0

To make it possible to use multiple VLANs, the fix is to change the lan interface to bind on eth0.1 and set port 0 to tagged:

config interface 'lan'
	option ifname 'eth0.1'
	option type 'bridge'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
config switch_vlan            
        option device 'eth0'  
        option vlan '1' 
        option ports '0t 1 2 3 4' 

It seems this question has been asked and answered before: https://forum.openwrt.org/viewtopic.php?pid=155341#p155341

The default configuration for this router should be changed so that users who want to use multiple VLANs can do so without having to figure this out.

Attached is a patch which fixes this for *just* the AG300H. Looking at the list, there are about 20 other routers with this same default configuration which could possibly benefit from this fix - but I would want someone to test them first:

ap121 |\
ap121-mini |\
ap96 |\
airrouter |\
dir-600-a1 |\
dir-615-c1 |\
dir-615-e4 |\
ja76pf |\
rb-750 |\
rb-751 |\
tew-632brp |\
tew-712br |\
tl-mr3220 |\
tl-mr3420 |\
tl-wr741nd |\
tl-wr741nd-v4 |\
tl-wr841n-v7 |\
whr-g301n |\
whr-hp-g300n |\
whr-hp-gn)

Attachments (1)

wzr-hp-ag300h-tagging-fix-20121026.patch (786 bytes) - added by trick@… 4 years ago.
default network config change for wzr-hp-ag300h

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by trick@…

default network config change for wzr-hp-ag300h

comment:1 Changed 4 years ago by Patrick van Staveren <trick@…>

Please note I haven't actually tested the patch end-to-end yet...trunk won't build at the moment and it's late here, so I'll bump this again tomorrow once it's tested. (There's probably a way for me to modify the default config on a live router and force it to re-evaluate...I will look into that trick another day.)

comment:2 Changed 3 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.