User Tools

Site Tools


linux:networking

This is an old revision of the document!


Ubuntu 20.04 Static IP

set the following in /etc/netplan/50-static-ip

network:
    version: 2
    ethernets:
        ens160:
            dhcp4: false
            addresses:
            - 192.168.1.2/24
            - 2001:db8:aaaa:bbbb:cccc::10/64
            gateway4: 192.168.1.1
            gateway6: 2001:db8:aaaa:bbbb:cccc::1/64
            nameservers:
              addresses:
              - 2001:db8:aaaa:bbbb:cccc::1/64
              - 192.168.1.1
              search: [internal.domain]

Then run

sudo netplan apply
linux/networking.1601026362.txt.gz · Last modified: (external edit)