Domain Name System
The Domain Name System (DNS) allows devices to send queries to a DNS Server. These queries request translation of Fully Qualified Domain Names (FQDNs) into IP addresses.
DNS configuration
SONiC runs on a base Linux system, to add DNS servers, we can simply edit the /etc/resolv.conf file.
To add DNS servers, edit the /etc/resolv.conf file. Note that you need to be root
to be able to edit this file.
admin@sonic:~$ sudo -s
root@sonic:/home/admin# echo "nameserver 8.8.8.8" >> /etc/resolv.conf
root@sonic:/home/admin# echo "nameserver 208.67.222.222" >> /etc/resolv.conf
admin@sonic:~$ cat /etc/resolv.conf
domain example.org
search example.org
nameserver 8.8.8.8
nameserver 208.67.222.222