Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Sep 1999 14:36:19 EST
From:      "David Cook" <dacster69@hotmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Static route problem
Message-ID:  <19990927043622.59866.qmail@hotmail.com>

next in thread | raw e-mail | index | archive | help
I'm having a problem with the route command in FreeBSD 3.1:

I have multiple branches connected to our Head Office via TCP/IP using the
private IP Class C ranges 192.168.X. as follows:

IP Range:       Branch:         Router:

192.168.1       Head Office     192.168.1.15
192.168.2       Branch2         192.168.2.15
.
.
192.168.26      Branch26        192.168.26.15

I have added a freeBSD box to Branch26 to act as a file & print server to
Windows clients via Samba. It was originally set up with a default route
of 192.168.26.15 which is the router that connects the branch to Head
Office.

So far so good ... I can telnet into this machine from any other subnet
including my home subnet of 192.168.77, which connects to Head Office
via ppp.

I now need to use the freebsd box to provide internet access to Branch26
only
(other branches will gain access to the 'net via Head Office ... don't ask,
it's political) which means I need a *static* non-default route for
192.168.0.0 via the 192.168.26.15 router, and a default route for all other
traffic via the dynamic PPP link on the freebsd box. I am having trouble
with the static route, even before trying to set up ppp.

Here's what I tried ...


bash-2.02# uname -a
FreeBSD b26bsd.ahca.com.au 3.1-RELEASE FreeBSD 3.1-RELEASE #0: Mon Feb 15
11:08:
08 GMT 1999     jkh@usw3.freebsd.org:/usr/src/sys/compile/GENERIC  i386

bash-2.02# netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use     Netif
Expire
default            192.168.26.15      UGSc        3        1      ed1
127.0.0.1          127.0.0.1          UH          0        2      lo0
192.168.26         link#1             UC          0        0      ed1
192.168.26.15      0:90:27:72:a4:ba   UHLW        3        0      ed1   1177
192.168.26.255     ff:ff:ff:ff:ff:ff  UHLWb       3      293      ed1

bash-2.02# route add -net 192.168 -netmask 255.255.0.0 192.168.26.15 1
add net 192.168: gateway 192.168.26.15

bash-2.02# netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use     Netif
Expire
default            192.168.26.15      UGSc        1        0      ed1 =>
default            192.168.26.15      UGSc        3        1      ed1
127.0.0.1          127.0.0.1          UH          0        2      lo0
192.168.26         link#1             UC          0        0      ed1
192.168.26.15      0:90:27:72:a4:ba   UHLW        4        0      ed1   1058
192.168.26.255     ff:ff:ff:ff:ff:ff  UHLWb       3      293      ed1


I get *two* default routes!!! I cannot seem to delete the original
without a "route flush", which kills my telnet session from home, and
leaves no default route at all.

(I telnet into the router at Branch26, and then from the router
to the freebsd box to fix the routing table, if you are wondering)

I've tried a number of other combinations, with and without the -netmask
parameter, all with the dual default result. I have done this before with
both SCO OpenServer & Linux, so I believe my theory is correct ... obviously
I am missing something simple.


TIA


David Cook
Information Services Manager
Latrobe Health Services
32 McDonald Street
Morwell  Victoria  3840
Australia
email:dacster69@hotmail.com

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


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?19990927043622.59866.qmail>