Home Networking IPv4 vs IPv6

IPv4 vs IPv6 - What does IPv4 and IPv6 Mean?

What are the differences between IPv4 and IPv6? What are Public and Private IP addresses? What are static and dynamic IP addresses? What threats are associated with IP addresses? How do I find my IP address?

By a TechBitBytes Contributor, November 11, 2022
7 MIN READ |

... sneak peek
You have probably heard about IP addresses. In this article, we explore what they are, how they are used, how you can find your IP address, and how you can protect yourself against threats associated with your IP address.

ip-addresses

An Internet Protocol (IP) address is a unique address that identifies a device in a network or the internet. The IP address allows information to be transmitted to and from a device connected to a network, including the internet. The IP address in your device allows you to connect to your favorite website and access its content. So, you are wondering, how does an IP allow me to access a website, after all, I never use any IP address. Before we answer the question, let's explore some concepts about an IP address.

IPv4 vs IPv6 Addresses

There are two versions of IP addresses: IPv4 and IPv6. The most common is IPv4. IPv4 addresses use eight-bit binary numbers, starting from 0 to 255. The IPv4 addresses are usually written in 4 parts, each separated by a dot (.) from the other. Each of the parts contains one, two, or three numbers between 0-255.

An example of an IPv4 address is 59.210.78.12

The example above might be a little foreign, so here is a more familiar IP: 192.168.1.100

IPv4 addresses are 32-bit numbers that can have 232 - about 4.3 billion - unique combinations.

Initially, IPv4 addresses were sufficient. However, as the number of devices connected to the internet increased (read on Internet of Things (IoT)), the number of unique IPv4 addresses rapidly decreased, which led to the need for a new addressing system. Hence the emergence of IPv6 addresses, which are 128-bit numbers. This means that there are possible 2128 unique combinations. That is about 340 trillion trillion trillion unique IP addresses that we are nowhere close to exhausting.

An example of an IPv6 address is 3cf3:d4a1:fc60:9d06:17a9:6a68:49ca:3a53
IPv6 addresses are often written in lowercase letters.

Key differences between IPv4 addresses and IPv6 addresses

  1. While IPv4 addresses use a decimal notation, IPv6 addresses use a hexadecimal notation

  2. While IPv4 addresses are 4 groups separated by a decimal, IPv6 addresses have 8 groups separated by a semicolon.

You can clearly see the differences between IPv4 and IPv6 addresses. Although IPv6 is newer (as it was launched in June 2012), IPv4 is still the most common IP address configuration.

IP addresses are assigned by the Internet Assigned Numbers Authority. IP addresses are not wholly randomly generated, instead, there is a hierarchy followed and it is associated with regions (regional registries). IP addresses are assigned down the hierarchy in blocks until they reach your ISP. Your ISP then assigns IP addresses to individual devices such as your phone.

Public and Private IP Addresses

Private IP Addresses

Private IP addresses are assigned to devices with your personal network, including your phone, TVs, gaming console, home computer, and even your fridge if it has internet capabilities as explained in Internet of Things (IoT). Your router needs a way to communicate with the devices connected to it. This is where private IP addresses come. You can manually assign IP addresses to multiple devices or have your router DHCP automatically assign IP addresses to each device connected to it.
Private IP addresses use reserved intranets IP addresses which are:

  1. 10.0.0.0 - 10.255.255.255

  2. 172.16.0.0 - 172.31.255.255

  3. 192.168.0.0 - 192.168.255.255 (This is the most common for home networks)

  4. 127.0.0.1 - This IP Address is reserved for a local server within private networks. This will be familiar to web developers.

Your device cannot directly communicate with another device outside your private network. It has to communicate through a public IP address. When you have multiple devices connected to your private network, there is only one outgoing public IP address assigned to your router. Your router maps the private addresses to the public one using a concept/tool known as network address translation (NAT). NAT helps consolidate the various private IP addresses (can be 1, 2, or 100) into a single public IP address.

public-and-private-networks-and-ip-addresses

Public IP Addresses

This is the main IP address assigned to your private network and is often assigned by your ISP. While each device in your network has its own unique private IP address, only one main public IP address is associated with your network. This public IP address is assigned to your primary router, which all other devices in your home network connect to. In the image above, the public address assigned by the ISP is 81.59.2.102.

Static and Dynamic Public IP Addresses

Dynamic IP addresses change automatically and regularly. Unless you are keen on the individual IP numbers assigned to your device, you will not notice a change in your device's IP address. On the other hand, static IP addresses do not change despite your device changing location.

If you connect your phone to your company's private network, a unique private IP address is assigned to it. Once you reach home and connect to your private network, your phone will have be assigned an IP address. If you go to a restaurant and connect to their private network, another unique IP address is assigned to your phone. The main routers in your office, home, and the public all have unique public IP addresses.

However, coincidently, you might notice that the IP address of your phone while in the company network is similar to that when you connect to your home network. Further, your friend in their own private network might have a similar IP to yours. Are the IPs similar? Yes, they are! However, remember every network under a router has a pool of IP addresses to select from. (see above private IP addresses). The router in your office can assign you the IP Address 192.168.1.105 and the same IP Address is assigned to your device by your home router. However, routers connected to the public network have unique IP addresses. Therefore, if the main router in your office connected to your ISP is 81.68.128.10, no other device in the whole world has that public unique address. Similarly, within your private home network, no device under a single router has the same IP address. If your phone is assigned an IP 192.168.1.110, no other device has the same IP within your private network.

If two devices have the same IP, one device will show an IP address conflict notification similar to the one shown below.

ip-address-conflict-in-windows-OS

When such error occurs, simply try to reset the network of the one of the devices. Click the link below to explore other ways you can solve the conflict of IP error.

ISPs assign dynamic IP addresses to all devices connected directly to the public network. To get a static IP address, you are required to contact your ISP and inquire if they offer static IP addresses. For most ISPs, dynamic IP addresses are free; however, static IP addresses may have a price tag attached to them.

Individual users and small businesses are not required to have a static IP address unless they have personal servers that need to be available on the internet. The consistency offered by static IP addresses ensures that a user can connect to the servers seamlessly through a single address and not have to re-enter another IP address every time he or she wants to connect to the server.

What is my IP Address?

You are reading this article on a browser, hence this device is connected to the internet. It might be through a router or on a phone connected directly to your ISP. There are multiple websites where you can find your public IPv4 and IPv6 address such as https://whatismyipaddress.com/.

Further, if you are connected to a router, you can find your private IP address through the steps below:

Method 1: In the Control Panel

1. Click on the network Icon on the taskbar
2. Click on Open Network and Sharing Center
3. In the View your active networks tab, click on your network name next to Connections
4. In the dialog box, click the Details button
5. Your IPv4 and IPv6 addresses will be indicated in the Network Connection Details

Method 2: In the Command Prompt (CMD) in Windows

1. Press Windows Key + R
2. In the Run dialog box, enter cmd and press enter (or click OK).
3. In the CMD window, enter ipconfig /all
4. Trace the connection labelled: Ethernet adapter your network name. Your current IP address will be indicated there.

How IP Addresses are Used:

And now we answer the question; How are IP addresses used to access websites? The answer is through a DNS.

The Domain Name System (DNS) server contains a list of public IP addresses and their corresponding domain names (or hostnames) When you search example.com on your browser, the Domain Name System (DNS) server matches the hostname to a specific public IP address. The DNS helps us memorize domain names, such as techbitbytes.com, and not entire IP addresses such as 29.85.197.217. If memorizing this IPv4 address is hard, imagine memorizing the address of a server that is using an IPv6 address.

Imagine sending a card to your best friend. You indicate your friend's postal address. Since you are expecting a reply, you write down your return address on the back of the card. Your friend will use the return address to write you a reply.
This is the same case when browsing the web.

When you search for techbitbytes.com, your computer sends this request to your router along with your private IP address. Your router then stores the private IP address and sends the request along with your public IP up the hierarchy until it reaches the DNS server (postal company). The server matches the request of the domain name to the corresponding public IP address. Armed with the IP address, it is easier to trace the server that hosts the information that you searched for. Once information is fetched, it comes down the hierarchy matching your router's public IP address. Your router then matches and retrieves your device's private IP address, and viola! You can see this article. That's a whole process but if your internet speed is fast, it appears to happen instantaneously.

Is my IP Address Visible to anyone else other than me?

Using the analogy above, your mailman, postal company, your friend's mailman, your friend, and probably your friend's curious neighbor will see your postal address indicated on the return address box.

If you are connected to the internet, then your IP address is visible. This provision is not by mistake. IP addresses help communicate to other devices on the internet, just as is the case with you sending a card. If you do not indicate your return address, then expect no reply from your friend. Therefore traces of your public IP will be in your ISP servers, DNS, Techbitbytes servers, and others. This, however, should not worry you. Servers are equipped with data protection tools that protect your IP address from leaking to malicious actors (hackers). However, there are threats associated with public IP addresses.

Threats Associated with Public IP Addresses

Malicious actors (commonly referred to as hackers) can get your public IP address using various ways with the most common being social engineering, WiFi sniffing, and online stalking.
Through WiFi sniffing, a hacker, using specialized tools, can illegally access publicly available WiFi. In some cases, no specialized hardware and software tools are required since users have not set passwords to the WiFi devices, including routers and cameras, or have not changed their passwords from the manufacturer's default passwords. (Read on securing your online data in minutes)

Cybersecurity, Password Generator
Free Online Password Generator
Generate your passwords Online using our free tool. We help you generate strong passwords to use.

Once users with malicious intent have your public IP address, they can connect to your networked devices, using their private networks, and commit all manner of crimes, without your knowledge.

These crimes include;

  1. Use geolocation to track you down to your exact physical location

  2. Download illegal content including pirated works of art such music and movies

  3. Add your devices to a botnet and use your devices' resources to attack other computers, engage in illegal crypto mining, send spam emails, engage in click fraud campaigns, and launch DDOS attacks

How Can I Protect/Hide My IP Address?

The most common way of hiding your public IP is by using a Virtual Private Network (VPN).

Using our card analogy, instead of sending your card to your postal company, you send it to another company, let's call it TBB_VPN. TBB_VPN encrypts your data and changes your return address to its own. It then sends the letter normally through the postal company. When your friend replies, he or she uses TBB_VPN's postal address. Once it reaches there, TBB_VPN matches your postal address and gives you the reply. By sending your card through TBB_VPN no one will see your public postal.

Once you use a VPN to access the internet, you access it anonymously. That means all your information is tracked to the VPN servers, including your public IP address. Usually, only you, and your VPN, know what you access. Your ISP will see that you are behind an ISP but will not know what websites you visit or what you download.

Therefore, a VPN can help protect your information from illegal access by malicious actors. If you are in Ontario, Canada using a VPN in Washington DC in the US, a hacker using geolocation tools can only trace you up to the server room in DC, even if they are your neighbor, ISP, or the government

It is recommended that you use a VPN when you are using public WiFi, accessing sensitive resources remotely, when traveling across borders, or when you need some privacy when surfing the web.



  This article is written to the best of the author's knowledge. TechBitBytes(TBB) ensures that all articles are constantly updated with the latest information.