Name
ip-macsec - MACsec device configurationSynopsis
ip link add link " DEVICE " name " NAME " type macsec[ [ ] | ] [ cipher " { " default " | " gcm-aes-128 " | "gcm-aes-256" } ] ["] [ encrypt " { " on " | " off " } ] ["send_sci " { " on " | " off " } ] ["end_station " { " on " | " off " } ] ["scb " { " on " | " off " } ] ["protect " { " on " | " off " } ] ["replay " { " on " | " off " } ] ["] [ validate " { " strict " | " check " | " disabled " } ] ["] [ offload " { " off " | " phy " | " mac " }"] ip macsec add " DEV " tx sa
"{ " 0..3 " } [ " OPTS " ]" ip macsec set " DEV " tx sa
"{ " 0..3 " } [ " OPTS " ]" ip macsec del " DEV " tx sa
"{ " 0..3 " }" ip macsec add " DEV " rx SCI
[ " on " | " off " ] ip macsec set " DEV " rx SCI
[ " on " | " off " ] ip macsec del " DEV " rx SCI
ip macsec add " DEV " rx " SCI " sa
"{ " 0..3 " } [ " OPTS " ]" ip macsec set " DEV " rx " SCI " sa
"{ " 0..3 " } [ " OPTS " ]" ip macsec del " DEV " rx " SCI " sa
"{ " 0..3 " }" ip macsec offload DEV
"{ " off " | " phy " | " mac " }" ip macsec show [ " DEV " ]
OPTS " := [ "
pn " { "1..2^32-1 " } ] ["
on " | " off " ]"SCI " := { "
sci <u64> " | "
PORT
} PORT " := { " 1..2^16-1 " } "
Description
The ip macsec commands are used to configure transmit secure associations and receive secure channels and their secure associations on a MACsec device created with the ip link add command using the macsec type.Examples
Create A Macsec Device On Link Eth0 (Offload Is Disabled By Default)
# ip link add link eth0 macsec0 type macsec port 11 encrypt onConfigure A Secure Association On That Device
# ip macsec add macsec0 tx sa 0 pn 1024 on key 01 81818181818181818181818181818181Configure A Receive Channel
# ip macsec add macsec0 rx port 1234 address c6:19:52:8f:e6:a0Configure A Receive Association
# ip macsec add macsec0 rx port 1234 address c6:19:52:8f:e6:a0 sa 0 pn 1 on key 00 82828282828282828282828282828282Display Macsec Configuration
# ip macsec showConfigure Offloading On An Interface
# ip macsec offload macsec0 phyConfigure Offloading Upon Macsec Device Creation
# ip link add link eth0 macsec0 type macsec port 11 encrypt on offload mac
Notes
This tool can be used to configure the 802.1AE keys of the interface. Note that 802.1AE uses GCM-AES with a initialization vector (IV) derived from the packet number. The same key must not be used with the same IV more than once. Instead, keys must be frequently regenerated and distributed. This tool is thus mostly for debugging and testing, or in combination with a user-space application that reconfigures the keys. It is wrong to just configure the keys statically and assume them to work indefinitely. The suggested and standardized way for key management is 802.1X-2010, which is implemented by wpa_supplicant.See Also
- ip-link(8)
- wpa_supplicant(8)