1NETWORKCTL(1)                     networkctl                     NETWORKCTL(1)
2
3
4

NAME

6       networkctl - Query or modify the status of network links
7

SYNOPSIS

9       networkctl [OPTIONS...] COMMAND [LINK...]
10

DESCRIPTION

12       networkctl may be used to query or modify the state of the network
13       links as seen by systemd-networkd. Please refer to systemd-
14       networkd.service(8) for an introduction to the basic concepts,
15       functionality, and configuration syntax.
16

COMMANDS

18       The following commands are understood:
19
20       list [PATTERN...]
21           Show a list of existing links and their status. If one or more
22           PATTERNs are specified, only links matching one of them are shown.
23           If no further arguments are specified shows all links, otherwise
24           just the specified links. Produces output similar to:
25
26               IDX LINK         TYPE     OPERATIONAL SETUP
27                 1 lo           loopback carrier     unmanaged
28                 2 eth0         ether    routable    configured
29                 3 virbr0       ether    no-carrier  unmanaged
30                 4 virbr0-nic   ether    off         unmanaged
31
32               4 links listed.
33
34           The operational status is one of the following:
35
36           missing
37               the device is missing
38
39           off
40               the device is powered down
41
42           no-carrier
43               the device is powered up, but it does not yet have a carrier
44
45           dormant
46               the device has a carrier, but is not yet ready for normal
47               traffic
48
49           degraded-carrier
50               one of the bonding or bridge slave network interfaces is in
51               off, no-carrier, or dormant state, and the master interface has
52               no address.
53
54           carrier
55               the link has a carrier, or for bond or bridge master, all
56               bonding or bridge slave network interfaces are enslaved to the
57               master
58
59           degraded
60               the link has carrier and addresses valid on the local link
61               configured. For bond or bridge master this means that not all
62               slave network interfaces have carrier but at least one does.
63
64           enslaved
65               the link has carrier and is enslaved to bond or bridge master
66               network interface
67
68           routable
69               the link has carrier and routable address configured. For bond
70               or bridge master it is not necessary for all slave network
71               interfaces to have carrier, but at least one must.
72
73           The setup status is one of the following:
74
75           pending
76               udev is still processing the link, we don't yet know if we will
77               manage it
78
79           initialized
80               udev has processed the link, but we don't yet know if we will
81               manage it
82
83           configuring
84               in the process of retrieving configuration or configuring the
85               link
86
87           configured
88               link configured successfully
89
90           unmanaged
91               networkd is not handling the link
92
93           failed
94               networkd failed to manage the link
95
96           linger
97               the link is gone, but has not yet been dropped by networkd
98
99
100       status [PATTERN...]
101           Show information about the specified links: type, state, kernel
102           module driver, hardware and IP address, configured DNS servers,
103           etc. If one or more PATTERNs are specified, only links matching one
104           of them are shown.
105
106           When no links are specified, an overall network status is shown.
107           Also see the option --all.
108
109           Produces output similar to:
110
111               ●        State: routable
112                 Online state: online
113                      Address: 10.193.76.5 on eth0
114                               192.168.122.1 on virbr0
115                               169.254.190.105 on eth0
116                               fe80::5054:aa:bbbb:cccc on eth0
117                      Gateway: 10.193.11.1 (CISCO SYSTEMS, INC.) on eth0
118                          DNS: 8.8.8.8
119                               8.8.4.4
120
121           In the overall network status, the online state depends on the
122           individual online state of all required links. Managed links are
123           required for online by default. In this case, the online state is
124           one of the following:
125
126           unknown
127               all links have unknown online status (i.e. there are no
128               required links)
129
130           offline
131               all required links are offline
132
133           partial
134               some, but not all, required links are online
135
136           online
137               all required links are online
138
139
140       lldp [PATTERN...]
141           Show discovered LLDP (Link Layer Discovery Protocol) neighbors. If
142           one or more PATTERNs are specified only neighbors on those
143           interfaces are shown. Otherwise shows discovered neighbors on all
144           interfaces. Note that for this feature to work, LLDP= must be
145           turned on for the specific interface, see systemd.network(5) for
146           details.
147
148           Produces output similar to:
149
150               LINK             CHASSIS ID        SYSTEM NAME      CAPS        PORT ID           PORT DESCRIPTION
151               enp0s25          00:e0:4c:00:00:00 GS1900           ..b........ 2                 Port #2
152
153               Capability Flags:
154               o - Other; p - Repeater;  b - Bridge; w - WLAN Access Point; r - Router;
155               t - Telephone; d - DOCSIS cable device; a - Station; c - Customer VLAN;
156               s - Service VLAN, m - Two-port MAC Relay (TPMR)
157
158               1 neighbors listed.
159
160       label
161           Show numerical address labels that can be used for address
162           selection. This is the same information that ip-addrlabel(8) shows.
163           See RFC 3484[1] for a discussion of address labels.
164
165           Produces output similar to:
166
167               Prefix/Prefixlen                          Label
168                       ::/0                                  1
169                   fc00::/7                                  5
170                   fec0::/10                                11
171                   2002::/16                                 2
172                   3ffe::/16                                12
173                2001:10::/28                                 7
174                   2001::/32                                 6
175               ::ffff:0.0.0.0/96                             4
176                       ::/96                                 3
177                      ::1/128                                0
178
179       delete DEVICE...
180           Deletes virtual netdevs. Takes interface name or index number.
181
182       up DEVICE...
183           Bring devices up. Takes interface name or index number.
184
185       down DEVICE...
186           Bring devices down. Takes interface name or index number.
187
188       renew DEVICE...
189           Renew dynamic configurations e.g. addresses received from DHCP
190           server. Takes interface name or index number.
191
192       forcerenew DEVICE...
193           Send a FORCERENEW message to all connected clients, triggering DHCP
194           reconfiguration. Takes interface name or index number.
195
196       reconfigure DEVICE...
197           Reconfigure network interfaces. Takes interface name or index
198           number. Note that this does not reload .netdev or .network
199           corresponding to the specified interface. So, if you edit config
200           files, it is necessary to call networkctl reload first to apply new
201           settings.
202
203       reload
204           Reload .netdev and .network files. If a new .netdev file is found,
205           then the corresponding netdev is created. Note that even if an
206           existing .netdev is modified or removed, systemd-networkd does not
207           update or remove the netdev. If a new, modified or removed .network
208           file is found, then all interfaces which match the file are
209           reconfigured.
210
211       edit FILE|@DEVICE...
212           Edit network configuration files, which include .network, .netdev,
213           and .link files. If no network config file matching the given name
214           is found, a new one will be created under /etc/. Specially, if the
215           name is prefixed by "@", it will be treated as a network interface,
216           and editing will be performed on the network config files
217           associated with it. Additionally, the interface name can be
218           suffixed with ":network" (default) or ":link", in order to choose
219           the type of network config to operate on.
220
221           If --drop-in= is specified, edit the drop-in file instead of the
222           main configuration file. Unless --no-reload is specified,
223           systemd-networkd will be reloaded after the edit of the .network or
224           .netdev files finishes. The same applies for .link files and
225           systemd-udevd. Note that the changed link settings are not
226           automatically applied after reloading. To achieve that, trigger
227           uevents for the corresponding interface. Refer to systemd.link(5)
228           for more information.
229
230       cat FILE|@DEVICE...
231           Show network configuration files. This command honors the "@"
232           prefix in the same way as edit.
233

OPTIONS

235       The following options are understood:
236
237       -a --all
238           Show all links with status.
239
240       -s --stats
241           Show link statistics with status.
242
243       -l, --full
244           Do not ellipsize the output.
245
246       -n, --lines=
247           When used with status, controls the number of journal lines to
248           show, counting from the most recent ones. Takes a positive integer
249           argument. Defaults to 10.
250
251       --drop-in=
252           NAMEWhen used with edit, edit the drop-in file NAME instead of the
253           main configuration file.
254
255       --no-reload
256           When used with edit, systemd-networkd or systemd-udevd will not be
257           reloaded after the editing finishes.
258
259       --json=MODE
260           Shows output formatted as JSON. Expects one of "short" (for the
261           shortest possible output without any redundant whitespace or line
262           breaks), "pretty" (for a pretty version of the same, with
263           indentation and line breaks) or "off" (to turn off JSON output, the
264           default).
265
266       -h, --help
267           Print a short help text and exit.
268
269       --version
270           Print a short version string and exit.
271
272       --no-legend
273           Do not print the legend, i.e. column headers and the footer with
274           hints.
275
276       --no-pager
277           Do not pipe output into a pager.
278

EXIT STATUS

280       On success, 0 is returned, a non-zero failure code otherwise.
281

SEE ALSO

283       systemd-networkd.service(8), systemd.network(5), systemd.netdev(5),
284       ip(8)
285

NOTES

287        1. RFC 3484
288           https://tools.ietf.org/html/rfc3484
289
290
291
292systemd 254                                                      NETWORKCTL(1)
Impressum