From owner-freebsd-questions Mon Oct 4 16:33:21 1999 Delivered-To: freebsd-questions@freebsd.org Received: from hotmail.com (f91.law3.hotmail.com [209.185.241.91]) by hub.freebsd.org (Postfix) with SMTP id B2E1514C81 for ; Mon, 4 Oct 1999 16:33:00 -0700 (PDT) (envelope-from dacster69@hotmail.com) Received: (qmail 13776 invoked by uid 0); 4 Oct 1999 23:32:59 -0000 Message-ID: <19991004233259.13775.qmail@hotmail.com> Received: from 203.29.147.98 by www.hotmail.com with HTTP; Mon, 04 Oct 1999 16:32:55 PDT X-Originating-IP: [203.29.147.98] From: "David Cook" To: freebsd-questions@freebsd.org Subject: Multiple Default Routes !!! Date: Tue, 05 Oct 1999 09:32:55 EST Mime-Version: 1.0 Content-Type: text/plain; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 ... 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