Hey all,
I use my AC68P as an AP, and I'm trying to get VLAN tagging working on it. I've had some success but I think I need some help to complete this.
I want router to have the following VLANs:
I can collapse the number of VLANs if it's recommended.
pfsense is handling the DCHP server for all the VLANs. A Csico switch sits inbetween pfsense and the ASUS router.
Success so far:
I was able to tag port 4 to VLAN 30 and successfully got an IP from pfsense.
Problems:
(1) I wanted the robocfg to persist after a reboot so I created the following script:
However the script never runs. 000services-started is never created.
I can execute the script manually with
I set permissions through winscp (0755) and my router has ' Enable JFFS custom scripts and configs ' checked.
EDIT: Fixed thanks to @ColinTaylor. I didn't realize you couldn't have .sh in the script names
(2) I never managed to get Wifi working. I can setup the bridges with the code below, but not sure where to proceed from there. Only the default WiFi works.
Resources I used:
I use my AC68P as an AP, and I'm trying to get VLAN tagging working on it. I've had some success but I think I need some help to complete this.
I want router to have the following VLANs:
VLAN | Physical Ports | Wireless |
1 (Default) | WAN, LAN1, LAN2, LAN3 | 2.4G / 5G |
20 | 2.4G / 5G | |
30 | LAN4 | 2.4G |
60 | 2.4G |
pfsense is handling the DCHP server for all the VLANs. A Csico switch sits inbetween pfsense and the ASUS router.
Success so far:
I was able to tag port 4 to VLAN 30 and successfully got an IP from pfsense.
Code:
# Remove Port 4 from Default LAN
robocfg vlan 1 ports "0 1 2 3 5t"
# Add Port 4 to VLAN30
robocfg vlan 30 ports "0t 4 5t"
Problems:
Code:
#!/bin/sh
# multi SSID with VLAN script for AC68P
# Trunk Port : WAN
# Ports 1 - 3: LAN (Untagged)
# Ports 4 : VLAN30
# Guest WiFi:
# wl0.1 - ASUS [Guest] : VLAN20
# wl0.2 - ASUS [IOT] : VLAN30
# wl0.3 - ASUS [Guest 2] : VLAN60
# wl1.1 - ASUS_5G [Guest] : VLAN20
sleep 10
robocfg vlan 1 ports "0 1 2 3 5t"
robocfg vlan 20 ports "0t 5t"
robocfg vlan 30 ports "0t 4 5t"
robocfg vlan 60 ports "0t 5t"
touch /tmp/000services-started
I can execute the script manually with
./service-start.sh
, so I don't think it's a syntax issue.I set permissions through winscp (0755) and my router has ' Enable JFFS custom scripts and configs ' checked.
EDIT: Fixed thanks to @ColinTaylor. I didn't realize you couldn't have .sh in the script names
Code:
#!/bin/sh
# multi SSID with VLAN script for AC68P
# Trunk Port : WAN
# Ports 1 - 3: LAN (Untagged)
# Ports 4 : VLAN30
# Guest WiFi:
# wl0.1 - ASUS [Guest] : VLAN20
# wl0.2 - ASUS [IOT] : VLAN30
# wl0.3 - ASUS [Guest 2] : VLAN60
# wl1.1 - ASUS_5G [Guest] : VLAN20
# eth0 - LAN
# eth1 - 2.4G Wifi
# eth2 - 5G Wifi
#VLAN Setup
robocfg vlan 1 ports "0 1 2 3 5t"
robocfg vlan 20 ports "0t 5t"
robocfg vlan 30 ports "0t 4 5t"
robocfg vlan 60 ports "0t 5t"
vconfig add eth0 20
vconfig add eth0 30
vconfig add eth0 60
ifconfig vlan20 up
ifconfig vlan30 up
ifconfig vlan60 up
# Remove Guest Networks from VLAN1
brctl delif br0 wl0.1
brctl delif br0 wl0.2
brctl delif br0 wl0.3
brctl delif br0 wl1.1
# Guest WiFi
brctl addbr br1
brctl addif br1 vlan20
brctl addif br1 wl0.1
brctl addif br1 wl1.1
ifconfig br1 192.168.20.3 netmask 255.255.255.0
ifconfig br1 up
# IoT WiFi
brctl addbr br2
brctl addif br2 vlan30
brctl addif br2 wl0.2
ifconfig br2 192.168.30.3 netmask 255.255.255.0
ifconfig br2 up
# Xiaomi WiFi
brctl addbr br3
brctl addif br3 vlan60
brctl addif br3 wl0.3
ifconfig br3 192.168.60.3 netmask 255.255.255.0
ifconfig br3 up
nvram set lan_ifnames="vlan1 eth1 eth2" # not sure what this line is for....
nvram set lan1_ifnames="vlan20 wl0.1 wl1.1"
nvram set lan1_ifname="br1"
nvram set lan2_ifnames="vlan30 wl0.2"
nvram set lan2_ifname="br2"
nvram set lan3_ifnames="vlan60 wl0.3"
nvram set lan3_ifname="br3"
killall eapd
eapd
Resources I used:
SSID to VLAN
Hello! Model: Asus RT-AC56U Firmware: 378.53 (AsusWRT-Merlin) Some default configs: lanports=0 1 2 3 wanports=4 landevs=vlan1 wl0 wl1 vlan1hwname=et0 vlan1ports=0 1 2 3 5* vlan2hwname=et0 vlan2ports=4 5u I'm trying to build a professional home network =D (to learn) I'm new to AsusWRT, Merlin...
www.snbforums.com
User scripts
Third party firmware for Asus routers (newer codebase) - RMerl/asuswrt-merlin.ng
github.com
multi SSID with VLAN script, for ASUS AC86U with merlin
multi SSID with VLAN script, for ASUS AC86U with merlin - services-start.sh
gist.github.com
Last edited: