Hello, is it ok to have several router interfaces with different IP addreses connected to a single switch? Or do all interfaces connected to a switch need to be on the same subnet?
Let's say that the interfaces are addressed 192.168.0.1/24, 192.168.1.1/24 and 192.168.2.1/24 respectively and each of these interfaces is connected to a port on the switch. Also, each interface is a seperate Ethernet router. The interface 192.168.0.1/24 connects to the WAN or Internet. The clients connect to the other side of the other 2 router's interfaces with DHCP server on in each case. These are addressed 172.16.0.1/24, 172.16.1.1/24. So a client in one of these segments would receive an address like 172.16.0.100/24 with a gateway of 172.16.0.1.
With the routing table set up correctly in the routers does it matter that traffic from different subnets could be passing through the switch at the same time?
I hope that I have posed this clearly enough.
Yes this will work but you would be better off setting up VLANS on the actual switch and segregate the different subnets from the router that way to keep things clean. Same setup as you are talking about just add VLANs on the switch.
hope this helps.