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