Score:0

My Ping result are returning an IPv6 instead of IPv4

do flag

I am new in Linux. So, I am running dual boot Linux and Windows 11. All my OS is on the latest version. I try to ping google.com in Linux, but I get returned IPv6 instead of IPv4. Here is the ping result:

$ ping google.com
PING google.com(si-in-f100.1e100.net (2404:6800:4003:c04::64)) 56 data bytes
64 bytes from si-in-f100.1e100.net (2404:6800:4003:c04::64): icmp_seq=1 ttl=58 time=15.4 ms
64 bytes from si-in-f100.1e100.net (2404:6800:4003:c04::64): icmp_seq=2 ttl=107 time=15.2 ms
64 bytes from si-in-f100.1e100.net (2404:6800:4003:c04::64): icmp_seq=3 ttl=107 time=15.3 ms
64 bytes from si-in-f100.1e100.net (2404:6800:4003:c04::64): icmp_seq=4 ttl=58 time=15.1 ms
^C
--- google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 15.147/15.242/15.356/0.075 ms

As you can see, I get IPv6 address. I expected I'll get IPv4. Maybe anyone could help me to ping IPv4. Thank you before :D

EDIT: It's already answered guys! Thank you so much by the way. Have a great day! :D

guiverc avatar
cn flag
Please start with your OS & release details. Linux is actually a kernel; found in android phones, motor cards & more; so please be specific by what OS & release you are using.
Michal Przybylowicz avatar
eg flag
Use command line switch `-4` to force using ipv4.
Score:1
om flag

To ping using IPv4, simply use the -4 option, e.g.

ping -4 google.com

The -4 option is used for many command line tools to force use of IPv4. To force use of IPv6, -6 can be used.

As you can see, I get IPv6 address. I expected I'll get IPv4.

I've yet to come across any pure IPv6 deployments in the wild. Almost all IPv6 deployments are dual stack with IPv4 and IPv6 connectivity.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.