Intuitive way of understanding network addressing scheme

Manoj Vignesh K M
6 min readJul 25, 2020
ipconfig /all

IP address, Internet Protocol address, I believe is the revolutionary invention made by humans. It let’s one uniquely identify a host in a network. The common questions that I hear are:

  • why is there an IP address when there is a MAC address and vice versa?
  • What is all about the concept of private and public IP addresses?

I hope this blog answers these questions and more.

(Not a boring) Evolution of network addressing scheme: My perspective

Let me give you a brief of how the internet started so that you may be able to appreciate the concept of MAC Addresses and IP addresses. Here, is an imitation of an internet scientist’s speech:

“Alright, now that we have a dozen computers and we want them to communicate with each other, let's assign an ID to each computer. Let the computer that wants to communicate, send the bits along the wire tagged with the destination target ID. All the computers receiving it will check if it is meant for them, by comparing the destination ID in the bits chunk against its own, and accept it or reject it accordingly.
But, this is limiting! What if there are thousands, millions, and billions of computers in the future? Computers have limited processing capability, and hence in the case of a billion computer in the world, it would effectively accept one in a billion messages on an average.
We need a way to hierarchically define these IDs and let one representative computer check if it is meant for anything for it or the set of computers that it fronts, and take the decision to forward it inside or reject it accordingly.”

Observe that the linear ID mentioned in the first paragraph is called the MAC address now. It is the physical address embedded in the network interface. The MAC Address does not change for a network adapter. The hierarchical ID mentioned in the third paragraph is called the IP address. It is a logical address that a network interface assumes when in a network. And, the representative computer that checks if the set of bits is meant for it or any computer that it fronts is called the router.

Let me pause here and let you explore other medium blogs and other articles if you want to understand MAC Addresses and IP addresses further.

What is meant by IP address is hierarchical?

Imagine a colony of apartments. The colony has, say, 2 rows of apartments, each row has 4 apartments, and each apartment has 4 floors with 4 houses each. To uniquely identify a house in the colony one needs to reference it as, the house in row 1, apartment 2, floor 4, house 3. At each level, notice that your brain is scoping to a smaller set of houses to consider to pinpoint the target.

Fun perspective: I feel the house address should be written in the reverse order rather than the typical order followed! However, we interpret it in reverse once read fully.

Private IP Address

Consider the inmates of the house in row 1, apartment 2, floor 4, house 3. Imagine yourself to be a person in the home. You have a wife, a father, a mother, a son, a daughter, a grandfather, a grandmother, mother-in-law, father-in-law, and the list goes on. Notice that every house have these set of people. (Probably, everyone is partying with the whole family in place!)

You call out “Dad!”. You don’t expect the father in a house in row 2, apartment 3, floor 3, house 2 to reply to you saying “Yes, son?”, do you? That is how exactly the private address works. The hierarchy, in this case, for example, is the father, grandfather, great grandfather, which scopes to different levels of granularity when the house inmates are considered for pinpointing. These private names make sense only within your home or when you all huddle up in a densely populated place.

When you are out in the world with your father, let’s say in a concert where there are thousands of people. It would cause chaos if you shouted out ‘dad’. Every person who is a father would turn to you. So, you call him by his name if he is close to you. Or, huddle up to be able to call him ‘dad’. But, if you want someone else to pass on the message that you have for him, who is also in the concert but seated elsewhere, it would require you to specify the set, seat row, the seat number, and his name. Similarly, if you want to communicate with a person in another house it would require you to post a mail with every detail in it, which includes the row, apartment, floor, house number, and the name of the person.

Private IP subnetwork in a private IP network

We understand that the names used by the inmates in a house is analogous to private IP addresses. Now, consider the children in the house huddling up to play a the house game. These children overlook their real role to take another new role. Even though there is a ‘father’ in the house, one of the children takes up the role of a ‘father’. The communication among the children makes sense only among themselves.

Connecting the dots

Now that we have the context set up, it is time to connect the dots. From the articles and blogs, you know by now that, there are 2³² IP addresses ranging from 0.0.0.0 to 255.255.255.255. Similar to what words can be formed in English. Of these IP addresses, the ranges:

  • 10.0.0.0 to 10.255.255.255,
  • 172.16.0.0 to 172.31.255.255, and
  • 192.168.0.0 to 192.168.255.255

are designated as private IP address range. These are words that describe the role of a person in the family such as father, mother, son, and daughter. The IP address other than the private addresses are termed public IP address. These are the words that describe the location of a house in the colony.

The other words in English are analogous to the invalid IP addresses. The real name of the person is analogous to a MAC address of the network interface. It does not change (in most cases) since his/her birth. While the IP address can change based on his current location. When at home your location is defined by the house number and other hierarchical details when at work your location is defined by desk number and other hierarchical details.

The house address or the desk address is the public IP address. While, the role that you assume in a family or in the team of your organization is the private IP address. If you put your mind in one you would only be the, say, an engineer in the team. And, when you want to ask someone to post a message to you, you represent the desk number for that moment. This is analogous to the network interface assuming an IP address at a time, be it public or private.

Furthermore, the details put in the cover of the mail are the attributes in the header of the network protocol data unit (PDU).

Here is the summary that maps the concept to the terminologies.

  • Role of a person in the family — Private IP Address
  • Location of the house — Public IP address
  • Name of the person — MAC Address
  • World — Internet
  • Colony, Concert — subnet
  • Row, Apartment, floor, house — subnet of the subnet
  • Set, Seat row number, seat number — subnet of the subnet
  • Mail — Protocol Data Unit
  • Message — PDU Payload
  • Mail Cover details — PDU Header
  • Shout Out ‘Dad’ — broadcast message
  • Sending a mail to destination — unicast message
  • Huddling — creating a private network

Teaser

Alright! I have crafted the mail with cover details and the content, the network PDU. How do I efficiently deliver this to the destination? This introduces us to the concept of protocols and routing.

--

--

Manoj Vignesh K M

Exploring the Science of Security | Georgia Tech MS CS | Security & Software Engineering