simple networking/routing question

I need server A to be able to reach server C (a mail server). server B can already reach server C and server A can reach server B. Is there a few simple steps I can take to add a static route to server A to solve this?


Solution 1:

No, at least in IP space.

If they aren't on the same subnet (xxx.yyy.zzz.1 and xxx.yyy.zzz.2) the two computers will require a router to connect them. If they are on the same subnet then a switch is all that is required.

Given the simplicity of you question means we're guessing blind, I'd first recommend that you check to see if A and C both have a "default gateway" that matches an IP of a local router for each of their subnets. And I'd check for firewalling (both software and hardware) at the same time.

Solution 2:

Assuming:

  • A is 10.1.0.1/24
  • C is 10.2.0.1/24
  • B is both 10.1.0.2/24 and 10.2.0.2/24
  • B has an OS on it that permits routing, or forwarding:

on A:

route add -host 10.2.0.1 10.1.0.2

on B:

  • make sure forwarding is enabled; this is done in different ways by different OSs

on C:

route add -host 10.1.0.1 10.2.0.2

Now A should be able to interact with C, and vice versa.

(Warning: route syntax above is from Solaris, because that's what I have historically spent most of my time with; linux and windows routing is done slightly differently. Also, making all these changes permanent across reboots is left as an exercise to the reader.)