IP/Host Location Addressing

Le Zhang
4 min readJun 19, 2021
Network Story

When we stay at home, open a browser and try to watch youtube on our laptop, or open a game, try to play an online game with friends. Do you know how our laptop knows where to get the video resource and how do people from different corners of the world able together into the same gaming room and play together?‌

What does our laptop do to make it happen?

IP/Host Addressing image 01

Obviously, we need to know where to go at first, is like when you want to watch a movie or buy some goods, you will need to know the address of the cinema and supermarket before go.

Similar to the address of a building, network domain also has the address of each service, They are named as Internet Protocol address. (IP address as shorten)

The IP address is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. Just like each building’s address, in the public area, they are unique.

‌We will explain how does IP address define and using to forward package. Now, we continue to the next step.

IP/Host Addressing image 02

‌Now, we know the name of our targe service, yes, it’s an address to the different service, like ‘google’, ‘youtube’, ‘facebook’, ‘amazon’ or so on. We just check a map to get the full address, this task we can do by using some tools, like the google map in our real world. Network world also has a similar tool, we named it DNS services, The Domain Name System (DNS) is a hierarchical and decentralized naming system for computers, services, or other resources connected to the Internet or a private network.

From the DNS table, we can get the IP address of our services. We will introduce the DNS family in another video.‌

Now let’s start request the server by the known IP address. Different from offline shopping, the online resource doesn’t need us to go out by ourselves. We also don’t need to search for the IP address all over the world ourselves, there is a helper who will do this job for us, which is our Gateway, also known as our router.

IP/Host Addressing image 03

Same as the delivery, our Gateway also need to know our source IP address, which is our home’s IP address, usually, when the Internet Service Provider (ISP) implement the network for us, they will provide a public IP address for us, that one is our source address, and together with the target IP address the gateway looked up from DNS service, Yes, now it knows where to get the resource and turn back to us. Remember network IP addressing is a two-way function, always provide the correct source address together with the target address to the network device.

Next step, We will explain how does the gateway doing the IP addressing, is like the delivery guy, Gateway itself also has no idea where our target is in the network world because there are too many services and if each delivery guy remembers all the maps, it will be a too heavy task for them. So is there any better way that the gateway can know where to go without keeping all the maps in mind?

The answer is Yes, we can think like this, the delivery guy doesn’t need to remember all the maps of the world, he only needs to know who else knows how to get to the target place, then pass the package to that guy, same as us, we only need to remember our gateway, our gateway also need to keep a list with different target IP addresses mapping to the different network devices, which directly connected with them.

Then the next delivery guy also passes the package to the next guy on his list, therefore, each of them needs to remember the map of one city, even one small area, then the last guy will pass the package to the target building, then the task resolved!

IP/Host Addressing 04

Same to the gateway, they just check a small route table inside their device, and pass the package to the next network device, then done! wait for the next drive to finish its job the return back the answering package to him.

The final step is our getaway device received the answering package, which including the video data from youtube, or gaming information from Dota, or charting message from Facebook friends. Now we successfully build up the communication with those websites and server we want!

--

--