1 <?xml version='
1.0'
?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 SPDX-License-Identifier: LGPL-2.1+
8 This file is part of systemd.
10 Copyright 2015 Zbigniew Jędrzejewski-Szmek
13 <refentry id=
"networkctl" conditional='ENABLE_NETWORKD'
14 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
17 <title>networkctl
</title>
18 <productname>systemd
</productname>
22 <contrib>Documentation
</contrib>
23 <firstname>Zbigniew
</firstname>
24 <surname>Jędrzejewski-Szmek
</surname>
25 <email>zbyszek@in.waw.pl
</email>
31 <refentrytitle>networkctl
</refentrytitle>
32 <manvolnum>1</manvolnum>
36 <refname>networkctl
</refname>
37 <refpurpose>Query the status of network links
</refpurpose>
42 <command>networkctl
</command>
43 <arg choice=
"opt" rep=
"repeat">OPTIONS
</arg>
44 <arg choice=
"plain">COMMAND
</arg>
45 <arg choice=
"opt" rep=
"repeat">LINK
</arg>
50 <title>Description
</title>
52 <para><command>networkctl
</command> may be used to introspect the
53 state of the network links as seen by
54 <command>systemd-networkd
</command>. Please refer to
55 <citerefentry><refentrytitle>systemd-networkd.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>
56 for an introduction to the basic concepts, functionality, and
57 configuration syntax.
</para>
61 <title>Options
</title>
63 <para>The following options are understood:
</para>
69 <option>--all
</option>
73 <para>Show all links with
<command>status
</command>.
</para>
77 <xi:include href=
"standard-options.xml" xpointer=
"help" />
78 <xi:include href=
"standard-options.xml" xpointer=
"version" />
79 <xi:include href=
"standard-options.xml" xpointer=
"no-legend" />
80 <xi:include href=
"standard-options.xml" xpointer=
"no-pager" />
86 <title>Commands
</title>
88 <para>The following commands are understood:
</para>
93 <command>list
</command>
94 <optional><replaceable>LINK…
</replaceable></optional>
98 <para>Show a list of existing links and their status. If no further arguments are specified shows all links,
99 otherwise just the specified links. Produces output similar to:
101 <programlisting>IDX LINK TYPE OPERATIONAL SETUP
102 1 lo loopback carrier unmanaged
103 2 eth0 ether routable configured
104 3 virbr0 ether no-carrier unmanaged
105 4 virbr0-nic ether off unmanaged
107 4 links listed.
</programlisting></para>
113 <command>status
</command>
114 <optional><replaceable>LINK…
</replaceable></optional>
118 <para>Show information about the specified links: type,
119 state, kernel module driver, hardware and IP address,
120 configured DNS servers, etc.
</para>
122 <para>When no links are specified, an overall network status is shown. Also see the option
123 <option>--all
</option>.
</para>
125 <para>Produces output similar to:
128 Address:
10.193.76.5 on eth0
129 192.168.122.1 on virbr0
130 169.254.190.105 on eth0
131 fe80::
5054:aa:bbbb:cccc on eth0
132 Gateway:
10.193.11.1 (CISCO SYSTEMS, INC.) on eth0
134 8.8.4.4</programlisting></para>
141 <command>lldp
</command>
142 <optional><replaceable>LINK…
</replaceable></optional>
146 <para>Show discovered LLDP (Link Layer Discovery Protocol) neighbors. If one or more link names are specified
147 only neighbors on those interfaces are shown. Otherwise shows discovered neighbors on all interfaces. Note
148 that for this feature to work,
<varname>LLDP=
</varname> must be turned on on the specific interface, see
149 <citerefentry><refentrytitle>systemd.network
</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
152 <para>Produces output similar to:
153 <programlisting>LINK CHASSIS ID SYSTEM NAME CAPS PORT ID PORT DESCRIPTION
154 enp0s25
00:e0:
4c:
00:
00:
00 GS1900 ..b........
2 Port #
2
157 o - Other; p - Repeater; b - Bridge; w - WLAN Access Point; r - Router;
158 t - Telephone; d - DOCSIS cable device; a - Station; c - Customer VLAN;
159 s - Service VLAN, m - Two-port MAC Relay (TPMR)
161 1 neighbors listed.
</programlisting></para>
167 <command>label
</command>
170 <listitem><para>Show numerical address labels that can be used for address selection.
171 This is the same information that
172 <citerefentry><refentrytitle>ip-addrlabel
</refentrytitle><manvolnum>8</manvolnum></citerefentry>
173 shows. See
<ulink url=
"https://tools.ietf.org/html/rfc3484">RFC
3484</ulink>
174 for a discussion of address labels.
</para>
176 <para>Produces output similar to:
177 <programlisting>Prefix/Prefixlen Label
187 ::
1/
128 0</programlisting></para>
195 <title>Exit status
</title>
197 <para>On success,
0 is returned, a non-zero failure code otherwise.
</para>
201 <title>See Also
</title>
203 <citerefentry><refentrytitle>systemd-networkd.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
204 <citerefentry><refentrytitle>systemd.network
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
205 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
206 <citerefentry project='die-net'
><refentrytitle>ip
</refentrytitle><manvolnum>8</manvolnum></citerefentry>