<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Hi folks,
<div><br>
</div>
<div>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, <a href="https://dev.openwrt.org/ticket/12377">https://dev.openwrt.org/ticket/12377</a>
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?</div>
<div><br>
</div>
<div>On my install this is the diff that makes it actually work:</div>
<div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">--- network.orig<span class="Apple-tab-span" style="white-space:pre">
</span>2014-09-23 15:57:21.000000000 +0100</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">+++ network<span class="Apple-tab-span" style="white-space:pre">
</span>2014-09-23 15:58:43.000000000 +0100</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">@@ -9,7 +9,7 @@</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> <span class="Apple-tab-span" style="white-space:pre">
</span>option ula_prefix 'fdeb:2d45:922d::/48'</div>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"> <br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> config interface 'lan'</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">-<span class="Apple-tab-span" style="white-space:pre">
</span>option ifname 'eth1'</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">+<span class="Apple-tab-span" style="white-space:pre">
</span>option ifname 'eth1.1'</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> <span class="Apple-tab-span" style="white-space:pre">
</span>option force_link '1'</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> <span class="Apple-tab-span" style="white-space:pre">
</span>option type 'bridge'</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> <span class="Apple-tab-span" style="white-space:pre">
</span>option proto 'static'</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">@@ -36,5 +36,5 @@</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> config switch_vlan</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> <span class="Apple-tab-span" style="white-space:pre">
</span>option device 'switch0'</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> <span class="Apple-tab-span" style="white-space:pre">
</span>option vlan '1'</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">-<span class="Apple-tab-span" style="white-space:pre">
</span>option ports '0 1 2 3 4'</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">+<span class="Apple-tab-span" style="white-space:pre">
</span>option ports '0t 1 2 3 4'</div>
</div>
<div><br>
</div>
<div>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?</div>
<div><br>
</div>
<div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">The file /target/linux/ar71xx/base-files/etc/uci-defaults/02_network</div>
</div>
<div><br>
</div>
<div>currently is:</div>
<div><br>
</div>
<div>
<div>wnr2000-v3 |\</div>
<div>wnr2200 |\</div>
<div>wnr612-v2)</div>
<div> ucidef_set_interfaces_lan_wan "eth1" "eth0"</div>
<div> ucidef_add_switch "switch0" "1" "1"</div>
<div> ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"</div>
<div> ;;</div>
<div><br>
</div>
</div>
<div>and for my Netgear WNR2200 it now needs:</div>
<div><br>
</div>
<div>
<div>wnr2000-v3 |\</div>
<div>wnr612-v2)</div>
<div> ucidef_set_interfaces_lan_wan "eth1" "eth0"</div>
<div> ucidef_add_switch "switch0" "1" "1"</div>
<div> ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"</div>
<div> ;;</div>
</div>
<div><br>
</div>
<div>
<div>wnr2200 )</div>
<div> ucidef_set_interfaces_lan_wan "eth1" "eth0"</div>
<div> ucidef_add_switch "switch0" "1" "1"</div>
<div> ucidef_add_switch_vlan "switch0" "1" "0t 1 2 3 4"</div>
<div> ;;</div>
</div>
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>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?</div>
<div> </div>
<div>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.</div>
<div><br>
<div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
— </div>
<br class="Apple-interchange-newline">
Urs Rau</div>
<div apple-content-edited="true"><br class="Apple-interchange-newline">
<hr style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<font face="Arial" color="Gray" size="1" style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Operation
Mobilisation (OM) - a company limited by guarantee - The Quinta, Weston Rhyn, Oswestry, SY10 7LT, United Kingdom<br>
Company reg no: 2564320 (England & Wales) - Charity reg. no: 1008196 (England & Wales) - SC040988 (Scotland)<br>
Web: <a href="http://www.uk.om.org">http://www.uk.om.org</a></font> </div>
<br>
</div>
</body>
</html>