This commit was generated by cvs2svn to compensate for changes in r2587,
[iproute2.git] / man / man8 / ip.8
1 .TH IP 8 "17 January 2002" "iproute2" "Linux"
2 .SH NAME
3 ip \- show / manipulate routing, devices, policy routing and tunnels
4 .SH SYNOPSIS
5
6 .ad l
7 .in +8
8 .ti -8
9 .B ip
10 .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
11 .BR help " }"
12 .sp
13
14 .ti -8
15 .IR OBJECT " := { "
16 .BR link " | " addr " | " route " | " rule " | " neigh " | " tunnel " | "\
17 maddr " | "  mroute " | " monitor " }"
18 .sp
19
20 .ti -8
21 .IR OPTIONS " := { " 
22 \fB\-V\fR[\fIersion\fR] |
23 \fB\-s\fR[\fItatistics\fR] |
24 \fB\-r\fR[\fIesolve\fR] |
25 \fB\-f\fR[\fIamily\fR] {
26 .BR inet " | " inet6 " | " ipx " | " dnet " | " link " } | "
27 \fB\-o\fR[\fIneline\fR] }
28
29 .ti -8
30 .BI "ip link set " DEVICE
31 .RB "{ " up " | " down " | " arp " { " on " | " off " } |"
32 .br
33 .BR promisc " { " on " | " off " } |"
34 .br
35 .BR allmulti " { " on " | " off " } |"
36 .br
37 .BR dynamic " { " on " | " off " } |"
38 .br
39 .BR multicast " { " on " | " off " } |"
40 .br
41 .B  txqueuelen
42 .IR PACKETS " |"
43 .br
44 .B  name
45 .IR NEWNAME " |"
46 .br
47 .B  address
48 .IR LLADDR " |"
49 .B  broadcast 
50 .IR LLADDR " |"
51 .br
52 .B  mtu
53 .IR MTU " }"
54
55 .ti -8
56 .B ip link show
57 .RI "[ " DEVICE " ]"
58
59 .ti -8
60 .BR "ip addr" " { " add " | " del " } " 
61 .IB IFADDR " dev " STRING
62
63 .ti -8
64 .BR "ip addr" " { " show " | " flush " } [ " dev
65 .IR STRING " ] [ "
66 .B  scope
67 .IR SCOPE-ID " ] [ "
68 .B  to 
69 .IR PREFIX " ] [ " FLAG-LIST " ] [ "
70 .B  label
71 .IR PATTERN " ]"
72
73 .ti -8
74 .IR IFADDR " := " PREFIX " | " ADDR
75 .B  peer
76 .IR PREFIX " [ "
77 .B  broadcast
78 .IR ADDR " ] [ "
79 .B  anycast
80 .IR ADDR " ] [ "
81 .B  label
82 .IR STRING " ] [ "
83 .B  scope
84 .IR SCOPE-ID " ]"
85
86 .ti -8
87 .IR SCOPE-ID " := "
88 .RB "[ " host " | " link " | " global " | "
89 .IR NUMBER " ]"
90
91 .ti -8
92 .IR FLAG-LIST " := [ "  FLAG-LIST " ] " FLAG
93
94 .ti -8
95 .IR FLAG " := "
96 .RB "[ " permanent " | " dynamic " | " secondary " | " primary " | "\
97 tentative " | " deprecated " ]"
98
99 .ti -8
100 .BR "ip route" " { "
101 .BR list " | " flush " } "
102 .I  SELECTOR
103
104 .ti -8
105 .B  ip route get 
106 .IR ADDRESS " [ "
107 .BI from " ADDRESS " iif " STRING"
108 .RB " ] [ " oif 
109 .IR STRING " ] [ "
110 .B  tos
111 .IR TOS " ]"
112
113 .ti -8
114 .BR "ip route" " { " add " | " del " | " change " | " append " | "\
115 replace " | " monitor " } "
116 .I  ROUTE
117
118 .ti -8
119 .IR SELECTOR " := "
120 .RB "[ " root
121 .IR PREFIX " ] [ "
122 .B  match
123 .IR PREFIX " ] [ "
124 .B  exact
125 .IR PREFIX " ] [ "
126 .B  table
127 .IR TABLE_ID " ] [ "
128 .B  proto
129 .IR RTPROTO " ] [ "
130 .B  type
131 .IR TYPE " ] [ "
132 .B  scope
133 .IR SCOPE " ]"
134
135 .ti -8
136 .IR ROUTE " := " NODE_SPEC " [ " INFO_SPEC " ]"
137
138 .ti -8
139 .IR NODE_SPEC " := [ " TYPE " ] " PREFIX " ["
140 .B  tos
141 .IR TOS " ] [ "
142 .B  table
143 .IR TABLE_ID " ] [ "
144 .B  proto
145 .IR RTPROTO " ] [ "
146 .B  scope
147 .IR SCOPE " ] [ "
148 .B  metric
149 .IR METRIC " ]"
150
151 .ti -8
152 .IR INFO_SPEC " := " "NH OPTIONS FLAGS" " ["
153 .B  nexthop
154 .IR NH " ] ..."
155
156 .ti -8
157 .IR NH " := [ "
158 .B  via
159 .IR ADDRESS " ] [ "
160 .B  dev
161 .IR STRING " ] [ "
162 .B  weight
163 .IR NUMBER " ] " NHFLAGS
164
165 .ti -8
166 .IR OPTIONS " := " FLAGS " [ "
167 .B  mtu
168 .IR NUMBER " ] [ "
169 .B  advmss
170 .IR NUMBER " ] [ "
171 .B  rtt
172 .IR NUMBER " ] [ "
173 .B  rttvar
174 .IR NUMBER " ] [ "
175 .B  window
176 .IR NUMBER " ] [ "
177 .B  cwnd
178 .IR NUMBER " ] [ "
179 .B  ssthresh
180 .IR REALM " ] [ "
181 .B  realms
182 .IR REALM " ]"
183
184 .ti -8
185 .IR TYPE " := [ "
186 .BR unicast " | " local " | " broadcast " | " multicast " | "\
187 throw " | " unreachable " | " prohibit " | " blackhole " | " nat " ]"
188
189 .ti -8
190 .IR TABLE_ID " := [ "
191 .BR local "| " main " | " default " | " all " |"
192 .IR NUMBER " ]"
193
194 .ti -8
195 .IR SCOPE " := [ "
196 .BR host " | " link " | " global " |"
197 .IR NUMBER " ]"
198
199 .ti -8
200 .IR FLAGS " := [ "
201 .BR equalize " ]"
202
203 .ti -8
204 .IR NHFLAGS " := [ "
205 .BR onlink " | " pervasive " ]"
206
207 .ti -8
208 .IR RTPROTO " := [ "
209 .BR kernel " | " boot " | " static " |"
210 .IR NUMBER " ]"
211
212 .ti -8
213 .B  ip rule
214 .RB " [ " list " | " add " | " del " | " flush " ]"
215 .I  SELECTOR ACTION
216
217 .ti -8
218 .IR SELECTOR " := [ "
219 .B  from
220 .IR PREFIX " ] [ "
221 .B  to
222 .IR PREFIX " ] [ "
223 .B  tos
224 .IR TOS " ] [ "
225 .B  fwmark
226 .IR FWMARK " ] [ "
227 .B  dev
228 .IR STRING " ] [ "
229 .B  pref
230 .IR NUMBER " ]"
231
232 .ti -8
233 .IR ACTION " := [ "
234 .B  table
235 .IR TABLE_ID " ] [ "
236 .B  nat
237 .IR ADDRESS " ] [ "
238 .BR prohibit " | " reject " | " unreachable " ] [ " realms
239 .RI "[" SRCREALM "/]" DSTREALM " ]"
240
241 .ti -8
242 .IR TABLE_ID " := [ "
243 .BR local " | " main " | " default " |"
244 .IR NUMBER " ]"
245
246 .ti -8
247 .BR "ip neigh" " { " add " | " del " | " change " | " replace " } { "
248 .IR ADDR " [ "
249 .B  lladdr
250 .IR LLADDR " ] [ "
251 .BR nud " { " permanent " | " noarp " | " stale " | " reachable " } ] | " proxy
252 .IR ADDR " } [ "
253 .B  dev
254 .IR DEV " ]"
255
256 .ti -8
257 .BR "ip neigh" " { " show " | " flush " } [ " to
258 .IR PREFIX " ] [ "
259 .B  dev
260 .IR DEV " ] [ "
261 .B  nud
262 .IR STATE " ]"
263
264 .ti -8
265 .BR "ip tunnel" " { " add " | " change " | " del " | " show " }"
266 .RI "[ " NAME " ]"
267 .br
268 .RB "[ " mode " { " ipip " | " gre " | " sit " } ]"
269 .br
270 .RB "[ " remote
271 .IR ADDR " ] [ "
272 .B  local
273 .IR ADDR " ]"
274 .br
275 .RB "[ [" i "|" o "]" seq " ] [ [" i "|" o "]" key
276 .IR KEY " ] [ "
277 .RB "[" i "|" o "]" csum " ] ]"
278 .br
279 .RB "[ " ttl
280 .IR TTL " ] [ "
281 .B  tos
282 .IR TOS " ] [ "
283 .RB "[" no "]" pmtudisc " ]"
284 .br
285 .RB "[ " dev
286 .IR PHYS_DEV " ]"
287
288 .ti -8
289 .IR ADDR " := { " IP_ADDRESS " |"
290 .BR any " }"
291
292 .ti -8
293 .IR TOS " := { " NUMBER " |"
294 .BR inherit " }"
295
296 .ti -8
297 .IR TTL " := { " 1 ".." 255 " | "
298 .BR inherit " }"
299
300 .ti -8
301 .IR KEY " := { " DOTTED_QUAD " | " NUMBER " }"
302
303 .ti -8
304 .BR "ip maddr" " [ " add " | " del " ]"
305 .IB MULTIADDR " dev " STRING
306
307 .ti -8
308 .BR "ip maddr show" " [ " dev
309 .IR STRING " ]"
310
311 .ti -8
312 .BR "ip mroute show" " ["
313 .IR PREFIX " ] [ "
314 .B  from
315 .IR PREFIX " ] [ "
316 .B  iif
317 .IR DEVICE " ]"
318
319 .ti -8
320 .BR "ip monitor" " [ " all " |"
321 .IR LISTofOBJECTS " ]"
322 .in -8
323 .ad b
324
325 .SH OPTIONS
326
327 .TP
328 .BR "\-V" , " -Version"
329 print the version of the
330 .B ip
331 utility and exit.
332
333 .TP
334 .BR "\-s" , " \-stats", " \-statistics"
335 output more information.  If the option
336 appears twice or more, the amount of information increases.
337 As a rule, the information is statistics or some time values.
338
339 .TP
340 .BR "\-f" , " \-family"
341 followed by protocol family identifier:
342 .BR "inet" , " inet6"
343 or
344 .B link
345 ,enforce the protocol family to use.  If the option is not present,
346 the protocol family is guessed from other arguments.  If the rest 
347 of the command line does not give enough information to guess the
348 family,
349 .B ip
350 falls back to the default one, usually
351 .B inet
352 or
353 .BR "any" .
354 .B link
355 is a special family identifier meaning that no networking protocol
356 is involved.
357
358 .TP
359 .B \-4
360 shortcut for
361 .BR "-family inet" .
362
363 .TP
364 .B \-6
365 shortcut for
366 .BR "\-family inet6" .
367
368 .TP
369 .B \-0
370 shortcut for
371 .BR "\-family link" .
372
373 .TP
374 .BR "\-o" , " \-oneline"
375 output each record on a single line, replacing line feeds
376 with the
377 .B '\'
378 character. This is convenient when you want to count records 
379 with
380 .BR wc (1)
381  or to
382 .BR grep (1)
383 the output.
384
385 .TP
386 .BR "\-r" , " \-resolve"
387 use the system's name resolver to print DNS names instead of
388 host addresses.
389
390 .SH IP - COMMAND SYNTAX
391
392 .SS
393 .I OBJECT
394
395 .TP
396 .B link
397 - network device.
398
399 .TP
400 .B address
401 - protocol (IP or IPv6) address on a device.
402 .TP
403 .B neighbour
404 - ARP or NDISC cache entry.
405
406 .TP
407 .B route
408 - routing table entry.
409
410 .TP
411 .B rule
412 - rule in routing policy database.
413
414 .TP
415 .B maddress
416 - multicast address.
417
418 .TP
419 .B mroute
420 - multicast routing cache entry.
421
422 .TP
423 .B tunnel
424 - tunnel over IP.
425
426 .PP
427 The names of all objects may be written in full or
428 abbreviated form, f.e.
429 .B address
430 is abbreviated as
431 .B addr
432 or just
433 .B a.
434
435 .SS
436 .I COMMAND
437
438 Specifies the action to perform on the object.
439 The set of possible actions depends on the object type.
440 As a rule, it is possible to
441 .BR "add" , " delete"
442 and
443 .B show
444 (or
445 .B list
446 ) objects, but some objects do not allow all of these operations
447 or have some additional commands.  The
448 .B help
449 command is available for all objects.  It prints
450 out a list of available commands and argument syntax conventions.
451 .sp
452 If no command is given, some default command is assumed.
453 Usually it is
454 .B list
455 or, if the objects of this class cannot be listed,
456 .BR "help" .
457
458 .SH ip link - network device configuration
459
460 .B link
461 is a network device and the corresponding commands
462 display and change the state of devices.
463
464 .SS ip link set - change device attributes
465
466 .TP
467 .BI dev " NAME " (default)
468 .I NAME
469 specifies network device to operate on.
470
471 .TP
472 .BR up " and " down
473 change the state of the device to
474 .B UP
475 or
476 .BR "DOWN" .
477
478 .TP
479 .BR "arp on " or " arp off"
480 change the
481 .B NOARP
482 flag on the device.
483
484 .TP
485 .BR "multicast on " or " multicast off"
486 change the
487 .B MULTICAST
488 flag on the device.
489
490 .TP
491 .BR "dynamic on " or " dynamic off"
492 change the
493 .B DYNAMIC
494 flag on the device.
495
496 .TP
497 .BI name " NAME"
498 change the name of the device.  This operation is not
499 recommended if the device is running or has some addresses
500 already configured.
501
502 .TP
503 .BI txqueuelen " NUMBER"
504 .TP 
505 .BI txqlen " NUMBER"
506 change the transmit queue length of the device.
507
508 .TP
509 .BI mtu " NUMBER"
510 change the 
511 .I MTU
512 of the device.
513
514 .TP
515 .BI address " LLADDRESS"
516 change the station address of the interface.
517
518 .TP
519 .BI broadcast " LLADDRESS"
520 .TP
521 .BI brd " LLADDRESS"
522 .TP
523 .BI peer " LLADDRESS"
524 change the link layer broadcast address or the peer address when
525 the interface is
526 .IR "POINTOPOINT" .
527
528 .PP
529 .B Warning:
530 If multiple parameter changes are requested,
531 .B ip
532 aborts immediately after any of the changes have failed.
533 This is the only case when
534 .B ip
535 can move the system to an unpredictable state.  The solution
536 is to avoid changing several parameters with one
537 .B ip link set
538 call.
539
540 .SS  ip link show - display device attributes
541
542 .TP
543 .BI dev " NAME " (default)
544 .I NAME
545 specifies the network device to show.
546 If this argument is omitted all devices are listed.
547
548 .TP
549 .B up
550 only display running interfaces.
551
552 .SH ip address - protocol address management.
553
554 The
555 .B address
556 is a protocol (IP or IPv6) address attached
557 to a network device.  Each device must have at least one address
558 to use the corresponding protocol.  It is possible to have several
559 different addresses attached to one device.  These addresses are not
560 discriminated, so that the term
561 .B alias
562 is not quite appropriate for them and we do not use it in this document.
563 .sp
564 The
565 .B ip addr
566 command displays addresses and their properties, adds new addresses
567 and deletes old ones.
568
569 .SS ip address add - add new protocol address.
570
571 .TP
572 .BI dev " NAME"
573 the name of the device to add the address to.
574
575 .TP
576 .BI local " ADDRESS " (default)
577 the address of the interface. The format of the address depends
578 on the protocol. It is a dotted quad for IP and a sequence of
579 hexadecimal halfwords separated by colons for IPv6.  The
580 .I ADDRESS
581 may be followed by a slash and a decimal number which encodes
582 the network prefix length.
583
584 .TP
585 .BI peer " ADDRESS"
586 the address of the remote endpoint for pointopoint interfaces.
587 Again, the
588 .I ADDRESS
589 may be followed by a slash and a decimal number, encoding the network
590 prefix length.  If a peer address is specified, the local address
591 cannot have a prefix length.  The network prefix is associated
592 with the peer rather than with the local address.
593
594 .TP
595 .BI broadcast " ADDRESS"
596 the broadcast address on the interface.
597 .sp
598 It is possible to use the special symbols
599 .B '+'
600 and
601 .B '-'
602 instead of the broadcast address.  In this case, the broadcast address
603 is derived by setting/resetting the host bits of the interface prefix.
604
605 .TP
606 .BI label " NAME"
607 Each address may be tagged with a label string.
608 In order to preserve compatibility with Linux-2.0 net aliases,
609 this string must coincide with the name of the device or must be prefixed
610 with the device name followed by colon.
611
612 .TP
613 .BI scope " SCOPE_VALUE"
614 the scope of the area where this address is valid.
615 The available scopes are listed in file
616 .BR "/etc/iproute2/rt_scopes" .
617 Predefined scope values are:
618
619 .in +8
620 .B global
621 - the address is globally valid.
622 .sp
623 .B site
624 - (IPv6 only) the address is site local, i.e. it is
625 valid inside this site.
626 .sp
627 .B link
628 - the address is link local, i.e. it is valid only on this device.
629 .sp
630 .B host
631 - the address is valid only inside this host.
632 .in -8
633
634 .SS ip address delete - delete protocol address
635 .B Arguments:
636 coincide with the arguments of
637 .B ip addr add.
638 The device name is a required argument.  The rest are optional.
639 If no arguments are given, the first address is deleted.
640
641 .SS ip address show - look at protocol addresses
642
643 .TP
644 .BI dev " NAME " (default)
645 name of device.
646
647 .TP
648 .BI scope " SCOPE_VAL"
649 only list addresses with this scope.
650
651 .TP
652 .BI to " PREFIX"
653 only list addresses matching this prefix.
654
655 .TP
656 .BI label " PATTERN"
657 only list addresses with labels matching the
658 .IR "PATTERN" .
659 .I PATTERN
660 is a usual shell style pattern.
661
662 .TP
663 .BR dynamic " and " permanent
664 (IPv6 only) only list addresses installed due to stateless
665 address configuration or only list permanent (not dynamic)
666 addresses.
667
668 .TP
669 .B tentative
670 (IPv6 only) only list addresses which did not pass duplicate
671 address detection.
672
673 .TP
674 .B deprecated
675 (IPv6 only) only list deprecated addresses.
676
677 .TP
678 .BR primary " and " secondary
679 only list primary (or secondary) addresses.
680
681 .SS ip address flush - flush protocol addresses
682 This command flushes the protocol addresses selected by some criteria.
683
684 .PP
685 This command has the same arguments as
686 .B show.
687 The difference is that it does not run when no arguments are given.
688
689 .PP
690 .B Warning:
691 This command (and other
692 .B flush
693 commands described below) is pretty dangerous.  If you make a mistake,
694 it will not forgive it, but will cruelly purge all the addresses.
695
696 .PP
697 With the
698 .B -statistics
699 option, the command becomes verbose. It prints out the number of deleted
700 addresses and the number of rounds made to flush the address list.  If
701 this option is given twice,
702 .B ip addr flush
703 also dumps all the deleted addresses in the format described in the
704 previous subsection.
705
706 .SH ip neighbour - neighbour/arp tables management.
707
708 .B neighbour
709 objects establish bindings between protocol addresses and
710 link layer addresses for hosts sharing the same link.
711 Neighbour entries are organized into tables. The IPv4 neighbour table
712 is known by another name - the ARP table.
713
714 .P
715 The corresponding commands display neighbour bindings
716 and their properties, add new neighbour entries and delete old ones.
717
718 .SS ip neighbour add - add a new neighbour entry
719 .SS ip neighbour change - change an existing entry
720 .SS ip neighbour replace - add a new entry or change an existing one
721
722 These commands create new neighbour records or update existing ones.
723
724 .TP
725 .BI to " ADDRESS " (default)
726 the protocol address of the neighbour. It is either an IPv4 or IPv6 address.
727
728 .TP
729 .BI dev " NAME"
730 the interface to which this neighbour is attached.
731
732 .TP
733 .BI lladdr " LLADDRESS"
734 the link layer address of the neighbour.
735 .I LLADDRESS
736 can also be
737 .BR "null" .
738
739 .TP
740 .BI nud " NUD_STATE"
741 the state of the neighbour entry.
742 .B nud
743 is an abbreviation for 'Neigh bour Unreachability Detection'.
744 The state can take one of the following values:
745
746 .in +8
747 .B permanent
748 - the neighbour entry is valid forever and can be only
749 be removed administratively.
750 .sp
751
752 .B noarp
753 - the neighbour entry is valid. No attempts to validate
754 this entry will be made but it can be removed when its lifetime expires.
755 .sp
756
757 .B reachable
758 - the neighbour entry is valid until the reachability
759 timeout expires.
760 .sp
761
762 .B stale
763 - the neighbour entry is valid but suspicious.
764 This option to
765 .B ip neigh
766 does not change the neighbour state if it was valid and the address
767 is not changed by this command.
768 .in -8
769
770 .SS ip neighbour delete - delete a neighbour entry
771 This command invalidates a neighbour entry.
772
773 .PP
774 The arguments are the same as with
775 .BR "ip neigh add" ,
776 except that
777 .B lladdr
778 and
779 .B nud
780 are ignored.
781
782 .PP
783 .B Warning:
784 Attempts to delete or manually change a
785 .B noarp
786 entry created by the kernel may result in unpredictable behaviour.
787 Particularly, the kernel may try to resolve this address even
788 on a
789 .B NOARP
790 interface or if the address is multicast or broadcast.
791
792 .SS ip neighbour show - list neighbour entries
793
794 This commands displays neighbour tables.
795
796 .TP
797 .BI to " ADDRESS " (default)
798 the prefix selecting the neighbours to list.
799
800 .TP
801 .BI dev " NAME"
802 only list the neighbours attached to this device.
803
804 .TP
805 .B unused
806 only list neighbours which are not currently in use.
807
808 .TP
809 .BI nud " NUD_STATE"
810 only list neighbour entries in this state.
811 .I NUD_STATE
812 takes values listed below or the special value
813 .B all
814 which means all states.  This option may occur more than once.
815 If this option is absent,
816 .B ip
817 lists all entries except for
818 .B none
819 and
820 .BR "noarp" .
821
822 .SS ip neighbour flush - flush neighbour entries
823 This command flushes neighbour tables, selecting
824 entries to flush by some criteria.
825
826 .PP
827 This command has the same arguments as
828 .B show.
829 The differences are that it does not run when no arguments are given,
830 and that the default neighbour states to be flushed do not include
831 .B permanent
832 and
833 .BR "noarp" .
834
835 .PP
836 With the
837 .B -statistics
838 option, the command becomes verbose.  It prints out the number of
839 deleted neighbours and the number of rounds made to flush the
840 neighbour table.  If the option is given
841 twice,
842 .B ip neigh flush
843 also dumps all the deleted neighbours.
844
845 .SH ip route - routing table management
846 Manipulate route entries in the kernel routing tables keep
847 information about paths to other networked nodes.
848 .sp
849 .B Route types:
850
851 .in +8
852 .B unicast
853 - the route entry describes real paths to the destinations covered
854 by the route prefix.
855
856 .sp
857 .B unreachable
858 - these destinations are unreachable.  Packets are discarded and the
859 ICMP message
860 .I host unreachable
861 is generated.
862 The local senders get an
863 .I EHOSTUNREACH
864 error.
865
866 .sp
867 .B blackhole
868 - these destinations are unreachable.  Packets are discarded silently.
869 The local senders get an
870 .I EINVAL
871 error.
872
873 .sp
874 .B prohibit
875 - these destinations are unreachable.  Packets are discarded and the
876 ICMP message
877 .I communication administratively prohibited
878 is generated.  The local senders get an
879 .I EACCES
880 error.
881
882 .sp
883 .B local
884 - the destinations are assigned to this host.  The packets are looped
885 back and delivered locally.
886
887 .sp
888 .B broadcast
889 - the destinations are broadcast addresses.  The packets are sent as
890 link broadcasts.
891
892 .sp
893 .B throw
894 - a special control route used together with policy rules. If such a
895 route is selected, lookup in this table is terminated pretending that
896 no route was found.  Without policy routing it is equivalent to the
897 absence of the route in the routing table.  The packets are dropped
898 and the ICMP message
899 .I net unreachable
900 is generated.  The local senders get an
901 .I ENETUNREACH
902 error.
903
904 .sp
905 .B nat
906 - a special NAT route.  Destinations covered by the prefix
907 are considered to be dummy (or external) addresses which require translation
908 to real (or internal) ones before forwarding.  The addresses to translate to
909 are selected with the attribute
910 .B Warning:
911 Route NAT is no longer supported in Linux 2.6.
912
913
914 .BR "via" .
915 .sp
916 .B anycast
917 .RI "- " "not implemented"
918 the destinations are
919 .I anycast
920 addresses assigned to this host.  They are mainly equivalent
921 to
922 .B local
923 with one difference: such addresses are invalid when used
924 as the source address of any packet.
925
926 .sp
927 .B multicast
928 - a special type used for multicast routing.  It is not present in
929 normal routing tables.
930 .in -8
931
932 .P
933 .B Route tables:
934 Linux-2.x can pack routes into several routing
935 tables identified by a number in the range from 1 to 255 or by
936 name from the file
937 .B /etc/iproute2/rt_tables
938 . By default all normal routes are inserted into the
939 .B main
940 table (ID 254) and the kernel only uses this table when calculating routes.
941
942 .sp
943 Actually, one other table always exists, which is invisible but
944 even more important.  It is the
945 .B local
946 table (ID 255).  This table
947 consists of routes for local and broadcast addresses.  The kernel maintains
948 this table automatically and the administrator usually need not modify it
949 or even look at it.
950
951 The multiple routing tables enter the game when
952 .I policy routing
953 is used.
954
955 .SS ip route add - add new route
956 .SS ip route change - change route
957 .SS ip route replace - change or add new one
958
959 .TP
960 .BI to " TYPE PREFIX " (default)
961 the destination prefix of the route.  If
962 .I TYPE
963 is omitted,
964 .B ip
965 assumes type
966 .BR "unicast" .
967 Other values of
968 .I TYPE
969 are listed above.
970 .I PREFIX
971 is an IP or IPv6 address optionally followed by a slash and the
972 prefix length.  If the length of the prefix is missing,
973 .B ip
974 assumes a full-length host route.  There is also a special
975 .I PREFIX
976 .B default
977 - which is equivalent to IP
978 .B 0/0
979 or to IPv6
980 .BR "::/0" .
981
982 .TP
983 .BI tos " TOS"
984 .TP
985 .BI dsfield " TOS"
986 the Type Of Service (TOS) key.  This key has no associated mask and
987 the longest match is understood as: First, compare the TOS
988 of the route and of the packet.  If they are not equal, then the packet
989 may still match a route with a zero TOS.
990 .I TOS
991 is either an 8 bit hexadecimal number or an identifier
992 from
993 .BR "/etc/iproute2/rt_dsfield" .
994
995 .TP
996 .BI metric " NUMBER"
997 .TP
998 .BI preference " NUMBER"
999 the preference value of the route.
1000 .I NUMBER
1001 is an arbitrary 32bit number.
1002
1003 .TP
1004 .BI table " TABLEID"
1005 the table to add this route to.
1006 .I TABLEID
1007 may be a number or a string from the file
1008 .BR "/etc/iproute2/rt_tables" .
1009 If this parameter is omitted,
1010 .B ip
1011 assumes the
1012 .B main
1013 table, with the exception of
1014 .BR local " , " broadcast " and " nat
1015 routes, which are put into the
1016 .B local
1017 table by default.
1018
1019 .TP
1020 .BI dev " NAME"
1021 the output device name.
1022
1023 .TP
1024 .BI via " ADDRESS"
1025 the address of the nexthop router.  Actually, the sense of this field
1026 depends on the route type.  For normal
1027 .B unicast
1028 routes it is either the true next hop router or, if it is a direct
1029 route installed in BSD compatibility mode, it can be a local address
1030 of the interface.  For NAT routes it is the first address of the block
1031 of translated IP destinations.
1032
1033 .TP
1034 .BI src " ADDRESS"
1035 the source address to prefer when sending to the destinations
1036 covered by the route prefix.
1037
1038 .TP
1039 .BI realm " REALMID"
1040 the realm to which this route is assigned.
1041 .I REALMID
1042 may be a number or a string from the file
1043 .BR "/etc/iproute2/rt_realms" .
1044
1045 .TP
1046 .BI mtu " MTU"
1047 .TP
1048 .BI "mtu lock" " MTU"
1049 the MTU along the path to the destination.  If the modifier
1050 .B lock
1051 is not used, the MTU may be updated by the kernel due to
1052 Path MTU Discovery.  If the modifier
1053 .B lock
1054 is used, no path MTU discovery will be tried, all packets
1055 will be sent without the DF bit in IPv4 case or fragmented
1056 to MTU for IPv6.
1057
1058 .TP
1059 .BI window " NUMBER"
1060 the maximal window for TCP to advertise to these destinations,
1061 measured in bytes.  It limits maximal data bursts that our TCP
1062 peers are allowed to send to us.
1063
1064 .TP
1065 .BI rtt " NUMBER"
1066 the initial RTT ('Round Trip Time') estimate.
1067
1068 .TP
1069 .BI rttvar " NUMBER " "(2.3.15+ only)"
1070 the initial RTT variance estimate.
1071
1072 .TP
1073 .BI ssthresh " NUMBER " "(2.3.15+ only)"
1074 an estimate for the initial slow start threshold.
1075
1076 .TP
1077 .BI cwnd " NUMBER " "(2.3.15+ only)"
1078 the clamp for congestion window.  It is ignored if the
1079 .B lock
1080 flag is not used.
1081
1082 .TP
1083 .BI advmss " NUMBER " "(2.3.15+ only)"
1084 the MSS ('Maximal Segment Size') to advertise to these
1085 destinations when establishing TCP connections.  If it is not given,
1086 Linux uses a default value calculated from the first hop device MTU.
1087 (If the path to these destination is asymmetric, this guess may be wrong.)
1088
1089 .TP
1090 .BI reordering " NUMBER " "(2.3.15+ only)"
1091 Maximal reordering on the path to this destination.
1092 If it is not given, Linux uses the value selected with
1093 .B sysctl
1094 variable
1095 .BR "net/ipv4/tcp_reordering" .
1096
1097 .TP
1098 .BI nexthop " NEXTHOP"
1099 the nexthop of a multipath route.
1100 .I NEXTHOP
1101 is a complex value with its own syntax similar to the top level
1102 argument lists:
1103
1104 .in +8
1105 .BI via " ADDRESS"
1106 - is the nexthop router.
1107 .sp
1108
1109 .BI dev " NAME"
1110 - is the output device.
1111 .sp
1112
1113 .BI weight " NUMBER"
1114 - is a weight for this element of a multipath
1115 route reflecting its relative bandwidth or quality.
1116 .in -8
1117
1118 .TP
1119 .BI scope " SCOPE_VAL"
1120 the scope of the destinations covered by the route prefix.
1121 .I SCOPE_VAL
1122 may be a number or a string from the file
1123 .BR "/etc/iproute2/rt_scopes" .
1124 If this parameter is omitted,
1125 .B ip
1126 assumes scope
1127 .B global
1128 for all gatewayed
1129 .B unicast
1130 routes, scope
1131 .B link
1132 for direct
1133 .BR unicast " and " broadcast
1134 routes and scope
1135 .BR host " for " local
1136 routes.
1137
1138 .TP
1139 .BI protocol " RTPROTO"
1140 the routing protocol identifier of this route.
1141 .I RTPROTO
1142 may be a number or a string from the file
1143 .BR "/etc/iproute2/rt_protos" .
1144 If the routing protocol ID is not given,
1145 .B ip assumes protocol
1146 .B boot
1147 (i.e. it assumes the route was added by someone who doesn't
1148 understand what they are doing).  Several protocol values have
1149 a fixed interpretation.
1150 Namely:
1151
1152 .in +8
1153 .B redirect
1154 - the route was installed due to an ICMP redirect.
1155 .sp
1156
1157 .B kernel
1158 - the route was installed by the kernel during autoconfiguration.
1159 .sp
1160
1161 .B boot
1162 - the route was installed during the bootup sequence.
1163 If a routing daemon starts, it will purge all of them.
1164 .sp
1165
1166 .B static
1167 - the route was installed by the administrator
1168 to override dynamic routing. Routing daemon will respect them
1169 and, probably, even advertise them to its peers.
1170 .sp
1171
1172 .B ra
1173 - the route was installed by Router Discovery protocol.
1174 .in -8
1175
1176 .sp
1177 The rest of the values are not reserved and the administrator is free
1178 to assign (or not to assign) protocol tags.
1179
1180 .TP
1181 .B onlink
1182 pretend that the nexthop is directly attached to this link,
1183 even if it does not match any interface prefix.
1184
1185 .TP
1186 .B equalize
1187 allow packet by packet randomization on multipath routes.
1188 Without this modifier, the route will be frozen to one selected
1189 nexthop, so that load splitting will only occur on per-flow base.
1190 .B equalize
1191 only works if the kernel is patched.
1192
1193 .SS ip route delete - delete route
1194
1195 .B ip route del
1196 has the same arguments as
1197 .BR "ip route add" ,
1198 but their semantics are a bit different.
1199
1200 Key values
1201 .RB "(" to ", " tos ", " preference " and " table ")"
1202 select the route to delete.  If optional attributes are present,
1203 .B ip
1204 verifies that they coincide with the attributes of the route to delete.
1205 If no route with the given key and attributes was found,
1206 .B ip route del
1207 fails.
1208
1209 .SS ip route show - list routes
1210 the command displays the contents of the routing tables or the route(s)
1211 selected by some criteria.
1212
1213 .TP
1214 .BI to " SELECTOR " (default)
1215 only select routes from the given range of destinations.
1216 .I SELECTOR
1217 consists of an optional modifier
1218 .RB "(" root ", " match " or " exact ")"
1219 and a prefix.
1220 .BI root " PREFIX"
1221 selects routes with prefixes not shorter than
1222 .IR PREFIX "."
1223 F.e.
1224 .BI root " 0/0"
1225 selects the entire routing table.
1226 .BI match " PREFIX"
1227 selects routes with prefixes not longer than
1228 .IR PREFIX "."
1229 F.e.
1230 .BI match " 10.0/16"
1231 selects
1232 .IR 10.0/16 ","
1233 .IR 10/8 " and " 0/0 ,
1234 but it does not select
1235 .IR 10.1/16 " and " 10.0.0/24 .
1236 And
1237 .BI exact " PREFIX"
1238 (or just
1239 .IR PREFIX ")"
1240 selects routes with this exact prefix. If neither of these options
1241 are present,
1242 .B ip
1243 assumes
1244 .BI root " 0/0"
1245 i.e. it lists the entire table.
1246
1247 .TP
1248 .BI tos " TOS"
1249 .BI dsfield " TOS"
1250 only select routes with the given TOS.
1251
1252 .TP
1253 .BI table " TABLEID"
1254 show the routes from this table(s).  The default setting is to show
1255 .BR table main "."
1256 .I TABLEID
1257 may either be the ID of a real table or one of the special values:
1258 .sp
1259 .in +8
1260 .B all
1261 - list all of the tables.
1262 .sp
1263 .B cache
1264 - dump the routing cache.
1265 .in -8
1266
1267 .TP
1268 .B cloned
1269 .TP
1270 .B cached
1271 list cloned routes i.e. routes which were dynamically forked from
1272 other routes because some route attribute (f.e. MTU) was updated.
1273 Actually, it is equivalent to
1274 .BR "table cache" "."
1275
1276 .TP
1277 .BI from " SELECTOR"
1278 the same syntax as for
1279 .BR to ","
1280 but it binds the source address range rather than destinations.
1281 Note that the
1282 .B from
1283 option only works with cloned routes.
1284
1285 .TP
1286 .BI protocol " RTPROTO"
1287 only list routes of this protocol.
1288
1289 .TP
1290 .BI scope " SCOPE_VAL"
1291 only list routes with this scope.
1292
1293 .TP
1294 .BI type " TYPE"
1295 only list routes of this type.
1296
1297 .TP
1298 .BI dev " NAME"
1299 only list routes going via this device.
1300
1301 .TP
1302 .BI via " PREFIX"
1303 only list routes going via the nexthop routers selected by
1304 .IR PREFIX "."
1305
1306 .TP
1307 .BI src " PREFIX"
1308 only list routes with preferred source addresses selected
1309 by
1310 .IR PREFIX "."
1311
1312 .TP
1313 .BI realm " REALMID"
1314 .TP
1315 .BI realms " FROMREALM/TOREALM"
1316 only list routes with these realms.
1317
1318 .SS ip route flush - flush routing tables
1319 this command flushes routes selected by some criteria.
1320
1321 .sp
1322 The arguments have the same syntax and semantics as the arguments of
1323 .BR "ip route show" ,
1324 but routing tables are not listed but purged.  The only difference is
1325 the default action:
1326 .B show
1327 dumps all the IP main routing table but
1328 .B flush
1329 prints the helper page.
1330
1331 .sp
1332 With the
1333 .B -statistics
1334 option, the command becomes verbose. It prints out the number of
1335 deleted routes and the number of rounds made to flush the routing
1336 table. If the option is given
1337 twice,
1338 .B ip route flush
1339 also dumps all the deleted routes in the format described in the
1340 previous subsection.
1341
1342 .SS ip route get - get a single route
1343 this command gets a single route to a destination and prints its
1344 contents exactly as the kernel sees it.
1345
1346 .TP
1347 .BI to " ADDRESS " (default)
1348 the destination address.
1349
1350 .TP
1351 .BI from " ADDRESS"
1352 the source address.
1353
1354 .TP
1355 .BI tos " TOS"
1356 .TP
1357 .BI dsfield " TOS"
1358 the Type Of Service.
1359
1360 .TP
1361 .BI iif " NAME"
1362 the device from which this packet is expected to arrive.
1363
1364 .TP
1365 .BI oif " NAME"
1366 force the output device on which this packet will be routed.
1367
1368 .TP
1369 .B connected
1370 if no source address 
1371 .RB "(option " from ")"
1372 was given, relookup the route with the source set to the preferred
1373 address received from the first lookup.
1374 If policy routing is used, it may be a different route.
1375
1376 .P
1377 Note that this operation is not equivalent to
1378 .BR "ip route show" .
1379 .B show
1380 shows existing routes.
1381 .B get
1382 resolves them and creates new clones if necessary.  Essentially,
1383 .B get
1384 is equivalent to sending a packet along this path.
1385 If the
1386 .B iif
1387 argument is not given, the kernel creates a route
1388 to output packets towards the requested destination.
1389 This is equivalent to pinging the destination
1390 with a subsequent
1391 .BR "ip route ls cache" ,
1392 however, no packets are actually sent.  With the
1393 .B iif
1394 argument, the kernel pretends that a packet arrived from this interface
1395 and searches for a path to forward the packet.
1396
1397 .SH ip rule - routing policy database management
1398
1399 .BR "Rule" s
1400 in the routing policy database control the route selection algorithm.
1401
1402 .P
1403 Classic routing algorithms used in the Internet make routing decisions
1404 based only on the destination address of packets (and in theory,
1405 but not in practice, on the TOS field).
1406
1407 .P
1408 In some circumstances we want to route packets differently depending not only
1409 on destination addresses, but also on other packet fields: source address,
1410 IP protocol, transport protocol ports or even packet payload.
1411 This task is called 'policy routing'.
1412
1413 .P
1414 To solve this task, the conventional destination based routing table, ordered
1415 according to the longest match rule, is replaced with a 'routing policy
1416 database' (or RPDB), which selects routes by executing some set of rules.
1417
1418 .P
1419 Each policy routing rule consists of a
1420 .B selector
1421 and an
1422 .B action predicate.
1423 The RPDB is scanned in the order of increasing priority. The selector
1424 of each rule is applied to {source address, destination address, incoming
1425 interface, tos, fwmark} and, if the selector matches the packet,
1426 the action is performed.  The action predicate may return with success.
1427 In this case, it will either give a route or failure indication
1428 and the RPDB lookup is terminated. Otherwise, the RPDB program
1429 continues on the next rule.
1430
1431 .P
1432 Semantically, natural action is to select the nexthop and the output device.
1433
1434 .P
1435 At startup time the kernel configures the default RPDB consisting of three
1436 rules:
1437
1438 .TP
1439 1.
1440 Priority: 0, Selector: match anything, Action: lookup routing
1441 table
1442 .B local
1443 (ID 255).
1444 The
1445 .B local
1446 table is a special routing table containing
1447 high priority control routes for local and broadcast addresses.
1448 .sp
1449 Rule 0 is special. It cannot be deleted or overridden.
1450
1451 .TP
1452 2.
1453 Priority: 32766, Selector: match anything, Action: lookup routing
1454 table
1455 .B main
1456 (ID 254).
1457 The
1458 .B main
1459 table is the normal routing table containing all non-policy
1460 routes. This rule may be deleted and/or overridden with other
1461 ones by the administrator.
1462
1463 .TP
1464 3.
1465 Priority: 32767, Selector: match anything, Action: lookup routing
1466 table
1467 .B default
1468 (ID 253).
1469 The
1470 .B default
1471 table is empty.  It is reserved for some post-processing if no previous
1472 default rules selected the packet.
1473 This rule may also be deleted.
1474
1475 .P
1476 Each RPDB entry has additional
1477 attributes.  F.e. each rule has a pointer to some routing
1478 table.  NAT and masquerading rules have an attribute to select new IP
1479 address to translate/masquerade.  Besides that, rules have some
1480 optional attributes, which routes have, namely
1481 .BR "realms" .
1482 These values do not override those contained in the routing tables.  They
1483 are only used if the route did not select any attributes.
1484
1485 .sp
1486 The RPDB may contain rules of the following types:
1487
1488 .in +8
1489 .B unicast
1490 - the rule prescribes to return the route found
1491 in the routing table referenced by the rule.
1492
1493 .B blackhole
1494 - the rule prescribes to silently drop the packet.
1495
1496 .B unreachable
1497 - the rule prescribes to generate a 'Network is unreachable' error.
1498
1499 .B prohibit
1500 - the rule prescribes to generate 'Communication is administratively
1501 prohibited' error.
1502
1503 .B nat
1504 - the rule prescribes to translate the source address
1505 of the IP packet into some other value.
1506 .in -8
1507
1508 .SS ip rule add - insert a new rule
1509 .SS ip rule delete - delete a rule
1510
1511 .TP
1512 .BI type " TYPE " (default)
1513 the type of this rule.  The list of valid types was given in the previous
1514 subsection.
1515
1516 .TP
1517 .BI from " PREFIX"
1518 select the source prefix to match.
1519
1520 .TP
1521 .BI to " PREFIX"
1522 select the destination prefix to match.
1523
1524 .TP
1525 .BI iif " NAME"
1526 select the incoming device to match.  If the interface is loopback,
1527 the rule only matches packets originating from this host.  This means
1528 that you may create separate routing tables for forwarded and local
1529 packets and, hence, completely segregate them.
1530
1531 .TP
1532 .BI tos " TOS"
1533 .TP
1534 .BI dsfield " TOS"
1535 select the TOS value to match.
1536
1537 .TP
1538 .BI fwmark " MARK"
1539 select the
1540 .B fwmark
1541 value to match.
1542
1543 .TP
1544 .BI priority " PREFERENCE"
1545 the priority of this rule.  Each rule should have an explicitly
1546 set
1547 .I unique
1548 priority value.
1549
1550 .TP
1551 .BI table " TABLEID"
1552 the routing table identifier to lookup if the rule selector matches.
1553
1554 .TP
1555 .BI realms " FROM/TO"
1556 Realms to select if the rule matched and the routing table lookup
1557 succeeded.  Realm 
1558 .I TO
1559 is only used if the route did not select any realm.
1560
1561 .TP
1562 .BI nat " ADDRESS"
1563 The base of the IP address block to translate (for source addresses).
1564 The 
1565 .I ADDRESS
1566 may be either the start of the block of NAT addresses (selected by NAT
1567 routes) or a local host address (or even zero).
1568 In the last case the router does not translate the packets, but
1569 masquerades them to this address.
1570
1571 .B Warning:
1572 Changes to the RPDB made with these commands do not become active
1573 immediately.  It is assumed that after a script finishes a batch of
1574 updates, it flushes the routing cache with
1575 .BR "ip route flush cache" .
1576
1577 .SS ip rule flush - also dumps all the deleted rules.
1578 This command has no arguments.
1579
1580 .SS ip rule show - list rules
1581 This command has no arguments.
1582
1583 .SH ip maddress - multicast addresses management
1584
1585 .B maddress
1586 objects are multicast addresses.
1587
1588 .SS ip maddress show - list multicast addresses
1589
1590 .TP
1591 .BI dev " NAME " (default)
1592 the device name.
1593
1594 .SS ip maddress add - add a multicast address
1595 .SS ip maddress delete - delete a multicast address
1596 these commands attach/detach a static link layer multicast address
1597 to listen on the interface.
1598 Note that it is impossible to join protocol multicast groups
1599 statically.  This command only manages link layer addresses.
1600
1601 .TP
1602 .BI address " LLADDRESS " (default)
1603 the link layer multicast address.
1604
1605 .TP
1606 .BI dev " NAME"
1607 the device to join/leave this multicast address.
1608
1609 .SH ip mroute - multicast routing cache management
1610 .B mroute
1611 objects are multicast routing cache entries created by a user level
1612 mrouting daemon (f.e.
1613 .B pimd
1614 or
1615 .B mrouted
1616 ).
1617
1618 Due to the limitations of the current interface to the multicast routing
1619 engine, it is impossible to change
1620 .B mroute
1621 objects administratively, so we may only display them.  This limitation
1622 will be removed in the future.
1623
1624 .SS ip mroute show - list mroute cache entries
1625
1626 .TP
1627 .BI to " PREFIX " (default)
1628 the prefix selecting the destination multicast addresses to list.
1629
1630 .TP
1631 .BI iif " NAME"
1632 the interface on which multicast packets are received.
1633
1634 .TP
1635 .BI from " PREFIX"
1636 the prefix selecting the IP source addresses of the multicast route.
1637
1638 .SH ip tunnel - tunnel configuration
1639 .B tunnel
1640 objects are tunnels, encapsulating packets in IPv4 packets and then
1641 sending them over the IP infrastructure.
1642
1643 .SS ip tunnel add - add a new tunnel
1644 .SS ip tunnel change - change an existing tunnel
1645 .SS ip tunnel delete - destroy a tunnel
1646
1647 .TP
1648 .BI name " NAME " (default)
1649 select the tunnel device name.
1650
1651 .TP
1652 .BI mode " MODE"
1653 set the tunnel mode.  Three modes are currently available:
1654 .BR ipip ", " sit " and " gre "."
1655
1656 .TP
1657 .BI remote " ADDRESS"
1658 set the remote endpoint of the tunnel.
1659
1660 .TP
1661 .BI local " ADDRESS"
1662 set the fixed local address for tunneled packets.
1663 It must be an address on another interface of this host.
1664
1665 .TP
1666 .BI ttl " N"
1667 set a fixed TTL 
1668 .I N
1669 on tunneled packets.
1670 .I N
1671 is a number in the range 1--255. 0 is a special value
1672 meaning that packets inherit the TTL value. 
1673 The default value is:
1674 .BR "inherit" .
1675
1676 .TP
1677 .BI tos " T"
1678 .TP
1679 .BI dsfield " T"
1680 set a fixed TOS
1681 .I T
1682 on tunneled packets.
1683 The default value is:
1684 .BR "inherit" .
1685
1686 .TP
1687 .BI dev " NAME" 
1688 bind the tunnel to the device
1689 .I NAME
1690 so that tunneled packets will only be routed via this device and will
1691 not be able to escape to another device when the route to endpoint
1692 changes.
1693
1694 .TP
1695 .B nopmtudisc
1696 disable Path MTU Discovery on this tunnel.
1697 It is enabled by default.  Note that a fixed ttl is incompatible
1698 with this option: tunnelling with a fixed ttl always makes pmtu
1699 discovery.
1700
1701 .TP
1702 .BI key " K"
1703 .TP
1704 .BI ikey " K"
1705 .TP
1706 .BI okey " K"
1707 .RB ( " only GRE tunnels " )
1708 use keyed GRE with key
1709 .IR K ". " K
1710 is either a number or an IP address-like dotted quad.
1711 The
1712 .B key
1713 parameter sets the key to use in both directions.
1714 The
1715 .BR ikey " and " okey
1716 parameters set different keys for input and output.
1717    
1718 .TP
1719 .BR csum ", " icsum ", " ocsum
1720 .RB ( " only GRE tunnels " )
1721 generate/require checksums for tunneled packets.
1722 The 
1723 .B ocsum
1724 flag calculates checksums for outgoing packets.
1725 The
1726 .B icsum
1727 flag requires that all input packets have the correct
1728 checksum.  The
1729 .B csum
1730 flag is equivalent to the combination
1731 .BR "icsum ocsum" .
1732
1733 .TP
1734 .BR seq ", " iseq ", " oseq
1735 .RB ( " only GRE tunnels " )
1736 serialize packets.
1737 The
1738 .B oseq
1739 flag enables sequencing of outgoing packets.
1740 The
1741 .B iseq
1742 flag requires that all input packets are serialized.
1743 The
1744 .B  seq
1745 flag is equivalent to the combination 
1746 .BR "iseq oseq" .
1747 .B It isn't work. Don't use it.
1748
1749 .SS ip tunnel show - list tunnels
1750 This command has no arguments.
1751
1752 .SH ip monitor and rtmon - state monitoring
1753
1754 The
1755 .B ip
1756 utility can monitor the state of devices, addresses
1757 and routes continuously.  This option has a slightly different format.
1758 Namely, the
1759 .B monitor
1760 command is the first in the command line and then the object list follows:
1761
1762 .BR "ip monitor" " [ " all " |"
1763 .IR LISTofOBJECTS " ]"
1764
1765 .I OBJECT-LIST
1766 is the list of object types that we want to monitor.
1767 It may contain
1768 .BR link ", " address " and " route "."
1769 If no
1770 .B file
1771 argument is given,
1772 .B ip
1773 opens RTNETLINK, listens on it and dumps state changes in the format
1774 described in previous sections.
1775
1776 .P
1777 If a file name is given, it does not listen on RTNETLINK,
1778 but opens the file containing RTNETLINK messages saved in binary format
1779 and dumps them.  Such a history file can be generated with the
1780 .B rtmon
1781 utility.  This utility has a command line syntax similar to
1782 .BR "ip monitor" .
1783 Ideally,
1784 .B rtmon
1785 should be started before the first network configuration command
1786 is issued. F.e. if you insert:
1787 .sp
1788 .in +8
1789 rtmon file /var/log/rtmon.log
1790 .in -8
1791 .sp
1792 in a startup script, you will be able to view the full history
1793 later.
1794
1795 .P
1796 Certainly, it is possible to start
1797 .B rtmon
1798 at any time.
1799 It prepends the history with the state snapshot dumped at the moment
1800 of starting.
1801
1802 .SH HISTORY
1803 .B ip
1804 was written by Alexey N. Kuznetsov and added in Linux 2.2.
1805 .SH SEE ALSO
1806 .BR tc (8)
1807 .br
1808 .RB "IP Command reference " ip-cref.ps
1809 .br
1810 .RB "IP tunnels " ip-cref.ps
1811
1812 .SH AUTHOR
1813 Original Manpage  by Michail Litvak <mci@owl.openwall.com>