I got a new router, so I'd like to turn my old router, ASUS RT-N16, into a switch. It has 4 LAN ports and 1 WAN port on the back.
(Later I'll also make it an access point, but I want to get it working as a switch first.)
I followed the instructions on Bridged AP and Dumb AP. I disabled dnsmasq, firewall, and dhcp. My /etc/config/network is at the end of this post.
When I connect my laptop directly to the new router, I can ssh to my RT-N16 LEDE box just fine. But when I connect my laptop (wired) to the RT-N16 LEDE box, it can't even get an IP address.
Reconfigure the hardware Ethernet switch so that all switch ports are in the same VLAN. Your /etc/config/network should have a switch configuration section. If you removed it you may want to reset to defaults (firstboot) and start over.
Until you do this you can still use the router as a switch on the 4 LAN ports. The WAN port will not be usable.
@Borromini Yep, I have a cable from an ASUS LAN port to the rest of my home network, and I can ssh to the ASUS.
@mk24 My /etc/config/network didn't have a switch section, and I've done reset / firstboot a couple times. "Until you do this you can still use the router as a switch on the 4 LAN ports." The problem is, I currently can't use the router as a switch on the 4 LAN ports.
Since it has one CPU port, the default setup to use as a router should be something like eth0.1 the 4 LAN ports, in the LAN network, and eth0.2 the WAN port, in the WAN network.
Using plain eth0 is not recommended unless you have changed the switch configuration to make everything one VLAN with the CPU port untagged.
ls -l /sys/class/net
lrwxrwxrwx Oct 17 17:52 br-lan -> ../../devices/virtual/net/br-lan
lrwxrwxrwx Jan 1 1970 eth0 -> ../../devices/bcma0:2/net/eth0
lrwxrwxrwx Jan 1 1970 lo -> ../../devices/virtual/net/lo
lrwxrwxrwx Dec 16 17:00 wlan0 -> ../../devices/bcma0:1/net/wlan0
Using plain eth0 is not recommended unless you have changed the switch configuration to make everything one VLAN with the CPU port untagged.
Having one VLAN with the CPU port untagged sounds great to me. How do I set that up? In /etc/config/network, have one "config switch" section and one "config switch_vlan" section?
VLAN1 is understood as a Switch's and a LAN's "default LAN."
As @mk24 stated, make all switch ports LAN (e.g. untagged of eth0.1), and just add a LAN IP, gateway and DNS - then you have your basic managed switch.
Weird... I clearly gave you the wrong information, and that's a weird numbering for the CPU port.
Normally, switch ports go in numerical order, starting from the left if you're looking at the back of the router, with the CPU port(s) on a 4 LAN router normally being sw.port 5, and if CPU has 2 ports, sw.port 6
.
I completely missed that in your original post, my bad =]