[OpenWrt-Devel] fixed VLAN vid 1 (lan) default for Netgear WNR2200 - how do I get this into the devel trunk?

Urs Rau (UK) urs.rau at om.org
Tue Sep 23 12:00:16 EDT 2014

Hi folks,

I had tried actually using VLANs on a Netgear WNR2200 using current daily snapshots and every time I saved and applied the settings I would loose all access. So I started googling and found the following post, https://dev.openwrt.org/ticket/12377 which helped me find what was the cause and I fixed it for my own install of the WNR2200. But it would sure be nice to have the fix go into the devel trunk, so I don’t have to keep doing this manually. And I suspect there are a lot of other routers that have the same logic error in their default /etc/config/network files?

On my install this is the diff that makes it actually work:
--- network.orig 2014-09-23 15:57:21.000000000 +0100
+++ network 2014-09-23 15:58:43.000000000 +0100
@@ -9,7 +9,7 @@
  option ula_prefix 'fdeb:2d45:922d::/48'

 config interface 'lan'
- option ifname 'eth1'
+ option ifname 'eth1.1'
  option force_link '1'
  option type 'bridge'
  option proto 'static'
@@ -36,5 +36,5 @@
 config switch_vlan
  option device 'switch0'
  option vlan '1'
- option ports '0 1 2 3 4'
+ option ports '0t 1 2 3 4'

I have looked at the src using git and think I would need to do the following below, but am not sure how I would be able to get it to change eth1 to eth1.1 for the lan interface by default?

The file /target/linux/ar71xx/base-files/etc/uci-defaults/02_network

currently is:

wnr2000-v3 |\
wnr2200 |\
        ucidef_set_interfaces_lan_wan "eth1" "eth0"
        ucidef_add_switch "switch0" "1" "1"
        ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"

and for my Netgear WNR2200 it now needs:

wnr2000-v3 |\
        ucidef_set_interfaces_lan_wan "eth1" "eth0"
        ucidef_add_switch "switch0" "1" "1"
        ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"

wnr2200 )
        ucidef_set_interfaces_lan_wan "eth1" "eth0"
        ucidef_add_switch "switch0" "1" "1"
        ucidef_add_switch_vlan "switch0" "1" "0t 1 2 3 4"

BUT that does not add or change the option ifname from eth1 to eth1.1 for the default lan interface, plus some (or most?) of the others in this group might also benefit from the same modification.

Any suggestions on how to take this forward? And to get it fixed so the two changes, 1st the lan option ifname being set to eth1.1 and 2nd the switch0 gets VLAN 1 tagged on the CPU?

I will have a followup question, which I’ll post under another subject. I don’t understand why the wan port does not show up under the luck switch page and ‘as-is’ I can’t have my VLANs come in tagged on the WAN port? But I’ll explore that one separately, for now I’ll use lan port1 as my wan in the meantime and bring my tagged VLANs into the router using lan port1.


Urs Rau

Operation Mobilisation (OM) - a company limited by guarantee - The Quinta, Weston Rhyn, Oswestry, SY10 7LT, United Kingdom
Company reg no: 2564320 (England & Wales) - Charity reg. no: 1008196 (England & Wales) - SC040988 (Scotland)
Web: http://www.uk.om.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20140923/0a709635/attachment.htm>
-------------- next part --------------
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list