]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/networkctl.xml
service: FileDescriptorStoreMax should also imply NotifyAccess
[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 This file is part of systemd.
d9000fd3 9
b975b0d5 10 Copyright 2015 Zbigniew Jędrzejewski-Szmek
d9000fd3
ZJS
11-->
12
e6de49ab 13<refentry id="networkctl" conditional='ENABLE_NETWORKD'
d9000fd3
ZJS
14 xmlns:xi="http://www.w3.org/2001/XInclude">
15
16 <refentryinfo>
17 <title>networkctl</title>
18 <productname>systemd</productname>
19
20 <authorgroup>
21 <author>
22 <contrib>Documentation</contrib>
23 <firstname>Zbigniew</firstname>
24 <surname>Jędrzejewski-Szmek</surname>
25 <email>zbyszek@in.waw.pl</email>
26 </author>
27 </authorgroup>
28 </refentryinfo>
29
30 <refmeta>
31 <refentrytitle>networkctl</refentrytitle>
32 <manvolnum>1</manvolnum>
33 </refmeta>
34
35 <refnamediv>
36 <refname>networkctl</refname>
cc98b302 37 <refpurpose>Query the status of network links</refpurpose>
d9000fd3
ZJS
38 </refnamediv>
39
40 <refsynopsisdiv>
41 <cmdsynopsis>
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>
46 </cmdsynopsis>
47 </refsynopsisdiv>
48
49 <refsect1>
50 <title>Description</title>
51
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>
1d3eaa93 56 for an introduction to the basic concepts, functionality, and
d9000fd3
ZJS
57 configuration syntax.</para>
58 </refsect1>
59
60 <refsect1>
61 <title>Options</title>
62
63 <para>The following options are understood:</para>
64
65 <variablelist>
66 <varlistentry>
67 <term>
68 <option>-a</option>
69 <option>--all</option>
70 </term>
71
72 <listitem>
73 <para>Show all links with <command>status</command>.</para>
74 </listitem>
75 </varlistentry>
76
77 <xi:include href="standard-options.xml" xpointer="help" />
78 <xi:include href="standard-options.xml" xpointer="version" />
400f73d9 79 <xi:include href="standard-options.xml" xpointer="no-legend" />
d9000fd3
ZJS
80 <xi:include href="standard-options.xml" xpointer="no-pager" />
81
82 </variablelist>
83 </refsect1>
84
85 <refsect1>
86 <title>Commands</title>
87
88 <para>The following commands are understood:</para>
89
90 <variablelist>
91 <varlistentry>
92 <term>
93 <command>list</command>
1eecafb8 94 <optional><replaceable>LINK…</replaceable></optional>
d9000fd3
ZJS
95 </term>
96
97 <listitem>
e997c4b0
LP
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:
100
101 <programlisting>IDX LINK TYPE OPERATIONAL SETUP
d9000fd3
ZJS
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
106
1074 links listed.</programlisting></para>
108 </listitem>
109 </varlistentry>
110
111 <varlistentry>
112 <term>
113 <command>status</command>
1eecafb8 114 <optional><replaceable>LINK…</replaceable></optional>
d9000fd3
ZJS
115 </term>
116
117 <listitem>
118 <para>Show information about the specified links: type,
119 state, kernel module driver, hardware and IP address,
120 configured DNS servers, etc.</para>
121
e997c4b0
LP
122 <para>When no links are specified, an overall network status is shown. Also see the option
123 <option>--all</option>.</para>
d9000fd3 124
e997c4b0 125 <para>Produces output similar to:
d9000fd3
ZJS
126 <programlisting>
127● State: routable
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
133 DNS: 8.8.8.8
134 8.8.4.4</programlisting></para>
135 </listitem>
136
137 </varlistentry>
138
139 <varlistentry>
140 <term>
141 <command>lldp</command>
1eecafb8 142 <optional><replaceable>LINK…</replaceable></optional>
d9000fd3
ZJS
143 </term>
144
145 <listitem>
e997c4b0
LP
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
150 details.</para>
151
152 <para>Produces output similar to:
153 <programlisting>LINK CHASSIS ID SYSTEM NAME CAPS PORT ID PORT DESCRIPTION
154enp0s25 00:e0:4c:00:00:00 GS1900 ..b........ 2 Port #2
155
156Capability Flags:
157o - Other; p - Repeater; b - Bridge; w - WLAN Access Point; r - Router;
158t - Telephone; d - DOCSIS cable device; a - Station; c - Customer VLAN;
159s - Service VLAN, m - Two-port MAC Relay (TPMR)
160
1611 neighbors listed.</programlisting></para>
d9000fd3
ZJS
162 </listitem>
163 </varlistentry>
a5be8dab
ZJS
164
165 <varlistentry>
166 <term>
167 <command>label</command>
168 </term>
169
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>
175
176 <para>Produces output similar to:
177 <programlisting>Prefix/Prefixlen Label
178 ::/0 1
179 fc00::/7 5
180 fec0::/10 11
181 2002::/16 2
182 3ffe::/16 12
183 2001:10::/28 7
184 2001::/32 6
185::ffff:0.0.0.0/96 4
186 ::/96 3
187 ::1/128 0</programlisting></para>
188 </listitem>
189 </varlistentry>
190
d9000fd3
ZJS
191 </variablelist>
192 </refsect1>
193
194 <refsect1>
195 <title>Exit status</title>
196
a5be8dab 197 <para>On success, 0 is returned, a non-zero failure code otherwise.</para>
d9000fd3
ZJS
198 </refsect1>
199
200 <refsect1>
201 <title>See Also</title>
202 <para>
203 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
204 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
a5be8dab
ZJS
205 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
206 <citerefentry project='die-net'><refentrytitle>ip</refentrytitle><manvolnum>8</manvolnum></citerefentry>
d9000fd3
ZJS
207 </para>
208 </refsect1>
209</refentry>