]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/networkctl.xml
capability: add new ambient_capabilities_supported() helper
[thirdparty/systemd.git] / man / networkctl.xml
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">
4
5 <!--
6 This file is part of systemd.
7
8 Copyright 2015 Zbigniew Jędrzejewski-Szmek
9
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="networkctl" conditional='ENABLE_NETWORKD'
25 xmlns:xi="http://www.w3.org/2001/XInclude">
26
27 <refentryinfo>
28 <title>networkctl</title>
29 <productname>systemd</productname>
30
31 <authorgroup>
32 <author>
33 <contrib>Documentation</contrib>
34 <firstname>Zbigniew</firstname>
35 <surname>Jędrzejewski-Szmek</surname>
36 <email>zbyszek@in.waw.pl</email>
37 </author>
38 </authorgroup>
39 </refentryinfo>
40
41 <refmeta>
42 <refentrytitle>networkctl</refentrytitle>
43 <manvolnum>1</manvolnum>
44 </refmeta>
45
46 <refnamediv>
47 <refname>networkctl</refname>
48 <refpurpose>Query the status of network links</refpurpose>
49 </refnamediv>
50
51 <refsynopsisdiv>
52 <cmdsynopsis>
53 <command>networkctl</command>
54 <arg choice="opt" rep="repeat">OPTIONS</arg>
55 <arg choice="plain">COMMAND</arg>
56 <arg choice="opt" rep="repeat">LINK</arg>
57 </cmdsynopsis>
58 </refsynopsisdiv>
59
60 <refsect1>
61 <title>Description</title>
62
63 <para><command>networkctl</command> may be used to introspect the
64 state of the network links as seen by
65 <command>systemd-networkd</command>. Please refer to
66 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
67 for an introduction to the basic concepts, functionality, and
68 configuration syntax.</para>
69 </refsect1>
70
71 <refsect1>
72 <title>Options</title>
73
74 <para>The following options are understood:</para>
75
76 <variablelist>
77 <varlistentry>
78 <term>
79 <option>-a</option>
80 <option>--all</option>
81 </term>
82
83 <listitem>
84 <para>Show all links with <command>status</command>.</para>
85 </listitem>
86 </varlistentry>
87
88 <xi:include href="standard-options.xml" xpointer="help" />
89 <xi:include href="standard-options.xml" xpointer="version" />
90 <xi:include href="standard-options.xml" xpointer="no-legend" />
91 <xi:include href="standard-options.xml" xpointer="no-pager" />
92
93 </variablelist>
94 </refsect1>
95
96 <refsect1>
97 <title>Commands</title>
98
99 <para>The following commands are understood:</para>
100
101 <variablelist>
102 <varlistentry>
103 <term>
104 <command>list</command>
105 <optional><replaceable>LINK…</replaceable></optional>
106 </term>
107
108 <listitem>
109 <para>Show a list of existing links and their status. If no further arguments are specified shows all links,
110 otherwise just the specified links. Produces output similar to:
111
112 <programlisting>IDX LINK TYPE OPERATIONAL SETUP
113 1 lo loopback carrier unmanaged
114 2 eth0 ether routable configured
115 3 virbr0 ether no-carrier unmanaged
116 4 virbr0-nic ether off unmanaged
117
118 4 links listed.</programlisting></para>
119 </listitem>
120 </varlistentry>
121
122 <varlistentry>
123 <term>
124 <command>status</command>
125 <optional><replaceable>LINK…</replaceable></optional>
126 </term>
127
128 <listitem>
129 <para>Show information about the specified links: type,
130 state, kernel module driver, hardware and IP address,
131 configured DNS servers, etc.</para>
132
133 <para>When no links are specified, an overall network status is shown. Also see the option
134 <option>--all</option>.</para>
135
136 <para>Produces output similar to:
137 <programlisting>
138 ● State: routable
139 Address: 10.193.76.5 on eth0
140 192.168.122.1 on virbr0
141 169.254.190.105 on eth0
142 fe80::5054:aa:bbbb:cccc on eth0
143 Gateway: 10.193.11.1 (CISCO SYSTEMS, INC.) on eth0
144 DNS: 8.8.8.8
145 8.8.4.4</programlisting></para>
146 </listitem>
147
148 </varlistentry>
149
150 <varlistentry>
151 <term>
152 <command>lldp</command>
153 <optional><replaceable>LINK…</replaceable></optional>
154 </term>
155
156 <listitem>
157 <para>Show discovered LLDP (Link Layer Discovery Protocol) neighbors. If one or more link names are specified
158 only neighbors on those interfaces are shown. Otherwise shows discovered neighbors on all interfaces. Note
159 that for this feature to work, <varname>LLDP=</varname> must be turned on on the specific interface, see
160 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
161 details.</para>
162
163 <para>Produces output similar to:
164 <programlisting>LINK CHASSIS ID SYSTEM NAME CAPS PORT ID PORT DESCRIPTION
165 enp0s25 00:e0:4c:00:00:00 GS1900 ..b........ 2 Port #2
166
167 Capability Flags:
168 o - Other; p - Repeater; b - Bridge; w - WLAN Access Point; r - Router;
169 t - Telephone; d - DOCSIS cable device; a - Station; c - Customer VLAN;
170 s - Service VLAN, m - Two-port MAC Relay (TPMR)
171
172 1 neighbors listed.</programlisting></para>
173 </listitem>
174 </varlistentry>
175
176 <varlistentry>
177 <term>
178 <command>label</command>
179 </term>
180
181 <listitem><para>Show numerical address labels that can be used for address selection.
182 This is the same information that
183 <citerefentry><refentrytitle>ip-addrlabel</refentrytitle><manvolnum>8</manvolnum></citerefentry>
184 shows. See <ulink url="https://tools.ietf.org/html/rfc3484">RFC 3484</ulink>
185 for a discussion of address labels.</para>
186
187 <para>Produces output similar to:
188 <programlisting>Prefix/Prefixlen Label
189 ::/0 1
190 fc00::/7 5
191 fec0::/10 11
192 2002::/16 2
193 3ffe::/16 12
194 2001:10::/28 7
195 2001::/32 6
196 ::ffff:0.0.0.0/96 4
197 ::/96 3
198 ::1/128 0</programlisting></para>
199 </listitem>
200 </varlistentry>
201
202 </variablelist>
203 </refsect1>
204
205 <refsect1>
206 <title>Exit status</title>
207
208 <para>On success, 0 is returned, a non-zero failure code otherwise.</para>
209 </refsect1>
210
211 <refsect1>
212 <title>See Also</title>
213 <para>
214 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
215 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
216 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
217 <citerefentry project='die-net'><refentrytitle>ip</refentrytitle><manvolnum>8</manvolnum></citerefentry>
218 </para>
219 </refsect1>
220 </refentry>