From owner-freebsd-net Wed Sep 2 20:03:43 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA00937 for freebsd-net-outgoing; Wed, 2 Sep 1998 20:03:43 -0700 (PDT) (envelope-from owner-freebsd-net@FreeBSD.ORG) Received: from pop.uniserve.com (pop.uniserve.com [204.244.156.3]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id UAA00932; Wed, 2 Sep 1998 20:03:42 -0700 (PDT) (envelope-from tom@uniserve.com) Received: from shell.uniserve.ca [204.244.186.218] by pop.uniserve.com with smtp (Exim 1.82 #4) id 0zEPeg-0006uF-00; Wed, 2 Sep 1998 20:01:50 -0700 Date: Wed, 2 Sep 1998 20:01:47 -0700 (PDT) From: Tom X-Sender: tom@shell.uniserve.ca To: Don cc: Alex Kwan , freebsd-net@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG Subject: Re: How to add route In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, 2 Sep 1998, Don wrote: > > I use the linux command (I was a linux user before) : > > route add -net 192.168.1.0 netmask 255.255.255.0 ed0 > the command should be: > route add -net -netmask -interface > or in your case: > route add -net 192.168.1.0 -netmask 255.255.255.0 -interface ed0 In most cases the "-net" bit is not required. "Classic UNIX" route syntax is: route add 192.168.1.0 192.168.1.1 (where 192.168.1.1 is the gateway). When UNIX went classless, the "-netmask" param was added, so the netmask of the route could be specified. Since then most Unixes have adopted (including FreeBSD) the more convienent, "/bits" syntax: route add 192.168.1.0/24 192.168.1.1 > the -interface flag is required for the route addition and netmask Interface flags is NOT required. The interface should always be implied by the gateway address anyhow. Using the "-interface" flag can do funny things. In fact, it is only recent that "-interface" even works on FreeBSD. > requires a - in front of it to signal the flag. > > -don Tom To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message