Saturday, January 12, 2019

Multiple networks, one switch?

Ok, I have a dumb networking question. I think I really misunderstood a basic concept for a long time (since 2002/2003) and I want to make sure I understand it now.

I always thought that the default gateway of a device needed to be an interface on a router with an ip address in the same subnet as the device.

And for that reason, all the devices on a switch, as well as any switches connected to said switch, all needed to be one the same subnet. Like i couldn't, on one switch, have some devices on 192.168.2.0 /24 and some on 192.168.3.0.24, and the switch is connected to an interface on a router with ip address 10.30.86.1, and all the 192.168.x.x devices have their default gw set to 10.30.86.1.

That's what I thought...

And then I started a new job a month ago where DHCP is not used anywhere and their environment seems to be configured as described above. It confused the crap out of me. It actually continues to.

I think that the actual reason that I always saw one network per router interface was not what I had thought about gateways needing to be on the same network, but rather because every other network I have worked with used DHCP, which involves broadcast communications to function, and I don't think DHCP servers can have multi-network pools....how would it know that a device with MAC address requesting an IP address should be given an address in range 192.168.2.0 /24 rather than 192.168.3.0 /24? It just wouldn't work in a DHCP setup. But it can in a static environment.

Am I (noww, finally) understanding this correctly?



No comments:

Post a Comment