Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What route(s) need to be added on which computer(s) for myDevice and ComputerB to communicate?

myDevice: 192.168.1.2

ComputerA:
- NIC1: 10.2.2.20
- NIC2: 192.168.1.1

ComputerB: 10.2.2.30, 192.168.1.3

Physical Connections
  ComputerA:NIC1 - ((LAN)) - ComputerB
  myDevice - ComputerA:NIC2

Notes:

  • ComputerA and ComputerB run XP SP3
  • ComputerA and ComputerB have static IP(s)
  • Assume all netmasks to be 255.255.255.0
share|improve this question
1  
What are you referring to for adding routes? What kind of device is myDevice? If they are on the same network (192.168.1.x) they should be able to communicate if the gateway is correct. –  user142485 Jul 17 '12 at 18:44
add comment

2 Answers

up vote 2 down vote accepted

Based on the stated physical and IP connections, you should be able to go from myDevice -> ComputerA -> ComputerB just by virtue of setting up myDevice to use the same gateway as computerA.

What's a gateway, you ask?

A gateway is an IP address that performs IPv4 Masquerading, which means that it forwards packets from one IP address to another. Most router software does this automatically, so you would point myDevice at the router as the gateway in that case. But if the LAN is defined as a local network being hosted by ComputerA, then you will need to make ComputerA a gateway.

IPv4 Masquerading can be accomplished on Windows XP by following these instructions from a stable link to a Microsoft Knowledge Base article: http://support.microsoft.com/kb/315236

Once you have IPv4 Forwarding (masquerading) set up properly, all you should need to ensure is that:

  1. ComputerA, ComputerB and myDevice are at least transitively physically connected, which means that A->B->C implies that A->C because you can use "B" as an intermediate hop (I changed the letters in my contrived example just to be simple/brief);

  2. ComputerA, ComputerB and myDevice all share an IP space in common (which they do; the 192.168.1.0/24 space is shared because of the 255.255.255.0 netmask)

  3. The three devices all have unique IPs within the shared IP address space;

  4. There is a gateway device defined that will forward packets from devices that are not physically connected, because by default the only devices that will communicate over IP are devices that are physically connected at the link layer. This is why you need the gateway.

  5. Devices which wish to communicate to other devices which are not physically connected to them have declared a gateway in their routing table, and the gateway is physically connected to the destination, or another gateway which (eventually) is physically connected to the destination by an arbitrary number of hops. In your example, this means that both myDevice and ComputerB need to declare computerA as a gateway.

If you're wondering about the invisible magical internals that cause myDevice to "know" that ComputerA is able to route packets to ComputerB, take a look at the Address Resolution Protocol (ARP) on Wikipedia. ARP is as critical to the function of the internet as DNS.

share|improve this answer
add comment

Assuming that ComputerB has only 1 NIC, you must do three, possibly four things:

  1. See to it that IP forwarding is enabled on ComputerA.
  2. Remove the 192.168.1.3 address from ComputerB
    • This address will confuse ComputerB into thinking it can reach myDevice directly
  3. Add a route on ComputerB to get to myDevice, either:
    • A default route using 10.2.2.20 as the gateway
    • A route to 192.168.1.0, with netmask 255.255.255.0 and gateway 10.2.2.20
  4. Ensure that myDevice has a route to get to ComputerB, either
    • A default route using 192.168.1.1 as the gateway
    • A route to 10.2.2.0, with netmask 255.255.255.0 and gateway 192.168.1.1
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.