Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Aug 1999 08:23:47 -0700
From:      "Joseph T. Lee" <nugundam@best.com>
To:        freebsd-questions@freebsd.org
Subject:   static route setup problems
Message-ID:  <19990805082347.A22408@la.best.com>
In-Reply-To: <Pine.BSF.4.10.9908031645230.13768-100000@greenwood3.nerv.nu>; from Joseph Lee on Tue, Aug 03, 1999 at 05:36:13PM -0700
References:  <Pine.BSF.4.10.9908031645230.13768-100000@greenwood3.nerv.nu>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi, I'm having difficulting with routing which searching the mailing lists
and reading the man page have not helped.

My fbsd machine (A) is on the same physical segment behind a hub with 2
other machines (B,C).  Machines A/B/C each have a real IP, but the IPs
are not on the same subnet (due to stupid cable modem IP distribution).

I've gotten B/C to see each other directly with the route command in
DOS, but I haven't been able to get an equivalent route add command working
for FreeBSD.  I would like to know where I'm getting it wrong.

I've tried:
(1) route add -host <B.ip> -interface de0
(1) gives me:
Destination        Gateway            Flags     Refs     Use     Netif Expire
gw                 0:40:5:43:34:24    UHLW        0     7937      lo0
<B.ip>             0:40:5:43:34:24    UHLS        0        0      de0

Shouldn't the ethernet address for the gateway to B be B's, not gw's?

(2) route add -host <B.ip> -interface <A.ip>
(2) gives me:
Destination        Gateway            Flags     Refs     Use     Netif Expire
gw                 0:40:5:43:34:24    UHLW        0     7937      lo0
<B.ip>             gw                 UHS         0        0      de0

and a /kernel: arp_rtrequest: bad gateway value

(3) route add -host <B.ip> <A.ip>
(3) gives:
Destination        Gateway            Flags     Refs     Use     Netif Expire
gw                 0:40:5:43:34:24    UHLW        0     7937      lo0
<B.ip>             gw                 UGHS        0        0      de0

traceroute to <B.ip> (<B.ip>), 30 hops max, 40 byte packets
 1  gw (<A.ip>)  1.762 ms  0.812 ms  0.769 ms
 2  gw (<A.ip>)  1.379 ms  1.340 ms  1.315 ms

(4) route add -host <B.ip> -netmask 255.255.255.255 <A.ip>
(4) gives:
Destination        Gateway            Flags     Refs     Use     Netif Expire
gw                 0:40:5:43:34:24    UHLW        0     7937      lo0
<B.ip>             gw                 UGSc        0        0      de0

This gives the same traceroute as (3).

The only way I've been able to see B from A (or C from A) is to set the
netmask on A's de0 to 255.254.0.0 and broadcast to <A.ip.255> so that I get
a routing table of:
Destination        Gateway            Flags     Refs     Use     Netif Expire
24/15              link#1             UC          0        0      de0
gw                 0:40:5:43:34:24    UHLW        0     7937      lo0
<B.ip>             0:0:c0:8c:8b:93    UHLW        0        2      de0   1183

This allows A to see B/C fine, but messes things up if A needs to route to
other machines on the 24/15 subnet which aren't directly connected.

What is the correct route command?  Thanks for any help,
-- 
Joseph nugundam =best=com==/==\=IIGS=/==\=Playstation=/==\=Civic HX CVT=/==\
#            Anime Expo 1999            >> www.anime-expo.org/              >
#      FreeBSD: The Power to Serve      >> www.freebsd.org                  >
# EX: The Online World of Anime & Manga >> www.ex.org/                     /


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?19990805082347.A22408>