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