locked
configuring windows 7 as a router in LAN RRS feed

  • Question

  • hi everyone

    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?



    Friday, November 16, 2012 5:54 PM

Answers

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

       The IPEnableRouter registry entry:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\Tcpip\Parameters\IPEnableRouter

    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.

     


    Bill

    • Marked as answer by Juke Chou Tuesday, December 4, 2012 3:30 PM
    Friday, November 16, 2012 11:30 PM

All replies

  • It depends on your router. Generally privit subnets are not routable, but in practice, if you have "real" router, you can configure router table. It does nothing with Windows 7.

    Regards

    Milos

    Friday, November 16, 2012 9:44 PM
  •   You can enable IP routing in Windows 7 by modifying the relevant registry key.

       The IPEnableRouter registry entry:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\Tcpip\Parameters\IPEnableRouter

    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.

     


    Bill

    • Marked as answer by Juke Chou Tuesday, December 4, 2012 3:30 PM
    Friday, November 16, 2012 11:30 PM
  • Hi,

    Before you want to consider Windows 7 as a router, you must make sure this computer is equipped with 2 network cards. One network card connect to 192.168.2.1, one connect to 192.168.3.1.

    There is an tutorial about how to make Windows XP as a router( It’s same with Windows 7), more information refer to the link below:

    http://www.home-network-help.com/ip-forwarding.html


    Spencer

    TechNet Community Support

    • Marked as answer by Juke Chou Tuesday, December 4, 2012 3:30 PM
    • Unmarked as answer by Juke Chou Tuesday, December 4, 2012 3:30 PM
    • Proposed as answer by rey.manic Wednesday, September 11, 2013 7:41 PM
    Tuesday, November 20, 2012 9:31 AM
  • Hi Bill, Thanks for your answer, I have try this but seems not to work on my case.
    I have a little different scenario, instead having to network cards I got one Lan card
    and one wireless adapter conectet to a wireless access point,
    so what I what to make its to rout all IP traffic from lan network to the access point network.
    I got w7 to act as router and the wireless adapter its a usb device, is this posible ??
    attached its an image of what I what to do.

    ok I cant post the image here as I am a new member, any way that's the Idea,

    thanks for any help you can give me in advance.
    Rey.

    Wednesday, September 11, 2013 8:11 PM
  •   As I said earlier it will depend on the default gateway settings of the PCs. If either of them is set to use some other router (and if they can access the Internet they must be) you can't make it work without modifying the routes on the Internet router.

      Win 7 can act as a router if you have enabled IP routing, but it can only transfer traffic from one subnet to the other if the traffic actually gets to the Win 7 router! If it goes to some other router it will be lost.

     

    Bill

    Thursday, September 12, 2013 12:34 AM