Skip to main content

Network IP configuration

Network configuration in Ubuntu 20.04

By default, the eth1 interface obtains a dynamic IP address via DHCP.

If you need to assign a static IP address, edit the configuration file /etc/netplan/01-netcfg.yaml, modifying it as follows:

network:
version: 2
renderer: networkd
ethernets:
eth1:
dhcp4: no
addresses: [192.168.150.1/24]
optional: yes

In this configuration, the eth1 interface will be assigned a static IP address of 192.168.150.1.

After making the changes, it is necessary to reboot the device.