• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 317
  • Last Modified:

Using a computer as network router with two nics

I have a prob with a setup I have.
WinXP computer with two nics, one network connected to one and another connected to the other.
What IP addresses and subnet masks do I need to make them communicate. The first network is ok with the computers talking. The second network that I have just introduced cannot see the winXP computer due I believe to my IP/subnet config.
I am setting static IP addresses as usual.
winXP machine
nic1 = IP = 192.168.0.1 subnet = 255.255.255.0
nis2 = IP = 192.168.1.1 subnet = 255.255.254.0

Can't know!

Tony
0
Texhead
Asked:
Texhead
2 Solutions
 
FishMongerCommented:
First, change the netmask on NIC 2 to 255.255.255.0 then add static routes in the routing table.

route add 192.168.0.0 mask 255.255.255.0 192.168.1.1
route add 192.168.1.0 mask 255.255.255.0 192.168.0.1

If the workstations are not using this computer as their default gateway, then you'll also need to add the appropriate static route on each of the workstations.  Also, if you have a mixture of OSs, check the syntax of the route command.  Some of the OSs requires the -p (persistent) option to preserve the route across reboots.

If you're going to go through this kind of trouble, it might be easier (and maybe better) to remove one of the NICs and combine the 2 networks.
0
 
JivkoCommented:
NIC2 and workstations in Network 2 should be in the same subnet and everithing should be fine.
Also
If you are looking to use your Windows XP box as a router, one of the first things you will need to do is enable IP forwarding. Previously, NT and 2000 provided a checkbox in your network settings GUI to easily turn routing on, but with XP it's no longer an easy-to-toggle checkbox. But, given the following registry edit, you'll be on your way to routing packets from one network to another. Set this key to one to enable routing, or zero to disable (disabled is the default):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\IPEnableRouter

Regards
0
 
TexheadAuthor Commented:
Thanks people
I am using an old existing network for the first nic, BNC coax and the second is Cat 5 RJ45, a stop-gap until It can be completely rewired. (not what I call brilliant)
Thanks fishmonger, I did some searching and found I didn't need to change the subnet mask just the IP range. Not sure what you meen by route command and the -p switch and where to put this if I were to do routing fully.
I am using the winXP machine only from the second network so I dont need it routed to the first network. (winXP machine is Internet and Print server and file server)
Jivco thanks for the Reg key I will use that at some time.

Tony
0
 
stevenlewisCommented:
you run the route add command from a command prompt
start -->run type cmd
this gets you to the prompt
then run the route add
the -p switch makes it a persitant route (so it will stay after a reboot)
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now