Use windows as router

Use windows as router

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

i have a network and want PCs in range 192.168.2.1 connect to PCs in range for 192.168.3.1 with a windows 7 as a router.

Is there any solution?

Answers

You can enable IP routing in Windows 7 by modifying the relevant registry key.

The IPEnableRouter registry entry:

Set registry entry to 1 (data type is REG_DWORD)

This will enable IP forwarding on the workstation. However traffic will only move from one subnet to the other if the routing is set up correctly. It will «just work» if the router is the default gateway for both subnets.

192.168.2 x dg 192.168.2.254
|
192.168.2.254 dg blank
Win 7 router
192.168.3.254 dg blank
|
192.168.3.x dg 192.168.3.254

It gets harder if either subnet uses a different gateway. You need extra routing to get the traffic to the Win 7 router (and these routes are not set up on the router workstation itself).

The Win 7 router can only forward traffic which actually reaches it! It can do nothing about traffic which goes to a different gateway.

Use windows as router

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

i have a network and want PCs in range 192.168.2.1 connect to PCs in range for 192.168.3.1 with a windows 7 as a router.

Is there any solution?

Answers

You can enable IP routing in Windows 7 by modifying the relevant registry key.

The IPEnableRouter registry entry:

Set registry entry to 1 (data type is REG_DWORD)

This will enable IP forwarding on the workstation. However traffic will only move from one subnet to the other if the routing is set up correctly. It will «just work» if the router is the default gateway for both subnets.

Читайте также:  Acer вернуть заводские настройки windows 10

192.168.2 x dg 192.168.2.254
|
192.168.2.254 dg blank
Win 7 router
192.168.3.254 dg blank
|
192.168.3.x dg 192.168.3.254

It gets harder if either subnet uses a different gateway. You need extra routing to get the traffic to the Win 7 router (and these routes are not set up on the router workstation itself).

The Win 7 router can only forward traffic which actually reaches it! It can do nothing about traffic which goes to a different gateway.

Use windows as router

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

i have a network and want PCs in range 192.168.2.1 connect to PCs in range for 192.168.3.1 with a windows 7 as a router.

Is there any solution?

Answers

You can enable IP routing in Windows 7 by modifying the relevant registry key.

The IPEnableRouter registry entry:

Set registry entry to 1 (data type is REG_DWORD)

This will enable IP forwarding on the workstation. However traffic will only move from one subnet to the other if the routing is set up correctly. It will «just work» if the router is the default gateway for both subnets.

192.168.2 x dg 192.168.2.254
|
192.168.2.254 dg blank
Win 7 router
192.168.3.254 dg blank
|
192.168.3.x dg 192.168.3.254

It gets harder if either subnet uses a different gateway. You need extra routing to get the traffic to the Win 7 router (and these routes are not set up on the router workstation itself).

The Win 7 router can only forward traffic which actually reaches it! It can do nothing about traffic which goes to a different gateway.

Use windows as router

Вопрос

I have a windows 10 PC which is connected to my work vpn via tap adapter.

I have enabled Routing and Remote access on this. This has two IPs from Home router which is 192.168.10.* and one from work vpn which is 192.168.21.*

I am able to access work network from this PC which is 192.168.20.x

I added this PC(192.168.10.*) as a gateway on my other PCs at home.

Читайте также:  What is launchpad linux

I want other PCs in the home network to be able to access the systems at work.

But i am not able to ping the work network from my other home PC(192.168.10.*).

I also tried adding a static route

route add 192.168.20.* MASK 255.255.255.0 192.168.10.* Metric 500

on my PC(192.168.10.*) but still I am not able to ping work network.

  • Изменено yats86 1 сентября 2018 г. 19:27
  • Изменено Karen_Hu Microsoft contingent staff 3 сентября 2018 г. 1:40 hidden privacy information

Все ответы

You normally cannot route anything through a VPN connection. VPN is a point-to-point connection, not a routed one.

IN any case, routing is a two-way process. Setting a route to move traffic from one subnet to another is pointless if there is no route at the other end to get the return traffic back!

Only with the Windows built-in feature it cannot be achieved.

Here is reference for you, please read it:

How to share a VPN connection from your Windows PC with manual configuration

Please Note: The third-party product discussed here is manufactured by a company that is independent of Microsoft. We make no warranty, implied or otherwise, regarding this product’s performance or reliability.
Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

Windows 7 as Router

Here is quick way to make work Windows 7 as Router.

In order to be able to route traffic between the various subnets, the router needs access to all of the virtual switches. I started out by creating a bunch of virtual network adapters and linking each one to a different virtual switch. When I booted the VM however, I realized that it was difficult to tell which virtual network adapter was connected to which virtual switch. I needed an IT professional and When hiring IT, always go with a managed service provider to get the right information and management, thankfully I was able to continue by my own but all because of the help of the IT guy. This was a bit of a problem because I wanted to assign a static IP address to each virtual network adapter and I had to make sure to use an address within the appropriate subnet.

Читайте также:  Windows swap com window swap com

Although it was a little bit of work, I shut down the VM and removed all but one of the virtual network adapters. I then booted the VM and assigned an address that corresponded to the range used by the other VMs sharing the virtual switch. At that point, I shut down the VM and added another virtual network adapter. I then booted the VM and assigned an address based on the virtual switch to which this adapter was connected. I repeated the process until all of my virtual network adapters were in place.

1. Click on Start button and Search for ‘regedit’ which a short name of Register Editor in Windows.

Click on picture below see it in bigger size.

2. Once found, click on it to open it.

3. In the newly opened Register Editor Window go to

4. Now you need to be careful what you do next, as if you edit something wrong, it can corrupt your registery and break your Windows Installation. If you are too worried, backup your registry as following

Find the registery key named ‘IPEnable Router’, right click on it and change the value data from 0 to 1. Press OK button and Close the Window.

Click on picture below see it in bigger size.

5. Restart the PC and it will now be able to work as router. Which means, if you have you networks cards on this PC attached to two different network, it will be able to route between them just as a router. Or you can get use to connect two GNS Networks or to Connect GNS3 Network to Real Networks as in the post below.

Оцените статью