Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Oct 1999 10:28:12 -0700 (PDT)
From:      Alfred Perlstein <bright@wintelcom.net>
To:        David Cook <dacster69@hotmail.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Multiple Default Routes !!!
Message-ID:  <Pine.BSF.4.05.9910051022230.6368-100000@fw.wintelcom.net>
In-Reply-To: <19991004233259.13775.qmail@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tue, 5 Oct 1999, David Cook wrote:

> I'm really hoping that some kind soul will have a look at this
> problem for me ... I've posted this twice now with absolutely
> ** zero ** response.
> 
> Anyway ... third time lucky ...

removing the '1' from the end of your route add command makes it 
look like it works.

route add -net 192.168 -netmask 255.255.0.0 192.168.26.15

_not_

route add -net 192.168 -netmask 255.255.0.0 192.168.26.15 1

I assume the '1' is from your sysV experiance meaning metric,
that's not how BSD does it afaik.

-Alfred



> 
> 
> 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
> 



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?Pine.BSF.4.05.9910051022230.6368-100000>