Monday, September 17, 2018

How IP Routing Works

              How IP Routing Works

Routing is the process during which data packets are forwarded from one machine or device (technically referred to as a node) to another on a network until they reach their destinations.
 When data is transferred from one device to another on an IP network, like the Internet, the data is broken down into smaller units called packets. These units carry, along with the data, a header that contains a lot of information that help in their journey to their destination, a bit like what you have on an envelope. This information includes the IP addresses of the source and destination devices, packet numbers that will help reassemble them in order upon reaching destination, and some other technical information. 
 Routing is the same as switching (with some very technical differences, which I will spare you from). IP routing uses IP addresses to forward IP packets from their sources to their destinations. IP adopts packet switching, in contrast with circuit switching. 

How Routing Works

Let us consider a scenario where Li sends a message from his computer in China sends a message to Jo's machine in New York. TCP and other protocols do their work with the data on Li's machine; then it is sent to the IP protocol's module, where the data packets are bundled into IP packets and sent over the network (Internet).
These data packets have to cross through a lot of routers to reach their destination half the world away. The work these routers do is called routing. Each packet carries the IP addresses of the source and destination machine.
Each of the intermediate routers consults the IP address of each packet received. Based on this, each will know exactly in which direction to forward the packet. Normally, each router has a routing table, where data about the neighboring routers is stored. This data consists of the cost incurred into forwarding a packet in the direction of that neighboring node. The cost is in terms of network requirements and scarce resources. Data from this table is considered and used to decide the best route to take, or the most efficient node to send the packet to on its way to its destination.
The packets go each one its own way, and can move through different networks and take different paths. They all finally get routed to one same destination machine.
On reaching Jo's machine, the destination address and the machine address will match. The packets will be consumed by the machine, where the IP module on it will reassemble them and send the resulting data above to the TCP service for further processing. 

No comments:

Post a Comment

Which Python course is best for beginners?

Level Up Your Python Prowess: Newbie Ninjas: Don't fret, little grasshoppers! Courses like "Learn Python 3" on Codecade...