User avatar
DougieLawson
Posts: 34416
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Raspberry pi doesn't connect to internet

Thu Aug 16, 2018 6:13 am

keiichi wrote:
Thu Aug 16, 2018 12:06 am
drgeoff wrote:
Wed Aug 15, 2018 11:26 pm
When you did the traceroute to www.google.com the DNS returned an IPv4 address.

When you try to ping www.google.com the DNS returns an IPv6 address. Why?
Beautiful question!
Because ping does both a type=A and type=AAAA query against the DNS when you give it a domain name rather than a dotted decimal IPv4 address or colon separated IPv6 address. It's using getaddrinfo() to get round the IPv4 vs IPv6 problem.
Note:Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

keiichi
Posts: 45
Joined: Mon Jul 27, 2015 8:33 pm

Re: Raspberry pi doesn't connect to internet

Thu Aug 16, 2018 7:59 am

DougieLawson wrote:
Thu Aug 16, 2018 6:13 am
Because ping does both a type=A and type=AAAA query against the DNS when you give it a domain name rather than a dotted decimal IPv4 address or colon separated IPv6 address. It's using getaddrinfo() to get round the IPv4 vs IPv6 problem.
Some time ago there isn't this problem. Also on my debian, when I ping an address, this use IPv4.
Is there a way to use IPv4 with ping?

User avatar
DougieLawson
Posts: 34416
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Raspberry pi doesn't connect to internet

Thu Aug 16, 2018 1:49 pm

Note:Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

keiichi
Posts: 45
Joined: Mon Jul 27, 2015 8:33 pm

Re: Raspberry pi doesn't connect to internet

Thu Aug 16, 2018 2:14 pm

Thanks a lot

Return to “Networking and servers”