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

How do I connect two networks using two nics in a PC?

Hi Guys,

I have two nics in a server which receives reports from one network (192.168.120.x) and is queried by our main network (192.168.125.x).  The 192.168.120.x network is a VLAN which goes across a fiber line to 4 devices and a machine, the 4 devices (120.x) are time and attendance clocks which dump the reports on the Server for the users on the 125.x network to query.  However, the machine which is on the other end of the VLAN needs to connect to the main network.

Can anyone give me an idea on how to get this working, without the use of a router?

Thanks,
Ricardo.
0
Ricardo_Dowell
Asked:
Ricardo_Dowell
  • 4
  • 3
  • 2
1 Solution
 
that1guy15Commented:
If the server is Windows you can set up RRAS to route between the two networks.
http://technet.microsoft.com/en-us/network/bb545655.aspx

IF the server is linux you can set up routes between the two networks.
http://www.yolinux.com/TUTORIALS/LinuxTutorialNetworking.html#ROUTE

0
 
Ricardo_DowellAuthor Commented:
Let me apologise for my misleading post, where I reffered to the machine as a server - the OS on the machine which has the two nics is Windows XP Professional.
0
 
that1guy15Commented:
That's OK. you will want to use the route add command to add a static route between the two NIC's

Here is a link
http://technet.microsoft.com/en-us/library/bb490991.aspx

0
Turn Raw Data into a Real Career

There’s a growing demand for qualified analysts who can make sense of Big Data. With an MS in Data Analytics, you can become the data mining, management, mapping, and munging expert that today’s leading corporations desperately need.

 
Ricardo_DowellAuthor Commented:
Hi,

Thanks for such a quick response.

NIC A and B in the PC are configured as follows:
NIC A
IP   192.168.125.129
SM  255.255.255.0
GW 192.168.125.5
NIC B
IP   192.168.120.1
SM  255.255.255.0
GW 192.168.120.1

From the 125.x network I want to query 192.168.120.203.

I tried adding the static route below but I was still unable to ping the 120.x network from the 125.x network.
 
"Route add -p 192.168.120.0 mask 255.255.255.0 192.168.125.129 metric 20"

It's my first time adding static routes so maybe I am going about it the wrong way.

Ricardo...
0
 
Rob WilliamsCommented:
XP does not support routing in it's default state. You will need to enable it on the XP machine (the dual NIC machine) by changing 1 registry key. See:
http://www.petri.co.il/configuring_routing_in_w2k_pro_xp_pro.htm

Then you need to add the route to the machine/s on the 125.x network:
route add -p 192.168.120.0 mask 255.255.255.0 192.168.125.129
(no need for metric if Windows 2003/XP)

Then you also have to add a route to the computers that have to reply, so they "know the way back home":
route add -p 192.168.125.0 mask 255.255.255.0 192.168.120.1

One other thing, Gateways.
You can only have 1 default gateway on a machine. If you leave the GW 192.168.120.1 on NIC B you don't need the second route above, but one of the gateways A, or B, needs to be removed from the NIC configuration.

Note, name resolution will not work, unless you have WINS or DNS servers present, but you can access using IP's
\\192.168.120.123\ShareName
net use  z:  \\192.168.120.123\ShareName
0
 
Ricardo_DowellAuthor Commented:
I edited the registry on the PC with the two nics and I added "route add -p 192.168.120.0 mask 255.255.255.0 192.168.125.129" to that machine.  I then added "route add -p 192.168.125.0 mask 255.255.255.0 192.168.120.1" to the computer that has to reply.  

However, when I added the first route to the machine with the two NICS, I was unable to ping anything on the 120.x network from that machine.  Once I deleted that route, I was able to ping again.  The static route is still in the second machine.

I also removed GW 192.168.125.5

RD
0
 
Rob WilliamsCommented:
Don't add any routes to the machine with the 2 NICs. It knows the location of both subnets.

Then you need to add the route to the machine/s on the 125.x network:
route add -p 192.168.120.0 mask 255.255.255.0 192.168.125.129

add a route to the computers that have to reply, so they "know the way back home":
route add -p 192.168.125.0 mask 255.255.255.0 192.168.120.1

Remove one of the default gateways from the machine with 2 NICs

0
 
Ricardo_DowellAuthor Commented:
Thanks RobWill - that did the trick.
0
 
Rob WilliamsCommented:
Glad to hear it worked out for you.
Thanks Ricardo.
Cheers !
--Rob
0

Featured Post

Will You Be GDPR Compliant by 5/28/2018?

GDPR? That's a regulation for the European Union. But, if you collect data from customers or employees within the EU, then you need to know about GDPR and make sure your organization is compliant by May 2018. Check out our preparation checklist to make sure you're on track today!

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now