Home » Questions » Computers [ Ask a new question ]

How to connect 2 PC's via another PC?

How to connect 2 PC's via another PC?

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

Asked by: Guest | Views: 231
Total answers/comments: 2
bert [Entry]

"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."
bert [Entry]

"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 199.63.31.55, and that towards C is 10.1.1.21

route add 10.1.1.0 mask 255.255.255.0 10.1.1.21

route add 199.63.31.0 mask 255.255.255.0 199.63.31.55

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

http://commonerrors.blogspot.in/2015/08/gns3-tutorials-for-beginners-how-to.html

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."
"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 199.63.31.55, and that towards C is 10.1.1.21

route add 10.1.1.0 mask 255.255.255.0 10.1.1.21

route add 199.63.31.0 mask 255.255.255.0 199.63.31.55

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

http://commonerrors.blogspot.in/2015/08/gns3-tutorials-for-beginners-how-to.html

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."