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

NAME

6       networkctl - Query the status of network links
7

SYNOPSIS

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

DESCRIPTION

12       networkctl may be used to introspect the state of the network links as
13       seen by systemd-networkd. Please refer to systemd-networkd.service(8)
14       for an introduction to the basic concepts, functionality, and
15       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               for bond or bridge master, one of the bonding or bridge slave
51               network interfaces is in off, no-carrier, or dormant state
52
53           carrier
54               the link has a carrier, or for bond or bridge master, all
55               bonding or bridge slave network interfaces are enslaved to the
56               master
57
58           degraded
59               the link has carrier and addresses valid on the local link
60               configured
61
62           enslaved
63               the link has carrier and is enslaved to bond or bridge master
64               network interface
65
66           routable
67               the link has carrier and routable address configured
68
69           The setup status is one of the following:
70
71           pending
72               udev is still processing the link, we don't yet know if we will
73               manage it
74
75           initialized
76               udev has processed the link, but we don't yet know if we will
77               manage it
78
79           configuring
80               in the process of retrieving configuration or configuring the
81               link
82
83           configured
84               link configured successfully
85
86           unmanaged
87               networkd is not handling the link
88
89           failed
90               networkd failed to manage the link
91
92           linger
93               the link is gone, but has not yet been dropped by networkd
94
95
96       status [PATTERN...]
97           Show information about the specified links: type, state, kernel
98           module driver, hardware and IP address, configured DNS servers,
99           etc. If one or more PATTERNs are specified, only links matching one
100           of them are shown.
101
102           When no links are specified, an overall network status is shown.
103           Also see the option --all.
104
105           Produces output similar to:
106
107               ●        State: routable
108                 Online state: online
109                      Address: 10.193.76.5 on eth0
110                               192.168.122.1 on virbr0
111                               169.254.190.105 on eth0
112                               fe80::5054:aa:bbbb:cccc on eth0
113                      Gateway: 10.193.11.1 (CISCO SYSTEMS, INC.) on eth0
114                          DNS: 8.8.8.8
115                               8.8.4.4
116
117           In the overall network status, the online state depends on the
118           individual online state of all required links. Managed links are
119           required for online by default. In this case, the online state is
120           one of the following:
121
122           unknown
123               all links have unknown online status (i.e. there are no
124               required links)
125
126           offline
127               all required links are offline
128
129           partial
130               some, but not all, required links are online
131
132           online
133               all required links are online
134
135
136       lldp [PATTERN...]
137           Show discovered LLDP (Link Layer Discovery Protocol) neighbors. If
138           one or more PATTERNs are specified only neighbors on those
139           interfaces are shown. Otherwise shows discovered neighbors on all
140           interfaces. Note that for this feature to work, LLDP= must be
141           turned on for the specific interface, see systemd.network(5) for
142           details.
143
144           Produces output similar to:
145
146               LINK             CHASSIS ID        SYSTEM NAME      CAPS        PORT ID           PORT DESCRIPTION
147               enp0s25          00:e0:4c:00:00:00 GS1900           ..b........ 2                 Port #2
148
149               Capability Flags:
150               o - Other; p - Repeater;  b - Bridge; w - WLAN Access Point; r - Router;
151               t - Telephone; d - DOCSIS cable device; a - Station; c - Customer VLAN;
152               s - Service VLAN, m - Two-port MAC Relay (TPMR)
153
154               1 neighbors listed.
155
156       label
157           Show numerical address labels that can be used for address
158           selection. This is the same information that ip-addrlabel(8) shows.
159           See RFC 3484[1] for a discussion of address labels.
160
161           Produces output similar to:
162
163               Prefix/Prefixlen                          Label
164                       ::/0                                  1
165                   fc00::/7                                  5
166                   fec0::/10                                11
167                   2002::/16                                 2
168                   3ffe::/16                                12
169                2001:10::/28                                 7
170                   2001::/32                                 6
171               ::ffff:0.0.0.0/96                             4
172                       ::/96                                 3
173                      ::1/128                                0
174
175       delete DEVICE...
176           Deletes virtual netdevs. Takes interface name or index number.
177
178       up DEVICE...
179           Bring devices up. Takes interface name or index number.
180
181       down DEVICE...
182           Bring devices down. Takes interface name or index number.
183
184       renew DEVICE...
185           Renew dynamic configurations e.g. addresses received from DHCP
186           server. Takes interface name or index number.
187
188       forcerenew DEVICE...
189           Send a FORCERENEW message to all connected clients, triggering DHCP
190           reconfiguration. Takes interface name or index number.
191
192       reconfigure DEVICE...
193           Reconfigure network interfaces. Takes interface name or index
194           number. Note that this does not reload .netdev or .network
195           corresponding to the specified interface. So, if you edit config
196           files, it is necessary to call networkctl reload first to apply new
197           settings.
198
199       reload
200           Reload .netdev and .network files. If a new .netdev file is found,
201           then the corresponding netdev is created. Note that even if an
202           existing .netdev is modified or removed, systemd-networkd does not
203           update or remove the netdev. If a new, modified or removed .network
204           file is found, then all interfaces which match the file are
205           reconfigured.
206

OPTIONS

208       The following options are understood:
209
210       -a --all
211           Show all links with status.
212
213       -s --stats
214           Show link statistics with status.
215
216       -l, --full
217           Do not ellipsize the output.
218
219       -n, --lines=
220           When used with status, controls the number of journal lines to
221           show, counting from the most recent ones. Takes a positive integer
222           argument. Defaults to 10.
223
224       --json=MODE
225           Shows output formatted as JSON. Expects one of "short" (for the
226           shortest possible output without any redundant whitespace or line
227           breaks), "pretty" (for a pretty version of the same, with
228           indentation and line breaks) or "off" (to turn off JSON output, the
229           default).
230
231       -h, --help
232           Print a short help text and exit.
233
234       --version
235           Print a short version string and exit.
236
237       --no-legend
238           Do not print the legend, i.e. column headers and the footer with
239           hints.
240
241       --no-pager
242           Do not pipe output into a pager.
243

EXIT STATUS

245       On success, 0 is returned, a non-zero failure code otherwise.
246

SEE ALSO

248       systemd-networkd.service(8), systemd.network(5), systemd.netdev(5),
249       ip(8)
250

NOTES

252        1. RFC 3484
253           https://tools.ietf.org/html/rfc3484
254
255
256
257systemd 250                                                      NETWORKCTL(1)
Impressum