netplan (ubunut network)
Ubuntu 18.04 LTS has switched to Netplan for configuring network interfaces. Netplan is based on YAML based configuration system that makes configuration process very simple. Netplan has replaced the old configuration file /etc/network/interfaces that we previously used for configuring network interfaces in Ubuntu.
/via:https://vitux.com/how-to-configure-networking-with-netplan-on-ubuntu/
/via:https://askubuntu.com/questions/962016/netplan-config-for-two-network-interfaces
- generic.yaml
network: version: 2 renderer: NetworkManager/ networkd ethernets: DEVICE_NAME: dhcp4: yes/no addresses: [IP_ADDRESS/NETMASK] gateway: GATEWAY nameservers: addresses: [NAMESERVER_1, NAMESERVER_2] search: [search_domain,search_domain2]
- /etc/netplan/00-installer-config.yaml
network: version: 2 renderer: NetworkManager/ networkd ethernets: DEVICE_NAME: dhcp4: no addresses: 192.168.30.50/24 gateway: 192.168.30.249 nameservers: addresses: [192.168.30.10,192.168.30.249] DEVICE_NAME2: ...
sudo netplan try
sudo netplan [-d] apply # -d : debugging
sudo systemctl restart network-manager sudo systemctl restart system-networkd # ubuntu-server