Netplan¶
Netplan is a utility for easily configuring networking on a Linux system. You simply create a YAML description of the required network interfaces and what each should be configured to do. From this description, Netplan will generate all the necessary configuration for your chosen renderer tool.
The YAML configuration files are located in /etc/netplan/
.
To apply any changes to the network configuration, run the following command:
$ sudo netplan apply
Static IP Address¶
Example configuration with static IP:
network:
version: 2
renderer: networkd
ethernets:
enp3s0:
addresses:
- 82.103.128.15/26
gateway4: 82.103.128.1
nameservers:
search: [ cust.asergo.com, asergo.com ]
addresses: [ 82.103.191.3, 82.103.143.251 ]
VLAN Interface¶
Example for configuration of VLAN interface:
network:
version: 2
renderer: networkd
ethernets:
enp3s0:
dhcp4: true
vlans:
vlan101:
id: 101
link: enp3s0
addresses: [ 10.255.0.1/31 ]
routes:
- to: 10.0.0.0/8
via: 10.255.0.0
Bonding¶
Bonding can be configured to achieve Link Aggregation, where multiple network interfaces work as one to provide load balancing and redundancy.
Bonding configuration example:
network:
version: 2
renderer: networkd
ethernets:
enp3s0: {}
enp3s1: {}
bonds:
bond0:
interfaces:
- enp3s0
- enp3s1
addresses: [ 82.103.128.15/26 ]
gateway4: 82.103.128.1
parameters:
mode: 802.3ad
nameservers:
search: [ cust.asergo.com, asergo.com ]
addresses: [ 82.103.191.3, 82.103.143.251 ]