User Tools

Site Tools


linux:dns

This is an old revision of the document!


DNS on Linux

Static DNS

sudo vi /etc/netplan/00-installer-config.yaml
network:
  ethernets:
    ens160:
      addresses:
      - 192.168.1.2/24
      - 2001:db8:1111:2222:3333::2/64
      gateway4: 192.168.1.1
      gateway6: 2001:db8:1111:2222:3333::1::1
      nameservers:
        addresses:
        - 192.168.1.1
        - 192.168.1.2
        - 2001:db8:1111:2222:3333::d1
        - 2001:db8:1111:2222:3333::d2
        search:
        - mydomain.local
  version: 2
sudo netplan apply

DNS Status

resolvectl status

DNS Cache

sudo systemd-resolve --flush-caches
linux/dns.1601303880.txt.gz · Last modified: (external edit)