]>
Commit | Line | Data |
---|---|---|
514094f9 | 1 | <?xml version='1.0'?> |
3a54a157 ZJS |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | |
0307f791 | 4 | <!-- SPDX-License-Identifier: LGPL-2.1+ --> |
d9000fd3 | 5 | |
e6de49ab | 6 | <refentry id="networkctl" conditional='ENABLE_NETWORKD' |
d9000fd3 ZJS |
7 | xmlns:xi="http://www.w3.org/2001/XInclude"> |
8 | ||
9 | <refentryinfo> | |
10 | <title>networkctl</title> | |
11 | <productname>systemd</productname> | |
d9000fd3 ZJS |
12 | </refentryinfo> |
13 | ||
14 | <refmeta> | |
15 | <refentrytitle>networkctl</refentrytitle> | |
16 | <manvolnum>1</manvolnum> | |
17 | </refmeta> | |
18 | ||
19 | <refnamediv> | |
20 | <refname>networkctl</refname> | |
cc98b302 | 21 | <refpurpose>Query the status of network links</refpurpose> |
d9000fd3 ZJS |
22 | </refnamediv> |
23 | ||
24 | <refsynopsisdiv> | |
25 | <cmdsynopsis> | |
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> | |
30 | </cmdsynopsis> | |
31 | </refsynopsisdiv> | |
32 | ||
33 | <refsect1> | |
34 | <title>Description</title> | |
35 | ||
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> | |
1d3eaa93 | 40 | for an introduction to the basic concepts, functionality, and |
d9000fd3 ZJS |
41 | configuration syntax.</para> |
42 | </refsect1> | |
43 | ||
44 | <refsect1> | |
45 | <title>Options</title> | |
46 | ||
47 | <para>The following options are understood:</para> | |
48 | ||
49 | <variablelist> | |
50 | <varlistentry> | |
51 | <term> | |
52 | <option>-a</option> | |
53 | <option>--all</option> | |
54 | </term> | |
55 | ||
56 | <listitem> | |
57 | <para>Show all links with <command>status</command>.</para> | |
58 | </listitem> | |
59 | </varlistentry> | |
60 | ||
61 | <xi:include href="standard-options.xml" xpointer="help" /> | |
62 | <xi:include href="standard-options.xml" xpointer="version" /> | |
400f73d9 | 63 | <xi:include href="standard-options.xml" xpointer="no-legend" /> |
d9000fd3 ZJS |
64 | <xi:include href="standard-options.xml" xpointer="no-pager" /> |
65 | ||
66 | </variablelist> | |
67 | </refsect1> | |
68 | ||
69 | <refsect1> | |
70 | <title>Commands</title> | |
71 | ||
72 | <para>The following commands are understood:</para> | |
73 | ||
74 | <variablelist> | |
75 | <varlistentry> | |
76 | <term> | |
77 | <command>list</command> | |
f3eeecf4 | 78 | <optional><replaceable>PATTERN…</replaceable></optional> |
d9000fd3 ZJS |
79 | </term> |
80 | ||
81 | <listitem> | |
f3eeecf4 YW |
82 | <para>Show a list of existing links and their status. If one ore more |
83 | <replaceable>PATTERN</replaceable>s are specified, only links matching one of them are shown. | |
84 | If no further arguments are specified shows all links, | |
e997c4b0 LP |
85 | otherwise just the specified links. Produces output similar to: |
86 | ||
87 | <programlisting>IDX LINK TYPE OPERATIONAL SETUP | |
d9000fd3 ZJS |
88 | 1 lo loopback carrier unmanaged |
89 | 2 eth0 ether routable configured | |
90 | 3 virbr0 ether no-carrier unmanaged | |
91 | 4 virbr0-nic ether off unmanaged | |
92 | ||
93 | 4 links listed.</programlisting></para> | |
abcf95e9 JAK |
94 | |
95 | <para>The operational status is one of the following: | |
96 | <variablelist> | |
97 | <varlistentry> | |
98 | <term>off</term> | |
99 | <listitem> | |
100 | <para>the device is powered down</para> | |
101 | </listitem> | |
102 | </varlistentry> | |
103 | <varlistentry> | |
104 | <term>no-carrier</term> | |
105 | <listitem> | |
106 | <para>the device is powered up, but it does not yet have a carrier</para> | |
107 | </listitem> | |
108 | </varlistentry> | |
109 | <varlistentry> | |
110 | <term>dormant</term> | |
111 | <listitem> | |
112 | <para>the device has a carrier, but is not yet ready for normal traffic</para> | |
113 | </listitem> | |
114 | </varlistentry> | |
c9cc0383 YW |
115 | <varlistentry> |
116 | <term>degraded-carrier</term> | |
117 | <listitem> | |
118 | <para>for bond or bridge master, one of the bonding or bridge slave network interfaces is | |
119 | in off, no-carrier, or dormant state</para> | |
120 | </listitem> | |
121 | </varlistentry> | |
abcf95e9 JAK |
122 | <varlistentry> |
123 | <term>carrier</term> | |
124 | <listitem> | |
7d4ea8f9 YW |
125 | <para>the link has a carrier, or for bond or bridge master, all bonding or bridge slave |
126 | network interfaces are enslaved to the master.</para> | |
abcf95e9 JAK |
127 | </listitem> |
128 | </varlistentry> | |
129 | <varlistentry> | |
130 | <term>degraded</term> | |
131 | <listitem> | |
c9cc0383 | 132 | <para>the link has carrier and addresses valid on the local link configured</para> |
abcf95e9 JAK |
133 | </listitem> |
134 | </varlistentry> | |
806c86ad YW |
135 | <varlistentry> |
136 | <term>enslaved</term> | |
137 | <listitem> | |
7d4ea8f9 | 138 | <para>the link has carrier and is enslaved to bond or bridge master network interface</para> |
806c86ad YW |
139 | </listitem> |
140 | </varlistentry> | |
abcf95e9 JAK |
141 | <varlistentry> |
142 | <term>routable</term> | |
143 | <listitem> | |
144 | <para>the link has carrier and routable address configured</para> | |
145 | </listitem> | |
146 | </varlistentry> | |
147 | </variablelist> | |
148 | </para> | |
149 | ||
150 | <para>The setup status is one of the following: | |
151 | <variablelist> | |
152 | <varlistentry> | |
153 | <term>pending</term> | |
154 | <listitem> | |
155 | <para>udev is still processing the link, we don't yet know if we will manage it</para> | |
156 | </listitem> | |
157 | </varlistentry> | |
158 | <varlistentry> | |
159 | <term>failed</term> | |
160 | <listitem> | |
161 | <para>networkd failed to manage the link</para> | |
162 | </listitem> | |
163 | </varlistentry> | |
164 | <varlistentry> | |
165 | <term>configuring</term> | |
166 | <listitem> | |
167 | <para>in the process of retrieving configuration or configuring the link</para> | |
168 | </listitem> | |
169 | </varlistentry> | |
170 | <varlistentry> | |
171 | <term>configured</term> | |
172 | <listitem> | |
173 | <para>link configured successfully</para> | |
174 | </listitem> | |
175 | </varlistentry> | |
176 | <varlistentry> | |
177 | <term>unmanaged</term> | |
178 | <listitem> | |
179 | <para>networkd is not handling the link</para> | |
180 | </listitem> | |
181 | </varlistentry> | |
182 | <varlistentry> | |
183 | <term>linger</term> | |
184 | <listitem> | |
185 | <para>the link is gone, but has not yet been dropped by networkd</para> | |
186 | </listitem> | |
187 | </varlistentry> | |
188 | </variablelist> | |
189 | </para> | |
d9000fd3 ZJS |
190 | </listitem> |
191 | </varlistentry> | |
192 | ||
193 | <varlistentry> | |
194 | <term> | |
195 | <command>status</command> | |
f3eeecf4 | 196 | <optional><replaceable>PATTERN…</replaceable></optional> |
d9000fd3 ZJS |
197 | </term> |
198 | ||
199 | <listitem> | |
f3eeecf4 YW |
200 | <para>Show information about the specified links: type, state, kernel module driver, hardware and |
201 | IP address, configured DNS servers, etc. If one ore more <replaceable>PATTERN</replaceable>s are | |
202 | specified, only links matching one of them are shown.</para> | |
d9000fd3 | 203 | |
e997c4b0 LP |
204 | <para>When no links are specified, an overall network status is shown. Also see the option |
205 | <option>--all</option>.</para> | |
d9000fd3 | 206 | |
e997c4b0 | 207 | <para>Produces output similar to: |
d9000fd3 ZJS |
208 | <programlisting> |
209 | ● State: routable | |
210 | Address: 10.193.76.5 on eth0 | |
211 | 192.168.122.1 on virbr0 | |
212 | 169.254.190.105 on eth0 | |
213 | fe80::5054:aa:bbbb:cccc on eth0 | |
214 | Gateway: 10.193.11.1 (CISCO SYSTEMS, INC.) on eth0 | |
215 | DNS: 8.8.8.8 | |
216 | 8.8.4.4</programlisting></para> | |
217 | </listitem> | |
218 | ||
219 | </varlistentry> | |
220 | ||
221 | <varlistentry> | |
222 | <term> | |
223 | <command>lldp</command> | |
f3eeecf4 | 224 | <optional><replaceable>PATTERN…</replaceable></optional> |
d9000fd3 ZJS |
225 | </term> |
226 | ||
227 | <listitem> | |
f3eeecf4 YW |
228 | <para>Show discovered LLDP (Link Layer Discovery Protocol) neighbors. If one or more |
229 | <replaceable>PATTERN</replaceable>s are specified only neighbors on those interfaces are shown. | |
230 | Otherwise shows discovered neighbors on all interfaces. Note that for this feature to work, | |
231 | <varname>LLDP=</varname> must be turned on for the specific interface, see | |
e997c4b0 LP |
232 | <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry> for |
233 | details.</para> | |
234 | ||
235 | <para>Produces output similar to: | |
236 | <programlisting>LINK CHASSIS ID SYSTEM NAME CAPS PORT ID PORT DESCRIPTION | |
237 | enp0s25 00:e0:4c:00:00:00 GS1900 ..b........ 2 Port #2 | |
238 | ||
239 | Capability Flags: | |
240 | o - Other; p - Repeater; b - Bridge; w - WLAN Access Point; r - Router; | |
241 | t - Telephone; d - DOCSIS cable device; a - Station; c - Customer VLAN; | |
242 | s - Service VLAN, m - Two-port MAC Relay (TPMR) | |
243 | ||
244 | 1 neighbors listed.</programlisting></para> | |
d9000fd3 ZJS |
245 | </listitem> |
246 | </varlistentry> | |
a5be8dab ZJS |
247 | |
248 | <varlistentry> | |
249 | <term> | |
250 | <command>label</command> | |
251 | </term> | |
252 | ||
253 | <listitem><para>Show numerical address labels that can be used for address selection. | |
254 | This is the same information that | |
255 | <citerefentry><refentrytitle>ip-addrlabel</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
256 | shows. See <ulink url="https://tools.ietf.org/html/rfc3484">RFC 3484</ulink> | |
257 | for a discussion of address labels.</para> | |
258 | ||
259 | <para>Produces output similar to: | |
260 | <programlisting>Prefix/Prefixlen Label | |
261 | ::/0 1 | |
262 | fc00::/7 5 | |
263 | fec0::/10 11 | |
264 | 2002::/16 2 | |
265 | 3ffe::/16 12 | |
266 | 2001:10::/28 7 | |
267 | 2001::/32 6 | |
268 | ::ffff:0.0.0.0/96 4 | |
269 | ::/96 3 | |
270 | ::1/128 0</programlisting></para> | |
271 | </listitem> | |
272 | </varlistentry> | |
273 | ||
d9000fd3 ZJS |
274 | </variablelist> |
275 | </refsect1> | |
276 | ||
277 | <refsect1> | |
278 | <title>Exit status</title> | |
279 | ||
a5be8dab | 280 | <para>On success, 0 is returned, a non-zero failure code otherwise.</para> |
d9000fd3 ZJS |
281 | </refsect1> |
282 | ||
283 | <refsect1> | |
284 | <title>See Also</title> | |
285 | <para> | |
286 | <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
287 | <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
a5be8dab ZJS |
288 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
289 | <citerefentry project='die-net'><refentrytitle>ip</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
d9000fd3 ZJS |
290 | </para> |
291 | </refsect1> | |
292 | </refentry> |