Sunday, October 31, 2021

"Selecting" the proper network

Hey guys!

This is likely simple, but I don't know enough to solve it on my own.

So here is the scenario: Say we have a few different 172.17.2.0/24 networks, with a DHCP server, isolated from each other. Then I have one (maybe more in the future, but for now one) computer.

I want a simple way to "select" which network I want to connect to from the computer. Currently this is done with human intervention, by simply physically connecting the computer to a different network. But I want to automate it and I am not sure what's the best way to do this. Some ideas:

  • Have each one of the networks connected to different interfaces of a switch, each interface in a different VLAN. I could simply write a script that changes the VLAN the computer is in. I think this one would be somewhat easy.

  • Similar to above, but a router doing NAT between switch and computer. Router could be NATed to route different Networks to the right network. For example, 192.168.X.0/24 would be NATed to the 172.17.2.0/24 in vlan X. I haven't done much NATing in my life though so I am not sure if this would work and that sounds harder.

  • Not doing this at all. This is just a minor improvement for a testing environment, but it would make our lives easier.

What do you guys think?



No comments:

Post a Comment