On 20 Jun 00, at 0:15, Richard Adams wrote:
> On Mon, 19 Jun 2000, Robin Gilks wrote about, Kernel IP routing bug:
> > Greeting all
> >
> > Has anyone found a fix yet for the routing bug in 2.2 kernels that I
> > highlighted about 5 months ago?
> >
> > At the time there was a lot of prattle about netmasks (total waste of space)
> > and such where a simple point-to-point route could not be established, never
> > mind a subnet.
> >
> > Summary
> >
> > A packet comes into an interface and is routed back out of the same interface
> > in order to complete its journey. IT DOES NOT WORK. The code assumes that the
> > destination is on the same network segment (I think) so it refuses to send it
> > out the same interface.
> >
> > In case doubters didn't get that IT DOES NOT WORK.
> >
> > Yes - forward in /proc is enabled (I may be stupid sometimes but not that
> > stupid) and in any case it forwards on the other 4 interfaces.
> >
> > Yes - I've checked that reverse path filtering (/proc....rp_filter) is turned
> > on, turned off, disabled with CONFIG_IP_ADVANCED_ROUTER, enabled with it, been
> > set to all values documented.
> >
> > So...
> >
> > Any ideas at all or does everyone else like me just not have the time to find
> > the solution by rewriting the code!!
>
> AFAI can see you are correct, i cant get our local node to retransmit the
> packets either.
>
> What i see is. (bogus IP#'s used)
> If you want listen traces let me know.
>
> 44.123.123.1 44.123.123.2 both have the same qrg and use 44.123.123.3 as
> thier node.
> 44.123.123.1 and 44.123.123.2 dont hear each others packets, so they set
> routes VIA 44.123.123.3 However 44.123.123.3 does not retransmit the
> packets.
>
The reason it doesn't work is because TCP/IP does not work that
way. TCP/IP is based on the assumption that every computer on a
network segment (NOT subnet) can hear all of the other computers
on the same segment.
Since each network port connects to only one segment (there's
only one cable plugged in to it) TCP/IP assumes that any packet
being routed out the same port that it came in on is being re-routed
from a machine on that segment to another machine ON THE
SAME PIECE OF CABLE. If that is the case, then there's no need
for the routing at all, it can be sent directly without needing the
router.
What TCP/IP does when it finds this situation is send out an ICMP
redirect packet to the source machine, telling it to update it's
routing tables to bypass the router. Then the mis-routed packet is
discarded, and the source machine is expected to re-send the
packet directly to the correct machine.
A couple of things you could try:
1) re-design the hardware setup so all the stations can talk to
each other directly. this may or may not be possible with radios
involved.
2) somewhere in one of the networking HOWTOs is a way to
assign two IP numbers to the same network port. arrange the
subnetting and IP numbers so that all the machines that one of
your remote machines is on the same subnet as one of the IP #s,
and the other remote machine is on the subnet for the second IP #.
The packets being routed wuld then come in from a port using one
IP number, and go back out the same physical port, but using the
other IP number. I don't know if this would work or not, I have never
even tried to set it up, but it may work. It's worth looking into
anyway.