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