Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Sep 1998 15:41:24 +0200 (CEST)
From:      Stephan Mantler <step@step.cg.tuwien.ac.at>
To:        freebsd-questions@FreeBSD.ORG
Subject:   fun with route(8)
Message-ID:  <199809231341.PAA21982@step.cg.tuwien.ac.at>

next in thread | raw e-mail | index | archive | help
Hi,

I'm experiencing a surprising amount of trouble with our local routing
configuration. Basically, we have a freebsd box with three interfaces:
192.168.1.1/24 and 192.168.2.1/24 to the local subnets and one for
the uplink. The problem is that the next-hop router is on a different
class C subnet than the gateway's uplink interface (which is a /32 
address).

the gateway is running 2.2CAM-19980716-SNAP (on top of 2.2.7).

Let's say the gateway's external interface was 194.123.123.250, and
the uplink 194.123.128.10 (not the real addresses).

So what we tried was:
route add -host 194.123.128.10 194.123.123.250 -interface
route add -net default 194.123.128.10

result: couldn't even ping the uplink. second route doesn't work,
'network unreachable'.

next try:
(deleting the above routes first)
route add -host 194.123.128.10 -interface xl2
route add -net default 194.123.128.10

result: route to the uplink shows up in routing table with the gateway
address the same (ether hardware) address as the uplink interface. bad.
second route still doesn't work.

then: delete all arp entries. route to 194.123.128.10 gone. (ok, that
didn't really surprise me).

*CHANGED* the arp entry for this ip address to the proper one.
result: can ping uplink.

then: (still trying to get a default route up)
route add -net default 194.123.123.250    (this can't be what i want.)
route change default 194.123.128.10       (i'm not expecting this to work)

it does work, tho. result: i've got a route to the proper uplink. things
work.


all of this leaves a few questions open:

-) what's wrong with the original two statements? after reading the man
   pages (several times), this should've been the proper way to set things
   up..
-) why does the route add -net default fail, while i can add a different
   default route (to one of the local interfaces) and then *change* it to
   use the gateway i want?
   it appears to me that route doesn't recognize the uplink to be directly
   reachable, despite the -interface option. (route change ...128.10 -iface
   didn't help either).
-) what's with the arp entry? i can't believe i need to change it by hand..


thanks in advance for any comments/help,
-step.

-- 
Stephan Mantler  <step@acm.org>  | Our greatest glory consists not in never 
triathlete-sysadmin-fire fighter | falling,but in rising every time we fall.

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?199809231341.PAA21982>