IP routing is the process that forwards packets from one network to another. Often hoping between many different networks before reaching its intended destination. It works by using various internet protocol technologies and routing tables that together decide the best path for the data to take.
When I studied to become a network engineer I always struggled with what IP Routing did, and how it worked. I now know, but I’m sure there are plenty of people like me who still struggle with it. Therefore, I have written this article, to explain what IP routing is and how it works as clearly as possible. So keep reading to learn.
What is IP Routing
IP Routing stands for Internet Protocol Routing and is the technology that determines the path for data packets between networks. It forwards data from a source to the intended destination, by sending it through various networks. These networks receive the packets and forward them to the next network. The receiving and forwarding are done by a network router that looks at the intended destination and chooses the best possible path for the data packets to take.
If you look at the image below, you can see an example of how routing is done. Computer A wants to send data to computer B. To begin with, computer A sends the data to its router. Thereafter, the router decides the optimal data path.
In this example, the router finds two viable paths. The first and the shortest path goes through network 1 and 2. The second and longer one is between network 3, 4, and 5. It would be an easy choice if the networks had equal speed, but the speed of network 3, 4, 5 is faster than 1 and 2. Thus it must make a decision of which is the fastest possible route.
How Does IP Routing Work
When a router receives a packet, either from its computer or another router, it reads headers of the packet to learn its planned destination. When it knows the packet’s destination it uses something called a routing table to decide the optimal path for the packet.
An easy way of thinking about a routing table is to compare it to a train timetable. Something passengers look at to decide which train to take. Routing tables work the same, except with network paths instead of trains. In the case of networking, however, the passengers (packets) are unable to make a decision themselves. So they always ask the train station personnel (router) which train to take.
There are two main types of routing tables that routers can use. These are static routing tables or dynamic routing tables.
Static Routing Tables
A static routing table is set up manually by the network administrator. It needs to be configured so that it has a static route on every router to work efficiently. It will never change unless the administrator reconfigures it in some way. Here are the advantages and disadvantages of static routing tables.
- Easy to configure and manages on small networks
- It’s more secure because there is no routing protocol to analyze.
- Easy to configure on subnetworks
- Takes less computer power (CPU, memory, bandwidth)
- Very difficult to manage and administrate on larger networks
- Don’t prevent routing loops
- Any changes and the administrator have to manually update the routers
- No automatic rerouting if an outage occurs
Dynamic Routing Tables
Dynamic routing tables are created automatically by the routers themselves. And if any change in the network occurs it automatically updates it. These intelligent routing protocols can choose a different path when a change happens to the routing/network infrastructure. Here are the advantages and disadvantages of dynamic routing tables.
- No manual router set up or management.
- Easy to manage on a larger network.
- Prevent routing loops
- New routes get added automatically.
- Easy to scale.
- Takes more computer power (CPU, memory, bandwidth)
- Requires more complex initial configuration to work.
Routers can use a lot of different routing protocols to decide which path it thinks is optimal. Often, however, they use more than one of these to decide the best path for data to travel. Here are some of the most common ones:
BGP stands for Border Gateway Protocol. It is used to tell which network has which IP address and whatever networks have a connection to each other. BPG is a type of dynamic routing protocol and works well with dynamic routing tables.
OSPF stands for Open Shortest Path First. It is used by routers to find the fastest and shortest possible route for packets to travel to their destination.
RIP stands for Routing Information Protocol and uses hop counts to identify the shortest path to a packet’s destination. In this case, hope counts mean how many routers must receive and transfer the packet between the sender and its destination. RIP always tries to find the path with as few of these as possible, even though it might not always be the fastest path.
EIGRP stands for Enhanced Interior Gateway Routing Protocol and is an advanced distance-vector routing protocol. It is used for automating routing decisions and configurations.
IS-IS stands for Intermediate System – Intermediate System and is another type of IP routing protocol. It is very similar to OSPF the major difference being that OSPF operates on layer 1 while IS-IS operates on layer 2.
IP Routing is what guides packets through networks and is the foundation for the internet. Routers guide the data with various internet protocols and routing tables to find the optimal path for the packets. Different methods are used for different networks, depending on size and location. But the purpose stays the same; efficient communication between networks.