table of contents
- bookworm 252.22-1~deb12u1
- bookworm-backports 254.5-1~bpo12+3
- testing 255.4-1
- unstable 255.5-1
- experimental 256~rc1-1~exp2
NETWORKCTL(1) | networkctl | NETWORKCTL(1) |
NAME¶
networkctl - Query or modify the status of network links
SYNOPSIS¶
networkctl [OPTIONS...] COMMAND [LINK...]
DESCRIPTION¶
networkctl may be used to query or modify the state of the network links as seen by systemd-networkd. Please refer to systemd-networkd.service(8) for an introduction to the basic concepts, functionality, and configuration syntax.
COMMANDS¶
The following commands are understood:
list [PATTERN...]
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 eth0 ether routable configured
3 virbr0 ether no-carrier unmanaged
4 virbr0-nic ether off unmanaged 4 links listed.
The operational status is one of the following:
missing
Added in version 245.
off
Added in version 240.
no-carrier
Added in version 240.
dormant
Added in version 240.
degraded-carrier
Added in version 242.
carrier
Added in version 240.
degraded
Added in version 240.
enslaved
Added in version 242.
routable
Added in version 240.
The setup status is one of the following:
pending
Added in version 240.
initialized
Added in version 251.
configuring
Added in version 240.
configured
Added in version 240.
unmanaged
Added in version 240.
failed
Added in version 240.
linger
Added in version 240.
Added in version 219.
status [PATTERN...]
When no links are specified, an overall network status is shown. Also see the option --all.
Produces output similar to:
● State: routable
Online state: online
Address: 10.193.76.5 on eth0
192.168.122.1 on virbr0
169.254.190.105 on eth0
fe80::5054:aa:bbbb:cccc on eth0
Gateway: 10.193.11.1 (CISCO SYSTEMS, INC.) on eth0
DNS: 8.8.8.8
8.8.4.4
In the overall network status, the online state depends on the individual online state of all required links. Managed links are required for online by default. In this case, the online state is one of the following:
unknown
Added in version 249.
offline
Added in version 249.
partial
Added in version 249.
online
Added in version 249.
Added in version 219.
lldp [PATTERN...]
Produces output similar to:
LINK CHASSIS ID SYSTEM NAME CAPS PORT ID PORT DESCRIPTION enp0s25 00:e0:4c:00:00:00 GS1900 ..b........ 2 Port #2 Capability Flags: o - Other; p - Repeater; b - Bridge; w - WLAN Access Point; r - Router; t - Telephone; d - DOCSIS cable device; a - Station; c - Customer VLAN; s - Service VLAN, m - Two-port MAC Relay (TPMR) 1 neighbors listed.
Added in version 219.
label
Produces output similar to:
Prefix/Prefixlen Label
::/0 1
fc00::/7 5
fec0::/10 11
2002::/16 2
3ffe::/16 12
2001:10::/28 7
2001::/32 6 ::ffff:0.0.0.0/96 4
::/96 3
::1/128 0
Added in version 234.
delete DEVICE...
Added in version 243.
up DEVICE...
Added in version 246.
down DEVICE...
Added in version 246.
renew DEVICE...
Added in version 244.
forcerenew DEVICE...
Added in version 246.
reconfigure DEVICE...
Added in version 244.
reload
Added in version 244.
edit FILE|@DEVICE...
If --drop-in= is specified, edit the drop-in file instead of the main configuration file. Unless --no-reload is specified, systemd-networkd will be reloaded after the edit of the .network or .netdev files finishes. The same applies for .link files and systemd-udevd(8). Note that the changed link settings are not automatically applied after reloading. To achieve that, trigger uevents for the corresponding interface. Refer to systemd.link(5) for more information.
Added in version 254.
cat FILE|@DEVICE...
Added in version 254.
OPTIONS¶
The following options are understood:
-a --all
Added in version 219.
-s --stats
Added in version 243.
-l, --full
Added in version 245.
-n, --lines=
Added in version 245.
--drop-in=NAME
Added in version 254.
--no-reload
Added in version 254.
--json=MODE
-h, --help
--version
--no-legend
--no-pager
EXIT STATUS¶
On success, 0 is returned, a non-zero failure code otherwise.
SEE ALSO¶
systemd-networkd.service(8), systemd.network(5), systemd.netdev(5), ip(8)
NOTES¶
- 1.
- RFC 3484
systemd 255 |