s

Linux Server Ping Temporary failure in name resolution edit button Edit

author
Murugan Andezuthu Dharmaratnam | calendar 02 September 2023 | 715

Problem Statement

Temporary failure in name resolution
ping google.com
ping: google.com: Temporary failure in name resolution
ip addr show

1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0:  mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:16:3e:80:62:0b brd ff:ff:ff:ff:ff:ff
    inet 150.242.13.66/24 brd 150.242.13.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:fe80:620b/64 scope link
       valid_lft forever preferred_lft forever

Solution

This solution involves verifying DNS configurations, updating the `/etc/resolv.conf` file with reliable DNS servers, and restarting the network services to resolve issues with domain name resolution.


1. Check Internet connection


ping 8.8.8.8
2. Check & Modify DNS Server Configuration
cat /etc/resolv.conf
sudo nano /etc/resolv.conf
add nameservers to resolve.conf
nameserver 8.8.8.8
nameserver 8.8.4.4

13. Restart networking


sudo systemctl restart networking

14. Check if its working now


ping google.com