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