2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1+ -->
6 <refentry id=
"networkctl" conditional='ENABLE_NETWORKD'
7 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
10 <title>networkctl
</title>
11 <productname>systemd
</productname>
15 <refentrytitle>networkctl
</refentrytitle>
16 <manvolnum>1</manvolnum>
20 <refname>networkctl
</refname>
21 <refpurpose>Query the status of network links
</refpurpose>
26 <command>networkctl
</command>
27 <arg choice=
"opt" rep=
"repeat">OPTIONS
</arg>
28 <arg choice=
"plain">COMMAND
</arg>
29 <arg choice=
"opt" rep=
"repeat">LINK
</arg>
34 <title>Description
</title>
36 <para><command>networkctl
</command> may be used to introspect the
37 state of the network links as seen by
38 <command>systemd-networkd
</command>. Please refer to
39 <citerefentry><refentrytitle>systemd-networkd.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>
40 for an introduction to the basic concepts, functionality, and
41 configuration syntax.
</para>
45 <title>Commands
</title>
47 <para>The following commands are understood:
</para>
52 <command>list
</command>
53 <optional><replaceable>PATTERN…
</replaceable></optional>
57 <para>Show a list of existing links and their status. If one ore more
58 <replaceable>PATTERN
</replaceable>s are specified, only links matching one of them are shown.
59 If no further arguments are specified shows all links,
60 otherwise just the specified links. Produces output similar to:
62 <programlisting>IDX LINK TYPE OPERATIONAL SETUP
63 1 lo loopback carrier unmanaged
64 2 eth0 ether routable configured
65 3 virbr0 ether no-carrier unmanaged
66 4 virbr0-nic ether off unmanaged
68 4 links listed.
</programlisting></para>
70 <para>The operational status is one of the following:
75 <para>the device is missing
</para>
81 <para>the device is powered down
</para>
85 <term>no-carrier
</term>
87 <para>the device is powered up, but it does not yet have a carrier
</para>
93 <para>the device has a carrier, but is not yet ready for normal traffic
</para>
97 <term>degraded-carrier
</term>
99 <para>for bond or bridge master, one of the bonding or bridge slave network interfaces is
100 in off, no-carrier, or dormant state
</para>
106 <para>the link has a carrier, or for bond or bridge master, all bonding or bridge slave
107 network interfaces are enslaved to the master.
</para>
111 <term>degraded
</term>
113 <para>the link has carrier and addresses valid on the local link configured
</para>
117 <term>enslaved
</term>
119 <para>the link has carrier and is enslaved to bond or bridge master network interface
</para>
123 <term>routable
</term>
125 <para>the link has carrier and routable address configured
</para>
131 <para>The setup status is one of the following:
136 <para>udev is still processing the link, we don't yet know if we will manage it
</para>
142 <para>networkd failed to manage the link
</para>
146 <term>configuring
</term>
148 <para>in the process of retrieving configuration or configuring the link
</para>
152 <term>configured
</term>
154 <para>link configured successfully
</para>
158 <term>unmanaged
</term>
160 <para>networkd is not handling the link
</para>
166 <para>the link is gone, but has not yet been dropped by networkd
</para>
176 <command>status
</command>
177 <optional><replaceable>PATTERN…
</replaceable></optional>
181 <para>Show information about the specified links: type, state, kernel module driver, hardware and
182 IP address, configured DNS servers, etc. If one ore more
<replaceable>PATTERN
</replaceable>s are
183 specified, only links matching one of them are shown.
</para>
185 <para>When no links are specified, an overall network status is shown. Also see the option
186 <option>--all
</option>.
</para>
188 <para>Produces output similar to:
191 Address:
10.193.76.5 on eth0
192 192.168.122.1 on virbr0
193 169.254.190.105 on eth0
194 fe80::
5054:aa:bbbb:cccc on eth0
195 Gateway:
10.193.11.1 (CISCO SYSTEMS, INC.) on eth0
197 8.8.4.4</programlisting></para>
204 <command>lldp
</command>
205 <optional><replaceable>PATTERN…
</replaceable></optional>
209 <para>Show discovered LLDP (Link Layer Discovery Protocol) neighbors. If one or more
210 <replaceable>PATTERN
</replaceable>s are specified only neighbors on those interfaces are shown.
211 Otherwise shows discovered neighbors on all interfaces. Note that for this feature to work,
212 <varname>LLDP=
</varname> must be turned on for the specific interface, see
213 <citerefentry><refentrytitle>systemd.network
</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
216 <para>Produces output similar to:
217 <programlisting>LINK CHASSIS ID SYSTEM NAME CAPS PORT ID PORT DESCRIPTION
218 enp0s25
00:e0:
4c:
00:
00:
00 GS1900 ..b........
2 Port #
2
221 o - Other; p - Repeater; b - Bridge; w - WLAN Access Point; r - Router;
222 t - Telephone; d - DOCSIS cable device; a - Station; c - Customer VLAN;
223 s - Service VLAN, m - Two-port MAC Relay (TPMR)
225 1 neighbors listed.
</programlisting></para>
231 <command>label
</command>
234 <listitem><para>Show numerical address labels that can be used for address selection.
235 This is the same information that
236 <citerefentry project='die-net'
><refentrytitle>ip-addrlabel
</refentrytitle><manvolnum>8</manvolnum></citerefentry>
237 shows. See
<ulink url=
"https://tools.ietf.org/html/rfc3484">RFC
3484</ulink>
238 for a discussion of address labels.
</para>
240 <para>Produces output similar to:
241 <programlisting>Prefix/Prefixlen Label
251 ::
1/
128 0</programlisting></para>
257 <command>delete
</command>
259 <listitem><para>Deletes virtual netdevs. Takes interface name or index number.
</para></listitem>
264 <command>up
</command>
266 <listitem><para>Bring devices up. Takes interface name or index number.
</para></listitem>
271 <command>down
</command>
273 <listitem><para>Bring devices down. Takes interface name or index number.
</para></listitem>
278 <command>renew
</command>
280 <listitem><para>Renew dynamic configurations e.g. addresses received from DHCP server.
281 Takes interface name or index number.
</para></listitem>
286 <command>forcerenew
</command>
288 <listitem><para>Send a FORCERENEW message to all connected clients, triggering DHCP reconfiguration.
289 Takes interface name or index number.
</para></listitem>
294 <command>reconfigure
</command>
296 <listitem><para>Reconfigure network interfaces. Takes interface name or index number.
</para></listitem>
301 <command>reload
</command>
303 <listitem><para>Reload
<filename>.netdev
</filename> and
<filename>.network
</filename> files.
304 If a new
<filename>.netdev
</filename> file is found, then the corresponding netdev is created.
305 Note that even if an existing
<filename>.netdev
</filename> is modified or removed,
306 <command>systemd-networkd
</command> does not update or remove the netdev.
307 If a new, modified or removed
<filename>.network
</filename> file is found, then all interfaces
308 which match the file are reconfigured.
</para></listitem>
315 <title>Options
</title>
317 <para>The following options are understood:
</para>
323 <option>--all
</option>
327 <para>Show all links with
<command>status
</command>.
</para>
334 <option>--stats
</option>
338 <para>Show link statistics with
<command>status
</command>.
</para>
343 <term><option>-l
</option></term>
344 <term><option>--full
</option></term>
347 <para>Do not ellipsize the output.
</para>
352 <term><option>-n
</option></term>
353 <term><option>--lines=
</option></term>
356 <para>When used with
<command>status
</command>, controls the number of journal lines to show,
357 counting from the most recent ones. Takes a positive integer argument. Defaults to
10.
</para>
361 <xi:include href=
"standard-options.xml" xpointer=
"help" />
362 <xi:include href=
"standard-options.xml" xpointer=
"version" />
363 <xi:include href=
"standard-options.xml" xpointer=
"no-legend" />
364 <xi:include href=
"standard-options.xml" xpointer=
"no-pager" />
370 <title>Exit status
</title>
372 <para>On success,
0 is returned, a non-zero failure code otherwise.
</para>
376 <title>See Also
</title>
378 <citerefentry><refentrytitle>systemd-networkd.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
379 <citerefentry><refentrytitle>systemd.network
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
380 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
381 <citerefentry project='die-net'
><refentrytitle>ip
</refentrytitle><manvolnum>8</manvolnum></citerefentry>