[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: openbsd routing logic confused by ip prefixes - correction
Dan Harnett wrote:
>
> On Wed, Feb 04, 2004 at 03:55:58PM +0100, José M. Fandiño wrote:
> > Hello,
> >
> > > I have an ethernet segment with different network prefixes,
> > > concretely: 195.55.55.0/25 and 195.55.55.128/26.
> > > (195.55.55.192/26 was not assigned to me)
> >
> > sorry £ukasz , I write wrong prefixes, they are:
> > 195.55.55.0/26 <- gateway block
> > 195.55.55.64/26 <- BSD box
> > 195.55.55.128/26 <- for future use
> > *195.55.55.192/26 is not mine.
> > http://www.ripe.net/perl/whois?form_type=simple&full_query_string=&searchtext=195.55.55.0&do_search=Search
>
> Ahhh... That makes more sense.
>
> > fuego2# route add -host 195.55.55.1 195.55.55.66 -interface
> > Feb 3 22:27:22 fuego2 /bsd: arp_rtrequest: bad gateway value
> > add host 195.55.55.1: gateway 195.55.55.66
> > fuego2#
> > fuego2# netstat -rn -f inet
>
> # route add -net 195.55.55.0/26 -interface 195.55.55.66
yes, I did that test before sending a mail to misc@ but
the current scenario is more complex.
I will need to do proxy-arp for legacy boxes in the
first block, I think that a little ascii diagram can
explain it better:
195.55.55.1 old network 195.55.55.0/26
|INTERNET|---|GW|----------------------|OBSD |-------------
195.55.55.66 (with proxyarp for the old network)
As you can see I need a more specific route for 195.55.55.1/32
in the external interface and a network route to 195.55.55.0/26
in the internal. This is very easy to setup in GNU/Linux, all the
problem is add a 195.55.55.1/32 route to OpenBSD.
** Even adding a route like this works:
route add -net 195.55.55.0/30 -interface 195.55.55.66
but a host route (read 195.55.55.1/32) fails, and it
fails only with OpenBSD. :-?
If I run "tcpdump -i xl0 -n host 195.55.55.1 or host 195.55.55.66"
to see the wire, the OpenBSD tcp/ip stack _don't_send_packets_.
I think it's a problem which the routing logic of OBSD,
why a can setup a /30 route and not a /32 route to
195.55.55.1?
/-----/
fuego2# ping 195.55.55.1
PING 195.55.55.1 (195.55.55.1): 56 data bytes
Feb 3 22:28:38 fuego2 /bsd: arpresolve: can't allocate llinfo
^C--- 195.55.55.1 ping statistics ---
5 packets transmitted, 0 packets received, 100.0% packet loss
fuego2# netstat -rn -f inet
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Interface
127/8 127.0.0.1 UGRS 0 0 33224 lo0
127.0.0.1 127.0.0.1 UH 1 0 33224 lo0
195.55.55.1 195.55.55.66 UHS 0 0 - xl0
195.55.55.64/26 link#1 UC 0 0 - xl0
224/4 127.0.0.1 URS 0 0 33224 lo0
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/IT d- s+:+() a- C+++ UBL+++$ P+ L+++ E--- W++ N+ o++ K- w---
O+ M+ V- PS+ PE+ Y++ PGP+>+++ t+ 5 X+$ R- tv-- b+++ DI D++>+++
G++ e- h+(++) !r !z
------END GEEK CODE BLOCK------