1 .TH IP\-XFRM 8 "20 Dec 2011" "iproute2" "Linux"
3 ip-xfrm \- transform configuration
12 .RI " { " COMMAND " | "
18 .IR XFRM-OBJECT " { " COMMAND " | "
24 .BR state " | " policy " | " monitor
28 .BR "ip xfrm state" " { " add " | " update " } "
29 .IR ID " [ " ALGO-LIST " ]"
40 .RB "[ " replay-window
46 .RB "[ " replay-seq-hi
48 .RB "[ " replay-oseq-hi
53 .IR SELECTOR " ] [ " LIMIT-LIST " ]"
57 .IR ADDR "[/" PLEN "] ]"
61 .IR EXTRA-FLAG-LIST " ]"
68 .B "ip xfrm state allocspi"
86 .BR "ip xfrm state" " { " delete " | " get " } "
94 .BR ip " [ " -4 " | " -6 " ] " "xfrm state deleteall" " ["
104 .BR ip " [ " -4 " | " -6 " ] " "xfrm state list" " ["
115 .BR "ip xfrm state flush" " [ " proto
119 .BR "ip xfrm state count"
134 .BR esp " | " ah " | " comp " | " route2 " | " hao
137 .IR ALGO-LIST " := [ " ALGO-LIST " ] " ALGO
141 .RB "{ " enc " | " auth " } "
142 .IR ALGO-NAME " " ALGO-KEYMAT " |"
145 .IR ALGO-NAME " " ALGO-KEYMAT " " ALGO-TRUNC-LEN " |"
148 .IR ALGO-NAME " " ALGO-KEYMAT " " ALGO-ICV-LEN " |"
155 .BR transport " | " tunnel " | " beet " | " ro " | " in_trigger
158 .IR FLAG-LIST " := [ " FLAG-LIST " ] " FLAG
162 .BR noecn " | " decap-dscp " | " nopmtudisc " | " wildrecv " | " icmp " | "
163 .BR af-unspec " | " align4 " | " esn
168 .IR ADDR "[/" PLEN "] ]"
170 .IR ADDR "[/" PLEN "] ]"
181 .RB "{ " tcp " | " udp " | " sctp " | " dccp " } [ " sport
186 .RB "{ " icmp " | " ipv6-icmp " | " mobility-header " } [ " type
192 .RI "{ " DOTTED-QUAD " | " NUMBER " } ] }"
195 .IR LIMIT-LIST " := [ " LIMIT-LIST " ]"
201 .RB "{ " time-soft " | " time-hard " | " time-use-soft " | " time-use-hard " }"
204 .RB "{ " byte-soft " | " byte-hard " }"
207 .RB "{ " packet-soft " | " packet-hard " }"
212 .RB "{ " espinudp " | " espinudp-nonike " | " espintcp " }"
213 .IR SPORT " " DPORT " " OADDR
216 .IR EXTRA-FLAG-LIST " := [ " EXTRA-FLAG-LIST " ] " EXTRA-FLAG
219 .IR EXTRA-FLAG " := "
220 .BR dont-encap-dscp " | " oseq-may-wrap
223 .BR "ip xfrm policy" " { " add " | " update " }"
245 .RI "[ " LIMIT-LIST " ] [ " TMPL-LIST " ]"
248 .BR "ip xfrm policy" " { " delete " | " get " }"
249 .RI "{ " SELECTOR " | "
266 .BR ip " [ " -4 " | " -6 " ] " "xfrm policy" " { " deleteall " | " list " }"
268 .RI "[ " SELECTOR " ]"
283 .B "ip xfrm policy flush"
288 .B "ip xfrm policy count"
291 .B "ip xfrm policy set"
293 .IR LBITS " " RBITS " ]"
295 .IR LBITS " " RBITS " ]"
300 .IR ADDR "[/" PLEN "] ]"
302 .IR ADDR "[/" PLEN "] ]"
312 .RB "{ " tcp " | " udp " | " sctp " | " dccp " } [ " sport
317 .RB "{ " icmp " | " ipv6-icmp " | " mobility-header " } [ " type
323 .RI "{ " DOTTED-QUAD " | " NUMBER " } ] }"
327 .BR in " | " out " | " fwd
335 .BR allow " | " block
338 .IR FLAG-LIST " := [ " FLAG-LIST " ] " FLAG
342 .BR localok " | " icmp
345 .IR LIMIT-LIST " := [ " LIMIT-LIST " ]"
351 .RB "{ " time-soft " | " time-hard " | " time-use-soft " | " time-use-hard " }"
354 .RB "{ " byte-soft " | " byte-hard " }"
357 .RB "{ " packet-soft " | " packet-hard " }"
361 .IR TMPL-LIST " := [ " TMPL-LIST " ]"
387 .BR esp " | " ah " | " comp " | " route2 " | " hao
391 .BR transport " | " tunnel " | " beet " | " ro " | " in_trigger
395 .BR required " | " use
398 .BR "ip xfrm monitor" " ["
405 .IR LISTofXFRM-OBJECTS " ]"
408 .IR LISTofXFRM-OBJECTS " := [ " LISTofXFRM-OBJECTS " ] " XFRM-OBJECT
411 .IR XFRM-OBJECT " := "
412 .BR acquire " | " expire " | " SA " | " policy " | " aevent " | " report
419 xfrm is an IP framework for transforming packets (such as encrypting
420 their payloads). This framework is used to implement the IPsec protocol
423 object operating on the Security Association Database, and the
425 object operating on the Security Policy Database). It is also used for
426 the IP Payload Compression Protocol and features of Mobile IPv6.
430 ip xfrm state add add new state into xfrm
431 ip xfrm state update update existing state in xfrm
432 ip xfrm state allocspi allocate an SPI value
433 ip xfrm state delete delete existing state in xfrm
434 ip xfrm state get get existing state in xfrm
435 ip xfrm state deleteall delete all existing state in xfrm
436 ip xfrm state list print out the list of existing state in xfrm
437 ip xfrm state flush flush all state in xfrm
438 ip xfrm state count count all existing state in xfrm
443 is specified by a source address, destination address,
444 .RI "transform protocol " XFRM-PROTO ","
445 and/or Security Parameter Index
447 (For IP Payload Compression, the Compression Parameter Index or CPI is used for
452 specifies a transform protocol:
453 .RB "IPsec Encapsulating Security Payload (" esp "),"
454 .RB "IPsec Authentication Header (" ah "),"
455 .RB "IP Payload Compression (" comp "),"
456 .RB "Mobile IPv6 Type 2 Routing Header (" route2 "), or"
457 .RB "Mobile IPv6 Home Address Option (" hao ")."
461 contains one or more algorithms to use. Each algorithm
467 .RB "encryption (" enc "),"
468 .RB "authentication (" auth " or " auth-trunc "),"
469 .RB "authenticated encryption with associated data (" aead "), or"
470 .RB "compression (" comp ")"
476 .RB "(for all except " comp ")"
479 which may include both a key and a salt or nonce value; refer to the
482 .RB "(for " auth-trunc " only)"
483 the truncation length
487 .RB "(for " aead " only)"
488 the Integrity Check Value length
495 Encryption algorithms include
496 .BR ecb(cipher_null) ", " cbc(des) ", " cbc(des3_ede) ", " cbc(cast5) ","
497 .BR cbc(blowfish) ", " cbc(aes) ", " cbc(serpent) ", " cbc(camellia) ","
498 .BR cbc(twofish) ", and " rfc3686(ctr(aes)) "."
500 Authentication algorithms include
501 .BR digest_null ", " hmac(md5) ", " hmac(sha1) ", " hmac(sha256) ","
502 .BR hmac(sha384) ", " hmac(sha512) ", " hmac(rmd160) ", and " xcbc(aes) "."
504 Authenticated encryption with associated data (AEAD) algorithms include
505 .BR rfc4106(gcm(aes)) ", " rfc4309(ccm(aes)) ", and " rfc4543(gcm(aes)) "."
507 Compression algorithms include
508 .BR deflate ", " lzs ", and " lzjh "."
514 specifies a mode of operation for the transform protocol. IPsec and IP Payload
515 Compression modes are
516 .BR transport ", " tunnel ","
517 and (for IPsec ESP only) Bound End-to-End Tunnel
519 Mobile IPv6 modes are route optimization
522 .RB "(" in_trigger ")."
526 contains one or more of the following optional flags:
527 .BR noecn ", " decap-dscp ", " nopmtudisc ", " wildrecv ", " icmp ", "
528 .BR af-unspec ", " align4 ", or " esn "."
532 selects the traffic that will be controlled by the policy, based on the source
533 address, the destination address, the network device, and/or
538 selects traffic by protocol. For the
539 .BR tcp ", " udp ", " sctp ", or " dccp
540 protocols, the source and destination port can optionally be specified.
542 .BR icmp ", " ipv6-icmp ", or " mobility-header
543 protocols, the type and code numbers can optionally be specified.
546 protocol, the key can optionally be specified as a dotted-quad or number.
547 Other protocols can be selected by name or number
552 sets limits in seconds, bytes, or numbers of packets.
556 encapsulates packets with protocol
557 .BR espinudp ", " espinudp-nonike ", or " espintcp ","
558 .RI "using source port " SPORT ", destination port " DPORT
559 .RI ", and original address " OADDR "."
563 used to match xfrm policies and states
567 used to set the output mark to influence the routing
568 of the packets emitted by the state
572 xfrm interface identifier used to in both xfrm policies and states
578 ip xfrm policy add add a new policy
579 ip xfrm policy update update an existing policy
580 ip xfrm policy delete delete an existing policy
581 ip xfrm policy get get an existing policy
582 ip xfrm policy deleteall delete all existing xfrm policies
583 ip xfrm policy list print out the list of xfrm policies
584 ip xfrm policy flush flush policies
589 filter (remove) all socket policies from the output.
593 selects the traffic that will be controlled by the policy, based on the source
594 address, the destination address, the network device, and/or
599 selects traffic by protocol. For the
600 .BR tcp ", " udp ", " sctp ", or " dccp
601 protocols, the source and destination port can optionally be specified.
603 .BR icmp ", " ipv6-icmp ", or " mobility-header
604 protocols, the type and code numbers can optionally be specified.
607 protocol, the key can optionally be specified as a dotted-quad or number.
608 Other protocols can be selected by name or number
613 selects the policy direction as
614 .BR in ", " out ", or " fwd "."
618 sets the security context.
623 .BR main " (default) or " sub "."
628 .BR allow " (default) or " block "."
632 is a number that defaults to zero.
636 contains one or both of the following optional flags:
637 .BR local " or " icmp "."
641 sets limits in seconds, bytes, or numbers of packets.
645 is a template list specified using
646 .IR ID ", " MODE ", " REQID ", and/or " LEVEL ". "
650 is specified by a source address, destination address,
651 .RI "transform protocol " XFRM-PROTO ","
652 and/or Security Parameter Index
654 (For IP Payload Compression, the Compression Parameter Index or CPI is used for
659 specifies a transform protocol:
660 .RB "IPsec Encapsulating Security Payload (" esp "),"
661 .RB "IPsec Authentication Header (" ah "),"
662 .RB "IP Payload Compression (" comp "),"
663 .RB "Mobile IPv6 Type 2 Routing Header (" route2 "), or"
664 .RB "Mobile IPv6 Home Address Option (" hao ")."
668 specifies a mode of operation for the transform protocol. IPsec and IP Payload
669 Compression modes are
670 .BR transport ", " tunnel ","
671 and (for IPsec ESP only) Bound End-to-End Tunnel
673 Mobile IPv6 modes are route optimization
676 .RB "(" in_trigger ")."
681 .BR required " (default) or " use "."
687 ip xfrm policy count count existing policies
691 Use one or more -s options to display more details, including policy hash table
698 ip xfrm policy set configure the policy hash table
702 Security policies whose address prefix lengths are greater than or equal
703 policy hash table thresholds are hashed. Others are stored in the
704 policy_inexact chained list.
708 specifies the minimum local address prefix length of policies that are
709 stored in the Security Policy Database hash table.
713 specifies the minimum remote address prefix length of policies that are
714 stored in the Security Policy Database hash table.
720 ip xfrm monitor state monitoring for xfrm objects
724 The xfrm objects to monitor can be optionally specified.
729 option is set, the program listens to all network namespaces that have a
730 nsid assigned into the network namespace were the program is running.
731 A prefix is displayed to show the network namespace where the message
735 [nsid 1]Flushed state proto 0
740 Manpage revised by David Ward <david.ward@ll.mit.edu>
742 Manpage revised by Christophe Gouault <christophe.gouault@6wind.com>
744 Manpage revised by Nicolas Dichtel <nicolas.dichtel@6wind.com>