Solved

Network card route

Posted on 2007-11-28
14
635 Views
Last Modified: 2013-11-09
Hi,

I have one computer (A) with 2 NIC's
192.168.1.X
192.168.2.100

I have another computer (B) with 1 NIC
192.168.2.50

CompA can see the 1.X network and 2.X fine
CompB can see CompA which is fine also

Is there a way for CompC on the 1.X range to see the 2.X network.
CompC only has one network card.

Is there a way to add a route on the NIC or something.  I know i can install another NIC for the 2.X range.  But i am wondering if there is a way for one network card to ping or communicate with both 1.X and 2.X range thru the network.  at the same time.  

thanks
0
Comment
Question by:rick81
  • 7
  • 6
14 Comments
 
LVL 21

Expert Comment

by:from_exp
ID: 20371664
you have to configure comp C with network of 1.X range, with default gateway pointing to 1.100 (if that is an IP of PC A)
sometimes your should also enable or allow routing to be done on PC A
0
 
LVL 6

Author Comment

by:rick81
ID: 20371710
ok if i do that though will comp C still be able to access the internet, network shares, etc
and if so it will be running everything thru compA is that right? will this affect performance?

i thought there might be some sort of script.  all i wont to do is access a network share from 2.X range from compC (1.X).  would someone know how to write a script so that when i clicked on the shortcut to compB it would use compA gateway.  and when not in use it would use the normal routing.

thanks
0
 
LVL 21

Expert Comment

by:from_exp
ID: 20371774
don't know about the script, but if your pc C already has it's primary ip address with default gateway set to access internet and you want it to go to network 1.x via pc A, then you should do on pc C:
route add 192.168.1.0 mask 255.255.255.0 192.168.1.100

if you want to have this route even after pc reboots use -p flag
route -p add 192.168.1.0 mask 255.255.255.0 192.168.1.100
0
 
LVL 6

Author Comment

by:rick81
ID: 20371802
below are the actual ip's.  (A) has two NIC cards

A - 192.168.0.100/192.168.2.100
B - 192.168.2.50
C - 192.168.0.9

I want to access B from C.
tried the route
route add 192.168.2.50 mask 255.255.255.0 192.168.0.100
gave a mask error?  any ideas
0
 
LVL 21

Expert Comment

by:from_exp
ID: 20371810
route add 192.168.2.0 mask 255.255.255.0 192.168.0.100 shoud work

please also provide me with ipconfig output on all 3 pcs
0
 
LVL 6

Author Comment

by:rick81
ID: 20371833
PCA
192.168.0.100 255.255.255.0 192.168.0.1
192.168.2.100 255.255.255.0

PCB (not sure on g/way)  this is a linux box
192.168.2.50

PCC
192.168.0.20 255.255.255.0 192.168.0.1
the route added successfully and i can ping 2.100 (B) but not 2.50(C)
0
 
LVL 6

Author Comment

by:rick81
ID: 20371851
as PC A is connected to the 1.X network it pings its other 2.X address.  With or without the route from PC C
0
Network it in WD Red

There's an industry-leading WD Red drive for every compatible NAS system to help fulfill your data storage needs. With drives up to 8TB, WD Red offers a wide array of solutions for customers looking to build the biggest, best-performing NAS storage solution.  

 
LVL 21

Expert Comment

by:from_exp
ID: 20371878
you don't need to add any routes to PC A
on pc B you shoud execute also route command with route to PC C:
route add 192.168.1.0 mask 255.255.255.0 192.168.2.100
0
 
LVL 6

Author Comment

by:rick81
ID: 20371900
yeh i didnt add a route to PC A

i cannot add a route to PC B as it is a linux box.  I have no idea here.
looks like im stuck on this one.
0
 
LVL 21

Expert Comment

by:from_exp
ID: 20371920
on linux you should type:
route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.2.100

don't give up there ;)
to get information of ips configured on interface in linux:
ifconfig
netstat -in
to get routes:
netstat -rn
0
 
LVL 6

Author Comment

by:rick81
ID: 20371928
thanks.  i dont have access to the linux box as yet.
will get back to you.  thanks so far.

0
 
LVL 6

Author Comment

by:rick81
ID: 20371961
if i had another NIC in the linux box (B)
and had it set as 192.168.1.XX

then any pc on the 1.XX network could access it.  aswell as (A) and (B) on the 2.X range.

is that correct?
0
 
LVL 21

Expert Comment

by:from_exp
ID: 20372034
yepp, correct, but you should also consider correct routing:
every host should have route to particular subnet, otherwise packets will be sent to default route.
so when you add new subnet behind any new PC our router, all PCs should understand where to sent packets for that new subnet. Thats why you use route add command
0
 
LVL 11

Accepted Solution

by:
sysreq2000 earned 125 total points
ID: 20391730

There are 3 issues here:

1. Computer A needs to be capable of routing packets from one NIC to another. (this is assuming there is no other way to get from 1x to 2x)

2. Computer C needs to know which way to go to find the 2x network. Assuming the default gateway on computer C is NOT computer A, then you will need to give it the route.

3. The computers on the 2x network need to know how to get to the 1x network, so they can respond to computer C.

So,

step 1

I'm assuming computer A is a Windows XP Pro machine. You need to enable IP Routing so that computer a will forward packet between NIC's. If it's no XP pro then google IP Routing for that OS and I'm sure you'll find a how-to.

For XP Pro:

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To enable TCP/IP forwarding, follow these steps: 1. Start Registry Editor (Regedit.exe).
2. In Registry Editor, locate the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
3. Set the following registry value:
Value Name: IPEnableRouter
Value type: REG_DWORD
Value Data: 1
A value of 1 enables TCP/IP forwarding for all network connections that are installed and used by this computer.  
4. Quit Registry Editor.


Step 2, again assuming it's windows:

From a command prompt on computer c:

route add -p 192.168.2.0 mask 255.255.255.0 192.168.0.100

Step 3:
You get the idea. Let know if you need help for computer B or other computers on it's network.

If computer A is the Default Gateway for all computers then you don't need all the static routes added, just make sure A is capapble of forwarding packets.

Hope that helps.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will step through configuring a SonicWALL appliance to utilize an internal DHCP server for Global VPN Client (GVC) hosts.  There are times when using an external (external to the SonicWALL) DHCP server, such as Windows Servers, isn’t pr…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now