Print this page
Clearview IPMP manpages
| Split |
Close |
| Expand all |
| Collapse all |
--- old/./route.1m.txt
+++ new/./route.1m.txt
1 1 System Administration Commands route(1M)
2 2
3 3
4 4
5 5 NAME
6 6 route - manually manipulate the routing tables
7 7
8 8 SYNOPSIS
9 9 route [-fnvq] sub-command [ [modifiers] args]
10 10
11 11
12 12 route [-fnvq] [-p [-R root-dir]] add | delete [modifiers] destination gateway
13 13 [args]
14 14
15 15
16 16 route [-fnvq] change | get [modifiers] destination
17 17 [gateway [args]]
18 18
19 19
20 20 route [-fn] monitor [modifiers]
21 21
22 22
23 23 route [-fnvq] flush [modifiers]
24 24
25 25
26 26 route -p [-R root-dir] show
27 27
28 28
29 29 DESCRIPTION
30 30 route manually manipulates the network routing tables. These
31 31 tables are normally maintained by the system routing daemon,
32 32 such as in.routed(1M) and in.ripngd(1M).
33 33
34 34
35 35 route supports a limited number of general options, but a
36 36 rich command language. Users can specify an arbitrary
37 37 request that can be delivered by means of the programmatic
38 38 interface discussed in route(7P).
39 39
40 40
41 41 route uses a routing socket and the new message types
42 42 RTM_ADD, RTM_DELETE, RTM_GET, and RTM_CHANGE. While only
43 43 superusers can modify routing tables, the RTM_GET operation
44 44 is allowed for non-privileged users.
45 45
46 46 OPTIONS
47 47 -f Flush the routing tables of all gateway
48 48 entries. If you use the -f option in conjunc-
49 49 tion with any of the route sub-commands,
50 50 route flushes the gateways before performing
51 51 the sub-command. Specify the table to flush
52 52 by placing the -inet or -inet6 modifier
53 53 immediately after the -f option. If unspeci-
54 54 fied, flushing IPv4 (-inet) routes is the
55 55 default.
56 56
57 57
58 58
59 59
60 60 SunOS 5.11 Last change: 26 Jun 2006 1
61 61
62 62
63 63
64 64
65 65
66 66
67 67 System Administration Commands route(1M)
68 68
69 69
70 70
71 71 -n Prevent attempts to print host and network
72 72 names symbolically when reporting actions.
73 73 This option is useful when name servers are
74 74 unavailable.
75 75
76 76
77 77 -p Make changes to the network route tables per-
78 78 sistent across system restarts. The operation
79 79 is applied to the network routing tables
80 80 first and, if successful, is then applied to
81 81 the list of saved routes used at system
82 82 startup. In determining whether an operation
83 83 was successful, a failure to add a route that
84 84 already exists or to delete a route that is
85 85 not in the routing table is ignored. Particu-
86 86 lar care should be taken when using host or
87 87 network names in persistent routes, as
88 88 network-based name resolution services are
89 89 not available at the time routes are added at
90 90 startup.
91 91
92 92
|
↓ open down ↓ |
92 lines elided |
↑ open up ↑ |
93 93 -q Suppress all output.
94 94
95 95
96 96 -R root-dir Specify an alternate root directory where
97 97 route applies changes. This option is ignored
98 98 unless used in conjunction with the -p
99 99 option. When -R is specified, route changes
100 100 are applied only to the list of saved routes
101 101 to be used at startup, not to the network
102 102 routing tables. In addition, certain checks,
103 - such as the existance of network interfaces
103 + such as the existence of network interfaces
104 104 used with -ifp, are skipped. This can be use-
105 105 ful from within JumpStart scripts, where the
106 106 root directory of the system being modified
107 107 is in a location other than /.
108 108
109 109
110 110 -v Print additional details in verbose mode.
111 111
112 112
113 113 Subcommands
114 114 The following subcommands are supported:
115 115
116 116 add Add a route.
117 117
118 118
119 119 change Change aspects of a route (such as its gateway).
120 120
121 121
122 122
123 123
124 124
125 125
126 126 SunOS 5.11 Last change: 26 Jun 2006 2
127 127
128 128
129 129
130 130
131 131
132 132
133 133 System Administration Commands route(1M)
134 134
135 135
136 136
137 137 delete Delete a specific route.
138 138
139 139
140 140 flush Remove all gateway entries from the routing
141 141 table.
142 142
143 143
144 144 get Look up and display the route for a destination.
145 145
146 146
147 147 monitor Continuously report any changes to the routing
148 148 information base, routing lookup misses, or
149 149 suspected network partitionings.
150 150
151 151
152 152 show Display the list of routes to be applied at sys-
153 153 tem startup. Can be used only in conjunction with
154 154 the -p option.
155 155
156 156
157 157
158 158 The add and delete sub-commands have the following syntax:
159 159
160 160 route [ -fnvq ] cmd destination gateway [metric/netmask]
161 161
162 162
163 163
164 164
165 165 where cmd is add or delete, destination is the destination
166 166 host or network, and gateway is the next-hop intermediary
167 167 through which packets should be routed. Modifiers described
168 168 in OPERANDS can be placed anywhere on the command line.
169 169
170 170
171 171 The get and change sub-commands have the following syntax:
172 172
173 173 route [ -fnvq ] cmd destination [gateway [metric/netmask]]
174 174
175 175
176 176
177 177
178 178 where cmd is get or change, destination is the destination
179 179 host or network, and gateway is the next-hop intermediary
180 180 through which packets should be routed. Modifiers described
181 181 in OPERANDS can be placed anywhere on the command line.
182 182
183 183
184 184 The monitor sub-command has the following syntax:
185 185
186 186 route monitor [ -inet | -inet6 ]
187 187
188 188
189 189
190 190
191 191
192 192 SunOS 5.11 Last change: 26 Jun 2006 3
193 193
194 194
195 195
196 196
197 197
198 198
199 199 System Administration Commands route(1M)
200 200
201 201
202 202
203 203 OPERANDS
204 204 route executes its sub-commands on routes to destinations by
205 205 way of gateways.
206 206
207 207 Destinations and Gateways
208 208 By default, destination and gateway addresses are inter-
209 209 preted as IPv4 addresses. All symbolic names are tried first
210 210 as a host name, using getipnodebyname(3SOCKET). If this
211 211 lookup fails in the AF_INET case, getnetbyname(3SOCKET)
212 212 interprets the name as that of a network.
213 213
214 214
215 215 Including an optional modifier on the command line before
216 216 the address changes how the route sub-command interprets it.
217 217
218 218
219 219 The following modifiers are supported:
220 220
221 221 -inet Force the address to be interpreted as an IPv4
222 222 address, that is, under the AF_INET address fam-
223 223 ily.
224 224
225 225
226 226 -inet6 Force the address to be interpreted as an IPv6
227 227 address, that is, under the AF_INET6 address fam-
228 228 ily.
229 229
230 230
231 231
232 232 For IPv4 addresses, routes to a particular host are by
233 233 default distinguished from those to a network by interpret-
234 234 ing the Internet address specified as the destination. If
235 235 the destination has a local address part (that is, the por-
236 236 tion not covered by the netmask) of 0, or if the destination
237 237 is resolved as the symbolic name of a network, then the
238 238 route is assumed to be to a network; otherwise, it is
239 239 presumed to be a route to a host.
240 240
241 241
242 242 You can force this selection by using one of the following
243 243 modifiers:
244 244
245 245 -host Force the destination to be interpreted as a host.
246 246
247 247
248 248 -net Force the destination to be interpreted as a net-
249 249 work.
250 250
251 251
252 252
253 253 For example:
254 254
255 255
256 256
257 257
258 258 SunOS 5.11 Last change: 26 Jun 2006 4
259 259
260 260
261 261
262 262
263 263
264 264
265 265 System Administration Commands route(1M)
266 266
267 267
268 268
269 269 Destination Destination Equivalent
270 270 __________________________________________________________
271 271 128.32 -host 128.0.0.32
272 272 128.32.130 -host 128.32.0.130
273 273 -net 128.32 128.32.0.0
274 274 -net 128.32.130 128.32.130.0
275 275
276 276
277 277
278 278 Two modifiers avoid confusion between addresses and keywords
279 279 (for example., host used as a symbolic host name). You can
280 280 distinguish a destination by preceding it with the -dst
281 281 modifier. You can distinguish a gateway address by using the
282 282 -gateway modifier. If the destination is directly reachable
283 283 by way of an interface requiring no intermediary IP router
284 284 to act as a gateway, this can be indicated by using the
285 285 -interface or -iface modifier.
286 286
287 287
288 288 In the following example, the route does not refer to an
289 289 external gateway (router), but rather to one of the
290 290 machine's interfaces. Packets with IP destination addresses
291 291 matching the destination and mask on such a route are sent
292 292 out on the interface identified by the gateway address. For
293 293 interfaces using the ARP protocol, this type of route is
294 294 used to specify that all matching destinations are local to
295 295 the physical link. That is, a host could be configured to
296 296 ARP for all addresses, without regard to the configured
297 297 interface netmask, by adding a default route using this com-
298 298 mand. For example:
299 299
300 300 example# route add default hostname -interface
301 301
302 302
303 303
304 304
305 305 where gateway address hostname is the name or IP address
306 306 associated with the network interface over which all match-
307 307 ing packets should be sent. On a host with a single network
308 308 interface, hostname is usually the same as the nodename
309 309 returned by the uname -n command. See uname(1).
310 310
311 311
312 312 For backward compatibility with older systems, directly
313 313 reachable routes can also be specified by placing a 0 after
314 314 the gateway address:
315 315
316 316 example# route add default hostname 0
317 317
318 318
319 319
320 320
321 321
322 322
323 323
324 324 SunOS 5.11 Last change: 26 Jun 2006 5
325 325
326 326
327 327
328 328
329 329
330 330
331 331 System Administration Commands route(1M)
332 332
333 333
334 334
335 335 This value was once a route metric, but this metric is no
336 336 longer used. If the value is specified as 0, then the desti-
337 337 nation is directly reachable (equivalent to specifying
|
↓ open down ↓ |
224 lines elided |
↑ open up ↑ |
338 338 -interface). If it is non-zero but cannot be interpreted as
339 339 a subnet mask, then a gateway is used (default).
340 340
341 341
342 342 With the AF_INET address family or an IPv4 address, a
343 343 separate subnet mask can be specified. This can be specified
344 344 in one of the following ways:
345 345
346 346 o IP address following the gateway address . This is
347 347 typically specified in decimal dot notation as for
348 - inet_addr(3SOCKET) rather than in symbollic form.
348 + inet_addr(3SOCKET) rather than in symbolic form.
349 349
350 350 o IP address following the -netmask qualifier.
351 351
352 352 o Slash character and a decimal length appended to
353 353 the destination address.
354 354
355 355
356 356 If a subnet mask is not specified, the mask used is the sub-
357 357 net mask of the output interface selected by the gateway
358 358 address, if the classful network of the destination is the
359 359 same as the classful network of the interface. Otherwise,
360 360 the classful network mask for the destination address is
361 361 used.
362 362
363 363
364 364 Each of the following examples creates an IPv4 route to the
365 365 destination 192.0.2.32 subnet with a subnet mask of
366 366 255.255.255.224:
367 367
368 368 example# route add 192.0.2.32/27 somegateway
369 369 example# route add 192.0.2.32 -netmask 255.255.255.224 somegateway
370 370 example# route add 192.0.2.32 somegateway 255.255.255.224
371 371
372 372
373 373
374 374
375 375 For IPv6, only the slash format is accepted. The following
376 376 example creates an IPv6 route to the destination 33fe:: with
377 377 a netmask of 16 one-bits followed by 112 zero-bits.
378 378
379 379 example# route add -inet6 3ffe::/16 somegateway
380 380
381 381
382 382
383 383
384 384 In cases where the gateway does not uniquely identify the
385 385 output interface (for example, when several interfaces have
386 386 the same address), you can use the -ifp ifname modifier to
387 387
388 388
389 389
390 390 SunOS 5.11 Last change: 26 Jun 2006 6
|
↓ open down ↓ |
32 lines elided |
↑ open up ↑ |
391 391
392 392
393 393
394 394
395 395
396 396
397 397 System Administration Commands route(1M)
398 398
399 399
400 400
401 - specify the interface by name. For example, -ifp lo0 associ-
402 - ates the route with the lo0 interface.
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.
403 407
408 +
404 409 Routing Flags
405 410 Routes have associated flags that influence operation of the
406 411 protocols when sending to destinations matched by the
407 412 routes. These flags can be set (and in some cases cleared,
408 413 indicated by ~) by including the following modifiers on the
409 414 command line:
410 415
411 416
412 417
413 418 Modifier Flag Description
414 419 ______________________________________________________________________
415 420 -interface ~RTF_GATEWAY Destination is directly reachable
416 421 -iface ~RTF_GATEWAY Alias for interface modifier
417 422 -static RTF_STATIC Manually added route
418 423 -nostatic ~RTF_STATIC Pretend route was added by kernel or
419 424 routing daemon
420 425 -reject RTF_REJECT Emit an ICMP unreachable when matched
421 426 -blackhole RTF_BLACKHOLE Silently discard packets duing updates
422 427 -proto1 RTF_PROTO1 Set protocol specific routing flag #1
423 428 -proto2 RTF_PROTO2 Set protocol specific routing flag #2
424 429 -private RTF_PRIVATE Do not advertise this route
425 430 -multirt RTF_MULTIRT Creates the specified redundant route
426 431 -setsrc RTF_SETSRC Assigns the default source address
427 432
428 433
429 434
430 435 The optional modifiers -rtt, -rttvar, -sendpipe, -recvpipe,
431 436 -mtu, -hopcount, -expire, and -ssthresh provide initial
432 437 values to quantities maintained in the routing entry by
433 438 transport level protocols, such as TCP. These can be indivi-
434 439 dually locked either by preceding each modifier to be locked
435 440 by the -lock meta-modifier, or by specifying that all ensu-
436 441 ing metrics can be locked by the -lockrest meta-modifier.
437 442
438 443
439 444 Some transport layer protocols can support only some of
440 445 these metrics. The following optional modifiers are sup-
441 446 ported:
442 447
443 448 -expire Lifetime for the entry. This optional modifier
444 449 is not currently supported.
445 450
446 451
447 452 -hopcount Maximum hop count. This optional modifier is
448 453 not currently supported.
449 454
450 455
451 456 -mtu Maximum MTU in bytes.
452 457
453 458
454 459
455 460
456 461 SunOS 5.11 Last change: 26 Jun 2006 7
457 462
458 463
459 464
460 465
461 466
462 467
463 468 System Administration Commands route(1M)
464 469
465 470
466 471
467 472 -recvpipe Receive pipe size in bytes.
468 473
469 474
470 475 -rtt Round trip time in microseconds.
471 476
472 477
473 478 -rttvar Round trip time variance in microseconds.
474 479
475 480
476 481 -sendpipe Send pipe size in bytes.
477 482
478 483
479 484 -ssthresh Send pipe size threshold in bytes.
480 485
481 486
482 487 -secattr Security attributes of the route. This modifier
483 488 is available only if the system is configured
484 489 with the Solaris Trusted Extensions feature.
485 490
486 491 The -secattr modifier has the following format:
487 492
488 493 min_sl=val,max_sl=val,doi=val,cipso
489 494
490 495 or:
491 496
492 497 sl=VAL,doi=VAL,cipso
493 498
494 499 In the first form, above, the val for min_sl
495 500 and max_sl is a sensitivity label in either hex
496 501 or string form. The val for doi is a non-
497 502 negative integer. The route will apply only for
498 503 packets with the same domain of interpretation
499 504 as defined by the doi value and within the
500 505 accreditation range defined by the min_sl and
501 506 max_sl values. The cipso keyword is optional
502 507 and set by default. Valid min_sl, max_sl and
503 508 doi keyword/value pairs are mandatory. Note
504 509 that if val contains a space, it must be pro-
505 510 tected by double quotes.
506 511
507 512 The second form, above, is equivalent to speci-
508 513 fying the first form with the same VAL for
509 514 min_sl and max_sl. The second form should be
510 515 used for the get command, because get uses only
511 516 a single sensitivity label.
512 517
513 518
514 519 Compatibility
515 520 The modifiers host and net are taken to be equivalent to
516 521 -host and -net. To specify a symbolic address that matches
517 522 one of these names, use the dst or gateway keyword to dis-
518 523 tinguish it. For example: -dst host
519 524
520 525
521 526
522 527 SunOS 5.11 Last change: 26 Jun 2006 8
523 528
524 529
525 530
526 531
527 532
528 533
529 534 System Administration Commands route(1M)
530 535
531 536
532 537
533 538 The following two flags are also accepted for compatibility
534 539 with older systems, but have no effect.
535 540
536 541
537 542
538 543 Modifier Flag
539 544 __________________________________________________________
540 545 -cloning RTF_CLONING
541 546 -xresolve RTF_XRESOLVE
542 547
543 548
544 549
545 550 The -ifa hostname modifier is also accepted, but has no
546 551 effect.
547 552
548 553 FILES
549 554 /etc/defaultrouter List of default routers
550 555
551 556
552 557 /etc/hosts List of host names and net addresses
553 558
554 559
555 560 /etc/networks List of network names and addresses
556 561
557 562
558 563 ATTRIBUTES
559 564 See attributes(5) for descriptions of the following attri-
560 565 butes:
561 566
562 567
563 568
564 569 ____________________________________________________________
565 570 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
566 571 |_____________________________|_____________________________|
567 572 | Availability | SUNWcsu |
568 573 |_____________________________|_____________________________|
569 574
570 575
571 576 SEE ALSO
572 577 uname(1), in.ripngd(1M), in.routed(1M), netstat(1M),
573 578 routed(1M), ioctl(2), getipnodebyname(3SOCKET),
574 579 getnetbyname(3SOCKET), inet_addr(3SOCKET), defaultrouter(4),
575 580 hosts(4), networks(4), attributes(5), ARP(7P), ip(7P),
576 581 route(7P), routing(7P)
577 582
578 583 DIAGNOSTICS
579 584 add [ host| network] destination:gateway flags
580 585
581 586 The specified route is being added to the tables. The
582 587 values printed are from the routing table entry supplied
583 588 in the ioctl(2) call. If the gateway address used was
584 589 not the primary address of the gateway (the first one
585 590
586 591
587 592
588 593 SunOS 5.11 Last change: 26 Jun 2006 9
589 594
590 595
591 596
592 597
593 598
594 599
595 600 System Administration Commands route(1M)
596 601
597 602
598 603
599 604 returned by getipnodebyname(3SOCKET)) the gateway
600 605 address is printed numerically as well as symbolically.
601 606
602 607
603 608 delete [ host| network] destination:gateway flags
604 609 change [ host| network] destination:gateway flags
605 610
606 611 As add, but when deleting or changing an entry.
607 612
608 613
609 614 destination done
610 615
611 616 When the -f flag is specified, or the flush sub-command
612 617 is used, each routing table entry deleted is indicated
613 618 with a message of this form.
614 619
615 620
616 621 Network is unreachable
617 622
618 623 An attempt to add a route failed because the gateway
619 624 listed was not on a directly-connected network. Give the
620 625 next-hop gateway instead.
621 626
622 627
623 628 not in table
624 629
625 630 A delete operation was attempted for an entry that is
626 631 not in the table.
627 632
628 633
629 634 entry exists
630 635
631 636 An add operation was attempted for a route that already
632 637 exists in the kernel.
633 638
634 639
635 640 routing table overflow
636 641
637 642 An operation was attempted, but the system was unable to
638 643 allocate memory to create the new entry.
639 644
640 645
641 646 insufficient privileges
642 647
643 648 An attempt to add, delete, change, or flush a route
644 649 failed because the calling process does not have
645 650 appropriate privileges.
646 651
647 652
648 653 NOTES
649 654 Specifying that destinations are local (with the -inter-
650 655 facemodifier) assumes that the routers implement proxy ARP,
651 656
652 657
653 658
654 659 SunOS 5.11 Last change: 26 Jun 2006 10
655 660
656 661
657 662
658 663
659 664
660 665
661 666 System Administration Commands route(1M)
662 667
663 668
664 669
665 670 meaning that they respond to ARP queries for all reachable
666 671 destinations. Normally, using either router discovery or RIP
667 672 is more reliable and scalable than using proxy ARP. See
668 673 in.routed(1M) for information related to RIP.
669 674
670 675
671 676 Combining the all destinations are local route with subnet
672 677 or network routes can lead to unpredictable results. The
673 678 search order as it relates to the all destinations are local
674 679 route are undefined and can vary from release to release.
675 680
676 681
677 682
678 683
679 684
680 685
681 686
682 687
683 688
684 689
685 690
686 691
687 692
688 693
689 694
690 695
691 696
692 697
693 698
694 699
695 700
696 701
697 702
698 703
699 704
700 705
701 706
702 707
703 708
704 709
705 710
706 711
707 712
708 713
709 714
710 715
711 716
712 717
713 718
714 719
715 720
716 721
717 722
718 723
719 724
720 725 SunOS 5.11 Last change: 26 Jun 2006 11
721 726
722 727
723 728
|
↓ open down ↓ |
310 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX