What's new

Add port to RT-N66U with USB ethernet

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Max Pixel

New Around Here
My RT-N66U is one port short of servicing every device in my media cabinet. I had a spare USB NIC, and plugged it in to one of the USB ports out of curiosity. It doesn't work out of the box as an extra LAN port, but it certainly is recognized. It shows up in "ip link list", and the web interface even shows "Realtek USB 10/100 LAN".

The first thing I tried was `brctl addif br0 eth3`. This worked to some degree - a computer plugged in to the port showed up in the Clients list in the web interface, and got an IP address from DHCP. But it didn't have access to the internet (in fact, attempting to load a website seems to have caused the Clients list in the web interface to break, now showing 0 clients).

What steps am I missing? Or is this not going to be possible?
 
My RT-N66U is one port short of servicing every device in my media cabinet. I had a spare USB NIC, and plugged it in to one of the USB ports out of curiosity. It doesn't work out of the box as an extra LAN port, but it certainly is recognized. It shows up in "ip link list", and the web interface even shows "Realtek USB 10/100 LAN".

The first thing I tried was `brctl addif br0 eth3`. This worked to some degree - a computer plugged in to the port showed up in the Clients list in the web interface, and got an IP address from DHCP. But it didn't have access to the internet (in fact, attempting to load a website seems to have caused the Clients list in the web interface to break, now showing 0 clients).

What steps am I missing? Or is this not going to be possible?

You can get a 4 port gig switch for like $20. If you're able to hack it together somehow with the USB NIC who knows how many glitches you'll run into in the future.

I believe any NIC you connect via USB, the router is expecting that to be a WAN port for LTE backup or dual WAN. So you'll probably have to modify lots of stuff to get it working as a LAN port.
 
tried was `brctl addif br0 eth3`. This worked to some degree - a computer plugged in to the port showed up in the Clients list in the web interface, and got an IP address from DHCP. But it didn't have access to the internet
..
What steps am I missing? Or is this not going to be possible?
It sounds like an iptables rule may be needed or something. Try looking at the existing rules and see if anything there stands out.

EDIT: had a look at my RT-AX86U, and nothing stood out there. But in nvram there are several rules that list ethernet ports. So perhaps try there instead. "nvram show | grep eth"

Eg.
wired_ifnames=eth4 eth3 eth2 eth1 eth5
br0_ifnames=eth4 eth3 eth2 eth1 eth5 eth6 eth7 wl0.2 wl1.2
lan_ifnames=eth4 eth3 eth2 eth1 eth5 eth6 eth7 wl0.2 wl1.2
w2_ifnames=eth4 eth3 eth2 eth1 eth5
 
You can get a 4 port gig switch for like $20...
Of course, but attempting to use the USB solution will teach me more about Linux network administration.

It sounds like an iptables rule may be needed or something... But in nvram there are several rules that list ethernet ports...
IPTables was the first thing I looked at, too, but nearly all the rules just specify "all" for source & dest. I wasn't aware of `nvram`, though, thanks for the tip. I was able to add eth3 to the relevant keys in nvram, but it didn't appear to have any effect. Most likely, they're read on boot and cached in RAM. Rebooting clears them, of course. Working around this would require either A) modify the firmware, B) re-start the relevant processes after modifying, or C) modify before the relevant services are started.
 
Any changes made to nvram variables will be written back to nvram when "nvram commit" is issued. Until then, they are just cached in RAM.
 
Of course, but attempting to use the USB solution will teach me more about Linux network administration.

Yes and no, these routers run a heavily modified/customized linux kernel with proprietary addons, many of the commands won't translate to typical Linux installs. USB NIC on a linux box is going to be very different from one plugged into these routers.

If you really want to get familiar with linux networking, ditch the Asus and build your own linux router, will be more powerful and flexible and you'll be dealing with the day to day commands and admin.
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top