Single 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.

3 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.

3 Likes

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

4 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.

1 Like

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).

1 Like

Okay so I am to a point now where I just purchased the Zyxel GS1900-24E for this scenario. Are there any good guides for creating this VLAN configuration?

Wait until it's on your desk and then familiarize yourself with it. The concepts are DSA with bridge-vlan filtering, bog standard among all DSA based OpenWrt devices (you just have a few more ports on your gs1900-24e to play with).

1 Like

Oh I have it on my desk. I have even reviewed the manual for setting up the vlan trunk port on the switch. I am trying to familiarize myself more with the correct setup on openwrt.

Switched VLANs towards which the switch (admin interfaces-) should not be visible would be bridges with proto=none.

1 Like

no, this is what I am talking about doing. Something similar to this thread.

You even commenting here:

I wander what is this device with one port, also would like to know other parameters like cpu and memory and disk size

Hopefully that helps you enough. Although it doesn't actually help with providing a solution.

Is that Gns 3?

1 Like

So that we can target your actual needs... what is it that you need help with?

  • router config?
  • switch config?
  • both?
  • an explanation of the principles of this type of setup?
  • something else?
1 Like

Okay so I setup

  • VLAN 1: VID 10, "lan", port 3 tagged, ports 4-24 untagged
    
  • VLAN 2: VID 20, "wan", port 2 untagged, port 3 tagged
    
  • Port 2, PVID 20
    
  • Ports 3-24, PVID 10
    

on the switch itself.

I am confused as to how the openwrt side under network should look.