As of the writing of this book, Internet Protocol Version 4 (IPv4)is used to route most of the network traffic on the Internet. It uses 32-bit (4 byte) addresses, which allows for a space of 232 addresses. Under IPv4, there are not enough addresses remaining to accommodate all of the Internet devices now in use, which is why IPv6 was created. In this section we will first run some commands and then discuss IPv4 and IPv6.
Let's try some commands using both protocols:
Let's start with IPv4. Run the following command:
ping 192.168.1.115
Then, run the following command:
ssh 192.168.1.115
Now let's try IPv6. First let's see if your computer has an IPv6 address. Run
ifconfig
on your interface; on my laptop it'sifconfig wlan0
.You should see something like the following output:
inet 192.168.1.115 netmask 255.255.255.0 broadcast 192.168.1.255
You should also see something like the following output:
inet6 2002:244:b303:0:221:5eff:feff:f15d
. Try pinging it. On mine...