1NETWORKCTL(1) networkctl NETWORKCTL(1)
2
3
4
6 networkctl - Query the status of network links
7
9 networkctl [OPTIONS...] COMMAND [LINK...]
10
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
18 The following commands are understood:
19
20 list [PATTERN...]
21 Show a list of existing links and their status. If one ore 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 failed
76 networkd failed to manage the link
77
78 configuring
79 in the process of retrieving configuration or configuring the
80 link
81
82 configured
83 link configured successfully
84
85 unmanaged
86 networkd is not handling the link
87
88 linger
89 the link is gone, but has not yet been dropped by networkd
90
91
92 status [PATTERN...]
93 Show information about the specified links: type, state, kernel
94 module driver, hardware and IP address, configured DNS servers,
95 etc. If one ore more PATTERNs are specified, only links matching
96 one of them are shown.
97
98 When no links are specified, an overall network status is shown.
99 Also see the option --all.
100
101 Produces output similar to:
102
103 ● State: routable
104 Online state: online
105 Address: 10.193.76.5 on eth0
106 192.168.122.1 on virbr0
107 169.254.190.105 on eth0
108 fe80::5054:aa:bbbb:cccc on eth0
109 Gateway: 10.193.11.1 (CISCO SYSTEMS, INC.) on eth0
110 DNS: 8.8.8.8
111 8.8.4.4
112
113 In the overall network status, the online state depends on the
114 individual online state of all required links. Managed links are
115 required for online by default. In this case, the online state is
116 one of the following:
117
118 unknown
119 all links have unknown online status (i.e. there are no
120 required links)
121
122 offline
123 all required links are offline
124
125 partial
126 some, but not all, required links are online
127
128 online
129 all required links are online
130
131
132 lldp [PATTERN...]
133 Show discovered LLDP (Link Layer Discovery Protocol) neighbors. If
134 one or more PATTERNs are specified only neighbors on those
135 interfaces are shown. Otherwise shows discovered neighbors on all
136 interfaces. Note that for this feature to work, LLDP= must be
137 turned on for the specific interface, see systemd.network(5) for
138 details.
139
140 Produces output similar to:
141
142 LINK CHASSIS ID SYSTEM NAME CAPS PORT ID PORT DESCRIPTION
143 enp0s25 00:e0:4c:00:00:00 GS1900 ..b........ 2 Port #2
144
145 Capability Flags:
146 o - Other; p - Repeater; b - Bridge; w - WLAN Access Point; r - Router;
147 t - Telephone; d - DOCSIS cable device; a - Station; c - Customer VLAN;
148 s - Service VLAN, m - Two-port MAC Relay (TPMR)
149
150 1 neighbors listed.
151
152 label
153 Show numerical address labels that can be used for address
154 selection. This is the same information that ip-addrlabel(8) shows.
155 See RFC 3484[1] for a discussion of address labels.
156
157 Produces output similar to:
158
159 Prefix/Prefixlen Label
160 ::/0 1
161 fc00::/7 5
162 fec0::/10 11
163 2002::/16 2
164 3ffe::/16 12
165 2001:10::/28 7
166 2001::/32 6
167 ::ffff:0.0.0.0/96 4
168 ::/96 3
169 ::1/128 0
170
171 delete DEVICE...
172 Deletes virtual netdevs. Takes interface name or index number.
173
174 up DEVICE...
175 Bring devices up. Takes interface name or index number.
176
177 down DEVICE...
178 Bring devices down. Takes interface name or index number.
179
180 renew DEVICE...
181 Renew dynamic configurations e.g. addresses received from DHCP
182 server. Takes interface name or index number.
183
184 forcerenew DEVICE...
185 Send a FORCERENEW message to all connected clients, triggering DHCP
186 reconfiguration. Takes interface name or index number.
187
188 reconfigure DEVICE...
189 Reconfigure network interfaces. Takes interface name or index
190 number. Note that this does not reload .netdev or .network
191 corresponding to the specified interface. So, if you edit config
192 files, it is necessary to call networkctl reload first to apply new
193 settings.
194
195 reload
196 Reload .netdev and .network files. If a new .netdev file is found,
197 then the corresponding netdev is created. Note that even if an
198 existing .netdev is modified or removed, systemd-networkd does not
199 update or remove the netdev. If a new, modified or removed .network
200 file is found, then all interfaces which match the file are
201 reconfigured.
202
204 The following options are understood:
205
206 -a --all
207 Show all links with status.
208
209 -s --stats
210 Show link statistics with status.
211
212 -l, --full
213 Do not ellipsize the output.
214
215 -n, --lines=
216 When used with status, controls the number of journal lines to
217 show, counting from the most recent ones. Takes a positive integer
218 argument. Defaults to 10.
219
220 --json=MODE
221 Shows output formatted as JSON. Expects one of "short" (for the
222 shortest possible output without any redundant whitespace or line
223 breaks), "pretty" (for a pretty version of the same, with
224 indentation and line breaks) or "off" (to turn off JSON output, the
225 default).
226
227 -h, --help
228 Print a short help text and exit.
229
230 --version
231 Print a short version string and exit.
232
233 --no-legend
234 Do not print the legend, i.e. column headers and the footer with
235 hints.
236
237 --no-pager
238 Do not pipe output into a pager.
239
241 On success, 0 is returned, a non-zero failure code otherwise.
242
244 systemd-networkd.service(8), systemd.network(5), systemd.netdev(5),
245 ip(8)
246
248 1. RFC 3484
249 https://tools.ietf.org/html/rfc3484
250
251
252
253systemd 249 NETWORKCTL(1)