Date: Wed, 2 Sep 1998 20:01:47 -0700 (PDT) From: Tom <tom@uniserve.com> To: Don <don@calis.BlackSun.org> Cc: Alex Kwan <kwanalex@hkstar.com>, freebsd-net@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG Subject: Re: How to add route Message-ID: <Pine.BSF.3.96.980902195515.16218B-100000@shell.uniserve.ca> In-Reply-To: <Pine.BSF.3.96.980902222508.10084B-100000@calis.BlackSun.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <network> -netmask <netmask> -interface <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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980902195515.16218B-100000>