summaryrefslogtreecommitdiffstats
path: root/sbin/route
diff options
context:
space:
mode:
authorjoel <joel@FreeBSD.org>2012-03-24 06:40:41 +0000
committerjoel <joel@FreeBSD.org>2012-03-24 06:40:41 +0000
commit679009409c43d8fc17a58b44b8f4c001d5cce2c5 (patch)
tree882315b001263075b04562e58a00e8ee518c2728 /sbin/route
parentdf574149ee305ec2743ad783af3da228288518bd (diff)
downloadFreeBSD-src-679009409c43d8fc17a58b44b8f4c001d5cce2c5.zip
FreeBSD-src-679009409c43d8fc17a58b44b8f4c001d5cce2c5.tar.gz
Document the show alias and add an EXAMPLES section.
Diffstat (limited to 'sbin/route')
-rw-r--r--sbin/route/route.837
1 files changed, 36 insertions, 1 deletions
diff --git a/sbin/route/route.8 b/sbin/route/route.8
index 5956786..713d0db 100644
--- a/sbin/route/route.8
+++ b/sbin/route/route.8
@@ -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 destination.
.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"
OpenPOWER on IntegriCloud