83 was successful, a failure to add a route that
84 already exists or to delete a route that is
85 not in the routing table is ignored. Particu-
86 lar care should be taken when using host or
87 network names in persistent routes, as
88 network-based name resolution services are
89 not available at the time routes are added at
90 startup.
91
92
93 -q Suppress all output.
94
95
96 -R root-dir Specify an alternate root directory where
97 route applies changes. This option is ignored
98 unless used in conjunction with the -p
99 option. When -R is specified, route changes
100 are applied only to the list of saved routes
101 to be used at startup, not to the network
102 routing tables. In addition, certain checks,
103 such as the existance of network interfaces
104 used with -ifp, are skipped. This can be use-
105 ful from within JumpStart scripts, where the
106 root directory of the system being modified
107 is in a location other than /.
108
109
110 -v Print additional details in verbose mode.
111
112
113 Subcommands
114 The following subcommands are supported:
115
116 add Add a route.
117
118
119 change Change aspects of a route (such as its gateway).
120
121
122
123
328
329
330
331 System Administration Commands route(1M)
332
333
334
335 This value was once a route metric, but this metric is no
336 longer used. If the value is specified as 0, then the desti-
337 nation is directly reachable (equivalent to specifying
338 -interface). If it is non-zero but cannot be interpreted as
339 a subnet mask, then a gateway is used (default).
340
341
342 With the AF_INET address family or an IPv4 address, a
343 separate subnet mask can be specified. This can be specified
344 in one of the following ways:
345
346 o IP address following the gateway address . This is
347 typically specified in decimal dot notation as for
348 inet_addr(3SOCKET) rather than in symbollic form.
349
350 o IP address following the -netmask qualifier.
351
352 o Slash character and a decimal length appended to
353 the destination address.
354
355
356 If a subnet mask is not specified, the mask used is the sub-
357 net mask of the output interface selected by the gateway
358 address, if the classful network of the destination is the
359 same as the classful network of the interface. Otherwise,
360 the classful network mask for the destination address is
361 used.
362
363
364 Each of the following examples creates an IPv4 route to the
365 destination 192.0.2.32 subnet with a subnet mask of
366 255.255.255.224:
367
368 example# route add 192.0.2.32/27 somegateway
381
382
383
384 In cases where the gateway does not uniquely identify the
385 output interface (for example, when several interfaces have
386 the same address), you can use the -ifp ifname modifier to
387
388
389
390 SunOS 5.11 Last change: 26 Jun 2006 6
391
392
393
394
395
396
397 System Administration Commands route(1M)
398
399
400
401 specify the interface by name. For example, -ifp lo0 associ-
402 ates the route with the lo0 interface.
403
404 Routing Flags
405 Routes have associated flags that influence operation of the
406 protocols when sending to destinations matched by the
407 routes. These flags can be set (and in some cases cleared,
408 indicated by ~) by including the following modifiers on the
409 command line:
410
411
412
413 Modifier Flag Description
414 ______________________________________________________________________
415 -interface ~RTF_GATEWAY Destination is directly reachable
416 -iface ~RTF_GATEWAY Alias for interface modifier
417 -static RTF_STATIC Manually added route
418 -nostatic ~RTF_STATIC Pretend route was added by kernel or
419 routing daemon
420 -reject RTF_REJECT Emit an ICMP unreachable when matched
421 -blackhole RTF_BLACKHOLE Silently discard packets duing updates
422 -proto1 RTF_PROTO1 Set protocol specific routing flag #1
423 -proto2 RTF_PROTO2 Set protocol specific routing flag #2
|
83 was successful, a failure to add a route that
84 already exists or to delete a route that is
85 not in the routing table is ignored. Particu-
86 lar care should be taken when using host or
87 network names in persistent routes, as
88 network-based name resolution services are
89 not available at the time routes are added at
90 startup.
91
92
93 -q Suppress all output.
94
95
96 -R root-dir Specify an alternate root directory where
97 route applies changes. This option is ignored
98 unless used in conjunction with the -p
99 option. When -R is specified, route changes
100 are applied only to the list of saved routes
101 to be used at startup, not to the network
102 routing tables. In addition, certain checks,
103 such as the existence of network interfaces
104 used with -ifp, are skipped. This can be use-
105 ful from within JumpStart scripts, where the
106 root directory of the system being modified
107 is in a location other than /.
108
109
110 -v Print additional details in verbose mode.
111
112
113 Subcommands
114 The following subcommands are supported:
115
116 add Add a route.
117
118
119 change Change aspects of a route (such as its gateway).
120
121
122
123
328
329
330
331 System Administration Commands route(1M)
332
333
334
335 This value was once a route metric, but this metric is no
336 longer used. If the value is specified as 0, then the desti-
337 nation is directly reachable (equivalent to specifying
338 -interface). If it is non-zero but cannot be interpreted as
339 a subnet mask, then a gateway is used (default).
340
341
342 With the AF_INET address family or an IPv4 address, a
343 separate subnet mask can be specified. This can be specified
344 in one of the following ways:
345
346 o IP address following the gateway address . This is
347 typically specified in decimal dot notation as for
348 inet_addr(3SOCKET) rather than in symbolic form.
349
350 o IP address following the -netmask qualifier.
351
352 o Slash character and a decimal length appended to
353 the destination address.
354
355
356 If a subnet mask is not specified, the mask used is the sub-
357 net mask of the output interface selected by the gateway
358 address, if the classful network of the destination is the
359 same as the classful network of the interface. Otherwise,
360 the classful network mask for the destination address is
361 used.
362
363
364 Each of the following examples creates an IPv4 route to the
365 destination 192.0.2.32 subnet with a subnet mask of
366 255.255.255.224:
367
368 example# route add 192.0.2.32/27 somegateway
381
382
383
384 In cases where the gateway does not uniquely identify the
385 output interface (for example, when several interfaces have
386 the same address), you can use the -ifp ifname modifier to
387
388
389
390 SunOS 5.11 Last change: 26 Jun 2006 6
391
392
393
394
395
396
397 System Administration Commands route(1M)
398
399
400
401 specify the interface by name. For example, *-ifp lo0*
402 associates the route with the *lo0* interface. If the named
403 interface is an underlying interface in an IPMP group, then
404 requests to add a route will automatically be translated to
405 the corresponding IPMP IP interface, and requests to delete
406 or change a route on an underlying interface will fail.
407
408
409 Routing Flags
410 Routes have associated flags that influence operation of the
411 protocols when sending to destinations matched by the
412 routes. These flags can be set (and in some cases cleared,
413 indicated by ~) by including the following modifiers on the
414 command line:
415
416
417
418 Modifier Flag Description
419 ______________________________________________________________________
420 -interface ~RTF_GATEWAY Destination is directly reachable
421 -iface ~RTF_GATEWAY Alias for interface modifier
422 -static RTF_STATIC Manually added route
423 -nostatic ~RTF_STATIC Pretend route was added by kernel or
424 routing daemon
425 -reject RTF_REJECT Emit an ICMP unreachable when matched
426 -blackhole RTF_BLACKHOLE Silently discard packets duing updates
427 -proto1 RTF_PROTO1 Set protocol specific routing flag #1
428 -proto2 RTF_PROTO2 Set protocol specific routing flag #2
|