From: "Pio Mendez" Date: Tue, 14 Nov 2006 18:53:22 +0000 Subject: RE: [LARTC] netmask 255.255.255.255 vs ip route add via ... (bug?) Message-Id: MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1049191912==" List-Id: References: In-Reply-To: To: lartc@vger.kernel.org --===============1049191912== Content-Type: text/html; charset="iso-8859-1"; format="flowed" Content-Transfer-Encoding: quoted-printable

It works because linux (and XP too) maintain a cache of all routes learn= ed.
Try:  ip route show cache.
You can clean this cache:  = ip route flush cache.


From:  Andrew McGill <andrewm@intoweb.co.za><= /I>
To:  lartc@mailman.ds9a.nl
Subject:  <= I>[LARTC] netmask 255.255.255.255 vs ip route add via ... (bug?)

Dat= e:  Tue, 14 Nov 2006 15:48:41 +0200 (SAST)
>Greeting= s routing folks,
>
>I want to use the netmask 255.255.255.255 t= o insulate (not quite
>isolate) machines on a shared subnet from eac= h other.  This works
>just fine on win XP, but Linux iprou= te will not acccept the gateway
>address in one step -- neither on t= he command line nor via DHCP:
>
>Here's the interface, set up w= ith a netmask of /32:
>
>     # ip addr
= >     ...
>     2: eth0: &= lt;BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
>qlen=20 1000
>         link/ether 00:= 08:74:48:1f:0c brd ff:ff:ff:ff:ff:ff
>     &= nbsp;   inet 192.168.1.6/32 brd 192.168.1.255 scope global eth0>         inet6 fe80::208:74ff= :fe48:1f0c/64 scope link
>       &= nbsp;    valid_lft forever preferred_lft forever
>= ;     ...
>
>And here's me trying to add th= e route:
>
>     # ip route add default via= 192.168.1.17
>     RTNETLINK answers: Network is= unreachable
>
>Hmm ... erk ... workaround ... add a host route= first, then add it
>as a default route ...
>
> &nb= sp;   # sudo ip route add 192.168.1.17 dev=20 eth0
>     # sudo ip route add default via 192.16= 8.1.17
>
>And this is what we get ... (yep, it works)
>>     # ip route ls
>    = ; 192.168.1.17 dev eth0  scope link
>   &nbs= p; default via 192.168.1.17 dev eth0
>
>But wait!  We= can delete the host route! And it works just fine (you
>*can* try t= his at home folks).
>
>     # sudo ip route= del 192.168.1.17
>     # ip route ls
>&nbs= p;    default via 192.168.1.17 dev eth0
>
>So wh= y did we need that host route?
>
>It should be possible to add = the gateway directly, or it should be
>impossible to delete it once = something "depends" on it.  The current
>behaviour seems a= =20 little unbalanced (and, for my strange purposes,
>inconvenient :)>
>   Tested on Ubuntu 6.06 Dapper (Kernel: 2.6.15, ipr= oute2 20041019)
>   Looks the same on Fedora Core 3, (Kerne= l 2.6.11.8, iproute2
>2.6.9)
>
>&:-)
>
>=
>--
>Disclaimer: this disclaimer and your base are us
>_= ______________________________________________
>LARTC mailing list>LARTC@mailman.ds9a.nl
>http://mailman.ds9a.nl/cgi-bin/mailman/li= stinfo/lartc


MSN Amor Busca tu = =BD naranja --===============1049191912== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============1049191912==--