How does the internet work — Part 2 — Addresses on the internet

Sharoon Mohammed
bits-n-bytes
Published in
5 min readFeb 17, 2019

This is part 2 of the “How does the internet work” series intended for beginners. Check out the previous post here for an introductory lesson

In the previous post on internet basics , we learnt all about hosts and nodes in the internet , and how the internet is an interconnection of different networks across the globe. A device A is able to send messages to a device B across the globe , even though they are separate networks that may not speak the same language. All of this is made possible because of a common addressing scheme agreed upon by all devices on the internet. In this post , we will explore addressing on the internet.

All devices on the internet has an address known as an “Internet protocol address” or an “IP address” . This IP address uniquely identifies the device throughout the internet. This IP address is advertised to all the other devices connected to the internet across different networks through various protocols , and this is what enables devices across different networks to talk to each other .

There are another set of addresses that are used within a network. From now on , a local network will be called as a “local area network” or a “LAN”. There are multiple technologies that a LAN can use, such as Ethernet , ATM , Frame Relay etc. We won’t dive into much detail about these , but it should suffice to know that they are different methods of communication within a LAN , just like a common language that all devices in the LAN speak. Devices that belong to different LAN’s may not speak the same language. Ethernet is the most common LAN technology , so we will assume the LAN technology as Ethernet in this post.

Ethernet also uses a set of addresses known as Media access control addresses (MAC addresses) . These are used for communication by devices within a LAN. These are not known by devices outside the LAN.

To make the distinction between MAC addresses and IP addresses more clear , let us consider a real-world analogy, which we are going to use throughout this series. Consider you are sending a letter to your friend John Doe in another country. You post an envelope with his name and house address.

John Doe , 2110 West Avenue , NY , USA

The letter follows many paths throughout its journey — from the letterbox to multiple post offices , to John Doe’s home mailbox , and finally to John Doe. Here , your home is LAN A and John Doe’s home is LAN B. John Doe is the MAC address and his home address is the IP address. The post office is not concerned about the MAC address (his name) , it only uses the IP address to forward the letter . Once it reaches his home, the letter is forwarded to John Doe by any one of his family members using the MAC address on the envelope (his name). Suppose you, the sender only had the MAC address (his name) , there is no way the letter would reach him because there is absolutely no way for the post office to determine which John Doe among millions of possible John Doe’s in the world. So , you need the IP address (Home address) , which enables the letter to be properly mailed. This simple hierarchy is exactly what is used on the internet.

From the analogy , its clear that MAC addresses are only known within the network , and IP addresses are globally advertised. The path the message on the internet takes is determined by its IP address. Different networks can use different technologies within themselves , but they all speak the global language of “IP” .

Now you may wonder , why do we need this 2 address hierarchy; if IP addresses are unique , why not use just the IP address to communicate? As we saw before , different LAN’s may use different technologies to communicate. LAN A would use Ethernet whereas LAN B would use ATM , and there would be no way for devices on LAN A and LAN B to speak with each other. Thus we use IP addresses which are known by devices on both LAN’s , sort of as a common protocol to link different LAN’s.

A lot of you would be familiar with IP addresses used on the internet. Its a 4 digit value like 10.10.10.1 . They are managed by the Internet Assigned Numbers Authority (IANA) . The IANA provides a chunk of IP addresses to your Internet service provider (ISP) e.g AT&T who assigns it to you. The 4 digit value is actually converted into binary when interpreted by computers and devices on the internet. If you need some info regarding decimal to binary conversion , check out this page. The 4 digit notation ( 10.10.10.1 ) is used for better readability by humans.

An IP address of 10.10.10.1 would look like this in binary:

00001010 . 00001010 . 00001010 . 00000001

The MAC address is a 12 Digit hexadecimal value assigned by the device manufacturer to each device. It looks like this AF:34:12:BB:CC:22 . If you are unfamiliar with hexadecimal values , check out this post.

Example of addresses on the internet

Here is a simplified diagram of a set of networks with IP and MAC addresses configured. A PC on LAN A would need to know the IP addresses of PC’s on LAB B and vice-versa for communication between them.

I hope this post has given you more insight about the working of the internet and the addressing system used on the internet. We will dive more into the process of forwarding information on the internet in the next post.

--

--

Sharoon Mohammed
bits-n-bytes

I love to read and write about technology, and help people understand the technology they use.