From owner-svn-src-head@FreeBSD.ORG Sat Mar 24 06:40:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 393ED106564A; Sat, 24 Mar 2012 06:40:42 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 246E78FC0C; Sat, 24 Mar 2012 06:40:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2O6efdJ017244; Sat, 24 Mar 2012 06:40:41 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2O6efD7017242; Sat, 24 Mar 2012 06:40:41 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201203240640.q2O6efD7017242@svn.freebsd.org> From: Joel Dahl Date: Sat, 24 Mar 2012 06:40:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233418 - head/sbin/route X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2012 06:40:42 -0000 Author: joel (doc committer) Date: Sat Mar 24 06:40:41 2012 New Revision: 233418 URL: http://svn.freebsd.org/changeset/base/233418 Log: Document the show alias and add an EXAMPLES section. Modified: head/sbin/route/route.8 Modified: head/sbin/route/route.8 ============================================================================== --- head/sbin/route/route.8 Sat Mar 24 06:28:15 2012 (r233417) +++ head/sbin/route/route.8 Sat Mar 24 06:40:41 2012 (r233418) @@ -28,7 +28,7 @@ .\" @(#)route.8 8.3 (Berkeley) 3/19/94 .\" $FreeBSD$ .\" -.Dd October 2, 2005 +.Dd March 24, 2012 .Dt ROUTE 8 .Os .Sh NAME @@ -107,6 +107,10 @@ Lookup and display the route for a desti .It Cm monitor Continuously report any changes to the routing information base, routing lookup misses, or suspected network partitionings. +.It Cm show +Another name for the +.Cm get +command. .El .Pp The monitor command has the syntax: @@ -344,6 +348,37 @@ As such, only the super-user may modify the routing tables. .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Add a default route to the network routing table. +This will send all packets for destinations not available in the routing table +to the default gateway at 192.168.1.1: +.Pp +.Dl route add -net 0.0.0.0/0 192.168.1.1 +.Pp +A shorter version of adding a default route can also be written as: +.Pp +.Dl route add default 192.168.1.1 +.Pp +Add a static route to the 172.16.10.0/24 network via the 172.16.1.1 gateway: +.Pp +.Dl route add -net 172.16.10.0/24 172.16.1.1 +.Pp +Change the gateway of an already established static route in the routing table: +.Pp +.Dl route change -net 172.16.10.0/24 172.16.1.2 +.Pp +Display the route for a destination network: +.Pp +.Dl route show 172.16.10.0 +.Pp +Delete a static route from the routing table: +.Pp +.Dl route delete -net 172.16.10.0/24 172.16.1.2 +.Pp +Remove all routes from the routing table: +.Pp +.Dl route flush +.Pp .Sh DIAGNOSTICS .Bl -diag .It "add [host \&| network ] %s: gateway %s flags %x"