[Resolved] I can't resolve names via DNS

Issues related to configuring your network
Post Reply
antolepore
Posts: 15
Joined: 2012/07/19 05:49:33

[Resolved] I can't resolve names via DNS

Post by antolepore » 2021/07/26 23:09:50

HI,
I have configured everything perfectly (maybe):

Code: Select all

[root@centos3 ~]# ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.30.103  netmask 255.255.255.0  broadcast 192.168.30.255
        inet6 fe80::a00:27ff:fea8:1e6  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:a8:01:e6  txqueuelen 1000  (Ethernet)
        RX packets 61  bytes 6491 (6.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 55  bytes 7145 (6.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.30.130  netmask 255.255.255.0  broadcast 192.168.30.255
        inet6 fe80::a00:27ff:fed3:2382  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:d3:23:82  txqueuelen 1000  (Ethernet)
        RX packets 9  bytes 906 (906.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 19  bytes 1364 (1.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Code: Select all

[root@centos3 ~]# cat /etc/resolv.conf
# Generated by NetworkManager
search localdomain
nameserver 8.8.8.8
nameserver 8.8.4.4
But when i try to ping something the dns are not reachable and therefore I do not draw anything

Code: Select all

[root@centos3 ~]# ping www.google.it
ping: www.google.it: Nome o servizio sconosciuto
how come? what am I doing wrong?
Last edited by antolepore on 2021/07/26 23:24:34, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: I can't resolve names via DNS

Post by TrevorH » 2021/07/26 23:18:27

Can you ping 8.8.8.8?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

antolepore
Posts: 15
Joined: 2012/07/19 05:49:33

Re: I can't resolve names via DNS

Post by antolepore » 2021/07/26 23:23:09

Now works!!!!

I followed this thread


https://superuser.com/questions/901672/ ... nreachable

and added

Code: Select all

/etc/sysconfig/network:

NETWORKING=yes
HOSTNAME=centos7
GATEWAY=10.0.0.1
Now ping works

Code: Select all

[root@centos3 ~]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=116 time=20.8 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=116 time=20.5 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 20.499/20.646/20.793/0.147 ms
[root@centos3 ~]# ping www.google.it
PING www.google.it (142.250.180.131) 56(84) bytes of data.
64 bytes from mil04s43-in-f3.1e100.net (142.250.180.131): icmp_seq=1 ttl=116 time=16.9 ms
64 bytes from mil04s43-in-f3.1e100.net (142.250.180.131): icmp_seq=2 ttl=116 time=16.8 ms
^C
--- www.google.it ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1003ms
rtt min/avg/max/mdev = 16.791/16.854/16.917/0.063 ms

Post Reply