Date: Sat, 24 Mar 2012 06:40:41 +0000 (UTC) From: Joel Dahl <joel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r233418 - head/sbin/route Message-ID: <201203240640.q2O6efD7017242@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203240640.q2O6efD7017242>