options: -h, --help show this help message and exit --debug Enable debug messages
Available commands:
help Show this help message apply Apply current netplan config to running system generate Generate backend specific configuration files from /etc/netplan/*.yaml get Get a setting by specifying a nested key like "ethernets.eth0.addresses", or "all" info Show available features ip Retrieve IP information from the system set Add new setting by specifying a dotted key=value pair like ethernets.eth0.dhcp4=true rebind Rebind SR-IOV virtual functions of given physical functions to their driver status Query networking state of the running system try Try to apply a new netplan config to running system, with automatic rollback
Mode= Specifies one of the bonding policies. The default is "balance-rr" (round robin). Possible values are "balance-rr", "active-backup", "balance-xor", "broadcast", "802.3ad", "balance-tlb", and "balance-alb".
TransmitHashPolicy= Selects the transmit hash policy to use for slave selection in balance-xor, 802.3ad, and tlb modes. Possible values are "layer2", "layer3+4", "layer2+3", "encap2+3", and "encap3+4".
LACPTransmitRate= Specifies the rate with which link partner transmits Link Aggregation Control Protocol Data Unit packets in 802.3ad mode. Possible values are "slow", which requests partner to transmit LACPDUs every 30 seconds, and "fast", which requests partner to transmit LACPDUs every second. The default value is "slow".
vlan部分说明:
1 2 3 4 5
The "[VLAN]" section only applies for netdevs of kind "vlan", and accepts the following key:
Id= The VLAN ID to use. An integerin the range 0–4094. This option is compulsory.
6. networkctl命令
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# networkctl -h networkctl [OPTIONS...] COMMAND
Query and control the networking subsystem.
Commands: list [PATTERN...] List links status [PATTERN...] Show link status lldp [PATTERN...] Show LLDP neighbors label Show current address label entries in the kernel delete DEVICES... Delete virtual netdevs up DEVICES... Bring devices up down DEVICES... Bring devices down renew DEVICES... Renew dynamic configurations forcerenew DEVICES... Trigger DHCP reconfiguration of all connected clients reconfigure DEVICES... Reconfigure interfaces reload Reload .network and .netdev files edit FILES|DEVICES... Edit network configuration files cat FILES|DEVICES... Show network configuration files
6.1. networkctl status
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# networkctl status ● Interfaces: 8, 9, 7, 6, 5, 4, 3, 2, 1 State: routable Online state: online Address: 192.168.0.1 on bond0.1000 xxxx::4c0e:43ff:feba:xxxx on bond0 xxxx::4c0e:43ff:feba:xxxx on bond0.1000 Gateway: 9.9.9.9 on bond0.1000