A Routing Table is a database within a router, storing and updating addresses of other network devices and providing the most efficient routes. It is used for directing traffic.
When working with a Layer 3 device, like a router, it is important to understand how the traffic is
getting from point A to point B. To do this, we are going to be interested in “Hops”.
A Hop is when a packet passes through a router.
We will often want to know what the next hop might be. By consulting the routing table and observing inbound traffic, we can determine the destination and calculate the path to the next hop.
Routers don't need to know how to get everywhere, they just need to know how to get to the next router, trusting that the next stop down the line will know the correct hop after that. This string of Layer 3 devices between ourselves and the destination location, together form the entire path despite each only being aware of its own local network and what the following hop might be.
Imagine this scenario: If the best path for a packet leaving Router A is through Router B, but Router B's understands the best path from there as being through Router A, we will end up with a conflict, seeing that packet go back and forth. Without a way to remove that packet, it will continue in a loop forever.
Fortunately in IPv4 we have something called "Time to Live." Every time a packet passes through a router the “Time to Live” is decreased by one. When the "TTL" gets to zero, the router discards that packet from the network.
In IPv6 this process is called "Hop Limit" and this keeps the packet from looping around indefinitely inside our network.
If you are configuring a routing table inside your router, firewall or any other layer 3 device, you are going to need to know the exact path the packet will take as well as the network destination.
This information can often be acquired from network diagrams. Occasionally the next hop might be a third party location and contacting that third party may be needed to determine the next hop for configuring on your device. This is why we need to troubleshoot based on our routing tables should the next hop destination be improperly set resulting in traffic not going to where it needs to go. Important also is the need to consider the path a packet will take on the way back.
If the next hop is inputted incorrectly, a routing loop can occur. The result will see traffic constantly circling around or travelling to a router that doesn't actually exist. In either case, traffic is not going to get to where it needs to go and changes will have to be made to the routing table.
The Loopback interface is an administrative feature that can be configured inside a router. It is an IP address that can be assigned inside our router which will always be available. This is a Virtual Address inside our router as appose to a physical interface. The loopback interface is similar to the IPv4 loopback address 127.0.0.1 but is configurable in accordance to how the administrator so desires. Configuring the Loopback interface requires an IP address, (much like an interface on your router which has an IP address and subnet mask) the Loopback interface address can be listed within Routing Tables you can reference and designate as the next hop. This address will be available as long as that router is turned on.
It is common to see the loopback interface being used as the next hop, especially if you have redundant routes and you need to provide some type of internal address. The Loopback interface is also being used as an external reference to the router that will be always available.
So, as an end user we rarely think about the routes that our traffic is taking to communicate out on the internet, but it is a relatively complex path and the devices that are along the way have to make decisions about where this traffic is going. That`s why all of these devices along the path must have a routing table which will act as a map or diagram, providing directions and that showing how to get from point A to point B.
No comments:
Post a Comment