BackupGGCode / wl500g

ASUS WL-5xx RT-N1x Oleg's based custom firmware
0 stars 0 forks source link

Different work of VLANs before and after reboot #393

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have two VLANs from provider: untagged (internet + multicast) and tagged vlan 
231 with DHCP and middleware form STB.

What steps will reproduce the problem?
1. In ip config of GUI choose STB-port 4.
2. Enter robocfg vlan 231 ports "0t 1 8t" in console. If this command not 
entered, then STB can't get IP address (but multicast will be work).
3. Enter nvram commit in console (i don't sure that is necessary, but this 
command usually save NVRAM configuration :) ).

Before router reboot: STB reboot succesfull, all works normally.
Robocfg output:
[admin@domik root]$ robocfg show
Switch: enabled gigabit
Port 0:  100FD enabled stp: none vlan: 2 jumbo: off mac: 00:1b:d5:37:43:55
Port 1:  100FD enabled stp: none vlan: 231 jumbo: off mac: 00:1a:79:08:51:e7
Port 2:   DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
Port 3: 1000FD enabled stp: none vlan: 1 jumbo: off mac: 1c:6f:65:ab:61:c8
Port 4:  100FD enabled stp: none vlan: 1 jumbo: off mac: 18:8e:d5:4a:52:05
Port 8: 1000FD enabled stp: none vlan: 1 jumbo: off mac: bc:ae:c5:c3:78:75
VLANs: BCM53115 enabled mac_check mac_hash
   1: vlan1: 2 3 4 8t
   2: vlan2: 0 1 8t
 231: vlan231: 0t 1 8t

After router reboot: 
STB can't get IP address.
robocfg output the same as was:

[admin@domik root]$ robocfg show
Switch: enabled gigabit
Port 0:  100FD enabled stp: none vlan: 2 jumbo: off mac: 00:1b:d5:37:43:55
Port 1:  100FD enabled stp: none vlan: 231 jumbo: off mac: 00:1a:79:08:51:e7
Port 2:   DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
Port 3: 1000FD enabled stp: none vlan: 1 jumbo: off mac: 1c:6f:65:ab:61:c8
Port 4:  100FD enabled stp: none vlan: 1 jumbo: off mac: 18:8e:d5:4a:52:05
Port 8: 1000FD enabled stp: none vlan: 1 jumbo: off mac: bc:ae:c5:c3:78:75
VLANs: BCM53115 enabled mac_check mac_hash
   1: vlan1: 2 3 4 8t
   2: vlan2: 0 1 8t
 231: vlan231: 0t 1 8t

After entering robocfg vlan 231 ports "0t 1 8t" in command line all works 
normally again.

Version of firmware: not last, RT-N16-1.9.2.7-rtn-r4923.trx

I find workaround: startup script execute robocfg after reboot, but i think 
that it not right. Thank you.

Original issue reported on code.google.com by kolu...@gmail.com on 30 Apr 2013 at 2:32

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
according your desc, internet has no deals with stb vlan, so it's not worth to 
add 1st port to 231 vlan, so suggested scheme is like below:
vlan1: 2 3 4 8t
vlan2: 0 8t
vlan231: 0t 1 8t

via nvram you can only configure 0-15 vlans (nvram show | grep '^vlan[0-9].*=' 
| sort). so the only way at the moment is to make /usr/local/sbin/port-boot 
script with robocfg call at the moment the only

Original comment by themiron.ru on 30 Apr 2013 at 6:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yes, i'm use /usr/local/sbin/post-boot. But untagged vlan also need for STB 
because IGMP traffic there.

Thank you.

Original comment by kolu...@gmail.com on 30 Apr 2013 at 6:55

GoogleCodeExporter commented 9 years ago
or, here's another solution, add 224 as vlan tag shift, vlan2 (wan of rt-n16) 
became vlan226, vlan1 (lan of rt-n16) - vlan225, and vlan7 - vlan231 as the 
goal.
select stb port in web ui and make nvram changes:

nvram set vlan0tag=224
nvram set vlan7hwname=et0
nvram set vlan7ports="0t 1" (pass vlan231 to LAN4 port only, not to cpu)
nvram set wandevs=vlan226
nvram set wan_ifname=vlan226
nvram set wan_ifnames=vlan226
nvram set landevs="vlan225 wl0"
nvram set lan_ifnames="vlan225 eth1"
nvram commit

after reboot you should get the following without robocfg call.
vlan225: 2 3 4 8t
vlan226: 0 1 8t
vlan231: 0t 1

Original comment by themiron.ru on 1 May 2013 at 10:33

GoogleCodeExporter commented 9 years ago
Wow...
Thank you.
But instead you example i've got next output from robocfg:
   1: vlan1: 2 3 4 8u
   2: vlan2: 0 1 8u
   7: vlan7: 0 1
 225: vlan225: 2 3 4 8t
 226: vlan226: 0 1 8t
 231: vlan231: 0t 1

All works normally, but seems like miracle )))

Original comment by kolu...@gmail.com on 2 May 2013 at 4:42