]> git.proxmox.com Git - mirror_iproute2.git/blame - man/man8/ip-xfrm.8
ipmonitor: allows to monitor in several netns
[mirror_iproute2.git] / man / man8 / ip-xfrm.8
CommitLineData
2a9721f1
SH
1.TH IP\-XFRM 8 "20 Dec 2011" "iproute2" "Linux"
2.SH "NAME"
aab2702d 3ip-xfrm \- transform configuration
2a9721f1
SH
4.SH "SYNOPSIS"
5.sp
6.ad l
7.in +8
8.ti -8
9.B ip
10.RI "[ " OPTIONS " ]"
11.B xfrm
12.RI " { " COMMAND " | "
13.BR help " }"
14.sp
15
16.ti -8
17.B "ip xfrm"
18.IR XFRM-OBJECT " { " COMMAND " | "
19.BR help " }"
20.sp
21
22.ti -8
23.IR XFRM-OBJECT " :="
24.BR state " | " policy " | " monitor
25.sp
26
27.ti -8
28.BR "ip xfrm state" " { " add " | " update " } "
29.IR ID " [ " ALGO-LIST " ]"
30.RB "[ " mode
31.IR MODE " ]"
32.RB "[ " mark
33.I MARK
34.RB "[ " mask
35.IR MASK " ] ]"
36.RB "[ " reqid
37.IR REQID " ]"
38.RB "[ " seq
39.IR SEQ " ]"
40.RB "[ " replay-window
41.IR SIZE " ]"
42.RB "[ " replay-seq
43.IR SEQ " ]"
44.RB "[ " replay-oseq
45.IR SEQ " ]"
eeb669a7
ND
46.RB "[ " replay-seq-hi
47.IR SEQ " ]"
48.RB "[ " replay-oseq-hi
49.IR SEQ " ]"
2a9721f1
SH
50.RB "[ " flag
51.IR FLAG-LIST " ]"
52.RB "[ " sel
53.IR SELECTOR " ] [ " LIMIT-LIST " ]"
54.RB "[ " encap
55.IR ENCAP " ]"
56.RB "[ " coa
57.IR ADDR "[/" PLEN "] ]"
58.RB "[ " ctx
59.IR CTX " ]"
60
61.ti -8
62.B "ip xfrm state allocspi"
63.I ID
64.RB "[ " mode
65.IR MODE " ]"
66.RB "[ " mark
67.I MARK
68.RB "[ " mask
69.IR MASK " ] ]"
70.RB "[ " reqid
71.IR REQID " ]"
72.RB "[ " seq
73.IR SEQ " ]"
74.RB "[ " min
75.I SPI
76.B max
77.IR SPI " ]"
78
79.ti -8
80.BR "ip xfrm state" " { " delete " | " get " } "
81.I ID
82.RB "[ " mark
83.I MARK
84.RB "[ " mask
85.IR MASK " ] ]"
86
87.ti -8
88.BR "ip xfrm state" " { " deleteall " | " list " } ["
89.IR ID " ]"
90.RB "[ " mode
91.IR MODE " ]"
92.RB "[ " reqid
93.IR REQID " ]"
94.RB "[ " flag
95.IR FLAG-LIST " ]"
96
97.ti -8
98.BR "ip xfrm state flush" " [ " proto
99.IR XFRM-PROTO " ]"
100
101.ti -8
102.BR "ip xfrm state count"
103
104.ti -8
105.IR ID " :="
106.RB "[ " src
107.IR ADDR " ]"
108.RB "[ " dst
109.IR ADDR " ]"
110.RB "[ " proto
111.IR XFRM-PROTO " ]"
112.RB "[ " spi
113.IR SPI " ]"
114
115.ti -8
116.IR XFRM-PROTO " :="
117.BR esp " | " ah " | " comp " | " route2 " | " hao
118
119.ti -8
120.IR ALGO-LIST " := [ " ALGO-LIST " ] " ALGO
121
122.ti -8
123.IR ALGO " :="
f3b9aa3d 124.RB "{ " enc " | " auth " } "
29665f92 125.IR ALGO-NAME " " ALGO-KEYMAT " |"
2a9721f1 126.br
2a9721f1 127.B auth-trunc
29665f92 128.IR ALGO-NAME " " ALGO-KEYMAT " " ALGO-TRUNC-LEN " |"
f3b9aa3d
DW
129.br
130.B aead
29665f92 131.IR ALGO-NAME " " ALGO-KEYMAT " " ALGO-ICV-LEN " |"
f3b9aa3d
DW
132.br
133.B comp
134.IR ALGO-NAME
2a9721f1
SH
135
136.ti -8
137.IR MODE " := "
29665f92 138.BR transport " | " tunnel " | " beet " | " ro " | " in_trigger
2a9721f1
SH
139
140.ti -8
141.IR FLAG-LIST " := [ " FLAG-LIST " ] " FLAG
142
143.ti -8
144.IR FLAG " :="
eeb669a7
ND
145.BR noecn " | " decap-dscp " | " nopmtudisc " | " wildrecv " | " icmp " | "
146.BR af-unspec " | " align4 " | " esn
2a9721f1
SH
147
148.ti -8
149.IR SELECTOR " :="
150.RB "[ " src
151.IR ADDR "[/" PLEN "] ]"
152.RB "[ " dst
153.IR ADDR "[/" PLEN "] ]"
154.RB "[ " dev
155.IR DEV " ]"
156.br
157.RI "[ " UPSPEC " ]"
158
159.ti -8
160.IR UPSPEC " := "
161.BR proto " {"
162.IR PROTO " |"
163.br
164.RB "{ " tcp " | " udp " | " sctp " | " dccp " } [ " sport
165.IR PORT " ]"
166.RB "[ " dport
167.IR PORT " ] |"
168.br
169.RB "{ " icmp " | " ipv6-icmp " | " mobility-header " } [ " type
170.IR NUMBER " ]"
171.RB "[ " code
172.IR NUMBER " ] |"
173.br
174.BR gre " [ " key
175.RI "{ " DOTTED-QUAD " | " NUMBER " } ] }"
176
177.ti -8
178.IR LIMIT-LIST " := [ " LIMIT-LIST " ]"
179.B limit
180.I LIMIT
181
182.ti -8
183.IR LIMIT " :="
184.RB "{ " time-soft " | " time-hard " | " time-use-soft " | " time-use-hard " }"
185.IR "SECONDS" " |"
186.br
187.RB "{ " byte-soft " | " byte-hard " }"
188.IR SIZE " |"
189.br
190.RB "{ " packet-soft " | " packet-hard " }"
191.I COUNT
192
193.ti -8
194.IR ENCAP " :="
195.RB "{ " espinudp " | " espinudp-nonike " }"
196.IR SPORT " " DPORT " " OADDR
197
198.ti -8
199.BR "ip xfrm policy" " { " add " | " update " }"
200.I SELECTOR
201.B dir
202.I DIR
203.RB "[ " ctx
204.IR CTX " ]"
205.RB "[ " mark
206.I MARK
207.RB "[ " mask
208.IR MASK " ] ]"
209.RB "[ " index
210.IR INDEX " ]"
211.RB "[ " ptype
212.IR PTYPE " ]"
213.RB "[ " action
214.IR ACTION " ]"
215.RB "[ " priority
216.IR PRIORITY " ]"
217.RB "[ " flag
218.IR FLAG-LIST " ]"
219.RI "[ " LIMIT-LIST " ] [ " TMPL-LIST " ]"
220
221.ti -8
222.BR "ip xfrm policy" " { " delete " | " get " }"
223.RI "{ " SELECTOR " | "
224.B index
225.IR INDEX " }"
226.B dir
227.I DIR
228.RB "[ " ctx
229.IR CTX " ]"
230.RB "[ " mark
231.I MARK
232.RB "[ " mask
233.IR MASK " ] ]"
234.RB "[ " ptype
235.IR PTYPE " ]"
236
237.ti -8
238.BR "ip xfrm policy" " { " deleteall " | " list " }"
239.RI "[ " SELECTOR " ]"
240.RB "[ " dir
241.IR DIR " ]"
242.RB "[ " index
243.IR INDEX " ]"
244.RB "[ " ptype
245.IR PTYPE " ]"
246.RB "[ " action
247.IR ACTION " ]"
248.RB "[ " priority
249.IR PRIORITY " ]"
250
251.ti -8
252.B "ip xfrm policy flush"
253.RB "[ " ptype
254.IR PTYPE " ]"
255
256.ti -8
257.B "ip xfrm policy count"
258
811aca04
CG
259.ti -8
260.B "ip xfrm policy set"
261.RB "[ " hthresh4
262.IR LBITS " " RBITS " ]"
263.RB "[ " hthresh6
264.IR LBITS " " RBITS " ]"
265
2a9721f1
SH
266.ti -8
267.IR SELECTOR " :="
268.RB "[ " src
269.IR ADDR "[/" PLEN "] ]"
270.RB "[ " dst
271.IR ADDR "[/" PLEN "] ]"
272.RB "[ " dev
273.IR DEV " ]"
274.RI "[ " UPSPEC " ]"
275
276.ti -8
277.IR UPSPEC " := "
278.BR proto " {"
279.IR PROTO " |"
280.br
281.RB "{ " tcp " | " udp " | " sctp " | " dccp " } [ " sport
282.IR PORT " ]"
283.RB "[ " dport
284.IR PORT " ] |"
285.br
286.RB "{ " icmp " | " ipv6-icmp " | " mobility-header " } [ " type
287.IR NUMBER " ]"
288.RB "[ " code
289.IR NUMBER " ] |"
290.br
291.BR gre " [ " key
292.RI "{ " DOTTED-QUAD " | " NUMBER " } ] }"
293
294.ti -8
295.IR DIR " := "
296.BR in " | " out " | " fwd
297
298.ti -8
299.IR PTYPE " := "
300.BR main " | " sub
301
302.ti -8
303.IR ACTION " := "
304.BR allow " | " block
305
306.ti -8
307.IR FLAG-LIST " := [ " FLAG-LIST " ] " FLAG
308
309.ti -8
310.IR FLAG " :="
311.BR localok " | " icmp
312
313.ti -8
314.IR LIMIT-LIST " := [ " LIMIT-LIST " ]"
315.B limit
316.I LIMIT
317
318.ti -8
319.IR LIMIT " :="
320.RB "{ " time-soft " | " time-hard " | " time-use-soft " | " time-use-hard " }"
321.IR "SECONDS" " |"
322.br
323.RB "{ " byte-soft " | " byte-hard " }"
324.IR SIZE " |"
325.br
326.RB "{ " packet-soft " | " packet-hard " }"
327.I COUNT
328
329.ti -8
330.IR TMPL-LIST " := [ " TMPL-LIST " ]"
331.B tmpl
332.I TMPL
333
334.ti -8
335.IR TMPL " := " ID
336.RB "[ " mode
337.IR MODE " ]"
338.RB "[ " reqid
339.IR REQID " ]"
340.RB "[ " level
341.IR LEVEL " ]"
342
343.ti -8
344.IR ID " :="
345.RB "[ " src
346.IR ADDR " ]"
347.RB "[ " dst
348.IR ADDR " ]"
349.RB "[ " proto
350.IR XFRM-PROTO " ]"
351.RB "[ " spi
352.IR SPI " ]"
353
354.ti -8
355.IR XFRM-PROTO " :="
356.BR esp " | " ah " | " comp " | " route2 " | " hao
357
358.ti -8
359.IR MODE " := "
29665f92 360.BR transport " | " tunnel " | " beet " | " ro " | " in_trigger
2a9721f1
SH
361
362.ti -8
363.IR LEVEL " :="
364.BR required " | " use
365
366.ti -8
367.BR "ip xfrm monitor" " [ " all " |"
368.IR LISTofXFRM-OBJECTS " ]"
369
811aca04
CG
370.ti -8
371.IR LISTofXFRM-OBJECTS " := [ " LISTofXFRM-OBJECTS " ] " XFRM-OBJECT
372
373.ti -8
374.IR XFRM-OBJECT " := "
375.BR acquire " | " expire " | " SA " | " policy " | " aevent " | " report
376
2a9721f1
SH
377.in -8
378.ad b
379
380.SH DESCRIPTION
381
382xfrm is an IP framework for transforming packets (such as encrypting
383their payloads). This framework is used to implement the IPsec protocol
384suite (with the
385.B state
386object operating on the Security Association Database, and the
387.B policy
388object operating on the Security Policy Database). It is also used for
389the IP Payload Compression Protocol and features of Mobile IPv6.
390
61f541fe 391.TS
392l l.
393ip xfrm state add add new state into xfrm
394ip xfrm state update update existing state in xfrm
395ip xfrm state allocspi allocate an SPI value
396ip xfrm state delete delete existing state in xfrm
397ip xfrm state get get existing state in xfrm
398ip xfrm state deleteall delete all existing state in xfrm
399ip xfrm state list print out the list of existing state in xfrm
400ip xfrm state flush flush all state in xfrm
401ip xfrm state count count all existing state in xfrm
61f541fe 402.TE
2a9721f1
SH
403
404.TP
405.IR ID
406is specified by a source address, destination address,
407.RI "transform protocol " XFRM-PROTO ","
408and/or Security Parameter Index
409.IR SPI "."
29665f92
DW
410(For IP Payload Compression, the Compression Parameter Index or CPI is used for
411.IR SPI ".)"
2a9721f1
SH
412
413.TP
414.I XFRM-PROTO
415specifies a transform protocol:
416.RB "IPsec Encapsulating Security Payload (" esp "),"
417.RB "IPsec Authentication Header (" ah "),"
418.RB "IP Payload Compression (" comp "),"
419.RB "Mobile IPv6 Type 2 Routing Header (" route2 "), or"
420.RB "Mobile IPv6 Home Address Option (" hao ")."
421
422.TP
423.I ALGO-LIST
29665f92
DW
424contains one or more algorithms to use. Each algorithm
425.I ALGO
426is specified by:
427.RS
428.IP \[bu]
429the algorithm type:
2a9721f1 430.RB "encryption (" enc "),"
29665f92
DW
431.RB "authentication (" auth " or " auth-trunc "),"
432.RB "authenticated encryption with associated data (" aead "), or"
433.RB "compression (" comp ")"
434.IP \[bu]
435the algorithm name
436.IR ALGO-NAME
437(see below)
438.IP \[bu]
439.RB "(for all except " comp ")"
440the keying material
441.IR ALGO-KEYMAT ","
442which may include both a key and a salt or nonce value; refer to the
443corresponding RFC
444.IP \[bu]
445.RB "(for " auth-trunc " only)"
446the truncation length
447.I ALGO-TRUNC-LEN
448in bits
449.IP \[bu]
450.RB "(for " aead " only)"
2a9721f1
SH
451the Integrity Check Value length
452.I ALGO-ICV-LEN
29665f92
DW
453in bits
454.RE
455
456.nh
457.RS
458Encryption algorithms include
459.BR ecb(cipher_null) ", " cbc(des) ", " cbc(des3_ede) ", " cbc(cast5) ","
460.BR cbc(blowfish) ", " cbc(aes) ", " cbc(serpent) ", " cbc(camellia) ","
461.BR cbc(twofish) ", and " rfc3686(ctr(aes)) "."
462
463Authentication algorithms include
464.BR digest_null ", " hmac(md5) ", " hmac(sha1) ", " hmac(sha256) ","
465.BR hmac(sha384) ", " hmac(sha512) ", " hmac(rmd610) ", and " xcbc(aes) "."
466
467Authenticated encryption with associated data (AEAD) algorithms include
468.BR rfc4106(gcm(aes)) ", " rfc4309(ccm(aes)) ", and " rfc4543(gcm(aes)) "."
469
470Compression algorithms include
471.BR deflate ", " lzs ", and " lzjh "."
472.RE
473.hy
2a9721f1
SH
474
475.TP
476.I MODE
29665f92
DW
477specifies a mode of operation for the transform protocol. IPsec and IP Payload
478Compression modes are
479.BR transport ", " tunnel ","
480and (for IPsec ESP only) Bound End-to-End Tunnel
481.RB "(" beet ")."
482Mobile IPv6 modes are route optimization
483.RB "(" ro ")"
484and inbound trigger
485.RB "(" in_trigger ")."
2a9721f1
SH
486
487.TP
488.I FLAG-LIST
489contains one or more of the following optional flags:
490.BR noecn ", " decap-dscp ", " nopmtudisc ", " wildrecv ", " icmp ", "
eeb669a7 491.BR af-unspec ", " align4 ", or " esn "."
2a9721f1
SH
492
493.TP
494.IR SELECTOR
495selects the traffic that will be controlled by the policy, based on the source
496address, the destination address, the network device, and/or
497.IR UPSPEC "."
498
499.TP
500.IR UPSPEC
501selects traffic by protocol. For the
502.BR tcp ", " udp ", " sctp ", or " dccp
503protocols, the source and destination port can optionally be specified.
504For the
505.BR icmp ", " ipv6-icmp ", or " mobility-header
506protocols, the type and code numbers can optionally be specified.
507For the
508.B gre
509protocol, the key can optionally be specified as a dotted-quad or number.
510Other protocols can be selected by name or number
511.IR PROTO "."
512
513.TP
514.I LIMIT-LIST
515sets limits in seconds, bytes, or numbers of packets.
516
517.TP
518.I ENCAP
519encapsulates packets with protocol
520.BR espinudp " or " espinudp-nonike ","
521.RI "using source port " SPORT ", destination port " DPORT
522.RI ", and original address " OADDR "."
811aca04 523
61f541fe 524.sp
811aca04 525.PP
61f541fe 526.TS
527l l.
528ip xfrm policy add add a new policy
529ip xfrm policy update update an existing policy
530ip xfrm policy delete delete an existing policy
531ip xfrm policy get get an existing policy
532ip xfrm policy deleteall delete all existing xfrm policies
533ip xfrm policy list print out the list of xfrm policies
534ip xfrm policy flush flush policies
61f541fe 535.TE
2a9721f1
SH
536
537.TP
538.IR SELECTOR
539selects the traffic that will be controlled by the policy, based on the source
540address, the destination address, the network device, and/or
541.IR UPSPEC "."
542
543.TP
544.IR UPSPEC
545selects traffic by protocol. For the
546.BR tcp ", " udp ", " sctp ", or " dccp
547protocols, the source and destination port can optionally be specified.
548For the
549.BR icmp ", " ipv6-icmp ", or " mobility-header
550protocols, the type and code numbers can optionally be specified.
551For the
552.B gre
553protocol, the key can optionally be specified as a dotted-quad or number.
554Other protocols can be selected by name or number
555.IR PROTO "."
556
557.TP
558.I DIR
559selects the policy direction as
560.BR in ", " out ", or " fwd "."
561
562.TP
563.I CTX
564sets the security context.
565
566.TP
567.I PTYPE
568can be
569.BR main " (default) or " sub "."
570
571.TP
572.I ACTION
573can be
574.BR allow " (default) or " block "."
575
576.TP
577.I PRIORITY
578is a number that defaults to zero.
579
580.TP
581.I FLAG-LIST
582contains one or both of the following optional flags:
583.BR local " or " icmp "."
584
585.TP
586.I LIMIT-LIST
587sets limits in seconds, bytes, or numbers of packets.
588
589.TP
590.I TMPL-LIST
591is a template list specified using
592.IR ID ", " MODE ", " REQID ", and/or " LEVEL ". "
593
594.TP
595.IR ID
596is specified by a source address, destination address,
597.RI "transform protocol " XFRM-PROTO ","
598and/or Security Parameter Index
599.IR SPI "."
29665f92
DW
600(For IP Payload Compression, the Compression Parameter Index or CPI is used for
601.IR SPI ".)"
2a9721f1
SH
602
603.TP
604.I XFRM-PROTO
605specifies a transform protocol:
606.RB "IPsec Encapsulating Security Payload (" esp "),"
607.RB "IPsec Authentication Header (" ah "),"
608.RB "IP Payload Compression (" comp "),"
609.RB "Mobile IPv6 Type 2 Routing Header (" route2 "), or"
610.RB "Mobile IPv6 Home Address Option (" hao ")."
611
612.TP
613.I MODE
29665f92
DW
614specifies a mode of operation for the transform protocol. IPsec and IP Payload
615Compression modes are
616.BR transport ", " tunnel ","
617and (for IPsec ESP only) Bound End-to-End Tunnel
618.RB "(" beet ")."
619Mobile IPv6 modes are route optimization
620.RB "(" ro ")"
621and inbound trigger
622.RB "(" in_trigger ")."
2a9721f1
SH
623
624.TP
625.I LEVEL
626can be
627.BR required " (default) or " use "."
628
811aca04
CG
629.sp
630.PP
631.TS
632l l.
633ip xfrm policy count count existing policies
634.TE
635
636.PP
637Use one or more -s options to display more details, including policy hash table
638information.
639
640.sp
641.PP
642.TS
643l l.
644ip xfrm policy set configure the policy hash table
645.TE
646
647.PP
648Security policies whose address prefix lengths are greater than or equal
649policy hash table thresholds are hashed. Others are stored in the
650policy_inexact chained list.
651
652.TP
653.I LBITS
654specifies the minimum local address prefix length of policies that are
655stored in the Security Policy Database hash table.
656
657.TP
658.I RBITS
659specifies the minimum remote address prefix length of policies that are
660stored in the Security Policy Database hash table.
661
662.sp
663.PP
664.TS
665l l.
666ip xfrm monitor state monitoring for xfrm objects
667.TE
668
669.PP
2a9721f1
SH
670The xfrm objects to monitor can be optionally specified.
671
672.SH AUTHOR
29665f92 673Manpage revised by David Ward <david.ward@ll.mit.edu>
811aca04
CG
674.br
675Manpage revised by Christophe Gouault <christophe.gouault@6wind.com>