Hello everyone, I’m back with a new blog. Today we’ll talk about IP addresses, their structure, and many related concepts.
Without wasting any time, let’s start
What is an IP address?
To identify a device on the internet, we assign a unique logical code in a standard format. This helps identify and communicate with different devices on the internet. Usually, it is assigned by your ISP (Internet Service Provider) or by your router (within your home network).
We can mainly divide IP addresses on four bases:
- Based on scope
a). Public IP address
b). Private IP address - Based on version
a). IPv4
b). IPv6 - Based on assignment
a). Static IP address
b). Dynamic IP address - Based on function
a). Unicast address
b). Broadcast address
c). Multicast address
d). Anycast address
Before moving forward with IP addresses, if you have basic knowledge of networking or have read my previous blogs, you may also know that another unique address exists called a MAC address, which is also used to identify a device on a network. So, let’s clarify the difference first and see why we need an address in addition to the MAC address.
IP vs MAC address
Let’s understand the difference through the table below.
Now, we can clearly understand why we need an IP address along with a MAC address.
Suppose you want to send a letter to your friend. You know who your friend is, and you describe them by their name, height, weight, skin color, etc. But is this information enough to send them the letter? With this, we can only identify who should receive the letter. This information could be enough if a lunch box arrives in your classroom — then you can identify who should receive it.
However, to send the letter, you require a proper home address. That’s where we need an IP address.
It tells devices and routers how and where to send the data.
The Path of Data/IP Packets
Before explaining other concepts about IP addresses, I want to tell you how a packet actually travels and what path it takes to reach the destination.
(It is advised to have a basic knowledge of TCP/IP or the OSI model for better understanding.you can check out my previous blogs for this)
Suppose you want to send something from Delhi, India, to New York, USA.
Let’s start from your laptop:
- First, you press the button to send the data.
- Now it reaches the application layer to get prepared to send.
- The transport layer divides it into smaller chunks.
- The network layer adds the destination IP address to these segments.
- The data link layer adds the MAC address so that it can reach the router.
- The physical layer converts them into bits (the form of data in which it transmits).
- The router checks the destination IP and sends it to the ISP.
(It may not reach the ISP directly; if it is far away, it may go through many other routers.) - Now the ISP sends it to the regional backbone (a network which connects local ISPs).
- The regional backbone will send it to the national backbone (which connects the regional networks).
- Now the interesting part: it reaches the international gateway — where the undersea cable starts.
(I know it may sound weird, but yeah, our data goes underwater.)
(It may not directly reach the destination country if it is far away.) - The same process repeats backwards: from international to national, then the regional backbone, then the local ISP, and at last the desired IP address.
Note → Before reaching the final destination, it will go through the server of the application you are using — just like when you mail something, it reaches the post office first and then your home.
Get Shubh Varshney’s stories in your inbox
Join Medium for free to get updates from this writer.
The following image is an example when you use Gmail services.
Types of IP addresses
(I already explained IP addresses based on scope and version, along with the structure and other details. If you want to read that, use the link below.)
https://medium.com/@shubh.varshney0907/some-common-networking-devices-and-terminology-95403cbf78b5?sharedUserId=shubh.varshney0907
Based on assignment
1. Static IP address
This is manually configured (meaning you choose which one to use). Usually, it remains the same until someone changes it, or if there is an IP conflict.
(IP conflict means two or more devices having the same IP address.)
Just because it is manually assigned doesn’t mean you can write any IP address. You have to configure the subnet mask, default gateway, DNS server, and ensure the availability of that address. That requires effort. Hence, it is initially assigned by your router. These types of addresses are generally used for servers, security cameras, printers, routers, and some IoT devices. Otherwise, it would create a lot of chaos if servers changed their IP address regularly because then browsers would struggle to connect to them.
A static IP has its own advantages, like making a device easy to locate, which makes remote access easier.
(In case you are wondering, IoT stands for “Internet of Things”, which is a network of devices that collects data and sends it over the network by itself.)
2. Dynamic IP address
This address is automatically assigned by a DHCP (Dynamic Host Configuration Protocol) server whenever a device connects to the network. This is what happens when you connect to your home router. Read the definition again carefully: I never mentioned that the server will assign a different IP address — it may be the same as before; there is no fixed pattern to it.
(It is this simple, but people still get confused about it. :/)
Devices that use dynamic IP addresses may include laptops, smartphones, tablets, smart TVs, and gaming consoles, etc.
(Don’t worry if you don’t know the terms default gateway, DNS server, subnet, and DHCP — I will explain them soon.)
Based on function
1. Unicast address
In unicast, there is one-to-one communication with unique IP addresses. It is the most common type of communication.
Examples may include sending an email or file, loading a webpage, downloading a file, etc.
2. Broadcast address
It’s a one-to-all communication: it sends the data to every device on the local network. That means if you broadcast a message from your laptop, it will reach every device connected to your router. It is only available in IPv4.
Routers use it to identify the MAC addresses of devices.
3. Multicast address
It is a customized version of broadcast. Here, we can send data to selected receivers only. It sends data to those who joined a particular group — and by group, I mean those who have interest.
For example, if I am watching TV and change to a different channel, does the previous channel still send me data? No. It will send data only to those who are still watching it.
Use cases include video conferencing, live streaming, etc.
4. Anycast address
It’s something unique because it is not based on the number of connections. It sends the data to the nearest receiver. It is used by servers that provide web services.
For example, while searching something on Google in India, you will get connected to an Indian server, not a US server.
Use cases: public DNS services, cloud services, etc.
(Note: I didn’t cover IPv4 classes here because CIDR (which I will cover later) is adopted now. However, class ranges still exist, and they’re just one search away.)
Loop Back Address
This is a special kind of IP address used for sending data to itself i.e. network traffic routed back to itself and interestingly it is same for every device .
in IPv4: 127.0.0.1 , IPv6: “::1” (without quotes ofcourse)
That’s it for today, everyone. In the next blog, I will discuss the structure of an IP header and packet. Feel free to point out any mistakes in the comments.
Till then: “DO WHATEVER YOU WANT!!”
(Sources: GeeksforGeeks, Cisco, and my brain)








