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

OPTIONS

18       The following options are understood:
19
20       -a --all
21           Show all links with status.
22
23       -h, --help
24           Print a short help text and exit.
25
26       --version
27           Print a short version string and exit.
28
29       --no-legend
30           Do not print the legend, i.e. column headers and the footer with
31           hints.
32
33       --no-pager
34           Do not pipe output into a pager.
35

COMMANDS

37       The following commands are understood:
38
39       list [LINK...]
40           Show a list of existing links and their status. If no further
41           arguments are specified shows all links, otherwise just the
42           specified links. Produces output similar to:
43
44               IDX LINK         TYPE     OPERATIONAL SETUP
45                 1 lo           loopback carrier     unmanaged
46                 2 eth0         ether    routable    configured
47                 3 virbr0       ether    no-carrier  unmanaged
48                 4 virbr0-nic   ether    off         unmanaged
49
50               4 links listed.
51
52           The operational status is one of the following:
53
54           off
55               the device is powered down
56
57           no-carrier
58               the device is powered up, but it does not yet have a carrier
59
60           dormant
61               the device has a carrier, but is not yet ready for normal
62               traffic
63
64           carrier
65               the link has a carrier
66
67           degraded
68               the link has carrier and addresses valid on the local link
69               configured
70
71           routable
72               the link has carrier and routable address configured
73
74           The setup status is one of the following:
75
76           pending
77               udev is still processing the link, we don't yet know if we will
78               manage it
79
80           failed
81               networkd failed to manage the link
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           linger
94               the link is gone, but has not yet been dropped by networkd
95
96
97       status [LINK...]
98           Show information about the specified links: type, state, kernel
99           module driver, hardware and IP address, configured DNS servers,
100           etc.
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                    Address: 10.193.76.5 on eth0
109                             192.168.122.1 on virbr0
110                             169.254.190.105 on eth0
111                             fe80::5054:aa:bbbb:cccc on eth0
112                    Gateway: 10.193.11.1 (CISCO SYSTEMS, INC.) on eth0
113                        DNS: 8.8.8.8
114                             8.8.4.4
115
116       lldp [LINK...]
117           Show discovered LLDP (Link Layer Discovery Protocol) neighbors. If
118           one or more link names are specified only neighbors on those
119           interfaces are shown. Otherwise shows discovered neighbors on all
120           interfaces. Note that for this feature to work, LLDP= must be
121           turned on for the specific interface, see systemd.network(5) for
122           details.
123
124           Produces output similar to:
125
126               LINK             CHASSIS ID        SYSTEM NAME      CAPS        PORT ID           PORT DESCRIPTION
127               enp0s25          00:e0:4c:00:00:00 GS1900           ..b........ 2                 Port #2
128
129               Capability Flags:
130               o - Other; p - Repeater;  b - Bridge; w - WLAN Access Point; r - Router;
131               t - Telephone; d - DOCSIS cable device; a - Station; c - Customer VLAN;
132               s - Service VLAN, m - Two-port MAC Relay (TPMR)
133
134               1 neighbors listed.
135
136       label
137           Show numerical address labels that can be used for address
138           selection. This is the same information that ip-addrlabel(8) shows.
139           See RFC 3484[1] for a discussion of address labels.
140
141           Produces output similar to:
142
143               Prefix/Prefixlen                          Label
144                       ::/0                                  1
145                   fc00::/7                                  5
146                   fec0::/10                                11
147                   2002::/16                                 2
148                   3ffe::/16                                12
149                2001:10::/28                                 7
150                   2001::/32                                 6
151               ::ffff:0.0.0.0/96                             4
152                       ::/96                                 3
153                      ::1/128                                0
154

EXIT STATUS

156       On success, 0 is returned, a non-zero failure code otherwise.
157

SEE ALSO

159       systemd-networkd.service(8), systemd.network(5), systemd.netdev(5),
160       ip(8)
161

NOTES

163        1. RFC 3484
164           https://tools.ietf.org/html/rfc3484
165
166
167
168systemd 241                                                      NETWORKCTL(1)
Impressum