RE: IP forwarding

Glynn Clements (glynn@sensei.co.uk)
Wed, 30 Sep 1998 23:22:24 +0100 (BST)


Neil Moore-Smith wrote:

> > The first thing to check is that IP forwarding hasn't been disabled by
> > the init scripts. Check that `cat /proc/sys/net/ipv4/ip_forward'
> > prints `1'.
>
> Good grief, Holmes! How did you know that? (Apologies to Conan Doyle)
>
> There is no such file as ip_forward on my system. You seem to have hit the
> spot. Hmmmm. So how would the init scripts have disabled it? Is this
> definitely a Linux-wide file, or is it specific to a particular
> implementation. I have Slackware 2.0.27.

OK. /proc/sys/net/ipv4/ip_forward was added in 2.0.30, so that isn't
the problem here.

> (BTW, Is that particularly out of date?

Yep.

> I looked at the source repositories and it seems 2.0.34 is about the
> latest.

2.0.35 is the latest 2.0.* kernel.

> I was a bit dubious about upgrading the kernel on its own, as all
> the utilities may then be out of date. Is there a way to tell what else
> needs upgrading?)

Not automatically, although I believe that there are some sites which
provide this sort of information (I don't have any URLs to hand,
though).

> > Do you need to run a routing daemon? If not, running one will only
> > make matters more complex, as you risk having it modify your routing
> > tables in interesting ways.
>
> Probably not. I'll turn it off and reboot. (Minutes later...) No, it still
> doesn't forward across the subnets.

OK.

Now, the question is: are you sure that it isn't forwarding the
packets? If you have a setup along the lines of:

--+-------+- -+-------+--
| | | |
+-+-+ +-+-----+-+ +-+-+
| A | | B | | C |
+---+ +---------+ +---+

and A can't connect to (or ping) C, it doesn't necessarily follow that
B isn't routing the packets. In order for everything to work:

1. B must be configured to forward packets,

2. B must have correct routes to both A and C,

3. A must have correct routes to B and C (the route to C will have B
as the gateway), and

4. C must have correct routes to B and A (the route to A will have B
as the gateway).

If any of these conditions aren't met, A won't be able to ping C, and
vice-versa.

-- 
Glynn Clements <glynn@sensei.co.uk>
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu