Setting routing between two networks - 2 interfaces - Windows 7

2

I have two network interfaces on one computer COMP-A.

First interface IP 10.10.10.34 /255.0.0.0

Second interface IP 192.168.0.23 /255.255.255.0

Computer via first interface is connected to network A (other computers) Computer via second interface is connected to network B.

I connect with the computer (COMP-A) from network A. And I have access to remote desktop etc.

I also need access to devices from network B.

Is it possible to make some routing between network interfaces to have access to devices from network B when I am connected to network A.

For example:

I am connected to network A with IP 10.10.142.23 and can ping COMP-A (IP 10.10.10.34). I need to ping device from network B with IP 192.168.0.26.

krzych

Posted 2016-12-06T12:48:02.607

Reputation: 31

Answers

0

According to the Microsoft forums you can enable IP forwarding (routing) using the following steps:

Go to Start and search on cmd or command. Right click on either cmd or command then select Run as administrator. At the command prompt type regedit. Navigate to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\Tcpip\Parameters\IPEnableRouter setting, right click and select Modify. Change 0 to 1 and exit the editor.

When your back at the command prompt type services.msc and navigate to the Routing and Remote Access service. Right click and select Properties. Change to Automatic and click on Start to start the service.

After this, you will need to set the default gateway of hosts in network A to 10.10.10.34 and the default gateway of hosts in network B to 192.168.0.23. If this isn't doable because you would lose connectivity to the rest of your network (or internet), you can add static routes to hosts in both networks:

For hosts in network B:

route -p ADD 10.0.0.0 MASK 255.0.0.0 192.168.0.23

For hosts in network A:

route -p ADD 192.168.0.0 MASK 255.255.255.0 10.10.10.34

The -p switch is to make them persistent after reboots. You would need to restart after you apply these settings.

mtak

Posted 2016-12-06T12:48:02.607

Reputation: 11 805