Resources:
https://whatismyipaddress.com/ip-lookup
What is an IP Address?
“An IP address is a unique address that identifies a device on the internet or a local network. IP stands for “Internet Protocol,” which is the set of rules governing the format of data sent via the internet or local network.”
commands:
Linux and Mac: ifconfig
Windows: ipconfig
IPv4 and IPv6
inet is IPv4 — decimal notation — 192.168.1.10
inet6 is IPv6 — hexadecimal notation — f280::20c:29ff:fe0a:4205
The earliest Internet Protocol was IPv4 which was 32 bits.
IPv6 was introduced in 1998 and was deployed in the mid-2000s. The new protocol uses 128-bit IP addresses indicating that IPv6 is able to provide many more addresses as compared to IPv4. That’s more than enough IP addresses available to meet the growing demand for websites, computers, smartphones, and other digital devices.
exploring IPv4
let's take an example: 192.168.1.10
There are 4 octets. i.e. 192, 168, 1, 10.
each octet is made up of 8 bits -1 1 1 1 1 1 1 1 , these 8 bits can be 0 or 1 depending on which the value of the octet is calculated.
for 192 octet the bits should have looked like: 1 1 0 0 0 0 0 0
for 168 : 1 1 0 0 1 0 0 0
for 1 : 0 0 0 0 0 0 0 1
for 10 : 0 0 0 0 1 0 1 0
The maximum value that an octet can have is 255 i.e. when all the bits are one=> 1 1 1 1 1 1 1 1
Total number of IP addresses possible in IPv4 = 2³² = around 4 billion
The total world population at this time is 7.9 billion and this indicate that then IPv4 addresses are completely consumed at this point. Therefore there was a need for IPv6 which is 128 bits.
The total number of addresses possible in IPv6 are: 340 trillion trillion trillion IP addresses
We are still able to use IPv4 because of NAT — Network address translation
with NAT we are assigned Private IP addresses.
“One of the reasons IPv4 has lasted so long is the use of NAT. Whilst there are many ways to map IP addresses and ports, NAT is typically deployed on end user routers. The router gets one real IP address and allows private IP addresses on a LAN to share that one address. This works, but there are problems. As IPv4 addresses become rarer we will see multiple levels of NAT and internet providers running NAT within their networks as well.”
Types of IP Address
Private and Public IP addresses
Private IP addresses
Dynamic and Static IP Addresses
“Most internet users have a dynamic IP address that automatically changes from time to time. This is better for internet service providers that need to deal with customers joining and leaving the service, and changing address.
Most websites have a static IP address that doesn’t change. This is important because the DNS system uses your website’s IP address when someone navigates to your site or sends you an email.”