Here is the output...
Code:admins@RT-AC87U-6798:/jffs/scripts# ./vlanswitch.sh 20 status verbose ***ERROR Cannot display status; VLAN 20 (or Bridge br20) not found admins@RT-AC87U-6798:/jffs/scripts#
Any further tests I can try?
./vlanswitch.sh 20 2 autodnsmasq
./vlanswitch.sh 20 status verbose
robocfg show
admins@RT-AC87U-6798:/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)
admins@RT-AC87U-6798:/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?)
=================================================================
admins@RT-AC87U-6798:/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
admins@RT-AC87U-6798:/jffs/scripts#
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
nvram get wan0_ifname
admins@RT-AC87U-6798:/jffs/scripts# ./vlanswitch.sh 20 status verbose
***ERROR Cannot display status; VLAN 20 (or Bridge br20) not found
admins@RT-AC87U-6798:/jffs/scripts#
admins@RT-AC87U-6798:/tmp/home/root# nvram get wan0_ifname
usb0
Output of nvram get wan0_ifname:
Code:admins@RT-AC87U-6798:/tmp/home/root# nvram get wan0_ifname usb0
I'm not sure if its me or not, it could well be, though when I run that command again now I get this:
***ERROR Cannot display status; VLAN 20 (or Bridge br20) not found
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.
./vlanswitch.sh 20 del
./vlanswitch.sh 20 2
./vlanswitch.sh 20 status verbose
admins@RT-AC87U-6798:/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)
admins@RT-AC87U-6798:/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?)
=================================================================
admins@RT-AC87U-6798:/jffs/scripts#
admins@RT-AC87U-6798:/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
admins@RT-AC87U-6798:/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)
admins@RT-AC87U-6798:/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?)
=================================================================
admins@RT-AC87U-6798:/jffs/scripts#
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?
robocfg show
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.
Ah, I see. Bummer! Thanks for the reply.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?
I'm not sure what issues you faced with the various other scripts/commands posted on the forum, but if have the time and want to beta-test my script I can send you a link?
Code:#======================================================================================= © 2016-2018 Martineau 'Router-on-a-stick' v1.18 # # Configure RT-AC68U LAN Port X as VLAN Trunk for tagged VLAN nnn to downstream switch(s) on separate subnet using '/etc/dnsmasq.conf' or simply assign Port X to a separate subnet. # # # Usage: VLANSwitch ['help'|''-h''] | [ [''vlan_id''] [switch_port] ] # [ ['status' ['verbose'] ['diag'] ['del'['nvram']] ['vpn'[n]] ['vlanfw'] ['nodnsmasq'] ['autodnsmasq'] ['alias='vlan_alias] ['debug'] ['bridge'] ['tcqdisc'] # # VLANSwitch 200 # Switch port 4 will have vlan200 tagged to it # VLANSwitch 200 del # Switch port 4 will have vlan200 removed # VLANSwitch 50 status # Show the connected VLAN devices (or Bridge if VLAN is enslaved to one) # VLANSwitch 50 status verbose # Show the vlan configuration and statistics etc. # VLANSwitch 20 3 vpn2 # Switch port 3 will have vlan20 tagged to it and will be forced via the VPN Client 2 (on bridge br2) # and the alias will be taken from the VPN Client GUI 'description' if it exists (Firmware >v380.xx) # or will be taken from '/etc/iproute2/rt_tables' e.g. 'ovpnc2' # VLANSwitch 30 vpn1 vlanfw # Switch port 4 will have vlan30 tagged to it and will be forced via the VPN Client 1 (on bridge br1) # Firewall rules will explicitly use vlan30 rather than vlan+ # VLANSwitch 130 nodnsmasq # Switch port 4 will have vlan130 tagged to it, and vlan130 does not need to exist in /etc/dnsmasq.conf # VLANSwitch 150 autodnsmasq # Switch port 4 will have vlan150 tagged to it, and /jffs/configs/dnsmasq.conf.add will be modified # NOTE: dnsmasq will be auto-restarted. # VLANSwitch 10 1 bridge notag # Switch port 1 will ONLY be vlan10 (not a tagged port), and bridge br10 using vlan111 will be created. # This method is for environments without additional downstream VLAN capable switches # VLANSwitch 10 1 bridge notag del # Switch port 1 will have vlan10 removed, and bridge br10 will be deleted # VLANSwitch 10 1 bridge notag tcqdisc # Switch port 1 will ONLY be vlan10 (not a tagged port), and bridge br10 using vlan111 will be created and 'tc qdisc' will be added
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!