Internet Protocol Layer – Beauty in Simplicity

internet protocol layerThe Internet Protocol Layer is one part within the four layer architecture of the TCP/IP model. This layer is responsible for transmitting packets of information across the network. It has no other concern with the other layers in the model. This narrow focus of the Internet Protocol layer allows the network engineers to deal with a small piece of a very large and complex challenge. It is sometime referred to as the Internetwork Protocol, because it deals with getting messages from network to network.

A nice feature about IP is that it does not have to be perfect. It’s designed in a way that data can sometimes get dropped, or sent different ways, but in the end it corrects itself and ultimately works. This layer had to introduce, and relies heavily on, the address of the destination host. This is what we call the IP address.

The IP address format is four numbers separated by dots. Each number is between zero and 255. The address is broken into two parts. The prefix is the network number. The second part is the computer number within the network. For example, a college campus could have one network number. So, this prefix in the IP address will be the same for every computer on that network. When a packet of information comes zooming across the internet for that campus, the routers only worry about the prefix, i.e., the network number.  This greatly simplifies the job of the router, because it only worries about the prefix. This allows routers to work very fast. Once a message reaches the destination network, it is up to that network to forward the message on the correct computer.

DHCP for Computers that Move Around

network address translationDynamic Host Configuration Protocol (DHCP) is the technology that allows someone to take their laptop to a school, then a coffee shop, and then home. Yet, everything still works. The user can still send messages back and forth regardless of their locations. This is because whenever someone opens their computer up at a coffee shop, or wherever, the computer sends out a message saying “Hey, I’m here, please give me a number to use on your network”. However, you may have noticed that wherever you are, your IP address starts with 192.168. This is actually a non-routable address that you get through a technology called Network Address Translation (NAT). You only see this non-routable address, and you do not see the real unique address assigned to you by the network.

Time to Live Saves Internet Protocol Layer From Infinite Loops

Because routers work imperfectly with imperfect information, they can occasionally send packets of information round and round through the same subset of routers. If this process were to never stop then an infinite loop forms. The router is mistaken by thinking it’s routing the packet of information correctly. It doesn’t know that it’s looping the packet. This problems gets corrected with a Time to Live (TTL) field inside the router. TTL starts a number, say 30, and each time a packet passes through that router, it subtracts one from the TTL field. If TTL goes down to zero, meaning the packet looped through 30 times, then the packet gets thrown out. When a packet gets thrown out, a notification is sent back to the sending computer to inform it that there was a problem. The computer can then send it out again until it successfully hops its way across the internet. If the sending computer wants to find out exactly when and where the package got thrown out, it can fun a program called Traceroute to diagnose the problem.

The simplicity of how routers work is one reason why the TCP/IP model succeeded. Routers don’t have to worry about the order of packets, they don’t have to store information, but rather they just forward on packets according to their best guess. They don’t have to be perfect. This allowed for the internet to be scalable, and to grow quickly.

Leave a Reply

Your email address will not be published. Required fields are marked *