]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/blob - man/man8/ip.8
ip: add documentation for initrwnd
[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 " | " addrlabel " | " route " | " rule " | " neigh " | "\
17  tunnel " | " 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 add link " DEVICE
31 .RB "[ " name " ]"
32 .I NAME
33 .br
34 .RB "[ " txqueuelen 
35 .IR PACKETS " ]"
36 .br
37 .RB "[ " address
38 .IR LLADDR " ]"
39 .RB "[ " broadcast
40 .IR LLADDR " ]"
41 .br
42 .RB "[ " mtu
43 .IR MTU " ]"
44 .br
45 .BR type TYPE
46 .RI "[ " ARGS " ]"
47
48 .ti -8
49 .IR TYPE " := [ "
50 .BR vlan " | " maclan " | " can " ]"
51
52 .ti -8
53 .BI "ip link delete " DEVICE
54 .BI type TYPE
55 .RI "[ " ARGS " ]"
56
57 .ti -8
58 .BI "ip link set " DEVICE
59 .RB "{ " up " | " down " | " arp " { " on " | " off " } |"
60 .br
61 .BR promisc " { " on " | " off " } |"
62 .br
63 .BR allmulticast " { " on " | " off " } |"
64 .br
65 .BR dynamic " { " on " | " off " } |"
66 .br
67 .BR multicast " { " on " | " off " } |"
68 .br
69 .B  txqueuelen
70 .IR PACKETS " |"
71 .br
72 .B  name
73 .IR NEWNAME " |"
74 .br
75 .B  address
76 .IR LLADDR " |"
77 .B  broadcast
78 .IR LLADDR " |"
79 .br
80 .B  mtu
81 .IR MTU " |"
82 .br
83 .B  netns
84 .IR PID " |"
85 .br
86 .B alias
87 .IR NAME  " |"
88 .br
89 .B vf
90 .IR NUM " ["
91 .B  mac
92 .IR LLADDR " ] ["
93 .B vlan
94 .IR VLANID " [ "
95 .B qos
96 .IR VLAN-QOS " ] ] ["
97 .B rate
98 .IR TXRATE " ]"
99
100 .ti -8
101 .B ip link show
102 .RI "[ " DEVICE " ]"
103
104 .ti -8
105 .BR "ip addr" " { " add " | " del " } "
106 .IB IFADDR " dev " STRING
107
108 .ti -8
109 .BR "ip addr" " { " show " | " flush " } [ " dev
110 .IR STRING " ] [ "
111 .B  scope
112 .IR SCOPE-ID " ] [ "
113 .B  to
114 .IR PREFIX " ] [ " FLAG-LIST " ] [ "
115 .B  label
116 .IR PATTERN " ]"
117
118 .ti -8
119 .IR IFADDR " := " PREFIX " | " ADDR
120 .B  peer
121 .IR PREFIX " [ "
122 .B  broadcast
123 .IR ADDR " ] [ "
124 .B  anycast
125 .IR ADDR " ] [ "
126 .B  label
127 .IR STRING " ] [ "
128 .B  scope
129 .IR SCOPE-ID " ]"
130
131 .ti -8
132 .IR SCOPE-ID " := "
133 .RB "[ " host " | " link " | " global " | "
134 .IR NUMBER " ]"
135
136 .ti -8
137 .IR FLAG-LIST " := [ "  FLAG-LIST " ] " FLAG
138
139 .ti -8
140 .IR FLAG " := "
141 .RB "[ " permanent " | " dynamic " | " secondary " | " primary " | "\
142 tentative " | " deprecated " | " dadfailed " | " temporary " ]"
143
144 .ti -8
145 .BR "ip addrlabel" " { " add " | " del " } " prefix
146 .BR PREFIX " [ "
147 .B dev
148 .IR DEV " ] [ "
149 .B label
150 .IR NUMBER " ]"
151
152 .ti -8
153 .BR "ip addrlabel" " { " list " | " flush " }"
154
155 .ti -8
156 .BR "ip route" " { "
157 .BR list " | " flush " } "
158 .I  SELECTOR
159
160 .ti -8
161 .B  ip route get
162 .IR ADDRESS " [ "
163 .BI from " ADDRESS " iif " STRING"
164 .RB " ] [ " oif
165 .IR STRING " ] [ "
166 .B  tos
167 .IR TOS " ]"
168
169 .ti -8
170 .BR "ip route" " { " add " | " del " | " change " | " append " | "\
171 replace " | " monitor " } "
172 .I  ROUTE
173
174 .ti -8
175 .IR SELECTOR " := "
176 .RB "[ " root
177 .IR PREFIX " ] [ "
178 .B  match
179 .IR PREFIX " ] [ "
180 .B  exact
181 .IR PREFIX " ] [ "
182 .B  table
183 .IR TABLE_ID " ] [ "
184 .B  proto
185 .IR RTPROTO " ] [ "
186 .B  type
187 .IR TYPE " ] [ "
188 .B  scope
189 .IR SCOPE " ]"
190
191 .ti -8
192 .IR ROUTE " := " NODE_SPEC " [ " INFO_SPEC " ]"
193
194 .ti -8
195 .IR NODE_SPEC " := [ " TYPE " ] " PREFIX " ["
196 .B  tos
197 .IR TOS " ] [ "
198 .B  table
199 .IR TABLE_ID " ] [ "
200 .B  proto
201 .IR RTPROTO " ] [ "
202 .B  scope
203 .IR SCOPE " ] [ "
204 .B  metric
205 .IR METRIC " ]"
206
207 .ti -8
208 .IR INFO_SPEC " := " "NH OPTIONS FLAGS" " ["
209 .B  nexthop
210 .IR NH " ] ..."
211
212 .ti -8
213 .IR NH " := [ "
214 .B  via
215 .IR ADDRESS " ] [ "
216 .B  dev
217 .IR STRING " ] [ "
218 .B  weight
219 .IR NUMBER " ] " NHFLAGS
220
221 .ti -8
222 .IR OPTIONS " := " FLAGS " [ "
223 .B  mtu
224 .IR NUMBER " ] [ "
225 .B  advmss
226 .IR NUMBER " ] [ "
227 .B  rtt
228 .IR TIME " ] [ "
229 .B  rttvar
230 .IR TIME " ] [ "
231 .B  window
232 .IR NUMBER " ] [ "
233 .B  cwnd
234 .IR NUMBER " ] [ "
235 .B  ssthresh
236 .IR REALM " ] [ "
237 .B  realms
238 .IR REALM " ] [ "
239 .B  rto_min
240 .IR TIME " ] [ "
241 .B  initcwnd
242 .IR NUMBER " ] [ "
243 .B  initrwnd
244 .IR NUMBER " ]"
245
246 .ti -8
247 .IR TYPE " := [ "
248 .BR unicast " | " local " | " broadcast " | " multicast " | "\
249 throw " | " unreachable " | " prohibit " | " blackhole " | " nat " ]"
250
251 .ti -8
252 .IR TABLE_ID " := [ "
253 .BR local "| " main " | " default " | " all " |"
254 .IR NUMBER " ]"
255
256 .ti -8
257 .IR SCOPE " := [ "
258 .BR host " | " link " | " global " |"
259 .IR NUMBER " ]"
260
261 .ti -8
262 .IR NHFLAGS " := [ "
263 .BR onlink " | " pervasive " ]"
264
265 .ti -8
266 .IR RTPROTO " := [ "
267 .BR kernel " | " boot " | " static " |"
268 .IR NUMBER " ]"
269
270 .ti -8
271 .B  ip rule
272 .RB " [ " list " | " add " | " del " | " flush " ]"
273 .I  SELECTOR ACTION
274
275 .ti -8
276 .IR SELECTOR " := [ "
277 .B  from
278 .IR PREFIX " ] [ "
279 .B  to
280 .IR PREFIX " ] [ "
281 .B  tos
282 .IR TOS " ] [ "
283 .B  fwmark
284 .IR FWMARK[/MASK] " ] [ "
285 .B  iif
286 .IR STRING " ] [ "
287 .B  oif
288 .IR STRING " ] [ "
289 .B  pref
290 .IR NUMBER " ]"
291
292 .ti -8
293 .IR ACTION " := [ "
294 .B  table
295 .IR TABLE_ID " ] [ "
296 .B  nat
297 .IR ADDRESS " ] [ "
298 .BR prohibit " | " reject " | " unreachable " ] [ " realms
299 .RI "[" SRCREALM "/]" DSTREALM " ]"
300
301 .ti -8
302 .IR TABLE_ID " := [ "
303 .BR local " | " main " | " default " |"
304 .IR NUMBER " ]"
305
306 .ti -8
307 .BR "ip neigh" " { " add " | " del " | " change " | " replace " } { "
308 .IR ADDR " [ "
309 .B  lladdr
310 .IR LLADDR " ] [ "
311 .BR nud " { " permanent " | " noarp " | " stale " | " reachable " } ] | " proxy
312 .IR ADDR " } [ "
313 .B  dev
314 .IR DEV " ]"
315
316 .ti -8
317 .BR "ip neigh" " { " show " | " flush " } [ " to
318 .IR PREFIX " ] [ "
319 .B  dev
320 .IR DEV " ] [ "
321 .B  nud
322 .IR STATE " ]"
323
324 .ti -8
325 .BR "ip tunnel" " { " add " | " change " | " del " | " show " | " prl " }"
326 .RI "[ " NAME " ]"
327 .br
328 .RB "[ " mode
329 .IR MODE " ] [ "
330 .B remote
331 .IR ADDR " ] [ "
332 .B  local
333 .IR ADDR " ]"
334 .br
335 .RB "[ [" i "|" o "]" seq " ] [ [" i "|" o "]" key
336 .IR KEY " ] [ "
337 .RB "[" i "|" o "]" csum " ] ]"
338 .br
339 .RB "[ " encaplimit
340 .IR ELIM " ]"
341 .RB "[ " ttl
342 .IR TTL " ]"
343 .br
344 .RB "[ " tos
345 .IR TOS " ] [ "
346 .B flowlabel
347 .IR FLOWLABEL " ]"
348 .br
349 .RB "[ " prl-default
350 .IR ADDR " ] [ "
351 .B prl-nodefault
352 .IR ADDR " ] [ "
353 .B prl-delete
354 .IR ADDR " ]"
355 .br
356 .RB "[ [" no "]" pmtudisc " ]"
357 .RB "[ " dev
358 .IR PHYS_DEV " ]"
359 .RB "[ " "dscp inherit" " ]"
360
361 .ti -8
362 .IR MODE " := "
363 .RB " { " ipip " | " gre " | " sit " | " isatap " | " ip6ip6 " | " ipip6 " | " any " }"
364
365 .ti -8
366 .IR ADDR " := { " IP_ADDRESS " |"
367 .BR any " }"
368
369 .ti -8
370 .IR TOS " := { " NUMBER " |"
371 .BR inherit " }"
372
373 .ti -8
374 .IR ELIM " := {
375 .BR none " | "
376 .IR 0 ".." 255 " }"
377
378 .ti -8
379 .ti -8
380 .IR TTL " := { " 1 ".." 255 " | "
381 .BR inherit " }"
382
383 .ti -8
384 .IR KEY " := { " DOTTED_QUAD " | " NUMBER " }"
385
386 .ti -8
387 .IR TIME " := " NUMBER "[s|ms|us|ns|j]"
388
389 .ti -8
390 .BR "ip maddr" " [ " add " | " del " ]"
391 .IB MULTIADDR " dev " STRING
392
393 .ti -8
394 .BR "ip maddr show" " [ " dev
395 .IR STRING " ]"
396
397 .ti -8
398 .BR "ip mroute show" " ["
399 .IR PREFIX " ] [ "
400 .B  from
401 .IR PREFIX " ] [ "
402 .B  iif
403 .IR DEVICE " ]"
404
405 .ti -8
406 .BR "ip monitor" " [ " all " |"
407 .IR LISTofOBJECTS " ]"
408
409 .ti -8
410 .BR "ip xfrm"
411 .IR XFRM_OBJECT " { " COMMAND " }"
412
413 .ti -8
414 .IR XFRM_OBJECT " := { " state " | " policy " | " monitor " } "
415
416 .ti -8
417 .BR "ip xfrm state " { " add " | " update " } "
418 .IR ID " [ "
419 .IR XFRM_OPT " ] "
420 .RB " [ " mode
421 .IR MODE " ] "
422 .br
423 .RB " [ " reqid
424 .IR REQID " ] "
425 .RB " [ " seq
426 .IR SEQ " ] "
427 .RB " [ " replay-window
428 .IR SIZE " ] "
429 .br
430 .RB " [ " flag
431 .IR FLAG-LIST " ] "
432 .RB " [ " encap
433 .IR ENCAP " ] "
434 .RB " [ " sel
435 .IR SELECTOR " ] "
436 .br
437 .RB " [ "
438 .IR LIMIT-LIST " ] "
439
440 .ti -8
441 .BR "ip xfrm state allocspi "
442 .IR ID
443 .RB " [ " mode
444 .IR MODE " ] "
445 .RB " [ " reqid
446 .IR REQID " ] "
447 .RB " [ " seq
448 .IR SEQ " ] "
449 .RB " [ " min
450 .IR SPI
451 .B max
452 .IR SPI " ] "
453
454 .ti -8
455 .BR "ip xfrm state" " { " delete " | " get " } "
456 .IR ID
457
458 .ti -8
459 .BR "ip xfrm state" " { " deleteall " | " list " } [ "
460 .IR ID " ] "
461 .RB " [ " mode
462 .IR MODE " ] "
463 .br
464 .RB " [ " reqid
465 .IR REQID " ] "
466 .RB " [ " flag
467 .IR FLAG_LIST " ] "
468
469 .ti -8
470 .BR "ip xfrm state flush" " [ " proto
471 .IR XFRM_PROTO " ] "
472
473 .ti -8
474 .BR "ip xfrm state count"
475
476 .ti -8
477 .IR ID " := "
478 .RB " [ " src
479 .IR ADDR " ] "
480 .RB " [ " dst
481 .IR ADDR " ] "
482 .RB " [ " proto
483 .IR XFRM_PROTO " ] "
484 .RB " [ " spi
485 .IR SPI " ] "
486
487 .ti -8
488 .IR XFRM_PROTO " := "
489 .RB " [ " esp " | " ah " | " comp " | " route2 " | " hao " ] "
490
491 .ti -8
492 .IR MODE " := "
493 .RB " [ " transport " | " tunnel " | " ro " | " beet " ] "
494 .B (default=transport)
495
496 .ti -8
497 .IR FLAG-LIST " := "
498 .RI " [ " FLAG-LIST " ] " FLAG
499
500 .ti -8
501 .IR FLAG " := "
502 .RB " [ " noecn " | " decap-dscp " | " wildrecv " ] "
503
504 .ti -8
505 .IR ENCAP " := " ENCAP-TYPE " " SPORT " " DPORT " " OADDR
506
507 .ti -8
508 .IR ENCAP-TYPE " := "
509 .B espinudp
510 .RB " | "
511 .B espinudp-nonike
512
513 .ti -8
514 .IR ALGO-LIST " := [ "
515 .IR ALGO-LIST " ] | [ "
516 .IR ALGO " ] "
517
518 .ti -8
519 .IR ALGO " := "
520 .IR ALGO_TYPE
521 .IR ALGO_NAME
522 .IR ALGO_KEY
523
524 .ti -8
525 .IR ALGO_TYPE " := "
526 .RB " [ " enc " | " auth " | " comp " ] "
527
528 .ti -8
529 .IR SELECTOR " := "
530 .B src
531 .IR ADDR "[/" PLEN "]"
532 .B dst
533 .IR ADDR "[/" PLEN "]"
534 .RI " [ " UPSPEC " ] "
535 .RB " [ " dev
536 .IR DEV " ] "
537
538 .ti -8
539 .IR UPSPEC " := "
540 .B proto
541 .IR PROTO " [[ "
542 .B sport
543 .IR PORT " ] "
544 .RB " [ " dport
545 .IR PORT " ] | "
546 .br
547 .RB " [ " type
548 .IR NUMBER " ] "
549 .RB " [ " code
550 .IR NUMBER " ]] "
551
552 .ti -8
553 .IR LIMIT-LIST " := [ " LIMIT-LIST " ] |"
554 .RB " [ "limit
555 .IR LIMIT " ] "
556
557 .ti -8
558 .IR LIMIT " := "
559 .RB " [ [" time-soft "|" time-hard "|" time-use-soft "|" time-use-hard "]"
560 .IR SECONDS " ] | "
561 .RB "[ ["byte-soft "|" byte-hard "]"
562 .IR SIZE " ] | "
563 .br
564 .RB " [ ["packet-soft "|" packet-hard "]"
565 .IR COUNT " ] "
566
567 .ti -8
568 .BR "ip xfrm policy" " { " add " | " update " } " " dir "
569 .IR DIR
570 .IR SELECTOR " [ "
571 .BR index
572 .IR INDEX " ] "
573 .br
574 .RB " [ " ptype
575 .IR PTYPE " ] "
576 .RB " [ " action
577 .IR ACTION " ] "
578 .RB " [ " priority
579 .IR PRIORITY " ] "
580 .br
581 .RI " [ " LIMIT-LIST " ] [ "
582 .IR TMPL-LIST " ] "
583
584 .ti -8
585 .BR "ip xfrm policy" " { " delete " | " get " } " " dir "
586 .IR DIR " [ " SELECTOR " | "
587 .BR index
588 .IR INDEX
589 .RB " ] "
590 .br
591 .RB " [ " ptype
592 .IR PTYPE " ] "
593
594 .ti -8
595 .BR "ip xfrm policy" " { " deleteall " | " list " } "
596 .RB " [ " dir
597 .IR DIR " ] [ "
598 .IR SELECTOR " ] "
599 .br
600 .RB " [ " index
601 .IR INDEX " ] "
602 .RB " [ " action
603 .IR ACTION " ] "
604 .RB " [ " priority
605 .IR PRIORITY " ] "
606
607 .ti -8
608 .B "ip xfrm policy flush"
609 .RB " [ " ptype
610 .IR PTYPE " ] "
611
612 .ti -8
613 .B "ip xfrm count"
614
615 .ti -8
616 .IR PTYPE " := "
617 .RB " [ " main " | " sub " ] "
618 .B (default=main)
619
620 .ti -8
621 .IR DIR " := "
622 .RB " [ " in " | " out " | " fwd " ] "
623
624 .ti -8
625 .IR SELECTOR " := "
626 .B src
627 .IR ADDR "[/" PLEN "]"
628 .B dst
629 .IR ADDR "[/" PLEN] " [ " UPSPEC
630 .RB " ] [ " dev
631 .IR DEV " ] "
632
633 .ti -8
634 .IR UPSPEC " := "
635 .B proto
636 .IR PROTO " [ "
637 .RB " [ " sport
638 .IR PORT " ] "
639 .RB " [ " dport
640 .IR PORT " ] | "
641 .br
642 .RB " [ " type
643 .IR NUMBER " ] "
644 .RB " [ " code
645 .IR NUMBER " ] ] "
646
647 .ti -8
648 .IR ACTION " := "
649 .RB " [ " allow " | " block " ]"
650 .B (default=allow)
651
652 .ti -8
653 .IR LIMIT-LIST " := "
654 .RB " [ "
655 .IR LIMIT-LIST " ] | "
656 .RB " [ " limit
657 .IR LIMIT " ] "
658
659 .ti -8
660 .IR LIMIT " := "
661 .RB " [ [" time-soft "|" time-hard "|" time-use-soft "|" time-use-hard "]"
662 .IR SECONDS " ] | "
663 .RB " [ [" byte-soft "|" byte-hard "]"
664 .IR SIZE " ] | "
665 .br [ "
666 .RB "[" packet-soft "|" packet-hard "]"
667 .IR NUMBER " ] "
668
669 .ti -8
670 .IR TMPL-LIST " := "
671 .B " [ "
672 .IR TMPL-LIST " ] | "
673 .RB " [ " tmpl
674 .IR TMPL " ] "
675
676 .ti -8
677 .IR TMPL " := "
678 .IR ID " [ "
679 .B mode
680 .IR MODE " ] "
681 .RB " [ " reqid
682 .IR REQID " ] "
683 .RB " [ " level
684 .IR LEVEL " ] "
685
686 .ti -8
687 .IR ID " := "
688 .RB " [ " src
689 .IR ADDR " ] "
690 .RB " [ " dst
691 .IR ADDR " ] "
692 .RB " [ " proto
693 .IR XFRM_PROTO " ] "
694 .RB " [ " spi
695 .IR SPI " ] "
696
697 .ti -8
698 .IR XFRM_PROTO " := "
699 .RB " [ " esp " | " ah " | " comp " | " route2 " | " hao " ] "
700
701 .ti -8
702 .IR MODE " := "
703 .RB " [ " transport " | " tunnel " | " beet " ] "
704 .B (default=transport)
705
706 .ti -8
707 .IR LEVEL " := "
708 .RB " [ " required " | " use " ] "
709 .B (default=required)
710
711 .ti -8
712 .BR "ip xfrm monitor" " [ " all " | "
713 .IR LISTofOBJECTS " ] "
714
715 .in -8
716 .ad b
717
718 .SH OPTIONS
719
720 .TP
721 .BR "\-V" , " -Version"
722 print the version of the
723 .B ip
724 utility and exit.
725
726 .TP
727 .BR "\-s" , " \-stats", " \-statistics"
728 output more information.  If the option
729 appears twice or more, the amount of information increases.
730 As a rule, the information is statistics or some time values.
731
732 .TP
733 .BR "\-f" , " \-family"
734 followed by protocol family identifier:
735 .BR "inet" , " inet6"
736 or
737 .B link
738 ,enforce the protocol family to use.  If the option is not present,
739 the protocol family is guessed from other arguments.  If the rest
740 of the command line does not give enough information to guess the
741 family,
742 .B ip
743 falls back to the default one, usually
744 .B inet
745 or
746 .BR "any" .
747 .B link
748 is a special family identifier meaning that no networking protocol
749 is involved.
750
751 .TP
752 .B \-4
753 shortcut for
754 .BR "-family inet" .
755
756 .TP
757 .B \-6
758 shortcut for
759 .BR "\-family inet6" .
760
761 .TP
762 .B \-0
763 shortcut for
764 .BR "\-family link" .
765
766 .TP
767 .BR "\-o" , " \-oneline"
768 output each record on a single line, replacing line feeds
769 with the
770 .B '\e\'
771 character. This is convenient when you want to count records
772 with
773 .BR wc (1)
774  or to
775 .BR grep (1)
776 the output.
777
778 .TP
779 .BR "\-r" , " \-resolve"
780 use the system's name resolver to print DNS names instead of
781 host addresses.
782
783 .SH IP - COMMAND SYNTAX
784
785 .SS
786 .I OBJECT
787
788 .TP
789 .B link
790 - network device.
791
792 .TP
793 .B address
794 - protocol (IP or IPv6) address on a device.
795
796 .TP
797 .B addrlabel
798 - label configuration for protocol address selection.
799
800 .TP
801 .B neighbour
802 - ARP or NDISC cache entry.
803
804 .TP
805 .B route
806 - routing table entry.
807
808 .TP
809 .B rule
810 - rule in routing policy database.
811
812 .TP
813 .B maddress
814 - multicast address.
815
816 .TP
817 .B mroute
818 - multicast routing cache entry.
819
820 .TP
821 .B tunnel
822 - tunnel over IP.
823
824 .TP
825 .B xfrm
826 - framework for IPsec protocol.
827
828 .PP
829 The names of all objects may be written in full or
830 abbreviated form, f.e.
831 .B address
832 is abbreviated as
833 .B addr
834 or just
835 .B a.
836
837 .SS
838 .I COMMAND
839
840 Specifies the action to perform on the object.
841 The set of possible actions depends on the object type.
842 As a rule, it is possible to
843 .BR "add" , " delete"
844 and
845 .B show
846 (or
847 .B list
848 ) objects, but some objects do not allow all of these operations
849 or have some additional commands.  The
850 .B help
851 command is available for all objects.  It prints
852 out a list of available commands and argument syntax conventions.
853 .sp
854 If no command is given, some default command is assumed.
855 Usually it is
856 .B list
857 or, if the objects of this class cannot be listed,
858 .BR "help" .
859
860 .SH ip link - network device configuration
861
862 .B link
863 is a network device and the corresponding commands
864 display and change the state of devices.
865
866 .SS ip link add - add virtual link
867
868 .TP
869 .BI link " DEVICE "
870 specifies the physical device to act operate on.
871
872 .I NAME
873 specifies the name of the new virtual device.
874
875 .I TYPE
876 specifies the type of the new device.
877 .sp
878 Link types:
879
880 .in +8
881 .B vlan
882 - 802.1q tagged virrtual LAN interface
883 .sp
884 .B macvlan
885 - virtual interface base on link layer address (MAC)
886 .sp
887 .B can
888 - Controller Area Network interface
889 .in -8
890
891 .SS ip link delete - delete virtual link
892 .I DEVICE
893 specifies the virtual  device to act operate on.
894 .I TYPE
895 specifies the type of the device.
896
897
898 .TP
899 .BI dev " DEVICE "
900 specifies the physical device to act operate on.
901
902 .SS ip link set - change device attributes
903
904 .TP
905 .BI dev " DEVICE "
906 .I DEVICE
907 specifies network device to operate on. When configuring SR-IOV Virtual Fuction
908 (VF) devices, this keyword should specify the associated Physical Function (PF)
909 device.
910
911 .TP
912 .BR up " and " down
913 change the state of the device to
914 .B UP
915 or
916 .BR "DOWN" .
917
918 .TP
919 .BR "arp on " or " arp off"
920 change the
921 .B NOARP
922 flag on the device.
923
924 .TP
925 .BR "multicast on " or " multicast off"
926 change the
927 .B MULTICAST
928 flag on the device.
929
930 .TP
931 .BR "dynamic on " or " dynamic off"
932 change the
933 .B DYNAMIC
934 flag on the device.
935
936 .TP
937 .BI name " NAME"
938 change the name of the device.  This operation is not
939 recommended if the device is running or has some addresses
940 already configured.
941
942 .TP
943 .BI txqueuelen " NUMBER"
944 .TP
945 .BI txqlen " NUMBER"
946 change the transmit queue length of the device.
947
948 .TP
949 .BI mtu " NUMBER"
950 change the
951 .I MTU
952 of the device.
953
954 .TP
955 .BI address " LLADDRESS"
956 change the station address of the interface.
957
958 .TP
959 .BI broadcast " LLADDRESS"
960 .TP
961 .BI brd " LLADDRESS"
962 .TP
963 .BI peer " LLADDRESS"
964 change the link layer broadcast address or the peer address when
965 the interface is
966 .IR "POINTOPOINT" .
967
968 .TP
969 .BI netns " PID"
970 move the device to the network namespace associated with the process
971 .IR "PID".
972
973 .TP
974 .BI alias " NAME"
975 give the device a symbolic name for easy reference.
976
977 .TP
978 .BI vf " NUM"
979 specify a Virtual Function device to be configured. The associated PF device
980 must be specified using the
981 .B dev
982 parameter.
983
984 .in +8
985 .BI mac " LLADDRESS"
986 - change the station address for the specified VF. The
987 .B vf
988 parameter must be specified.
989
990 .sp
991 .BI vlan " VLANID"
992 - change the assigned VLAN for the specified VF. When specified, all traffic
993 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
994 will be filtered for the specified VLAN ID, and will have all VLAN tags
995 stripped before being passed to the VF. Setting this parameter to 0 disables
996 VLAN tagging and filtering. The
997 .B vf
998 parameter must be specified.
999
1000 .sp
1001 .BI qos " VLAN-QOS"
1002 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
1003 tags transmitted by the VF will include the specified priority bits in the
1004 VLAN tag. If not specified, the value is assumed to be 0. Both the
1005 .B vf
1006 and
1007 .B vlan
1008 parameters must be specified. Setting both
1009 .B vlan
1010 and
1011 .B qos
1012 as 0 disables VLAN tagging and filtering for the VF.
1013
1014 .sp
1015 .BI rate " TXRATE"
1016 - change the allowed transmit bandwidth, in Mbps, for the specified VF.
1017 Setting this parameter to 0 disables rate limiting. The
1018 .B vf
1019 parameter must be specified.
1020 .in -8
1021
1022 .PP
1023 .B Warning:
1024 If multiple parameter changes are requested,
1025 .B ip
1026 aborts immediately after any of the changes have failed.
1027 This is the only case when
1028 .B ip
1029 can move the system to an unpredictable state.  The solution
1030 is to avoid changing several parameters with one
1031 .B ip link set
1032 call.
1033
1034 .SS  ip link show - display device attributes
1035
1036 .TP
1037 .BI dev " NAME " (default)
1038 .I NAME
1039 specifies the network device to show.
1040 If this argument is omitted all devices are listed.
1041
1042 .TP
1043 .B up
1044 only display running interfaces.
1045
1046 .SH ip address - protocol address management.
1047
1048 The
1049 .B address
1050 is a protocol (IP or IPv6) address attached
1051 to a network device.  Each device must have at least one address
1052 to use the corresponding protocol.  It is possible to have several
1053 different addresses attached to one device.  These addresses are not
1054 discriminated, so that the term
1055 .B alias
1056 is not quite appropriate for them and we do not use it in this document.
1057 .sp
1058 The
1059 .B ip addr
1060 command displays addresses and their properties, adds new addresses
1061 and deletes old ones.
1062
1063 .SS ip address add - add new protocol address.
1064
1065 .TP
1066 .BI dev " NAME"
1067 the name of the device to add the address to.
1068
1069 .TP
1070 .BI local " ADDRESS " (default)
1071 the address of the interface. The format of the address depends
1072 on the protocol. It is a dotted quad for IP and a sequence of
1073 hexadecimal halfwords separated by colons for IPv6.  The
1074 .I ADDRESS
1075 may be followed by a slash and a decimal number which encodes
1076 the network prefix length.
1077
1078 .TP
1079 .BI peer " ADDRESS"
1080 the address of the remote endpoint for pointopoint interfaces.
1081 Again, the
1082 .I ADDRESS
1083 may be followed by a slash and a decimal number, encoding the network
1084 prefix length.  If a peer address is specified, the local address
1085 cannot have a prefix length.  The network prefix is associated
1086 with the peer rather than with the local address.
1087
1088 .TP
1089 .BI broadcast " ADDRESS"
1090 the broadcast address on the interface.
1091 .sp
1092 It is possible to use the special symbols
1093 .B '+'
1094 and
1095 .B '-'
1096 instead of the broadcast address.  In this case, the broadcast address
1097 is derived by setting/resetting the host bits of the interface prefix.
1098
1099 .TP
1100 .BI label " NAME"
1101 Each address may be tagged with a label string.
1102 In order to preserve compatibility with Linux-2.0 net aliases,
1103 this string must coincide with the name of the device or must be prefixed
1104 with the device name followed by colon.
1105
1106 .TP
1107 .BI scope " SCOPE_VALUE"
1108 the scope of the area where this address is valid.
1109 The available scopes are listed in file
1110 .BR "/etc/iproute2/rt_scopes" .
1111 Predefined scope values are:
1112
1113 .in +8
1114 .B global
1115 - the address is globally valid.
1116 .sp
1117 .B site
1118 - (IPv6 only) the address is site local, i.e. it is
1119 valid inside this site.
1120 .sp
1121 .B link
1122 - the address is link local, i.e. it is valid only on this device.
1123 .sp
1124 .B host
1125 - the address is valid only inside this host.
1126 .in -8
1127
1128 .SS ip address delete - delete protocol address
1129 .B Arguments:
1130 coincide with the arguments of
1131 .B ip addr add.
1132 The device name is a required argument.  The rest are optional.
1133 If no arguments are given, the first address is deleted.
1134
1135 .SS ip address show - look at protocol addresses
1136
1137 .TP
1138 .BI dev " NAME " (default)
1139 name of device.
1140
1141 .TP
1142 .BI scope " SCOPE_VAL"
1143 only list addresses with this scope.
1144
1145 .TP
1146 .BI to " PREFIX"
1147 only list addresses matching this prefix.
1148
1149 .TP
1150 .BI label " PATTERN"
1151 only list addresses with labels matching the
1152 .IR "PATTERN" .
1153 .I PATTERN
1154 is a usual shell style pattern.
1155
1156 .TP
1157 .BR dynamic " and " permanent
1158 (IPv6 only) only list addresses installed due to stateless
1159 address configuration or only list permanent (not dynamic)
1160 addresses.
1161
1162 .TP
1163 .B tentative
1164 (IPv6 only) only list addresses which have not yet passed duplicate
1165 address detection.
1166
1167 .TP
1168 .B deprecated
1169 (IPv6 only) only list deprecated addresses.
1170
1171 .TP
1172 .B dadfailed
1173 (IPv6 only) only list addresses which have failed duplicate
1174 address detection.
1175
1176 .TP
1177 .B temporary
1178 (IPv6 only) only list temporary addresses.
1179
1180 .TP
1181 .BR primary " and " secondary
1182 only list primary (or secondary) addresses.
1183
1184 .SS ip address flush - flush protocol addresses
1185 This command flushes the protocol addresses selected by some criteria.
1186
1187 .PP
1188 This command has the same arguments as
1189 .B show.
1190 The difference is that it does not run when no arguments are given.
1191
1192 .PP
1193 .B Warning:
1194 This command (and other
1195 .B flush
1196 commands described below) is pretty dangerous.  If you make a mistake,
1197 it will not forgive it, but will cruelly purge all the addresses.
1198
1199 .PP
1200 With the
1201 .B -statistics
1202 option, the command becomes verbose. It prints out the number of deleted
1203 addresses and the number of rounds made to flush the address list.  If
1204 this option is given twice,
1205 .B ip addr flush
1206 also dumps all the deleted addresses in the format described in the
1207 previous subsection.
1208
1209 .SH ip addrlabel - protocol address label management.
1210
1211 IPv6 address label is used for address selection
1212 described in RFC 3484.  Precedence is managed by userspace,
1213 and only label is stored in kernel.
1214
1215 .SS ip addrlabel add - add an address label
1216 the command adds an address label entry to the kernel.
1217 .TP
1218 .BI prefix " PREFIX"
1219 .TP
1220 .BI dev " DEV"
1221 the outgoing interface.
1222 .TP
1223 .BI label " NUMBER"
1224 the label for the prefix.
1225 0xffffffff is reserved.
1226 .SS ip addrlabel del - delete an address label
1227 the command deletes an address label entry in the kernel.
1228 .B Arguments:
1229 coincide with the arguments of
1230 .B ip addrlabel add
1231 but label is not required.
1232 .SS ip addrlabel list - list address labels
1233 the command show contents of address labels.
1234 .SS ip addrlabel flush - flush address labels
1235 the command flushes the contents of address labels and it does not restore default settings.
1236 .SH ip neighbour - neighbour/arp tables management.
1237
1238 .B neighbour
1239 objects establish bindings between protocol addresses and
1240 link layer addresses for hosts sharing the same link.
1241 Neighbour entries are organized into tables. The IPv4 neighbour table
1242 is known by another name - the ARP table.
1243
1244 .P
1245 The corresponding commands display neighbour bindings
1246 and their properties, add new neighbour entries and delete old ones.
1247
1248 .SS ip neighbour add - add a new neighbour entry
1249 .SS ip neighbour change - change an existing entry
1250 .SS ip neighbour replace - add a new entry or change an existing one
1251
1252 These commands create new neighbour records or update existing ones.
1253
1254 .TP
1255 .BI to " ADDRESS " (default)
1256 the protocol address of the neighbour. It is either an IPv4 or IPv6 address.
1257
1258 .TP
1259 .BI dev " NAME"
1260 the interface to which this neighbour is attached.
1261
1262 .TP
1263 .BI lladdr " LLADDRESS"
1264 the link layer address of the neighbour.
1265 .I LLADDRESS
1266 can also be
1267 .BR "null" .
1268
1269 .TP
1270 .BI nud " NUD_STATE"
1271 the state of the neighbour entry.
1272 .B nud
1273 is an abbreviation for 'Neigh bour Unreachability Detection'.
1274 The state can take one of the following values:
1275
1276 .in +8
1277 .B permanent
1278 - the neighbour entry is valid forever and can be only
1279 be removed administratively.
1280 .sp
1281
1282 .B noarp
1283 - the neighbour entry is valid. No attempts to validate
1284 this entry will be made but it can be removed when its lifetime expires.
1285 .sp
1286
1287 .B reachable
1288 - the neighbour entry is valid until the reachability
1289 timeout expires.
1290 .sp
1291
1292 .B stale
1293 - the neighbour entry is valid but suspicious.
1294 This option to
1295 .B ip neigh
1296 does not change the neighbour state if it was valid and the address
1297 is not changed by this command.
1298 .in -8
1299
1300 .SS ip neighbour delete - delete a neighbour entry
1301 This command invalidates a neighbour entry.
1302
1303 .PP
1304 The arguments are the same as with
1305 .BR "ip neigh add" ,
1306 except that
1307 .B lladdr
1308 and
1309 .B nud
1310 are ignored.
1311
1312 .PP
1313 .B Warning:
1314 Attempts to delete or manually change a
1315 .B noarp
1316 entry created by the kernel may result in unpredictable behaviour.
1317 Particularly, the kernel may try to resolve this address even
1318 on a
1319 .B NOARP
1320 interface or if the address is multicast or broadcast.
1321
1322 .SS ip neighbour show - list neighbour entries
1323
1324 This commands displays neighbour tables.
1325
1326 .TP
1327 .BI to " ADDRESS " (default)
1328 the prefix selecting the neighbours to list.
1329
1330 .TP
1331 .BI dev " NAME"
1332 only list the neighbours attached to this device.
1333
1334 .TP
1335 .B unused
1336 only list neighbours which are not currently in use.
1337
1338 .TP
1339 .BI nud " NUD_STATE"
1340 only list neighbour entries in this state.
1341 .I NUD_STATE
1342 takes values listed below or the special value
1343 .B all
1344 which means all states.  This option may occur more than once.
1345 If this option is absent,
1346 .B ip
1347 lists all entries except for
1348 .B none
1349 and
1350 .BR "noarp" .
1351
1352 .SS ip neighbour flush - flush neighbour entries
1353 This command flushes neighbour tables, selecting
1354 entries to flush by some criteria.
1355
1356 .PP
1357 This command has the same arguments as
1358 .B show.
1359 The differences are that it does not run when no arguments are given,
1360 and that the default neighbour states to be flushed do not include
1361 .B permanent
1362 and
1363 .BR "noarp" .
1364
1365 .PP
1366 With the
1367 .B -statistics
1368 option, the command becomes verbose.  It prints out the number of
1369 deleted neighbours and the number of rounds made to flush the
1370 neighbour table.  If the option is given
1371 twice,
1372 .B ip neigh flush
1373 also dumps all the deleted neighbours.
1374
1375 .SH ip route - routing table management
1376 Manipulate route entries in the kernel routing tables keep
1377 information about paths to other networked nodes.
1378 .sp
1379 .B Route types:
1380
1381 .in +8
1382 .B unicast
1383 - the route entry describes real paths to the destinations covered
1384 by the route prefix.
1385
1386 .sp
1387 .B unreachable
1388 - these destinations are unreachable.  Packets are discarded and the
1389 ICMP message
1390 .I host unreachable
1391 is generated.
1392 The local senders get an
1393 .I EHOSTUNREACH
1394 error.
1395
1396 .sp
1397 .B blackhole
1398 - these destinations are unreachable.  Packets are discarded silently.
1399 The local senders get an
1400 .I EINVAL
1401 error.
1402
1403 .sp
1404 .B prohibit
1405 - these destinations are unreachable.  Packets are discarded and the
1406 ICMP message
1407 .I communication administratively prohibited
1408 is generated.  The local senders get an
1409 .I EACCES
1410 error.
1411
1412 .sp
1413 .B local
1414 - the destinations are assigned to this host.  The packets are looped
1415 back and delivered locally.
1416
1417 .sp
1418 .B broadcast
1419 - the destinations are broadcast addresses.  The packets are sent as
1420 link broadcasts.
1421
1422 .sp
1423 .B throw
1424 - a special control route used together with policy rules. If such a
1425 route is selected, lookup in this table is terminated pretending that
1426 no route was found.  Without policy routing it is equivalent to the
1427 absence of the route in the routing table.  The packets are dropped
1428 and the ICMP message
1429 .I net unreachable
1430 is generated.  The local senders get an
1431 .I ENETUNREACH
1432 error.
1433
1434 .sp
1435 .B nat
1436 - a special NAT route.  Destinations covered by the prefix
1437 are considered to be dummy (or external) addresses which require translation
1438 to real (or internal) ones before forwarding.  The addresses to translate to
1439 are selected with the attribute
1440 .B Warning:
1441 Route NAT is no longer supported in Linux 2.6.
1442
1443
1444 .BR "via" .
1445 .sp
1446 .B anycast
1447 .RI "- " "not implemented"
1448 the destinations are
1449 .I anycast
1450 addresses assigned to this host.  They are mainly equivalent
1451 to
1452 .B local
1453 with one difference: such addresses are invalid when used
1454 as the source address of any packet.
1455
1456 .sp
1457 .B multicast
1458 - a special type used for multicast routing.  It is not present in
1459 normal routing tables.
1460 .in -8
1461
1462 .P
1463 .B Route tables:
1464 Linux-2.x can pack routes into several routing tables identified 
1465 by a number in the range from 1 to 2^31 or by name from the file
1466 .B /etc/iproute2/rt_tables
1467 By default all normal routes are inserted into the
1468 .B main
1469 table (ID 254) and the kernel only uses this table when calculating routes.
1470 Values (0, 253, 254, and 255) are reserved for built-in use.
1471
1472 .sp
1473 Actually, one other table always exists, which is invisible but
1474 even more important.  It is the
1475 .B local
1476 table (ID 255).  This table
1477 consists of routes for local and broadcast addresses.  The kernel maintains
1478 this table automatically and the administrator usually need not modify it
1479 or even look at it.
1480
1481 The multiple routing tables enter the game when
1482 .I policy routing
1483 is used.
1484
1485 .SS ip route add - add new route
1486 .SS ip route change - change route
1487 .SS ip route replace - change or add new one
1488
1489 .TP
1490 .BI to " TYPE PREFIX " (default)
1491 the destination prefix of the route.  If
1492 .I TYPE
1493 is omitted,
1494 .B ip
1495 assumes type
1496 .BR "unicast" .
1497 Other values of
1498 .I TYPE
1499 are listed above.
1500 .I PREFIX
1501 is an IP or IPv6 address optionally followed by a slash and the
1502 prefix length.  If the length of the prefix is missing,
1503 .B ip
1504 assumes a full-length host route.  There is also a special
1505 .I PREFIX
1506 .B default
1507 - which is equivalent to IP
1508 .B 0/0
1509 or to IPv6
1510 .BR "::/0" .
1511
1512 .TP
1513 .BI tos " TOS"
1514 .TP
1515 .BI dsfield " TOS"
1516 the Type Of Service (TOS) key.  This key has no associated mask and
1517 the longest match is understood as: First, compare the TOS
1518 of the route and of the packet.  If they are not equal, then the packet
1519 may still match a route with a zero TOS.
1520 .I TOS
1521 is either an 8 bit hexadecimal number or an identifier
1522 from
1523 .BR "/etc/iproute2/rt_dsfield" .
1524
1525 .TP
1526 .BI metric " NUMBER"
1527 .TP
1528 .BI preference " NUMBER"
1529 the preference value of the route.
1530 .I NUMBER
1531 is an arbitrary 32bit number.
1532
1533 .TP
1534 .BI table " TABLEID"
1535 the table to add this route to.
1536 .I TABLEID
1537 may be a number or a string from the file
1538 .BR "/etc/iproute2/rt_tables" .
1539 If this parameter is omitted,
1540 .B ip
1541 assumes the
1542 .B main
1543 table, with the exception of
1544 .BR local " , " broadcast " and " nat
1545 routes, which are put into the
1546 .B local
1547 table by default.
1548
1549 .TP
1550 .BI dev " NAME"
1551 the output device name.
1552
1553 .TP
1554 .BI via " ADDRESS"
1555 the address of the nexthop router.  Actually, the sense of this field
1556 depends on the route type.  For normal
1557 .B unicast
1558 routes it is either the true next hop router or, if it is a direct
1559 route installed in BSD compatibility mode, it can be a local address
1560 of the interface.  For NAT routes it is the first address of the block
1561 of translated IP destinations.
1562
1563 .TP
1564 .BI src " ADDRESS"
1565 the source address to prefer when sending to the destinations
1566 covered by the route prefix.
1567
1568 .TP
1569 .BI realm " REALMID"
1570 the realm to which this route is assigned.
1571 .I REALMID
1572 may be a number or a string from the file
1573 .BR "/etc/iproute2/rt_realms" .
1574
1575 .TP
1576 .BI mtu " MTU"
1577 .TP
1578 .BI "mtu lock" " MTU"
1579 the MTU along the path to the destination.  If the modifier
1580 .B lock
1581 is not used, the MTU may be updated by the kernel due to
1582 Path MTU Discovery.  If the modifier
1583 .B lock
1584 is used, no path MTU discovery will be tried, all packets
1585 will be sent without the DF bit in IPv4 case or fragmented
1586 to MTU for IPv6.
1587
1588 .TP
1589 .BI window " NUMBER"
1590 the maximal window for TCP to advertise to these destinations,
1591 measured in bytes.  It limits maximal data bursts that our TCP
1592 peers are allowed to send to us.
1593
1594 .TP
1595 .BI rtt " TIME"
1596 the initial RTT ('Round Trip Time') estimate. If no suffix is
1597 specified the units are raw values passed directly to the
1598 routing code to maintain compatability with previous releases.
1599 Otherwise if a suffix of s, sec or secs is used to specify
1600 seconds; ms, msec or msecs to specify milliseconds; us, usec
1601 or usecs to specify microseconds; ns, nsec or nsecs to specify
1602 nanoseconds; j, hz or jiffies to specify jiffies, the value is
1603 converted to what the routing code expects.
1604
1605
1606 .TP
1607 .BI rttvar " TIME " "(2.3.15+ only)"
1608 the initial RTT variance estimate. Values are specified as with
1609 .BI rtt
1610 above.
1611
1612 .TP
1613 .BI rto_min " TIME " "(2.6.23+ only)"
1614 the minimum TCP Retransmission TimeOut to use when communicating with this
1615 destination.  Values are specified as with
1616 .BI rtt
1617 above.
1618
1619 .TP
1620 .BI ssthresh " NUMBER " "(2.3.15+ only)"
1621 an estimate for the initial slow start threshold.
1622
1623 .TP
1624 .BI cwnd " NUMBER " "(2.3.15+ only)"
1625 the clamp for congestion window.  It is ignored if the
1626 .B lock
1627 flag is not used.
1628
1629 .TP
1630 .BI initcwnd " NUMBER " "(2.5.70+ only)"
1631 the initial congestion window size for connections to this destination.
1632 Actual window size is this value multiplied by the MSS
1633 (``Maximal Segment Size'') for same connection. The default is
1634 zero, meaning to use the values specified in RFC2414.
1635
1636 .TP
1637 .BI initrwnd " NUMBER " "(2.6.33+ only)"
1638 the initial receive window size for connections to this destination.
1639 Actual window size is this value multiplied by the MSS of the connection.
1640 The default value is zero, meaning to use Slow Start value.
1641
1642 .TP
1643 .BI advmss " NUMBER " "(2.3.15+ only)"
1644 the MSS ('Maximal Segment Size') to advertise to these
1645 destinations when establishing TCP connections.  If it is not given,
1646 Linux uses a default value calculated from the first hop device MTU.
1647 (If the path to these destination is asymmetric, this guess may be wrong.)
1648
1649 .TP
1650 .BI reordering " NUMBER " "(2.3.15+ only)"
1651 Maximal reordering on the path to this destination.
1652 If it is not given, Linux uses the value selected with
1653 .B sysctl
1654 variable
1655 .BR "net/ipv4/tcp_reordering" .
1656
1657 .TP
1658 .BI nexthop " NEXTHOP"
1659 the nexthop of a multipath route.
1660 .I NEXTHOP
1661 is a complex value with its own syntax similar to the top level
1662 argument lists:
1663
1664 .in +8
1665 .BI via " ADDRESS"
1666 - is the nexthop router.
1667 .sp
1668
1669 .BI dev " NAME"
1670 - is the output device.
1671 .sp
1672
1673 .BI weight " NUMBER"
1674 - is a weight for this element of a multipath
1675 route reflecting its relative bandwidth or quality.
1676 .in -8
1677
1678 .TP
1679 .BI scope " SCOPE_VAL"
1680 the scope of the destinations covered by the route prefix.
1681 .I SCOPE_VAL
1682 may be a number or a string from the file
1683 .BR "/etc/iproute2/rt_scopes" .
1684 If this parameter is omitted,
1685 .B ip
1686 assumes scope
1687 .B global
1688 for all gatewayed
1689 .B unicast
1690 routes, scope
1691 .B link
1692 for direct
1693 .BR unicast " and " broadcast
1694 routes and scope
1695 .BR host " for " local
1696 routes.
1697
1698 .TP
1699 .BI protocol " RTPROTO"
1700 the routing protocol identifier of this route.
1701 .I RTPROTO
1702 may be a number or a string from the file
1703 .BR "/etc/iproute2/rt_protos" .
1704 If the routing protocol ID is not given,
1705 .B ip assumes protocol
1706 .B boot
1707 (i.e. it assumes the route was added by someone who doesn't
1708 understand what they are doing).  Several protocol values have
1709 a fixed interpretation.
1710 Namely:
1711
1712 .in +8
1713 .B redirect
1714 - the route was installed due to an ICMP redirect.
1715 .sp
1716
1717 .B kernel
1718 - the route was installed by the kernel during autoconfiguration.
1719 .sp
1720
1721 .B boot
1722 - the route was installed during the bootup sequence.
1723 If a routing daemon starts, it will purge all of them.
1724 .sp
1725
1726 .B static
1727 - the route was installed by the administrator
1728 to override dynamic routing. Routing daemon will respect them
1729 and, probably, even advertise them to its peers.
1730 .sp
1731
1732 .B ra
1733 - the route was installed by Router Discovery protocol.
1734 .in -8
1735
1736 .sp
1737 The rest of the values are not reserved and the administrator is free
1738 to assign (or not to assign) protocol tags.
1739
1740 .TP
1741 .B onlink
1742 pretend that the nexthop is directly attached to this link,
1743 even if it does not match any interface prefix.
1744
1745 .SS ip route delete - delete route
1746
1747 .B ip route del
1748 has the same arguments as
1749 .BR "ip route add" ,
1750 but their semantics are a bit different.
1751
1752 Key values
1753 .RB "(" to ", " tos ", " preference " and " table ")"
1754 select the route to delete.  If optional attributes are present,
1755 .B ip
1756 verifies that they coincide with the attributes of the route to delete.
1757 If no route with the given key and attributes was found,
1758 .B ip route del
1759 fails.
1760
1761 .SS ip route show - list routes
1762 the command displays the contents of the routing tables or the route(s)
1763 selected by some criteria.
1764
1765 .TP
1766 .BI to " SELECTOR " (default)
1767 only select routes from the given range of destinations.
1768 .I SELECTOR
1769 consists of an optional modifier
1770 .RB "(" root ", " match " or " exact ")"
1771 and a prefix.
1772 .BI root " PREFIX"
1773 selects routes with prefixes not shorter than
1774 .IR PREFIX "."
1775 F.e.
1776 .BI root " 0/0"
1777 selects the entire routing table.
1778 .BI match " PREFIX"
1779 selects routes with prefixes not longer than
1780 .IR PREFIX "."
1781 F.e.
1782 .BI match " 10.0/16"
1783 selects
1784 .IR 10.0/16 ","
1785 .IR 10/8 " and " 0/0 ,
1786 but it does not select
1787 .IR 10.1/16 " and " 10.0.0/24 .
1788 And
1789 .BI exact " PREFIX"
1790 (or just
1791 .IR PREFIX ")"
1792 selects routes with this exact prefix. If neither of these options
1793 are present,
1794 .B ip
1795 assumes
1796 .BI root " 0/0"
1797 i.e. it lists the entire table.
1798
1799 .TP
1800 .BI tos " TOS"
1801 .BI dsfield " TOS"
1802 only select routes with the given TOS.
1803
1804 .TP
1805 .BI table " TABLEID"
1806 show the routes from this table(s).  The default setting is to show
1807 .BR table main "."
1808 .I TABLEID
1809 may either be the ID of a real table or one of the special values:
1810 .sp
1811 .in +8
1812 .B all
1813 - list all of the tables.
1814 .sp
1815 .B cache
1816 - dump the routing cache.
1817 .in -8
1818
1819 .TP
1820 .B cloned
1821 .TP
1822 .B cached
1823 list cloned routes i.e. routes which were dynamically forked from
1824 other routes because some route attribute (f.e. MTU) was updated.
1825 Actually, it is equivalent to
1826 .BR "table cache" "."
1827
1828 .TP
1829 .BI from " SELECTOR"
1830 the same syntax as for
1831 .BR to ","
1832 but it binds the source address range rather than destinations.
1833 Note that the
1834 .B from
1835 option only works with cloned routes.
1836
1837 .TP
1838 .BI protocol " RTPROTO"
1839 only list routes of this protocol.
1840
1841 .TP
1842 .BI scope " SCOPE_VAL"
1843 only list routes with this scope.
1844
1845 .TP
1846 .BI type " TYPE"
1847 only list routes of this type.
1848
1849 .TP
1850 .BI dev " NAME"
1851 only list routes going via this device.
1852
1853 .TP
1854 .BI via " PREFIX"
1855 only list routes going via the nexthop routers selected by
1856 .IR PREFIX "."
1857
1858 .TP
1859 .BI src " PREFIX"
1860 only list routes with preferred source addresses selected
1861 by
1862 .IR PREFIX "."
1863
1864 .TP
1865 .BI realm " REALMID"
1866 .TP
1867 .BI realms " FROMREALM/TOREALM"
1868 only list routes with these realms.
1869
1870 .SS ip route flush - flush routing tables
1871 this command flushes routes selected by some criteria.
1872
1873 .sp
1874 The arguments have the same syntax and semantics as the arguments of
1875 .BR "ip route show" ,
1876 but routing tables are not listed but purged.  The only difference is
1877 the default action:
1878 .B show
1879 dumps all the IP main routing table but
1880 .B flush
1881 prints the helper page.
1882
1883 .sp
1884 With the
1885 .B -statistics
1886 option, the command becomes verbose. It prints out the number of
1887 deleted routes and the number of rounds made to flush the routing
1888 table. If the option is given
1889 twice,
1890 .B ip route flush
1891 also dumps all the deleted routes in the format described in the
1892 previous subsection.
1893
1894 .SS ip route get - get a single route
1895 this command gets a single route to a destination and prints its
1896 contents exactly as the kernel sees it.
1897
1898 .TP
1899 .BI to " ADDRESS " (default)
1900 the destination address.
1901
1902 .TP
1903 .BI from " ADDRESS"
1904 the source address.
1905
1906 .TP
1907 .BI tos " TOS"
1908 .TP
1909 .BI dsfield " TOS"
1910 the Type Of Service.
1911
1912 .TP
1913 .BI iif " NAME"
1914 the device from which this packet is expected to arrive.
1915
1916 .TP
1917 .BI oif " NAME"
1918 force the output device on which this packet will be routed.
1919
1920 .TP
1921 .B connected
1922 if no source address
1923 .RB "(option " from ")"
1924 was given, relookup the route with the source set to the preferred
1925 address received from the first lookup.
1926 If policy routing is used, it may be a different route.
1927
1928 .P
1929 Note that this operation is not equivalent to
1930 .BR "ip route show" .
1931 .B show
1932 shows existing routes.
1933 .B get
1934 resolves them and creates new clones if necessary.  Essentially,
1935 .B get
1936 is equivalent to sending a packet along this path.
1937 If the
1938 .B iif
1939 argument is not given, the kernel creates a route
1940 to output packets towards the requested destination.
1941 This is equivalent to pinging the destination
1942 with a subsequent
1943 .BR "ip route ls cache" ,
1944 however, no packets are actually sent.  With the
1945 .B iif
1946 argument, the kernel pretends that a packet arrived from this interface
1947 and searches for a path to forward the packet.
1948
1949 .SH ip rule - routing policy database management
1950
1951 .BR "Rule" s
1952 in the routing policy database control the route selection algorithm.
1953
1954 .P
1955 Classic routing algorithms used in the Internet make routing decisions
1956 based only on the destination address of packets (and in theory,
1957 but not in practice, on the TOS field).
1958
1959 .P
1960 In some circumstances we want to route packets differently depending not only
1961 on destination addresses, but also on other packet fields: source address,
1962 IP protocol, transport protocol ports or even packet payload.
1963 This task is called 'policy routing'.
1964
1965 .P
1966 To solve this task, the conventional destination based routing table, ordered
1967 according to the longest match rule, is replaced with a 'routing policy
1968 database' (or RPDB), which selects routes by executing some set of rules.
1969
1970 .P
1971 Each policy routing rule consists of a
1972 .B selector
1973 and an
1974 .B action predicate.
1975 The RPDB is scanned in the order of increasing priority. The selector
1976 of each rule is applied to {source address, destination address, incoming
1977 interface, tos, fwmark} and, if the selector matches the packet,
1978 the action is performed.  The action predicate may return with success.
1979 In this case, it will either give a route or failure indication
1980 and the RPDB lookup is terminated. Otherwise, the RPDB program
1981 continues on the next rule.
1982
1983 .P
1984 Semantically, natural action is to select the nexthop and the output device.
1985
1986 .P
1987 At startup time the kernel configures the default RPDB consisting of three
1988 rules:
1989
1990 .TP
1991 1.
1992 Priority: 0, Selector: match anything, Action: lookup routing
1993 table
1994 .B local
1995 (ID 255).
1996 The
1997 .B local
1998 table is a special routing table containing
1999 high priority control routes for local and broadcast addresses.
2000 .sp
2001 Rule 0 is special. It cannot be deleted or overridden.
2002
2003 .TP
2004 2.
2005 Priority: 32766, Selector: match anything, Action: lookup routing
2006 table
2007 .B main
2008 (ID 254).
2009 The
2010 .B main
2011 table is the normal routing table containing all non-policy
2012 routes. This rule may be deleted and/or overridden with other
2013 ones by the administrator.
2014
2015 .TP
2016 3.
2017 Priority: 32767, Selector: match anything, Action: lookup routing
2018 table
2019 .B default
2020 (ID 253).
2021 The
2022 .B default
2023 table is empty.  It is reserved for some post-processing if no previous
2024 default rules selected the packet.
2025 This rule may also be deleted.
2026
2027 .P
2028 Each RPDB entry has additional
2029 attributes.  F.e. each rule has a pointer to some routing
2030 table.  NAT and masquerading rules have an attribute to select new IP
2031 address to translate/masquerade.  Besides that, rules have some
2032 optional attributes, which routes have, namely
2033 .BR "realms" .
2034 These values do not override those contained in the routing tables.  They
2035 are only used if the route did not select any attributes.
2036
2037 .sp
2038 The RPDB may contain rules of the following types:
2039
2040 .in +8
2041 .B unicast
2042 - the rule prescribes to return the route found
2043 in the routing table referenced by the rule.
2044
2045 .B blackhole
2046 - the rule prescribes to silently drop the packet.
2047
2048 .B unreachable
2049 - the rule prescribes to generate a 'Network is unreachable' error.
2050
2051 .B prohibit
2052 - the rule prescribes to generate 'Communication is administratively
2053 prohibited' error.
2054
2055 .B nat
2056 - the rule prescribes to translate the source address
2057 of the IP packet into some other value.
2058 .in -8
2059
2060 .SS ip rule add - insert a new rule
2061 .SS ip rule delete - delete a rule
2062
2063 .TP
2064 .BI type " TYPE " (default)
2065 the type of this rule.  The list of valid types was given in the previous
2066 subsection.
2067
2068 .TP
2069 .BI from " PREFIX"
2070 select the source prefix to match.
2071
2072 .TP
2073 .BI to " PREFIX"
2074 select the destination prefix to match.
2075
2076 .TP
2077 .BI iif " NAME"
2078 select the incoming device to match.  If the interface is loopback,
2079 the rule only matches packets originating from this host.  This means
2080 that you may create separate routing tables for forwarded and local
2081 packets and, hence, completely segregate them.
2082
2083 .TP
2084 .BI oif " NAME"
2085 select the outgoing device to match.  The outgoing interface is only
2086 available for packets originating from local sockets that are bound to
2087 a device.
2088
2089 .TP
2090 .BI tos " TOS"
2091 .TP
2092 .BI dsfield " TOS"
2093 select the TOS value to match.
2094
2095 .TP
2096 .BI fwmark " MARK"
2097 select the
2098 .B fwmark
2099 value to match.
2100
2101 .TP
2102 .BI priority " PREFERENCE"
2103 the priority of this rule.  Each rule should have an explicitly
2104 set
2105 .I unique
2106 priority value.
2107 The options preference and order are synonyms with priority.
2108
2109 .TP
2110 .BI table " TABLEID"
2111 the routing table identifier to lookup if the rule selector matches.
2112 It is also possible to use lookup instead of table.
2113
2114 .TP
2115 .BI realms " FROM/TO"
2116 Realms to select if the rule matched and the routing table lookup
2117 succeeded.  Realm
2118 .I TO
2119 is only used if the route did not select any realm.
2120
2121 .TP
2122 .BI nat " ADDRESS"
2123 The base of the IP address block to translate (for source addresses).
2124 The
2125 .I ADDRESS
2126 may be either the start of the block of NAT addresses (selected by NAT
2127 routes) or a local host address (or even zero).
2128 In the last case the router does not translate the packets, but
2129 masquerades them to this address.
2130 Using map-to instead of nat means the same thing.
2131
2132 .B Warning:
2133 Changes to the RPDB made with these commands do not become active
2134 immediately.  It is assumed that after a script finishes a batch of
2135 updates, it flushes the routing cache with
2136 .BR "ip route flush cache" .
2137
2138 .SS ip rule flush - also dumps all the deleted rules.
2139 This command has no arguments.
2140
2141 .SS ip rule show - list rules
2142 This command has no arguments.
2143 The options list or lst are synonyms with show.
2144
2145 .SH ip maddress - multicast addresses management
2146
2147 .B maddress
2148 objects are multicast addresses.
2149
2150 .SS ip maddress show - list multicast addresses
2151
2152 .TP
2153 .BI dev " NAME " (default)
2154 the device name.
2155
2156 .SS ip maddress add - add a multicast address
2157 .SS ip maddress delete - delete a multicast address
2158 these commands attach/detach a static link layer multicast address
2159 to listen on the interface.
2160 Note that it is impossible to join protocol multicast groups
2161 statically.  This command only manages link layer addresses.
2162
2163 .TP
2164 .BI address " LLADDRESS " (default)
2165 the link layer multicast address.
2166
2167 .TP
2168 .BI dev " NAME"
2169 the device to join/leave this multicast address.
2170
2171 .SH ip mroute - multicast routing cache management
2172 .B mroute
2173 objects are multicast routing cache entries created by a user level
2174 mrouting daemon (f.e.
2175 .B pimd
2176 or
2177 .B mrouted
2178 ).
2179
2180 Due to the limitations of the current interface to the multicast routing
2181 engine, it is impossible to change
2182 .B mroute
2183 objects administratively, so we may only display them.  This limitation
2184 will be removed in the future.
2185
2186 .SS ip mroute show - list mroute cache entries
2187
2188 .TP
2189 .BI to " PREFIX " (default)
2190 the prefix selecting the destination multicast addresses to list.
2191
2192 .TP
2193 .BI iif " NAME"
2194 the interface on which multicast packets are received.
2195
2196 .TP
2197 .BI from " PREFIX"
2198 the prefix selecting the IP source addresses of the multicast route.
2199
2200 .SH ip tunnel - tunnel configuration
2201 .B tunnel
2202 objects are tunnels, encapsulating packets in IP packets and then
2203 sending them over the IP infrastructure.
2204 The encapulating (or outer) address family is specified by the
2205 .B -f
2206 option.  The default is IPv4.
2207
2208 .SS ip tunnel add - add a new tunnel
2209 .SS ip tunnel change - change an existing tunnel
2210 .SS ip tunnel delete - destroy a tunnel
2211
2212 .TP
2213 .BI name " NAME " (default)
2214 select the tunnel device name.
2215
2216 .TP
2217 .BI mode " MODE"
2218 set the tunnel mode. Available modes depend on the encapsulating address family.
2219 .br
2220 Modes for IPv4 encapsulation available:
2221 .BR ipip ", " sit ", " isatap " and " gre "."
2222 .br
2223 Modes for IPv6 encapsulation available:
2224 .BR ip6ip6 ", " ipip6 " and " any "."
2225
2226 .TP
2227 .BI remote " ADDRESS"
2228 set the remote endpoint of the tunnel.
2229
2230 .TP
2231 .BI local " ADDRESS"
2232 set the fixed local address for tunneled packets.
2233 It must be an address on another interface of this host.
2234
2235 .TP
2236 .BI ttl " N"
2237 set a fixed TTL
2238 .I N
2239 on tunneled packets.
2240 .I N
2241 is a number in the range 1--255. 0 is a special value
2242 meaning that packets inherit the TTL value.
2243 The default value for IPv4 tunnels is:
2244 .BR "inherit" .
2245 The default value for IPv6 tunnels is:
2246 .BR "64" .
2247
2248
2249 .TP
2250 .BI tos " T"
2251 .TP
2252 .BI dsfield " T"
2253 .TP
2254 .BI tclass " T"
2255 set a fixed TOS (or traffic class in IPv6)
2256 .I T
2257 on tunneled packets.
2258 The default value is:
2259 .BR "inherit" .
2260
2261 .TP
2262 .BI dev " NAME"
2263 bind the tunnel to the device
2264 .I NAME
2265 so that tunneled packets will only be routed via this device and will
2266 not be able to escape to another device when the route to endpoint
2267 changes.
2268
2269 .TP
2270 .B nopmtudisc
2271 disable Path MTU Discovery on this tunnel.
2272 It is enabled by default.  Note that a fixed ttl is incompatible
2273 with this option: tunnelling with a fixed ttl always makes pmtu
2274 discovery.
2275
2276 .TP
2277 .BI key " K"
2278 .TP
2279 .BI ikey " K"
2280 .TP
2281 .BI okey " K"
2282 .RB ( " only GRE tunnels " )
2283 use keyed GRE with key
2284 .IR K ". " K
2285 is either a number or an IP address-like dotted quad.
2286 The
2287 .B key
2288 parameter sets the key to use in both directions.
2289 The
2290 .BR ikey " and " okey
2291 parameters set different keys for input and output.
2292
2293 .TP
2294 .BR csum ", " icsum ", " ocsum
2295 .RB ( " only GRE tunnels " )
2296 generate/require checksums for tunneled packets.
2297 The
2298 .B ocsum
2299 flag calculates checksums for outgoing packets.
2300 The
2301 .B icsum
2302 flag requires that all input packets have the correct
2303 checksum.  The
2304 .B csum
2305 flag is equivalent to the combination
2306 .BR "icsum ocsum" .
2307
2308 .TP
2309 .BR seq ", " iseq ", " oseq
2310 .RB ( " only GRE tunnels " )
2311 serialize packets.
2312 The
2313 .B oseq
2314 flag enables sequencing of outgoing packets.
2315 The
2316 .B iseq
2317 flag requires that all input packets are serialized.
2318 The
2319 .B  seq
2320 flag is equivalent to the combination
2321 .BR "iseq oseq" .
2322 .B It isn't work. Don't use it.
2323
2324 .TP
2325 .BR "dscp inherit"
2326 .RB ( " only IPv6 tunnels " )
2327 Inherit DS field between inner and outer header.
2328
2329 .TP
2330 .BI encaplim " ELIM"
2331 .RB ( " only IPv6 tunnels " )
2332 set a fixed encapsulation limit.  Default is 4.
2333
2334 .TP
2335 .BI flowlabel " FLOWLABEL"
2336 .RB ( " only IPv6 tunnels " )
2337 set a fixed flowlabel.
2338
2339 .SS ip tunnel prl - potential router list (ISATAP only)
2340
2341 .TP
2342 .BI dev " NAME"
2343 mandatory device name.
2344
2345 .TP
2346 .BI prl-default " ADDR"
2347 .TP
2348 .BI prl-nodefault " ADDR"
2349 .TP
2350 .BI prl-delete " ADDR"
2351 .RB "Add or delete " ADDR
2352 as a potential router or default router.
2353
2354 .SS ip tunnel show - list tunnels
2355 This command has no arguments.
2356
2357 .SH ip monitor and rtmon - state monitoring
2358
2359 The
2360 .B ip
2361 utility can monitor the state of devices, addresses
2362 and routes continuously.  This option has a slightly different format.
2363 Namely, the
2364 .B monitor
2365 command is the first in the command line and then the object list follows:
2366
2367 .BR "ip monitor" " [ " all " |"
2368 .IR LISTofOBJECTS " ]"
2369
2370 .I OBJECT-LIST
2371 is the list of object types that we want to monitor.
2372 It may contain
2373 .BR link ", " address " and " route "."
2374 If no
2375 .B file
2376 argument is given,
2377 .B ip
2378 opens RTNETLINK, listens on it and dumps state changes in the format
2379 described in previous sections.
2380
2381 .P
2382 If a file name is given, it does not listen on RTNETLINK,
2383 but opens the file containing RTNETLINK messages saved in binary format
2384 and dumps them.  Such a history file can be generated with the
2385 .B rtmon
2386 utility.  This utility has a command line syntax similar to
2387 .BR "ip monitor" .
2388 Ideally,
2389 .B rtmon
2390 should be started before the first network configuration command
2391 is issued. F.e. if you insert:
2392 .sp
2393 .in +8
2394 rtmon file /var/log/rtmon.log
2395 .in -8
2396 .sp
2397 in a startup script, you will be able to view the full history
2398 later.
2399
2400 .P
2401 Certainly, it is possible to start
2402 .B rtmon
2403 at any time.
2404 It prepends the history with the state snapshot dumped at the moment
2405 of starting.
2406
2407 .SH ip xfrm - setting xfrm
2408 xfrm is an IP framework, which can transform format of the datagrams,
2409 .br
2410 i.e. encrypt the packets with some algorithm. xfrm policy and xfrm state
2411 are associated through templates
2412 .IR TMPL_LIST "."
2413 This framework is used as a part of IPsec protocol.
2414
2415 .SS ip xfrm state add - add new state into xfrm
2416
2417 .SS ip xfrm state update - update existing xfrm state
2418
2419 .SS ip xfrm state allocspi - allocate SPI value
2420
2421 .TP
2422 .I MODE
2423 is set as default to
2424 .BR transport ","
2425 but it could be set to
2426 .BR tunnel "," ro " or " beet "."
2427
2428 .TP
2429 .I FLAG-LIST
2430 contains one or more flags.
2431
2432 .TP
2433 .I FLAG
2434 could be set to
2435 .BR noecn ", " decap-dscp " or " wildrecv "."
2436
2437 .TP
2438 .I ENCAP
2439 encapsulation is set to encapsulation type
2440 .IR ENCAP-TYPE ", source port " SPORT ", destination port "  DPORT " and " OADDR "."
2441
2442 .TP
2443 .I ENCAP-TYPE
2444 could be set to
2445 .BR espinudp " or " espinudp-nonike "."
2446
2447 .TP
2448 .I ALGO-LIST
2449 contains one or more algorithms
2450 .I ALGO
2451 which depend on the type of algorithm set by
2452 .IR ALGO_TYPE "."
2453 It can be used these algoritms
2454 .BR enc ", " auth " or " comp "."
2455
2456 .SS ip xfrm policy add - add a new policy
2457
2458 .SS ip xfrm policy update - update an existing policy
2459
2460 .SS ip xfrm policy delete - delete existing policy
2461
2462 .SS ip xfrm policy get - get existing policy
2463
2464 .SS ip xfrm policy deleteall - delete all existing xfrm policy
2465
2466 .SS ip xfrm policy list - print out the list of xfrm policy
2467
2468 .SS ip xfrm policy flush - flush policies
2469 It can be flush
2470 .BR all
2471 policies or only those specified with
2472 .BR ptype "."
2473
2474 .TP
2475 .BI dir " DIR "
2476 directory could be one of these:
2477 .BR "inp", " out " or " fwd".
2478
2479 .TP
2480 .IR SELECTOR
2481 selects for which addresses will be set up the policy. The selector
2482 is defined by source and destination address.
2483
2484 .TP
2485 .IR UPSPEC
2486 is defined by source port
2487 .BR sport ", "
2488 destination port
2489 .BR dport ", " type
2490 as number and
2491 .B code
2492 also number.
2493
2494 .TP
2495 .BI dev " DEV "
2496 specify network device.
2497
2498 .TP
2499 .BI index " INDEX "
2500 the number of indexed policy.
2501
2502 .TP
2503 .BI ptype " PTYPE "
2504 type is set as default on
2505 .BR "main" ,
2506 could be switch on
2507 .BR "sub" .
2508
2509 .TP
2510 .BI action " ACTION "
2511 is set as default on
2512 .BR "allow".
2513 It could be switch on
2514 .BR "block".
2515
2516 .TP
2517 .BI priority " PRIORITY "
2518 priority is a number. Default priority is set on zero.
2519
2520 .TP
2521 .IR LIMIT-LIST
2522 limits are set in seconds, bytes or numbers of packets.
2523
2524 .TP
2525 .IR TMPL-LIST
2526 template list is based on
2527 .IR ID ","
2528 .BR mode ", " reqid " and " level ". "
2529
2530 .TP
2531 .IR ID
2532 is specified by source address, destination address,
2533 .I proto
2534 and value of
2535 .IR spi "."
2536
2537 .TP
2538 .IR XFRM_PROTO
2539 values:
2540 .BR esp ", " ah ", " comp ", " route2 " or " hao "."
2541
2542 .TP
2543 .IR MODE
2544 is set as default on
2545 .BR transport ","
2546 but it could be set on
2547 .BR tunnel " or " beet "."
2548
2549 .TP
2550 .IR LEVEL
2551 is set as default on
2552 .BR required
2553 and the other choice is
2554 .BR use "."
2555
2556 .TP
2557 .IR UPSPEC
2558 is specified by
2559 .BR sport ", "
2560 .BR dport ", " type
2561 and
2562 .B code
2563 (NUMBER).
2564
2565 .SS ip xfrm monitor - is used for listing all objects or defined group of them.
2566 The
2567 .B xfrm monitor
2568 can monitor the policies for all objects or defined group of them.
2569
2570 .SH HISTORY
2571 .B ip
2572 was written by Alexey N. Kuznetsov and added in Linux 2.2.
2573 .SH SEE ALSO
2574 .BR tc (8)
2575 .br
2576 .RB "IP Command reference " ip-cref.ps
2577 .br
2578 .RB "IP tunnels " ip-cref.ps
2579 .br
2580 .RB "User documentation at " http://lartc.org/ ", but please direct bugreports and patches to: " <netdev@vger.kernel.org>
2581
2582 .SH AUTHOR
2583 Original Manpage  by Michail Litvak <mci@owl.openwall.com>