Jump to content

Connected to two networks at the same time

kotekking2

Hello,

 

I would like to have a PC with two Ethernet ports, one of which would be connected to the main network, with access to the Internet (lets say this network is 192.168.1.0). The other would be local, accessible only through this one PC. Lets say this network has an address 192.168.2.0 and I want to access one of devices (like a NAS(lets say it has an IP 192.168.2.2)) through a web browser. How will the PC behave if I type 192.168.2.2 into the browser, and how can I make sure it wont try to look that up in the primary network with access to the Internet?

 

Any help/advice is appreciated..

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Your PC will look at his routing table and choose the right interface. 

 

If you want to look at the routing table of your PC:

 

1.Open command prompt (cmd)

2.enter the command route print

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Viper9 said:

Your PC will look at his routing table and choose the right interface. 

 

If you want to look at the routing table of your PC:

 

1.Open command prompt (cmd)

2.enter the command route print

So my PC has an IP of 192.168.2.3 on this network, which i presume is the "interface" in route add.

 

If I add a static route 192.168.2.0/24 and pass it through this "interface" it should work, right?

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

19 hours ago, kotekking2 said:

So my PC has an IP of 192.168.2.3 on this network, which i presume is the "interface" in route add.

 

If I add a static route 192.168.2.0/24 and pass it through this "interface" it should work, right?

You don't need to, since the interface have the IP address 192.168.2.3/24 your PC will know using the subnet mask that 192.168.2.2 is part of the 192.168.2.0 subnet. 

 

image.png.d3c8f345b089d130d7846a1f690a7cfa.png

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×