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