Turning each port into separate LAN

This is a newbie question: can you configure it such that each of the 4 lan ports in a home router to be running its own separate LAN with own DHCP/NAT?
Is this true for any router in general?
If this is true, I guess on the Raspi, I can use all 4 usb ethernets for this purpose, correct?

It is at least possible for routers with integrated managed switch and the switch ports are driven by DSA, see this thread

Not sure whether

are treated as separate NIC though.

1 Like

On linux/rasp, each usb-eth is a separate nic for sure.
Then for this, I guess we can have separate lan for each nic?

That sounds feasible, just beware that

as in

  • setting up subnetting for each port
  • DHCP for each port
  • firewall
  • eventually also DNS but that depends on the use case
1 Like

On a router with an integrated switch and several ethernet ports, you have to configure the switch using VLANs and isolate each port.

On a RPi, where each port will be on a different adapter, things will be simpler. Each adapter will appear as a different interface, that you will configure to your linkings, then you will configure how traffic flows (or not) from one interface to another.

You can use each USB port (if the RPi has enough power to feed them all), or even a USB hub and add even more adapters. Another option would be to plug a managed switch on the existing ethernet port.

2 Likes

Ok thanks, I will look into using the vlan approach for the integrated switch.

Good to hear it would be easier on the RPi.

I found the instructions on how to do this:
https://openwrt.org/docs/guide-user/network/vlan/creating_virtual_switches

This actually works. Unbelievable!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.