1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Help setting up VLAN on ASUS RT-AC68U

Discussion in 'Asuswrt-Merlin' started by FalconB, Oct 14, 2018.

  1. bmb

    bmb Regular Contributor

    Joined:
    Mar 22, 2013
    Messages:
    61
    Here is the output...

    Code:
    [email protected]:/jffs/scripts# ./vlanswitch.sh 20 status verbose
    
            ***ERROR Cannot display status; VLAN 20 (or Bridge br20) not found
    
    [email protected]:/jffs/scripts#
    Any further tests I can try?
     
  2. Martineau

    Martineau Part of the Furniture

    Joined:
    Jul 8, 2012
    Messages:
    2,164
    Location:
    UK
    Well you could try the following again
    Code:
    ./vlanswitch.sh   20   2   autodnsmasq
    
    ./vlanswitch.sh   20   status   verbose
    
    robocfg   show
     
  3. bmb

    bmb Regular Contributor

    Joined:
    Mar 22, 2013
    Messages:
    61
    I've had a chance to run those commands, though without a VLAN device connected. I think I need to reconfigure the switch first as the main router I'm using has the main subnet and VLAN through one port, the RT87 splits them So I'll come back to testing with devices connected another time when I can free up a port on the switch, though looking at the output below seems like RT87 is properly configured

    Code:
    [email protected]:/jffs/scripts# ./vlanswitch.sh   20   2   autodnsmasq
    
    (vlanswitch.sh): 8891 v1.24 non-Public Beta © 2016-2018 Martineau. VLAN configuration utility.
    
    
    
            (vlanswitch.sh): 8891 VLAN 'vlan20' alias 'None20' (192.168.20.0/24) via Switch Port 2 created for downstream VLAN switch(s)
    
    
    [email protected]:/jffs/scripts# ./vlanswitch.sh   20   status   verbose
    
            v1.24 non-Public Beta VLAN Switch Port 2 Configuration Status:
    
    
            'None20' vlan20 Robocfg Status
            ==============================
       1: vlan1: 1 2t 3 5t 8t
      20: vlan20: 2t 8t
    
    
            'None20' vlan20 Bridge Status
            =============================
    
    
    
            'None20' vlan20 Status
            ======================
    vlan20    Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
              inet addr:192.168.20.1  Bcast:192.168.20.255  Mask:255.255.255.0
              inet6 addr: fe80::fa32:e4ff:fe77:6798/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:3822 (3.7 KiB)
    
              alias None20
    
    
            'None20' vlan20 Statistics
            ==========================
    vlan20  VID: 20  REORDER_HDR: 1  dev->priv_flags: 1
             total frames received            0
              total bytes received            0
          Broadcast/Multicast Rcvd            0
    
          total frames transmitted           27
           total bytes transmitted         3822
                total headroom inc            0
               total encap on xmit           27
    Device: eth0
    INGRESS priority mappings: 0:0  1:0  2:0  3:0  4:0  5:0  6:0 7:0
     EGRESS priority mappings:
    
                    Firewall rules
                    ==============
    Chain MyInput (1 references)
    num   pkts bytes target     prot opt in     out     source               destination
    1        0     0 ACCEPT     udp  --  vlan+  *       0.0.0.0/0            0.0.0.0/0            multiport dports 53,67
    2        0     0 ACCEPT     tcp  --  vlan+  *       0.0.0.0/0            0.0.0.0/0            tcp dpt:53
    3       13  1598 DROP       all  --  vlan+  *       0.0.0.0/0            0.0.0.0/0            state NEW
    
    Chain MyVLANs (1 references)
    num   pkts bytes target     prot opt in     out     source               destination
    3        0     0 DROP       all  --  br0    vlan+   0.0.0.0/0            0.0.0.0/0            state NEW
    4        0     0 DROP       all  --  vlan+  br0     0.0.0.0/0            0.0.0.0/0            state NEW
    5        0     0 ACCEPT     all  --  vlan+  *       0.0.0.0/0            0.0.0.0/0            state NEW
    
                    DNS VPN rules
                    =============
    
    
            'None20' vlan20 ACTIVE devices (ARP only accurate within 60secs?)
            =================================================================
    
    [email protected]:/jffs/scripts# robocfg   show
    Switch: enabled
    Port 0:   DOWN enabled stp: none vlan: 2 jumbo: off mac: 00:00:00:00:00:00
    Port 1:   DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
    Port 2:   DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
    Port 3:   DOWN enabled stp: none vlan: 1 jumbo: off mac: c8:xx:00:xx:fx:xx
    Port 4:   DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
    Port 5: 1000FD enabled stp: none vlan: 1 jumbo: off mac: c8:xx:00:xx:xx:xx
    Port 7: 1000FD enabled stp: none vlan: 1 jumbo: off mac: f8:32:e4:77:67:98
    Port 8: 1000FD enabled stp: none vlan: 1 jumbo: off mac: f8:32:e4:77:67:98
    VLANs: BCM5301x enabled mac_check mac_hash
       1: vlan1: 1 2t 3 5t 8t
      20: vlan20: 2t 8t
    1045: vlan1045: 1t 2 7t
    1046: vlan1046: 0t 2 3 5
    1047: vlan1047: 1t 2 4t 5 8u
    1099: vlan1099: 1t 2t 5 7 8u
    1100: vlan1100: 2t 3 8t
    1101: vlan1101: 1 4 5 7 8u
    1102: vlan1102: 0t 4 5
    1103: vlan1103: 1t 2t 3 7t 8u
    [email protected]:/jffs/scripts#
     
  4. Martineau

    Martineau Part of the Furniture

    Joined:
    Jul 8, 2012
    Messages:
    2,164
    Location:
    UK
    OK, just to clarify, your post #81 was a PEBCAK moment? :D

    Can you confirm
    Code:
    nvram get wan0_ifname
    I have updated the script as it may get the WAN interface name incorrect?
     
  5. bmb

    bmb Regular Contributor

    Joined:
    Mar 22, 2013
    Messages:
    61
    I'm not sure if its me or not, it could well be, though when I run that command again now I get this:

    Code:
    [email protected]:/jffs/scripts# ./vlanswitch.sh 20 status verbose
    
            ***ERROR Cannot display status; VLAN 20 (or Bridge br20) not found
    
    [email protected]:/jffs/scripts#
    No changes made, router has been powered up since last night, and if I now repeat your codes from post 82 I get the same results again as I did in post 83.

    Output of nvram get wan0_ifname:

    Code:
    [email protected]:/tmp/home/root# nvram get wan0_ifname
    usb0
     
  6. Martineau

    Martineau Part of the Furniture

    Joined:
    Jul 8, 2012
    Messages:
    2,164
    Location:
    UK
    OK as I suspected you must download v1.25 as WAN interface 'usb0' will be ignored.


    No it is probably the script :oops:, but no idea why is has worked but now it doesn't.:confused::confused:

    I suggest you try
    Code:
    ./vlanswitch.sh 20 del
    then download v1.25 then retry

    Code:
    ./vlanswitch.sh 20 2
    
    ./vlanswitch.sh 20 status verbose
    
     
  7. bmb

    bmb Regular Contributor

    Joined:
    Mar 22, 2013
    Messages:
    61
    I update to script v1.25 ran these commands and the router crashed and rebooted

    Code:
    [email protected]:/jffs/scripts# ./vlanswitch.sh   20   2   autodnsmasq
    
    (vlanswitch.sh): 2473 v1.25 non-Public Beta ? 2016-2018 Martineau. VLAN configuration                                       utility.
    
    
    
            (vlanswitch.sh): 2473 VLAN 'vlan20' alias 'None20' (192.168.20.0/24) via Switc                                      h Port 2 created for downstream VLAN switch(s)
    
    
    [email protected]:/jffs/scripts# ./vlanswitch.sh   20   status   verbose
    
            VLAN Switch Port 2 Configuration Status:
    
    
            'None20' vlan20 Robocfg Status
            ==============================
       1: vlan1: 1 2t 3 5t 8t
      20: vlan20: 2t 8t
    
    
            'None20' vlan20 Bridge Status
            =============================
    
    
    
            'None20' vlan20 Status
            ======================
    vlan20    Link encap:Ethernet  HWaddr F8:32:E4:77:67:98
              inet addr:192.168.20.1  Bcast:192.168.20.255  Mask:255.255.255.0
              inet6 addr: fe80::fa32:e4ff:fe77:6798/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:3896 (3.8 KiB)
    
              alias None20
    
    
            'None20' vlan20 Statistics
            ==========================
    vlan20  VID: 20  REORDER_HDR: 1  dev->priv_flags: 1
             total frames received            0
              total bytes received            0
          Broadcast/Multicast Rcvd            0
    
          total frames transmitted           28
           total bytes transmitted         3896
                total headroom inc            0
               total encap on xmit           28
    Device: eth0
    INGRESS priority mappings: 0:0  1:0  2:0  3:0  4:0  5:0  6:0 7:0
     EGRESS priority mappings:
    
                    Firewall rules
                    ==============
    Chain MyInput (1 references)
    num   pkts bytes target     prot opt in     out     source               destination                                       
    1        0     0 ACCEPT     udp  --  vlan+  *       0.0.0.0/0            0.0.0.0/0                                                  multiport dports 53,67
    2        0     0 ACCEPT     tcp  --  vlan+  *       0.0.0.0/0            0.0.0.0/0                                                  tcp dpt:53
    3        0     0 DROP       all  --  vlan+  *       0.0.0.0/0            0.0.0.0/0                                                  state NEW
    
    Chain MyVLANs (1 references)
    num   pkts bytes target     prot opt in     out     source               destination                                       
    3        0     0 DROP       all  --  br0    vlan+   0.0.0.0/0            0.0.0.0/0                                                  state NEW
    4        0     0 DROP       all  --  vlan+  br0     0.0.0.0/0            0.0.0.0/0                                                  state NEW
    5        0     0 ACCEPT     all  --  vlan+  *       0.0.0.0/0            0.0.0.0/0                                                  state NEW
    
                    DNS VPN rules
                    =============
    
    
            'None20' vlan20 ACTIVE devices (ARP only accurate within 60secs?)
            =================================================================
    
    [email protected]:/jffs/scripts#
    
     
  8. bmb

    bmb Regular Contributor

    Joined:
    Mar 22, 2013
    Messages:
    61
    Apologies I did the above before I saw your last post...I'll do as you suggested
     
  9. bmb

    bmb Regular Contributor

    Joined:
    Mar 22, 2013
    Messages:
    61
    I had already replaced the script with v1.25, (do I need to go back back to v.24 first?), so then ran these codes and it crashed and rebooted again.

    Code:
    [email protected]:/jffs/scripts# ./vlanswitch.sh 20 del
    
    (vlanswitch.sh): 24132 v1.25 non-Public Beta ? 2016-2018 Martineau. VLAN configuration utility.
    
            ***ERROR - Cannot delete; VLAN 20 (or Bridge br20) not found
    
    [email protected]:/jffs/scripts# ./vlanswitch.sh 20 2
    
    (vlanswitch.sh): 31458 v1.25 non-Public Beta ? 2016-2018 Martineau. VLAN configuration utility.
    
    
    
            (vlanswitch.sh): 31458 VLAN 'vlan20' alias 'None20' (192.168.20.0/24) via Switch Port 2 created for downstream VLAN switch(s)
    
    
    [email protected]:/jffs/scripts# ./vlanswitch.sh 20 status verbose
    
            VLAN Switch Port 2 Configuration Status:
    
    
            'None20' vlan20 Robocfg Status
            ==============================
       1: vlan1: 1 2t 3 5t 8t
      20: vlan20: 2t 8t
    
    
            'None20' vlan20 Bridge Status
            =============================
    
    
    
            'None20' vlan20 Status
            ======================
    vlan20    Link encap:Ethernet  HWaddr 7E:A3:D4:FB:75:9D
              inet addr:192.168.20.1  Bcast:192.168.20.255  Mask:255.255.255.0
              inet6 addr: fe80::7ca3:d4ff:fefb:759d/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:3822 (3.7 KiB)
    
              alias None20
    
    
            'None20' vlan20 Statistics
            ==========================
    vlan20  VID: 20  REORDER_HDR: 1  dev->priv_flags: 1
             total frames received            0
              total bytes received            0
          Broadcast/Multicast Rcvd            0
    
          total frames transmitted           27
           total bytes transmitted         3822
                total headroom inc            0
               total encap on xmit           27
    Device: usb0
    INGRESS priority mappings: 0:0  1:0  2:0  3:0  4:0  5:0  6:0 7:0
     EGRESS priority mappings:
    
                    Firewall rules
                    ==============
    Chain MyInput (1 references)
    num   pkts bytes target     prot opt in     out     source               destination
    1        0     0 ACCEPT     udp  --  vlan+  *       0.0.0.0/0            0.0.0.0/0            multiport dports 53,67
    2        0     0 ACCEPT     tcp  --  vlan+  *       0.0.0.0/0            0.0.0.0/0            tcp dpt:53
    3       12  1351 DROP       all  --  vlan+  *       0.0.0.0/0            0.0.0.0/0            state NEW
    
    Chain MyVLANs (1 references)
    num   pkts bytes target     prot opt in     out     source               destination
    3        0     0 DROP       all  --  br0    vlan+   0.0.0.0/0            0.0.0.0/0            state NEW
    4        0     0 DROP       all  --  vlan+  br0     0.0.0.0/0            0.0.0.0/0            state NEW
    5        0     0 ACCEPT     all  --  vlan+  *       0.0.0.0/0            0.0.0.0/0            state NEW
    
                    DNS VPN rules
                    =============
    
    
            'None20' vlan20 ACTIVE devices (ARP only accurate within 60secs?)
            =================================================================
    
    [email protected]:/jffs/scripts#
     
  10. bmb

    bmb Regular Contributor

    Joined:
    Mar 22, 2013
    Messages:
    61
    I think the first crash may have been with v1.24 but wasn't so obvious because I'm simply running this router as a test for USB WAN. So before making any more changes let me do a factory reset and start again
     
  11. bmb

    bmb Regular Contributor

    Joined:
    Mar 22, 2013
    Messages:
    61
    Following the factory reset, initialize, running v1.25 crashes the router almost straight away. Then after reboot I ran v1.24 and thought all was well, but after several mins (about 5mins), crashed again. I didn't know it was crashing before due to the longish delay after running the script.

    In view of this do you want to carry on testing?
     
  12. Martineau

    Martineau Part of the Furniture

    Joined:
    Jul 8, 2012
    Messages:
    2,164
    Location:
    UK
    Sorry for the inconvenience.:oops::oops:

    At least the one positive is that this explains the mysterious 'disappearing' VLAN :rolleyes:

    Furthermore this may also explain why there was no feedback from the previous RT-87U user given the apparent catastrophic impact on the router, which fortunately in this instance you are able to test on a spare unit.

    It is up to you to decide if it is worth attempting to continue.

    Without additional info i.e. is there anything meaningful in Syslog?, I'm not sure if there is anything that could help diagnose the crash.

    Both v1.24 and v1.25 attempt to create the tagged VLAN port based on the 'robocfg' output. So this would probably be the area where I would start to investigate.

    i.e. You would issue
    Code:
    robocfg show
    immediately after a clean reboot, then again after running v1.24 (not v.125) as this would give you time to enter the second command!

    So, usually the script would expect the WAN to be 'eth0/vlan2' but as your WAN is 'usb0' then this would be the second area I would suspect.

    So if you were to run the script without configuring the WAN as 'usb0' but leaving it to its default, it would be interesting to see if either/both scripts still crash the router?
     
  13. bmb

    bmb Regular Contributor

    Joined:
    Mar 22, 2013
    Messages:
    61
    Its OK, no real inconvenience to me, I didn't wish to take up any more of your time for what may be little gain to the community.

    Over the weekend I'll do as you suggest and see if you can spot anything of interest.
     
  14. Joel Bedard

    Joel Bedard New Around Here

    Joined:
    Dec 12, 2018
    Messages:
    1
    Hi.

    I would like to get a copy of those scripts for enabling vlans on my Asus RT-AC68U router with the latest Merlin firmware on it (384.8_2).

    Many thanks in advance!!

    Joel
     
  15. Toddimus

    Toddimus Occasional Visitor

    Joined:
    Oct 4, 2012
    Messages:
    44
    Location:
    Monterey Bay Area
    I'm interested as well. Looking to do some network re-mapping/organization and this seems like just the thing I might want to use.
     
  16. Martineau

    Martineau Part of the Furniture

    Joined:
    Jul 8, 2012
    Messages:
    2,164
    Location:
    UK
    Unfortunately the script will not work in your environment RT-AC86U Incompatibility

    Also the script cannot run in AP mode, however, forum member @bmb attempted to see if he could adapt/use the script on his RT-AC87U but seemingly failed i.e. RT-AC87U Crash and apparently gave up?
     
    Toddimus likes this.
  17. Toddimus

    Toddimus Occasional Visitor

    Joined:
    Oct 4, 2012
    Messages:
    44
    Location:
    Monterey Bay Area
    Ah, I see. Bummer! Thanks for the reply.
     
  18. bcastulo

    bcastulo New Around Here

    Joined:
    Dec 21, 2018
    Messages:
    1
    Hello,
    I would like to try running the scripts on an ASUS RT-AC5300 running Merlin 384.8_2.
    Let me know.
    Thanks in advance.
    Bobby
     
  19. Nighalefty

    Nighalefty New Around Here

    Joined:
    Dec 21, 2018
    Messages:
    1
    Location:
    Tejas
    I apologize but Im not sure if its proper to start a convo or to request it in the forum for the is my first time to ask anything but Id really appreciate it if I could receive your a copy of your vlan beta script? I have the the same scenerio twice, one on the RT- AC68U with a unmanaged switch with vlan tagging and a RT-AC66U_B1 with a unmanaged switch that does not support vlan tagging. I would like to try it on both because i want find the best one to run my vpn on with a couple of clients with Division and Entware installed one to host all iot and run just Entware, both have Merlin F/W 384.8_2. not sure which ones better at each job. It looks to be what i've been looking for myself. Any advice/tips would be greatly appreciated as well.:confused:
     
  20. Dibun

    Dibun New Around Here

    Joined:
    Mar 28, 2019
    Messages:
    2
    Can you send me your script?

    Thanks in advance

     
    blinkenlights likes this.