Use old Linksys router as VLAN switch
You can find lots of cheap Linksys E900, E1200, and E4200 at Goodwill that can be repurpose to use as mange network switches with VLAN trunk and tagged access ports.
You don't get much capability for the trouble but it's good enough for simple lab testing or adding some IOT devices with VLAN tag.
- 2 trunk ports
- 2 access ports with VLAN tag
- One remaining port for switch management
- Virtual WIFI with VLAN tag
The general procedures is:
- Flash DD-WRT firmware.
- Setup the device as a basic managed switch
- Add VLAN tag
- Tag 2 ports with VLAN
System Reset
Note that after any system reset using the reset button, access to the router is limited via WIFI only. It will be completely open so login then do this to activate LAN port access.
- Connect via WIFI (it will be open)
- Reset admin password
- Go to Setup - Networking - Assign to Bridge - Add br0 to interface vlan1.
- Save then Apply Setting
- At this time, set the Local IP address to desired IP to work with local router.
- Optional setup main Wireless SSID and password, save and apply change.
Setup AP device as managed switch
Setup switch to work with a LAN router IP 192.168.10.1
- Connect via LAN port and login to AP
- Setup - Basic Setup
- WAN connection type: Disabled
- Set router name
- Network Setup, Router IP
- Local address 192.168.10.11
- Gate way : 192.168.10.1
- Local DNS: 192.168.10.1
- Optional: Assign WAN port to switch - set check box
- Setup NTP client, set server IP to the main router if it has NTP setup already
- Save Setting
- Setup - Advanced Routing - Operating Mode: Router.
- Service - Services
- Disable DNSMasq
- Enable Telnet
- Disable ttraff Daemon
- Setup - Networking
- Assign to bridge - add br0 to interface vlan2
- Security - Firewall: Disable
- Set Filter Multicast
- Setup - Basic Setup
- Disable DHCP server
- Save and apply setting
Connect to main router, test to make sure can access AP from any connection from main router.
Add VLAN
Add VLAN and setup trunk ports
- Telnet in to box as root with admin password
- Create new vlan name
- nvram set vlan3hwname=et0
- nvram set vlan4hwname=et0
- nvram show | grep vlan.*hwname | sort
- nvram commit
- reboot
- Use web interface to create trunk on port 1,2 to vlan 3,4
- Save and apply settings
- Telnet to box and add vlan to trunk port
- nvram set vlan3ports="2 0t 1t 5*"
- nvram set vlan4ports="3 0t 1t 5*"
- nvram commit
- reboot
port0vlans=2 18 19 21
port1vlans=3 4 16 18 19 21
port2vlans=3 4 16 18 19 21
port3vlans=3 18 19 21
port4vlans=4 18 19 21
port5vlans=2 3 4 16
---------------------
vlan0ports=1 2 3 4 5*
vlan1ports=0 1 2 3 5*
vlan2ports=4 5
vlan3ports=2 0t 1t 5*
vlan4ports=3 0t 1t 5*
------------------------
Add virtual WiFi
Use wireless menu to add virtual WIFI to use with a VLAN
Create bridge to link virtual WiFi to VLAN
On E4200, need extra startup command to make WiFi with VLAN work.- Use Administration - Command menu, enter these commands
- sleep 20
- stopservice nas
- wlconf eth1 down
- wlconf eth1 up
- wlconf eth2 down
- wlconf eth2 up
- startservice nas
- Save Startup
- Management - reboot
No comments:
Post a Comment