man-pages/man8/ip-macsec.8.html
2021-03-31 01:06:50 +01:00

241 lines
5.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of IP-MACSEC</TITLE>
</HEAD><BODY>
<H1>IP-MACSEC</H1>
Section: Linux (8)<BR>Updated: 07 Mar 2016<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
ip-macsec - MACsec device configuration
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>ip link add link </B><I>DEVICE</I><B> name </B><I>NAME</I><B> type macsec </B>
[ [
<B>address</B><I> &lt;lladdr&gt;</I>
]
<B>port</B><I> PORT</I>
|
<B>sci</B><I> &lt;u64&gt;</I>
] [
<B>cipher</B> { <B>default</B> | <B>gcm-aes-128</B> | gcm-aes-256 } ] [
<B>icvlen</B><I> ICVLEN</I>
] [
<B>encrypt</B> { <B>on</B> | <B>off</B> } ] [
<B>send_sci</B> { <B>on</B> | <B>off</B> } ] [
<B>end_station</B> { <B>on</B> | <B>off</B> } ] [
<B>scb</B> { <B>on</B> | <B>off</B> } ] [
<B>protect</B> { <B>on</B> | <B>off</B> } ] [
<B>replay</B> { <B>on</B> | <B>off</B> } ] [
<B>window</B><I> WINDOW</I>
] [
<B>validate</B> { <B>strict</B> | <B>check</B> | <B>disabled</B> } ] [
<B>encodingsa</B><I> SA</I>
]
<P>
<B>ip macsec add </B><I>DEV</I><B> tx sa</B>
{ <I>0..3</I> } [ <I>OPTS</I> ]
<B>key</B><I> ID KEY</I>
<BR>
<B>ip macsec set </B><I>DEV</I><B> tx sa</B>
{ <I>0..3</I> } [ <I>OPTS</I> ]
<BR>
<B>ip macsec del </B><I>DEV</I><B> tx sa</B>
{ <I>0..3</I> }
<P>
<B>ip macsec add </B><I>DEV</I><B> rx </B><I>SCI</I>
[<B> on </B>|<B> off </B>]
<BR>
<B>ip macsec set </B><I>DEV</I><B> rx </B><I>SCI</I>
[<B> on </B>|<B> off </B>]
<BR>
<B>ip macsec del </B><I>DEV</I><B> rx </B><I>SCI</I>
<P>
<B>ip macsec add </B><I>DEV</I><B> rx </B><I>SCI</I><B> sa</B>
{ <I>0..3</I> } [ <I>OPTS</I> ]
<B>key</B><I> ID KEY</I>
<BR>
<B>ip macsec set </B><I>DEV</I><B> rx </B><I>SCI</I><B> sa</B>
{ <I>0..3</I> } [ <I>OPTS</I> ]
<BR>
<B>ip macsec del </B><I>DEV</I><B> rx </B><I>SCI</I><B> sa</B>
{ <I>0..3</I> }
<P>
<B>ip macsec show</B>
[<I> DEV </I>]
<P>
<I>OPTS</I> := [
<B>pn</B> {
<I>1..2^32-1</I> } ] [
<B>on</B> | <B>off</B> ]
<BR>
<I>SCI</I> := {
<B>sci</B>
<I>&lt;u64&gt;</I> |
<B>port</B>
<I>PORT</I>
<B>address</B><I> &lt;lladdr&gt; </I>
}
<BR>
<I>PORT</I> := { <I>1..2^16-1</I> }
<P>
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
The
<B>ip macsec</B>
commands are used to configure transmit secure associations and receive secure channels and their secure associations on a MACsec device created with the
<B>ip link add</B>
command using the
<I>macsec</I>
type.
<P>
<A NAME="lbAE">&nbsp;</A>
<H2>EXAMPLES</H2>
<P>
<A NAME="lbAF">&nbsp;</A>
<H3>Create a MACsec device on link eth0</H3>
<PRE>
# ip link add link eth0 macsec0 type macsec port 11 encrypt on
</PRE><A NAME="lbAG">&nbsp;</A>
<H3>Configure a secure association on that device</H3>
<PRE>
# ip macsec add macsec0 tx sa 0 pn 1024 on key 01 81818181818181818181818181818181
</PRE><A NAME="lbAH">&nbsp;</A>
<H3>Configure a receive channel</H3>
<PRE>
# ip macsec add macsec0 rx port 1234 address c6:19:52:8f:e6:a0
</PRE><A NAME="lbAI">&nbsp;</A>
<H3>Configure a receive association</H3>
<PRE>
# ip macsec add macsec0 rx port 1234 address c6:19:52:8f:e6:a0 sa 0 pn 1 on key 00 82828282828282828282828282828282
</PRE><A NAME="lbAJ">&nbsp;</A>
<H3>Display MACsec configuration</H3>
<PRE>
# ip macsec show
</PRE><A NAME="lbAK">&nbsp;</A>
<H2>NOTES</H2>
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 distibuted.
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.
<P>
<A NAME="lbAL">&nbsp;</A>
<H2>SEE ALSO</H2>
<BR>
<B><A HREF="/cgi-bin/man/man2html?8+ip-link">ip-link</A></B>(8)
<B><A HREF="/cgi-bin/man/man2html?8+wpa_supplicant">wpa_supplicant</A></B>(8)
<A NAME="lbAM">&nbsp;</A>
<H2>AUTHOR</H2>
Sabrina Dubroca &lt;<A HREF="mailto:sd@queasysnail.net">sd@queasysnail.net</A>&gt;
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="4"><A HREF="#lbAE">EXAMPLES</A><DD>
<DL>
<DT id="5"><A HREF="#lbAF">Create a MACsec device on link eth0</A><DD>
<DT id="6"><A HREF="#lbAG">Configure a secure association on that device</A><DD>
<DT id="7"><A HREF="#lbAH">Configure a receive channel</A><DD>
<DT id="8"><A HREF="#lbAI">Configure a receive association</A><DD>
<DT id="9"><A HREF="#lbAJ">Display MACsec configuration</A><DD>
</DL>
<DT id="10"><A HREF="#lbAK">NOTES</A><DD>
<DT id="11"><A HREF="#lbAL">SEE ALSO</A><DD>
<DT id="12"><A HREF="#lbAM">AUTHOR</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:12 GMT, March 31, 2021
</BODY>
</HTML>