1IP-MACSEC(8) Linux IP-MACSEC(8)
2
3
4
6 ip-macsec - MACsec device configuration
7
9 ip link add link DEVICE name NAME type macsec [ [ address <lladdr> ]
10 port PORT | sci <u64> ] [ cipher { default | gcm-aes-128 | gcm-aes-256
11 } ] [ icvlen ICVLEN ] [ encrypt { on | off } ] [ send_sci { on | off }
12 ] [ end_station { on | off } ] [ scb { on | off } ] [ protect { on |
13 off } ] [ replay { on | off } ] [ window WINDOW ] [ validate { strict |
14 check | disabled } ] [ encodingsa SA ] [ offload { off | phy | mac } ]
15
16 ip macsec add DEV tx sa { 0..3 } [ OPTS ] key ID KEY
17 ip macsec set DEV tx sa { 0..3 } [ OPTS ]
18 ip macsec del DEV tx sa { 0..3 }
19
20 ip macsec add DEV rx SCI [ on | off ]
21 ip macsec set DEV rx SCI [ on | off ]
22 ip macsec del DEV rx SCI
23
24 ip macsec add DEV rx SCI sa { 0..3 } [ OPTS ] key ID KEY
25 ip macsec set DEV rx SCI sa { 0..3 } [ OPTS ]
26 ip macsec del DEV rx SCI sa { 0..3 }
27
28 ip macsec offload DEV { off | phy | mac }
29
30 ip macsec show [ DEV ]
31
32 OPTS := [ pn { 1..2^32-1 } ] [ on | off ]
33 SCI := { sci <u64> | port PORT address <lladdr> }
34 PORT := { 1..2^16-1 }
35
36
37
39 The ip macsec commands are used to configure transmit secure associa‐
40 tions and receive secure channels and their secure associations on a
41 MACsec device created with the ip link add command using the macsec
42 type.
43
44
46 Create a MACsec device on link eth0 (offload is disabled by default)
47 # ip link add link eth0 macsec0 type macsec port 11 encrypt on
48
49 Configure a secure association on that device
50 # ip macsec add macsec0 tx sa 0 pn 1024 on key 01 81818181818181818181818181818181
51
52 Configure a receive channel
53 # ip macsec add macsec0 rx port 1234 address c6:19:52:8f:e6:a0
54
55 Configure a receive association
56 # ip macsec add macsec0 rx port 1234 address c6:19:52:8f:e6:a0 sa 0 pn 1 on key 00 82828282828282828282828282828282
57
58 Display MACsec configuration
59 # ip macsec show
60
61 Configure offloading on an interface
62 # ip macsec offload macsec0 phy
63
64 Configure offloading upon MACsec device creation
65 # ip link add link eth0 macsec0 type macsec port 11 encrypt on offload mac
66
67
69 This tool can be used to configure the 802.1AE keys of the interface.
70 Note that 802.1AE uses GCM-AES with a initialization vector (IV) de‐
71 rived from the packet number. The same key must not be used with the
72 same IV more than once. Instead, keys must be frequently regenerated
73 and distributed. This tool is thus mostly for debugging and testing,
74 or in combination with a user-space application that reconfigures the
75 keys. It is wrong to just configure the keys statically and assume them
76 to work indefinitely. The suggested and standardized way for key man‐
77 agement is 802.1X-2010, which is implemented by wpa_supplicant.
78
79
81 ip-link(8) wpa_supplicant(8)
82
84 Sabrina Dubroca <sd@queasysnail.net>
85
86
87
88iproute 07 Mar 2016 IP-MACSEC(8)