Simple Ethernet Port Device, Plus Ethernet Unmanaged Switch

So I have a Single Ethernet port device, and an unmanaged ethernet switch. Is it possible to connect the single port to the switch and configure one of the ports on the switch to be the WAN, and the other's to be the LAN in this configuration? Really, in any realm of switches (unmanaged or managed) would this type of configuration be possible? If so, how? do we have any good guides for this already written?

Not with an unmanaged switch, no.

You can do this with a managed switch -- using VLANs. If you're going to use the switch to carry both the WAN and the LAN, stay away from the entry level devices from TP-Link and Netgear (and maybe one or two other brands)... get the next level up. This has to do with the fact that the most basic smart/managed switches often have flaws in how their management is handled, and this could cause headaches and/or security issues. I know this to be true for the TP-Link TL-SG10xxE series switches, and AFIAK, the similar versions made by Netgear have problems, too.

2 Likes

Thank for the great tip. Now that I have it narrowed down to Managed, do you know of any good guides to read? I am sure I can piece it together over a few pots of coffee and some hard grinding research, but I also like to read user experiences as well.

A lot of people run Raspberry Pi devices as routers.. some of those users will leverage the onboard ethernet and VLANs to handle both LAN and WAN, and then use a managed switch for 'breaking out' the appropriate connections. It's usually pretty easy to do. Search the forums for this type of configuration.

In most cases, a single ethernet device will have "eth0" as the base interface. If you use dotted notation such as eth0.10, you create a tagged network of VLAN 10 on eth0. From there, you just need to consult the documentation for your switch to create a trunk port (carrying multiple networks, to connect to the router) and then access ports (single network, untagged) for each of the VLANs of interest (WAN + LAN, and maybe others).

1 Like

This use case is often called the "one armed router" as something you can search for.

2 Likes

And another term that may be used is "Router on a stick"

3 Likes

Would it be possible to convert an old router into a "managed" switch using robocfg? If so what would setting up a port trunk look like in this instance if there is a wan port and 4 other ethernet ports?

What is robocfg?

Depending on the old router, you could run openwrt on it. Once in openwrt, many routers do support VLANs and thus could be used as a managed switch.

Robocfg appears to be an older terminal command line application that can be used to setup vlan and port configurations. For example freshtomato firmware uses it.

Ok. Well, if you have an old router that works with that application, sure. But if your old router supports openwrt, that may be a better option (or at least you can get help for it here on this forum).