Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Mar 2000 16:35:20 +0200
From:      "Indiana Jones" <orinoki@hotmail.com>
To:        <freebsd-questions@freebsd.org>
Subject:   Problems using Freebsd kernel for IP forwarding
Message-ID:  <20000314144624.6159.qmail@hotmail.com>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------=_NextPart_000_0256_01BF8DD3.49E40780
Content-Type: text/plain;
	charset="windows-1255"
Content-Transfer-Encoding: quoted-printable

Hi,

    We use a freebsd machine as a simple router with forwarding turned =
on.
    Can someone explain the following kernel behavior:

        1.    we do 'route add 10.9.109.16/28 192.168.1.1'
        2.    then someone forwards traffic to address 10.9.109.21 =
through
               this machine which correctly use this routing entry.
        3.    we then do 'route add 10.9.109.16/29 192.168.1.2'

    now, when forwarding traffic again to the same IP address =
(10.9.109.21) the forwarding is still being done
    according to the less specific forwarding rule (1) and not to the =
best match (3) rule (according to CIDR policy).
    If the two rules are added w/o traffic being forwarded in the middle =
(i.e. w/o step 2), then the behavior is correct.
    This seems like a bug!?

Thanks
                    Orinoki.


------=_NextPart_000_0256_01BF8DD3.49E40780
Content-Type: text/html;
	charset="windows-1255"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dwindows-1255" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2014.210" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3D"Bookman Old Style" size=3D2>Hi,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Bookman Old Style" size=3D2>&nbsp;&nbsp;&nbsp; We use =
a freebsd=20
machine as a simple router with forwarding turned on.</FONT></DIV>
<DIV><FONT face=3D"Bookman Old Style" size=3D2>&nbsp;&nbsp;&nbsp; Can =
someone=20
explain the following kernel behavior:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Bookman Old Style" size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
1.&nbsp;&nbsp;&nbsp; we do 'route add 10.9.109.16/28 =
192.168.1.1'</FONT></DIV>
<DIV><FONT face=3D"Bookman Old Style"=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.&nbsp;&nbsp;&n=
bsp;&nbsp;then=20
someone forwards traffic to address 10.9.109.21 through</FONT></DIV>
<DIV><FONT face=3D"Bookman Old Style"=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;this=20
machine which correctly use this routing entry.</FONT></DIV>
<DIV><FONT face=3D"Bookman Old Style" size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
3. &nbsp;&nbsp; we then do 'route add 10.9.109.16/29 192.168.1.<FONT=20
face=3D"Bookman Old Style" size=3D2>2'</FONT></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Bookman Old Style" size=3D2>&nbsp;&nbsp;&nbsp; now, =
when=20
forwarding traffic again to the same IP address (10.9.109.21) the =
forwarding is=20
still being done</FONT></DIV>
<DIV><FONT face=3D"Bookman Old Style" size=3D2>&nbsp;&nbsp;&nbsp; =
according to the=20
less specific forwarding rule (1) and not to the best match (3) rule =
(according=20
to CIDR policy).</FONT></DIV>
<DIV><FONT face=3D"Bookman Old Style" size=3D2>&nbsp;&nbsp;&nbsp; If the =
two rules=20
are added w/o traffic being forwarded in the middle (i.e. w/o step 2), =
then the=20
behavior is correct.</FONT></DIV>
<DIV><FONT face=3D"Bookman Old Style" size=3D2>&nbsp;&nbsp;&nbsp; This =
seems like a=20
bug!?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Bookman Old Style" size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3D"Bookman Old Style" size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
Orinoki.</FONT></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0256_01BF8DD3.49E40780--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000314144624.6159.qmail>