man-pages/man1/networkctl.1.html
2021-03-31 01:06:50 +01:00

453 lines
9.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of NETWORKCTL</TITLE>
</HEAD><BODY>
<H1>NETWORKCTL</H1>
Section: networkctl (1)<BR>Updated: <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>
networkctl - Query the status of network links
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<DL COMPACT>
<DT id="1">
<B>networkctl</B> [OPTIONS...] COMMAND [LINK...]
</DL>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
<B>networkctl</B>
<DD>may be used to introspect the state of the network links as seen by
<B>systemd-networkd</B>. Please refer to
<B><A HREF="/cgi-bin/man/man2html?8+systemd-networkd.service">systemd-networkd.service</A></B>(8)
for an introduction to the basic concepts, functionality, and configuration syntax.
<A NAME="lbAE">&nbsp;</A>
<H2>COMMANDS</H2>
<P>
The following commands are understood:
<P>
<B>list</B> [<I>PATTERN...</I>]
<DL COMPACT><DT id="2"><DD>
Show a list of existing links and their status. If one ore more
<I>PATTERN</I>s are specified, only links matching one of them are shown. If no further arguments are specified shows all links, otherwise just the specified links. Produces output similar to:
<P>
<DL COMPACT><DT id="3"><DD>
<PRE>
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 eth0 ether routable configured
3 virbr0 ether no-carrier unmanaged
4 virbr0-nic ether off unmanaged
4 links listed.
</PRE>
</DL>
<P>
The operational status is one of the following:
<P>
missing
<DL COMPACT><DT id="4"><DD>
the device is missing
</DL>
<P>
off
<DL COMPACT><DT id="5"><DD>
the device is powered down
</DL>
<P>
no-carrier
<DL COMPACT><DT id="6"><DD>
the device is powered up, but it does not yet have a carrier
</DL>
<P>
dormant
<DL COMPACT><DT id="7"><DD>
the device has a carrier, but is not yet ready for normal traffic
</DL>
<P>
degraded-carrier
<DL COMPACT><DT id="8"><DD>
for bond or bridge master, one of the bonding or bridge slave network interfaces is in off, no-carrier, or dormant state
</DL>
<P>
carrier
<DL COMPACT><DT id="9"><DD>
the link has a carrier, or for bond or bridge master, all bonding or bridge slave network interfaces are enslaved to the master.
</DL>
<P>
degraded
<DL COMPACT><DT id="10"><DD>
the link has carrier and addresses valid on the local link configured
</DL>
<P>
enslaved
<DL COMPACT><DT id="11"><DD>
the link has carrier and is enslaved to bond or bridge master network interface
</DL>
<P>
routable
<DL COMPACT><DT id="12"><DD>
the link has carrier and routable address configured
</DL>
<P>
The setup status is one of the following:
<P>
pending
<DL COMPACT><DT id="13"><DD>
udev is still processing the link, we don't yet know if we will manage it
</DL>
<P>
failed
<DL COMPACT><DT id="14"><DD>
networkd failed to manage the link
</DL>
<P>
configuring
<DL COMPACT><DT id="15"><DD>
in the process of retrieving configuration or configuring the link
</DL>
<P>
configured
<DL COMPACT><DT id="16"><DD>
link configured successfully
</DL>
<P>
unmanaged
<DL COMPACT><DT id="17"><DD>
networkd is not handling the link
</DL>
<P>
linger
<DL COMPACT><DT id="18"><DD>
the link is gone, but has not yet been dropped by networkd
</DL>
<P>
</DL>
<P>
<B>status</B> [<I>PATTERN...</I>]
<DL COMPACT><DT id="19"><DD>
Show information about the specified links: type, state, kernel module driver, hardware and IP address, configured DNS servers, etc. If one ore more
<I>PATTERN</I>s are specified, only links matching one of them are shown.
<P>
When no links are specified, an overall network status is shown. Also see the option
<B>--all</B>.
<P>
Produces output similar to:
<P>
<DL COMPACT><DT id="20"><DD>
<PRE>
● State: routable
Address: 10.193.76.5 on eth0
192.168.122.1 on virbr0
169.254.190.105 on eth0
fe80::5054:aa:bbbb:cccc on eth0
Gateway: 10.193.11.1 (CISCO SYSTEMS, INC.) on eth0
DNS: 8.8.8.8
8.8.4.4
</PRE>
</DL>
</DL>
<P>
<B>lldp</B> [<I>PATTERN...</I>]
<DL COMPACT><DT id="21"><DD>
Show discovered LLDP (Link Layer Discovery Protocol) neighbors. If one or more
<I>PATTERN</I>s are specified only neighbors on those interfaces are shown. Otherwise shows discovered neighbors on all interfaces. Note that for this feature to work,
<I>LLDP=</I>
must be turned on for the specific interface, see
<B><A HREF="/cgi-bin/man/man2html?5+systemd.network">systemd.network</A></B>(5)
for details.
<P>
Produces output similar to:
<P>
<DL COMPACT><DT id="22"><DD>
<PRE>
LINK CHASSIS ID SYSTEM NAME CAPS PORT ID PORT DESCRIPTION
enp0s25 00:e0:4c:00:00:00 GS1900 ..b........ 2 Port #2
Capability Flags:
o - Other; p - Repeater; b - Bridge; w - WLAN Access Point; r - Router;
t - Telephone; d - DOCSIS cable device; a - Station; c - Customer VLAN;
s - Service VLAN, m - Two-port MAC Relay (TPMR)
1 neighbors listed.
</PRE>
</DL>
</DL>
<P>
<B>label</B>
<DL COMPACT><DT id="23"><DD>
Show numerical address labels that can be used for address selection. This is the same information that
<B><A HREF="/cgi-bin/man/man2html?8+ip-addrlabel">ip-addrlabel</A></B>(8)
shows. See
m[blue]<B>RFC 3484</B>m[]<FONT SIZE="-2">[1]</FONT>
for a discussion of address labels.
<P>
Produces output similar to:
<P>
<DL COMPACT><DT id="24"><DD>
<PRE>
Prefix/Prefixlen Label
::/0 1
fc00::/7 5
fec0::/10 11
2002::/16 2
3ffe::/16 12
2001:10::/28 7
2001::/32 6
::ffff:0.0.0.0/96 4
::/96 3
::1/128 0
</PRE>
</DL>
</DL>
<P>
<B>delete</B>
<DL COMPACT><DT id="25"><DD>
Deletes virtual netdevs. Takes interface name or index number.
</DL>
<P>
<B>renew</B>
<DL COMPACT><DT id="26"><DD>
Renew dynamic configurations e.g. addresses received from DHCP server. Takes interface name or index number.
</DL>
<P>
<B>reconfigure</B>
<DL COMPACT><DT id="27"><DD>
Reconfigure network interfaces. Takes interface name or index number.
</DL>
<P>
<B>reload</B>
<DL COMPACT><DT id="28"><DD>
Reload
.netdev
and
.network
files. If a new
.netdev
file is found, then the corresponding netdev is created. Note that even if an existing
.netdev
is modified or removed,
<B>systemd-networkd</B>
does not update or remove the netdev. If a new, modified or removed
.network
file is found, then all interfaces which match the file are reconfigured.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>OPTIONS</H2>
<P>
The following options are understood:
<P>
<B>-a</B> <B>--all</B>
<DL COMPACT><DT id="29"><DD>
Show all links with
<B>status</B>.
</DL>
<P>
<B>-s</B> <B>--stats</B>
<DL COMPACT><DT id="30"><DD>
Show link statistics with
<B>status</B>.
</DL>
<P>
<B>-l</B>, <B>--full</B>
<DL COMPACT><DT id="31"><DD>
Do not ellipsize the output.
</DL>
<P>
<B>-n</B>, <B>--lines=</B>
<DL COMPACT><DT id="32"><DD>
When used with
<B>status</B>, controls the number of journal lines to show, counting from the most recent ones. Takes a positive integer argument. Defaults to 10.
</DL>
<P>
<B>-h</B>, <B>--help</B>
<DL COMPACT><DT id="33"><DD>
Print a short help text and exit.
</DL>
<P>
<B>--version</B>
<DL COMPACT><DT id="34"><DD>
Print a short version string and exit.
</DL>
<P>
<B>--no-legend</B>
<DL COMPACT><DT id="35"><DD>
Do not print the legend, i.e. column headers and the footer with hints.
</DL>
<P>
<B>--no-pager</B>
<DL COMPACT><DT id="36"><DD>
Do not pipe output into a pager.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>EXIT STATUS</H2>
<P>
On success, 0 is returned, a non-zero failure code otherwise.
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
<P>
<B><A HREF="/cgi-bin/man/man2html?8+systemd-networkd.service">systemd-networkd.service</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?5+systemd.network">systemd.network</A></B>(5),
<B><A HREF="/cgi-bin/man/man2html?5+systemd.netdev">systemd.netdev</A></B>(5),
<B><A HREF="/cgi-bin/man/man2html?8+ip">ip</A></B>(8)
<A NAME="lbAI">&nbsp;</A>
<H2>NOTES</H2>
<DL COMPACT>
<DT id="37"> 1.<DD>
RFC 3484
<DL COMPACT><DT id="38"><DD>
<A HREF="https://tools.ietf.org/html/rfc3484">https://tools.ietf.org/html/rfc3484</A>
</DL>
<P>
</DL>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="39"><A HREF="#lbAB">NAME</A><DD>
<DT id="40"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="41"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="42"><A HREF="#lbAE">COMMANDS</A><DD>
<DT id="43"><A HREF="#lbAF">OPTIONS</A><DD>
<DT id="44"><A HREF="#lbAG">EXIT STATUS</A><DD>
<DT id="45"><A HREF="#lbAH">SEE ALSO</A><DD>
<DT id="46"><A HREF="#lbAI">NOTES</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:20 GMT, March 31, 2021
</BODY>
</HTML>