xref: /freebsd/sbin/route/route.8 (revision 31a1fa7932ca8d841278825e2af422780937238c)
18fae3551SRodney W. Grimes.\" Copyright (c) 1983, 1991, 1993
28fae3551SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
38fae3551SRodney W. Grimes.\"
48fae3551SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
58fae3551SRodney W. Grimes.\" modification, are permitted provided that the following conditions
68fae3551SRodney W. Grimes.\" are met:
78fae3551SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
88fae3551SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
98fae3551SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
108fae3551SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
118fae3551SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
128fae3551SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors
138fae3551SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
148fae3551SRodney W. Grimes.\"    without specific prior written permission.
158fae3551SRodney W. Grimes.\"
168fae3551SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
178fae3551SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
188fae3551SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
198fae3551SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
208fae3551SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
218fae3551SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
228fae3551SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
238fae3551SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
248fae3551SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
258fae3551SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
268fae3551SRodney W. Grimes.\" SUCH DAMAGE.
278fae3551SRodney W. Grimes.\"
288fae3551SRodney W. Grimes.\"     @(#)route.8	8.3 (Berkeley) 3/19/94
297f3dea24SPeter Wemm.\" $FreeBSD$
308fae3551SRodney W. Grimes.\"
31259fcfd3SRuslan Ermilov.Dd October 2, 2005
328fae3551SRodney W. Grimes.Dt ROUTE 8
331d36c899SRuslan Ermilov.Os
348fae3551SRodney W. Grimes.Sh NAME
358fae3551SRodney W. Grimes.Nm route
361cc580efSPhilippe Charnier.Nd manually manipulate the routing tables
378fae3551SRodney W. Grimes.Sh SYNOPSIS
387c7fb079SRuslan Ermilov.Nm
391cc580efSPhilippe Charnier.Op Fl dnqtv
408fae3551SRodney W. Grimes.Ar command
418fae3551SRodney W. Grimes.Oo
428fae3551SRodney W. Grimes.Op Ar modifiers
438fae3551SRodney W. Grimes.Ar args
448fae3551SRodney W. Grimes.Oc
458fae3551SRodney W. Grimes.Sh DESCRIPTION
46629e80efSPhilippe CharnierThe
47629e80efSPhilippe Charnier.Nm
48629e80efSPhilippe Charnierutility is used to manually manipulate the network
499806e231SRuslan Ermilovrouting tables.
509806e231SRuslan ErmilovIt normally is not needed, as a
5176a88626SChristian Brueffersystem routing table management daemon, such as
528fae3551SRodney W. Grimes.Xr routed 8 ,
538fae3551SRodney W. Grimesshould tend to this task.
548fae3551SRodney W. Grimes.Pp
558fae3551SRodney W. GrimesThe
561cc580efSPhilippe Charnier.Nm
578fae3551SRodney W. Grimesutility supports a limited number of general options,
588fae3551SRodney W. Grimesbut a rich command language, enabling the user to specify
598fae3551SRodney W. Grimesany arbitrary request that could be delivered via the
608fae3551SRodney W. Grimesprogrammatic interface discussed in
618fae3551SRodney W. Grimes.Xr route 4 .
628fae3551SRodney W. Grimes.Pp
631cc580efSPhilippe CharnierThe following options are available:
641cc580efSPhilippe Charnier.Bl -tag -width indent
6576a88626SChristian Brueffer.It Fl d
6676a88626SChristian BruefferRun in debug-only mode, i.e., do not actually modify the routing table.
678fae3551SRodney W. Grimes.It Fl n
681cc580efSPhilippe CharnierBypass attempts to print host and network names symbolically
699806e231SRuslan Ermilovwhen reporting actions.
709806e231SRuslan Ermilov(The process of translating between symbolic
718fae3551SRodney W. Grimesnames and numerical equivalents can be quite time consuming, and
728fae3551SRodney W. Grimesmay require correct operation of the network; thus it may be expedient
7332704e57SDaniel Harristo forget this, especially when attempting to repair networking operations).
7431a1fa79SDavid E. O'Brien.It Fl t
7531a1fa79SDavid E. O'BrienRun in test-only mode.
7631a1fa79SDavid E. O'Brien.Pa /dev/null
7731a1fa79SDavid E. O'Brienis used instead of a socket.
788fae3551SRodney W. Grimes.It Fl v
798fae3551SRodney W. Grimes(verbose) Print additional details.
808fae3551SRodney W. Grimes.It Fl q
81999ffea5SRuslan ErmilovSuppress all output from the
82259fcfd3SRuslan Ermilov.Cm add , change , delete ,
83999ffea5SRuslan Ermilovand
84999ffea5SRuslan Ermilov.Cm flush
85999ffea5SRuslan Ermilovcommands.
868fae3551SRodney W. Grimes.El
878fae3551SRodney W. Grimes.Pp
888fae3551SRodney W. GrimesThe
891cc580efSPhilippe Charnier.Nm
90064b93d5SAnton Berezinutility provides the following commands:
918fae3551SRodney W. Grimes.Pp
928fae3551SRodney W. Grimes.Bl -tag -width Fl -compact
938fae3551SRodney W. Grimes.It Cm add
948fae3551SRodney W. GrimesAdd a route.
958fae3551SRodney W. Grimes.It Cm flush
968fae3551SRodney W. GrimesRemove all routes.
978fae3551SRodney W. Grimes.It Cm delete
988fae3551SRodney W. GrimesDelete a specific route.
99064b93d5SAnton Berezin.It Cm del
100064b93d5SAnton BerezinAnother name for the
101064b93d5SAnton Berezin.Cm delete
102064b93d5SAnton Berezincommand.
1038fae3551SRodney W. Grimes.It Cm change
1048fae3551SRodney W. GrimesChange aspects of a route (such as its gateway).
1058fae3551SRodney W. Grimes.It Cm get
1068fae3551SRodney W. GrimesLookup and display the route for a destination.
1078fae3551SRodney W. Grimes.It Cm monitor
1088fae3551SRodney W. GrimesContinuously report any changes to the routing information base,
1098fae3551SRodney W. Grimesrouting lookup misses, or suspected network partitionings.
1108fae3551SRodney W. Grimes.El
1118fae3551SRodney W. Grimes.Pp
1121cc580efSPhilippe CharnierThe monitor command has the syntax:
1138fae3551SRodney W. Grimes.Pp
11446eea498SRuslan Ermilov.Bd -ragged -offset indent -compact
1157c7fb079SRuslan Ermilov.Nm
1167c7fb079SRuslan Ermilov.Op Fl n
1178fae3551SRodney W. Grimes.Cm monitor
1188fae3551SRodney W. Grimes.Ed
1198fae3551SRodney W. Grimes.Pp
1201cc580efSPhilippe CharnierThe flush command has the syntax:
1218fae3551SRodney W. Grimes.Pp
12246eea498SRuslan Ermilov.Bd -ragged -offset indent -compact
1237c7fb079SRuslan Ermilov.Nm
1247c7fb079SRuslan Ermilov.Op Fl n
1258fae3551SRodney W. Grimes.Cm flush
1268fae3551SRodney W. Grimes.Op Ar family
1278fae3551SRodney W. Grimes.Ed
1288fae3551SRodney W. Grimes.Pp
1298fae3551SRodney W. GrimesIf the
1308fae3551SRodney W. Grimes.Cm flush
1318fae3551SRodney W. Grimescommand is specified,
1321cc580efSPhilippe Charnier.Nm
1338fae3551SRodney W. Grimeswill ``flush'' the routing tables of all gateway entries.
1348fae3551SRodney W. GrimesWhen the address family may is specified by any of the
1358fae3551SRodney W. Grimes.Fl osi ,
1368fae3551SRodney W. Grimes.Fl xns ,
137144b3534SJulian Elischer.Fl atalk ,
138cfa1ca9dSYoshinobu Inoue.Fl inet6 ,
1398fae3551SRodney W. Grimesor
1408fae3551SRodney W. Grimes.Fl inet
1418fae3551SRodney W. Grimesmodifiers, only routes having destinations with addresses in the
1428fae3551SRodney W. Grimesdelineated family will be deleted.
1438fae3551SRodney W. Grimes.Pp
1448fae3551SRodney W. GrimesThe other commands have the following syntax:
1458fae3551SRodney W. Grimes.Pp
14646eea498SRuslan Ermilov.Bd -ragged -offset indent -compact
1477c7fb079SRuslan Ermilov.Nm
1487c7fb079SRuslan Ermilov.Op Fl n
1498fae3551SRodney W. Grimes.Ar command
1508fae3551SRodney W. Grimes.Op Fl net No \&| Fl host
1518fae3551SRodney W. Grimes.Ar destination gateway
152ce6da1a9SRuslan Ermilov.Op Ar netmask
1538fae3551SRodney W. Grimes.Ed
1548fae3551SRodney W. Grimes.Pp
1558fae3551SRodney W. Grimeswhere
1568fae3551SRodney W. Grimes.Ar destination
1578fae3551SRodney W. Grimesis the destination host or network,
1588fae3551SRodney W. Grimes.Ar gateway
1598fae3551SRodney W. Grimesis the next-hop intermediary via which packets should be routed.
1608fae3551SRodney W. GrimesRoutes to a particular host may be distinguished from those to
1618fae3551SRodney W. Grimesa network by interpreting the Internet address specified as the
162ce6da1a9SRuslan Ermilov.Ar destination
163ce6da1a9SRuslan Ermilovargument.
1648fae3551SRodney W. GrimesThe optional modifiers
1658fae3551SRodney W. Grimes.Fl net
1668fae3551SRodney W. Grimesand
1678fae3551SRodney W. Grimes.Fl host
1688fae3551SRodney W. Grimesforce the destination to be interpreted as a network or a host, respectively.
1698fae3551SRodney W. GrimesOtherwise, if the
1708fae3551SRodney W. Grimes.Ar destination
17178c65517SGuy Helmerhas a
17278c65517SGuy Helmer.Dq local address part
17378c65517SGuy Helmerof
17478c65517SGuy HelmerINADDR_ANY
17578c65517SGuy Helmer.Pq Li 0.0.0.0 ,
1768fae3551SRodney W. Grimesor if the
1778fae3551SRodney W. Grimes.Ar destination
1788fae3551SRodney W. Grimesis the symbolic name of a network, then the route is
1798fae3551SRodney W. Grimesassumed to be to a network; otherwise, it is presumed to be a
1808fae3551SRodney W. Grimesroute to a host.
181ce6da1a9SRuslan ErmilovOptionally, the
182ce6da1a9SRuslan Ermilov.Ar destination
183ce6da1a9SRuslan Ermilovcould also be specified in the
1841b33d61dSRuslan Ermilov.Ar net Ns / Ns Ar bits
185ce6da1a9SRuslan Ermilovformat.
1868fae3551SRodney W. Grimes.Pp
1878fae3551SRodney W. GrimesFor example,
1888fae3551SRodney W. Grimes.Li 128.32
1898fae3551SRodney W. Grimesis interpreted as
1908fae3551SRodney W. Grimes.Fl host Li 128.0.0.32 ;
1918fae3551SRodney W. Grimes.Li 128.32.130
1928fae3551SRodney W. Grimesis interpreted as
1938fae3551SRodney W. Grimes.Fl host Li 128.32.0.130 ;
1948fae3551SRodney W. Grimes.Fl net Li 128.32
1958fae3551SRodney W. Grimesis interpreted as
1968fae3551SRodney W. Grimes.Li 128.32.0.0;
1978fae3551SRodney W. Grimes.Fl net Li 128.32.130
1988fae3551SRodney W. Grimesis interpreted as
199ce6da1a9SRuslan Ermilov.Li 128.32.130.0;
200ce6da1a9SRuslan Ermilovand
2011b33d61dSRuslan Ermilov.Li 192.168.64/20
202ce6da1a9SRuslan Ermilovis interpreted as
2031b33d61dSRuslan Ermilov.Fl net Li 192.168.64 Fl netmask Li 255.255.240.0 .
2048fae3551SRodney W. Grimes.Pp
20578c65517SGuy HelmerA
20678c65517SGuy Helmer.Ar destination
20778c65517SGuy Helmerof
20878c65517SGuy Helmer.Ar default
20978c65517SGuy Helmeris a synonym for
21078c65517SGuy Helmer.Fl net Li 0.0.0.0 ,
21178c65517SGuy Helmerwhich is the default route.
21278c65517SGuy Helmer.Pp
2138fae3551SRodney W. GrimesIf the destination is directly reachable
2148fae3551SRodney W. Grimesvia an interface requiring
2158fae3551SRodney W. Grimesno intermediary system to act as a gateway, the
2168fae3551SRodney W. Grimes.Fl interface
2178fae3551SRodney W. Grimesmodifier should be specified;
2188fae3551SRodney W. Grimesthe gateway given is the address of this host on the common network,
2198fae3551SRodney W. Grimesindicating the interface to be used for transmission.
220aa648cf8SJulian ElischerAlternately, if the interface is point to point the name of the interface
221aa648cf8SJulian Elischeritself may be given, in which case the route remains valid even
222072a289aSJulian Elischerif the local or remote addresses change.
2238fae3551SRodney W. Grimes.Pp
2248fae3551SRodney W. GrimesThe optional modifiers
2258fae3551SRodney W. Grimes.Fl xns ,
2268fae3551SRodney W. Grimes.Fl osi ,
227144b3534SJulian Elischer.Fl atalk ,
2288fae3551SRodney W. Grimesand
2298fae3551SRodney W. Grimes.Fl link
2308fae3551SRodney W. Grimesspecify that all subsequent addresses are in the
231144b3534SJulian Elischer.Tn XNS ,
232144b3534SJulian Elischer.Tn OSI ,
233144b3534SJulian Elischeror
234144b3534SJulian Elischer.Tn AppleTalk
2358fae3551SRodney W. Grimesaddress families,
2368fae3551SRodney W. Grimesor are specified as link-level addresses,
2378fae3551SRodney W. Grimesand the names must be numeric specifications rather than
2388fae3551SRodney W. Grimessymbolic names.
2398fae3551SRodney W. Grimes.Pp
2408fae3551SRodney W. GrimesThe optional
2418fae3551SRodney W. Grimes.Fl netmask
242eee9b17eSPhilippe Charniermodifier is intended
2438fae3551SRodney W. Grimesto achieve the effect of an
2448fae3551SRodney W. Grimes.Tn OSI
2458fae3551SRodney W. Grimes.Tn ESIS
2468fae3551SRodney W. Grimesredirect with the netmask option,
2478fae3551SRodney W. Grimesor to manually add subnet routes with
2488fae3551SRodney W. Grimesnetmasks different from that of the implied network interface
2498fae3551SRodney W. Grimes(as would otherwise be communicated using the OSPF or ISIS routing protocols).
2508fae3551SRodney W. GrimesOne specifies an additional ensuing address parameter
2518fae3551SRodney W. Grimes(to be interpreted as a network mask).
2528fae3551SRodney W. GrimesThe implicit network mask generated in the AF_INET case
2538fae3551SRodney W. Grimescan be overridden by making sure this option follows the destination parameter.
2548fae3551SRodney W. Grimes.Pp
255cfa1ca9dSYoshinobu InoueFor
256cfa1ca9dSYoshinobu Inoue.Dv AF_INET6 ,
257cfa1ca9dSYoshinobu Inouethe
258cfa1ca9dSYoshinobu Inoue.Fl prefixlen
259cfa1ca9dSYoshinobu Inouequalifier
260cfa1ca9dSYoshinobu Inoueis available instead of the
261cfa1ca9dSYoshinobu Inoue.Fl mask
262cfa1ca9dSYoshinobu Inouequalifier because non-continuous masks are not allowed in IPv6.
263cfa1ca9dSYoshinobu InoueFor example,
264cfa1ca9dSYoshinobu Inoue.Fl prefixlen Li 32
265cfa1ca9dSYoshinobu Inouespecifies network mask of
266cfa1ca9dSYoshinobu Inoue.Li ffff:ffff:0000:0000:0000:0000:0000:0000
267cfa1ca9dSYoshinobu Inoueto be used.
268cfa1ca9dSYoshinobu InoueThe default value of prefixlen is 64 to get along with
269cfa1ca9dSYoshinobu Inouethe aggregatable address.
270cfa1ca9dSYoshinobu InoueBut 0 is assumed if
271cfa1ca9dSYoshinobu Inoue.Cm default
272cfa1ca9dSYoshinobu Inoueis specified.
273cfa1ca9dSYoshinobu InoueNote that the qualifier works only for
274cfa1ca9dSYoshinobu Inoue.Dv AF_INET6
275cfa1ca9dSYoshinobu Inoueaddress family.
276cfa1ca9dSYoshinobu Inoue.Pp
2778fae3551SRodney W. GrimesRoutes have associated flags which influence operation of the protocols
2788fae3551SRodney W. Grimeswhen sending to destinations matched by the routes.
2798fae3551SRodney W. GrimesThese flags may be set (or sometimes cleared)
2808fae3551SRodney W. Grimesby indicating the following corresponding modifiers:
2818fae3551SRodney W. Grimes.Bd -literal
2828fae3551SRodney W. Grimes-cloning   RTF_CLONING    - generates a new route on use
2838fae3551SRodney W. Grimes-xresolve  RTF_XRESOLVE   - emit mesg on use (for external lookup)
2848fae3551SRodney W. Grimes-iface    ~RTF_GATEWAY    - destination is directly reachable
2858fae3551SRodney W. Grimes-static    RTF_STATIC     - manually added route
2868fae3551SRodney W. Grimes-nostatic ~RTF_STATIC     - pretend route added by kernel or daemon
2878fae3551SRodney W. Grimes-reject    RTF_REJECT     - emit an ICMP unreachable when matched
2888fae3551SRodney W. Grimes-blackhole RTF_BLACKHOLE  - silently discard pkts (during updates)
2898fae3551SRodney W. Grimes-proto1    RTF_PROTO1     - set protocol specific routing flag #1
2908fae3551SRodney W. Grimes-proto2    RTF_PROTO2     - set protocol specific routing flag #2
2918fae3551SRodney W. Grimes-llinfo    RTF_LLINFO     - validly translates proto addr to link addr
2928fae3551SRodney W. Grimes.Ed
2938fae3551SRodney W. Grimes.Pp
2948fae3551SRodney W. GrimesThe optional modifiers
2958fae3551SRodney W. Grimes.Fl rtt ,
2968fae3551SRodney W. Grimes.Fl rttvar ,
2978fae3551SRodney W. Grimes.Fl sendpipe ,
2988fae3551SRodney W. Grimes.Fl recvpipe ,
2998fae3551SRodney W. Grimes.Fl mtu ,
3008fae3551SRodney W. Grimes.Fl hopcount ,
3018fae3551SRodney W. Grimes.Fl expire ,
3028fae3551SRodney W. Grimesand
3038fae3551SRodney W. Grimes.Fl ssthresh
3048fae3551SRodney W. Grimesprovide initial values to quantities maintained in the routing entry
3058fae3551SRodney W. Grimesby transport level protocols, such as TCP or TP4.
3068fae3551SRodney W. GrimesThese may be individually locked by preceding each such modifier to
3078fae3551SRodney W. Grimesbe locked by
3088fae3551SRodney W. Grimesthe
3098fae3551SRodney W. Grimes.Fl lock
3108fae3551SRodney W. Grimesmeta-modifier, or one can
3118fae3551SRodney W. Grimesspecify that all ensuing metrics may be locked by the
3128fae3551SRodney W. Grimes.Fl lockrest
3138fae3551SRodney W. Grimesmeta-modifier.
3148fae3551SRodney W. Grimes.Pp
3158fae3551SRodney W. GrimesIn a
3168fae3551SRodney W. Grimes.Cm change
3178fae3551SRodney W. Grimesor
3188fae3551SRodney W. Grimes.Cm add
3198fae3551SRodney W. Grimescommand where the destination and gateway are not sufficient to specify
3208fae3551SRodney W. Grimesthe route (as in the
3218fae3551SRodney W. Grimes.Tn ISO
3228fae3551SRodney W. Grimescase where several interfaces may have the
3238fae3551SRodney W. Grimessame address), the
3248fae3551SRodney W. Grimes.Fl ifp
3258fae3551SRodney W. Grimesor
3268fae3551SRodney W. Grimes.Fl ifa
3278fae3551SRodney W. Grimesmodifiers may be used to determine the interface or interface address.
3288fae3551SRodney W. Grimes.Pp
3291c59bf7dSRuslan ErmilovThe optional
3301c59bf7dSRuslan Ermilov.Fl proxy
3311c59bf7dSRuslan Ermilovmodifier specifies that the
3321c59bf7dSRuslan Ermilov.Dv RTF_LLINFO
3331c59bf7dSRuslan Ermilovrouting table entry is the
334c4d9468eSRuslan Ermilov.Dq published (proxy-only)
3351c59bf7dSRuslan Ermilov.Tn ARP
3361c59bf7dSRuslan Ermiloventry, as reported by
3371c59bf7dSRuslan Ermilov.Xr arp 8 .
3381c59bf7dSRuslan Ermilov.Pp
339a441e6c4SBruce M SimpsonThe optional
340a441e6c4SBruce M Simpson.Fl genmask
341a441e6c4SBruce M Simpsonmodifier specifies that a cloning mask is present.
342a441e6c4SBruce M SimpsonThis specifies the mask applied when determining if a child route
343a441e6c4SBruce M Simpsonshould be created.
344a441e6c4SBruce M SimpsonIt is only applicable to network routes with the
345a441e6c4SBruce M Simpson.Dv RTF_CLONING
346a441e6c4SBruce M Simpsonflag set.
347a441e6c4SBruce M Simpson.Pp
3488fae3551SRodney W. GrimesAll symbolic names specified for a
3498fae3551SRodney W. Grimes.Ar destination
3508fae3551SRodney W. Grimesor
3518fae3551SRodney W. Grimes.Ar gateway
3528fae3551SRodney W. Grimesare looked up first as a host name using
3538fae3551SRodney W. Grimes.Xr gethostbyname 3 .
3548fae3551SRodney W. GrimesIf this lookup fails,
3558fae3551SRodney W. Grimes.Xr getnetbyname 3
3568fae3551SRodney W. Grimesis then used to interpret the name as that of a network.
3578fae3551SRodney W. Grimes.Pp
358629e80efSPhilippe CharnierThe
359629e80efSPhilippe Charnier.Nm
360629e80efSPhilippe Charnierutility uses a routing socket and the new message types
3611c59bf7dSRuslan Ermilov.Dv RTM_ADD , RTM_DELETE , RTM_GET ,
3628fae3551SRodney W. Grimesand
3631c59bf7dSRuslan Ermilov.Dv RTM_CHANGE .
3648fae3551SRodney W. GrimesAs such, only the super-user may modify
3658fae3551SRodney W. Grimesthe routing tables.
3666087df9eSRuslan Ermilov.Sh EXIT STATUS
3676087df9eSRuslan Ermilov.Ex -std
3688fae3551SRodney W. Grimes.Sh DIAGNOSTICS
36919ab52cbSDima Dorfman.Bl -diag
37019ab52cbSDima Dorfman.It "add [host \&| network ] %s: gateway %s flags %x"
3719806e231SRuslan ErmilovThe specified route is being added to the tables.
3729806e231SRuslan ErmilovThe
3738fae3551SRodney W. Grimesvalues printed are from the routing table entry supplied
3748fae3551SRodney W. Grimesin the
3758fae3551SRodney W. Grimes.Xr ioctl 2
3768fae3551SRodney W. Grimescall.
3778fae3551SRodney W. GrimesIf the gateway address used was not the primary address of the gateway
3788fae3551SRodney W. Grimes(the first one returned by
3798fae3551SRodney W. Grimes.Xr gethostbyname 3 ) ,
3808fae3551SRodney W. Grimesthe gateway address is printed numerically as well as symbolically.
38119ab52cbSDima Dorfman.It "delete [ host \&| network ] %s: gateway %s flags %x"
3828fae3551SRodney W. GrimesAs above, but when deleting an entry.
38319ab52cbSDima Dorfman.It "%s %s done"
3848fae3551SRodney W. GrimesWhen the
3858fae3551SRodney W. Grimes.Cm flush
3868fae3551SRodney W. Grimescommand is specified, each routing table entry deleted
3878fae3551SRodney W. Grimesis indicated with a message of this form.
38819ab52cbSDima Dorfman.It "Network is unreachable"
3898fae3551SRodney W. GrimesAn attempt to add a route failed because the gateway listed was not
3908fae3551SRodney W. Grimeson a directly-connected network.
3918fae3551SRodney W. GrimesThe next-hop gateway must be given.
39219ab52cbSDima Dorfman.It "not in table"
3938fae3551SRodney W. GrimesA delete operation was attempted for an entry which
3940227791bSRuslan Ermilovwas not present in the tables.
39519ab52cbSDima Dorfman.It "routing table overflow"
3968fae3551SRodney W. GrimesAn add operation was attempted, but the system was
3978fae3551SRodney W. Grimeslow on resources and was unable to allocate memory
3988fae3551SRodney W. Grimesto create the new entry.
3991d36c899SRuslan Ermilov.It "gateway uses the same route"
4001d36c899SRuslan ErmilovA
4011d36c899SRuslan Ermilov.Cm change
4021d36c899SRuslan Ermilovoperation resulted in a route whose gateway uses the
4031d36c899SRuslan Ermilovsame route as the one being changed.
4041d36c899SRuslan ErmilovThe next-hop gateway should be reachable through a different route.
4058fae3551SRodney W. Grimes.El
4068fae3551SRodney W. Grimes.Sh SEE ALSO
4075521ff5aSRuslan Ermilov.\".Xr esis 4 ,
4088fae3551SRodney W. Grimes.Xr netintro 4 ,
4098fae3551SRodney W. Grimes.Xr route 4 ,
4101c59bf7dSRuslan Ermilov.Xr arp 8 ,
4115521ff5aSRuslan Ermilov.Xr IPXrouted 8 ,
412bcff8e2aSMike Pritchard.Xr routed 8
413bcff8e2aSMike Pritchard.\".Xr XNSrouted 8
4148fae3551SRodney W. Grimes.Sh HISTORY
4158fae3551SRodney W. GrimesThe
4168fae3551SRodney W. Grimes.Nm
417629e80efSPhilippe Charnierutility appeared in
4188fae3551SRodney W. Grimes.Bx 4.2 .
4198fae3551SRodney W. Grimes.Sh BUGS
4208fae3551SRodney W. GrimesThe first paragraph may have slightly exaggerated
4211cc580efSPhilippe Charnier.Xr routed 8 Ns 's
4228fae3551SRodney W. Grimesabilities.
4232c9743caSBruce M Simpson.Pp
4242c9743caSBruce M SimpsonCurrently, routes with the
42521414470SRuslan Ermilov.Dv RTF_BLACKHOLE
4262c9743caSBruce M Simpsonflag set need to have the gateway set to an instance of the
4272c9743caSBruce M Simpson.Xr lo 4
4282c9743caSBruce M Simpsondriver, using the
4292c9743caSBruce M Simpson.Fl iface
4302c9743caSBruce M Simpsonoption, for the flag to have any effect; unless IP fast forwarding
4312c9743caSBruce M Simpsonis enabled, in which case the meaning of the flag will always
4322c9743caSBruce M Simpsonbe honored.
433