Permanent address: Linux | configure network address through netplan 🙃)
Problem description
In Ubuntu 18.04, the default network configuration tool is netplan, and SYSTEMd networkd is used as the back-end configuration tool.
This note will record how to use netplan to configure network address in Ubuntu 18.04 and how to deal with common problems.
Solution
For more usage methods, refer to the documentation of netplan | backend aggressive network configuration in yaml.
Static address binding
# Add Configuration cat > /etc/netplan/01-static.yaml <<EOF network: version: 2 renderer: networkd ethernets: enp3s0: addresses: - 10.10.10.2/24 gateway4: 10.10.10.1 nameservers: search: [mydomain, otherdomain] addresses: [10.10.10.1, 1.1.1.1] EOF # Application Configuration netplan apply
Dynamic allocation (DHCP)
# Add Configuration cat > /etc/netplan/01-static.yaml <<EOF network: version: 2 renderer: networkd ethernets: enp3s0: dhcp4: true EOF # Application Configuration netplan apply
“21442;” 32771;”29486;
Network plan `124Backend-agnostic network configuration in YAML
Read More:
- Linux Connect Error: network.service failed [How to Solve]
- Solution of device eth0 does not see to be present, delaying initialization. Error in network card under Linux
- [Solved] Linux WebService Startup Error: BindException: Cannot assign requested address
- Kylin arm64 linux configure: error: cannot guess build type; you must specify one
- Configure the node environment under Linux, internal/modules/cjs/loader.js:583 throw err; solution
- Linux Error: bind error: Address already in use [How to Solve]
- Centos8 Could not restart the Network: Failed to restart network.service: Unit network.service not found
- [Solved] Win10 and Linux address reading format is different (CV2. Error: opencv (4.2.0)/Io/opencv…)
- [Solved] Linux error E: dpkg is broken, you must manually run ‘sudo dpkg –configure -a’ to resolve this issue
- [Solved] Linux program error: dpkg is interrupted. You must manually run ‘sudo dpkg — configure – a’
- Virtual machine failed to start network service error: ob for network.service failed because the control process exited with error code
- [Solved] KVM Failed to Startup Error: error: Network not found: no network with matching name ‘default‘
- [Solved] Centos7 Error: gcc: configure: error: in build‘: configure: error: no acceptable C compiler found in $PATH
- [FAILED] Failed to start Raise network interfaces
- How to set fixed IP address for Raspberry Pie
- [Solved] Execute ./configure Error: [error]configure: error: You need a C++ compiler for C++ support.
- [Solved] Linux — 9 — txt files are copied from windows to Linux and read error
- Nginx Error: [emerg] bind() to [::]:80 failed (98: Address already in use)
- [Solved] configure: error: no acceptable C compiler found in $PATH
- Job for network.service failed [How to Solve]