Two PC's "A" and "B" are connected on the office LAN network having ip address range like 199.63.31.X.

"A" has 2 NIC cards in it - One connected to the LAN (199.63.31.x) and other connected(10.1.1.x) to PC "C" via a private hub.

"C" and "A" have a different ip address range : 10.1.1.X.

Is it possible to for m/c "B" to communicate with "C" via "A", considering "B" and "C" are on different ip address range?


This is possible. The most basic configuration that allows TCP/IP connections between your two networks is the following:

  • "A" needs to be configured to route between the two networks.
  • "B" needs a route telling it that "A" (199.63.31.x) is the gateway to network
  • "C" needs a route telling it that "A" (10.10.1.y) is the gateway to network
  • You probably need to add hosts entries on "B" and "C" so they can address each other by hostname. Without this, you must use IP addresses directly.

The exact steps needed will depend on what OS(es) these machines run. For example, Linux distributions put their hosts file at /etc/hosts; Windows machines use C:\Windows\system32\drivers\etc\hosts; Mac OSX uses /private/etc/hosts.

Other considerations you need to take into account are whether "C" needs to be able to access machines other than "B", if you care, or if "C" explicitly needs not to access other machines. You may also want to supply "C" with other services -- access to a DNS server, connections to a Windows Domain, or access to network file shares, for example. These are all possible, but you should know ahead of time exactly what you need to accomplish so you can configure "A" properly.

| improve this answer | |
  • 1
    remeber if it is windows you will have to use the ROUTE command.. IE Route add 10.10.1.x mask 199.63.31.x -p to make the gateways "talk" to eachother... i created some intresting routes with this .. one i vpn'd into a system . then with a route from the host computer i ACTUALY could access the ROUTER of the vpn system...very cool... – mike Dec 12 '09 at 6:25

You can do this if you install IP router software on A. Without knowing what operating system A runs, it would be difficult to recommend specific software.

| improve this answer | |

As others said, you need setup routing software for "A".

For Linux use iptables. If you asked such a question here, this is not what you may want to mess with.

On Windows there is an easy way to use bridged connections. Google for that, it's really to setup using wizard.

| improve this answer | |
  • iptables might be helpful here but it's not what is needed to enable packet forwarding on a linux kernel. at this juncture it's overkill. – quack quixote Dec 11 '09 at 10:37

An evil genius would use GNS3 to emulate a Cisco router/managed switch so that when you don't need to route using a computer, you can just copy the router/switch configuration over with about 3 seconds worth of downtime.

| improve this answer | |

Why not just put in a hardware router? It looks like all network cables are already at A, so just put a router there, plug in A, B, and C. Every computer can be on the same network, which will simplify sharing files etc.

Routers are not terribly expensive, and it will get rid of:

  1. Configuring sharing between B and C
  2. Loss of connectivity when A is not turned on.
| improve this answer | |

If you want to do it on windows, you can add a static route to each of your interfaces.

You'll have to add static routes to the IP Networks at each NIC from command prompt (or make a batch file to use only when required) :

route add destination-address mask subnet-mask gateway-ip

Example: let me assume that the ip address at the interface on A towards B is, and that towards C is

route add mask

route add mask

Or if you want to 'simulate' a router on your PC, use GNS3. Check this out:


Place a router and connect two clouds to two of the router's interfaces. At the cloud configuration, assign each cloud an NIC from your PC. So now you have one cloud connected to each of the PCs NIC cards. Assign IP addresses on router and clouds. This basically results in both networks at your PC's NICs being connected to your router in GNS3.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy