Routing Protocols
Routing protocols are responsible for navigating traffic. They keep track of remote networks and attempt to find the best path to them. They do this by keeping tables of information about the network. Each routing protocol will keep different information in these tables depending on how they operate. There are 2 different types of routing protocols, distance vector, and link state.
Distance VectorDistance vector routing protocols operate by sending out their entire routing table to neighbors at a set interval. In the previous section we did a basic RIP configuration. RIP is a distance vector protocol, and when we configured RIP we configured it to route for 1 network, the 192.168.1.0 network. So when RIP was brought up it sent out a routing update with all the information contained in its routing table for that route to its neighbors. The router that received the routing update would take that information and add it to its own routing table. This process continues to send routing information back and forth between the routers at a set interval defined by the routing protocol. Examples of distance vector protocols are RIPv1/RIPv2, IGRP, and EIGRP. You will hear a lot in the Cisco world about EIGRP being a hybrid routing protocol because it has characteristics of both distance vector and link state protocols, but in actuality it is just an advanced distance vector protocol, however EIGRP does not follow all of the rules of distance vector routing. We'll get more into this in the EIGRP section.
Link StateLink state protocols work by keeping detailed information on the network in 3 separate tables. These protocols will send routing information to neighbors and will keep a detailed map of the internetwork so that it knows a route to each network. Once the routing information has been exchanged the routers will begin sending hello packets to ensure that neighbors are still up and running. The routers will only send additional routing information if there is a change in the network such as a router goes down or a network is added. Link state protocols know more information about the internetwork than distance vector protocols. The only link state protocol we will discuss is Open Shortest Path First, OSPF.
|
|
Static Routing
There is a third option when routing traffic and that is static routing. Static routing refers to the manual entry of each route on each network. As you can probably imagine this can become extremely tedious and time consuming in a larger network, however it can be an asset if used properly.
Routing loops
When operating a distance vector routing protocol the network runs the risk of creating routing loops. Routing loops occur on distance vector networks because routing updates are not synchronized. For example, take a look at the following image.
We can see that the link between router 6 and router 7 has gone down, when this occurs router 6 will inform router 3 that the link is down. Router 3 will update is routing table but it will wait to update the rest of the network until its update timer is up, which by default is every 30 seconds. At this point only router 3 and 6 know that the link is down, routers 1, 2, and 5 all still think it's up and they are sending updates with this information still. Eventually router 3 will update router 2 telling it that the link is dead. At this point router 1 sends an update to routers 2 and 5 telling them that there is a path to the dead link through router 1. Now router 2 is going to advertise to router 3 and so on, until they all have invalid routes and are sending packets to unreachable destinations.
Routing loops can cause serious problems. One of the solutions is built into the RIP routing protocol, and it's known as maximum hop count. Maximum hop count defines how many times a packet can be forwarded through routers. Every time a packet is forward through a router its hop count is incremented, and by default, when it reaches 16 hops the destination is considered unreachable.
Routing loops can cause serious problems. One of the solutions is built into the RIP routing protocol, and it's known as maximum hop count. Maximum hop count defines how many times a packet can be forwarded through routers. Every time a packet is forward through a router its hop count is incremented, and by default, when it reaches 16 hops the destination is considered unreachable.
Split Horizon
Split horizons is another solution for routing loops. Split horizons is a rule that states routing information can't be sent back through an interface it was received on. Let's take another look at the network that went down and see how split horizons could have solved this routing loop.
Let's consider what happened when this network was brought online and before the link between router 6 and 7 went down. This serial link has to be advertised to router 3 from router 6. If we think back to our split horizon rule we know that router 3 will not re-advertise this route back to router 6, however it will advertise it to router 2. Router 2 will then advertise it to router 1 and 5. Now that the network has converged let's bring the link down again and consider how split horizons solves the problem.
When the link goes down router 6 will advertise to router 3 about the dead link. Router 3 would send to router 2, and at this point in the last example router 1 advertised that it knew about a route to the dead link, but in this example router 2 will not receive this update because split horizons prevents router 1 from sending an update to router 2 regarding that route.
When the link goes down router 6 will advertise to router 3 about the dead link. Router 3 would send to router 2, and at this point in the last example router 1 advertised that it knew about a route to the dead link, but in this example router 2 will not receive this update because split horizons prevents router 1 from sending an update to router 2 regarding that route.
Route Poisoning
Route poisoning is the last method of preventing routing loops we'll discuss in this section. When the link goes down between router 6 and 7 router 6 will send a routing update with the metric of 16, telling router 3 that the route is unreachable. Router 3 will respond with something called a poison reverse. Poison reverse violates the split horizon rule and advertises the same route back to router 6. This ensures that every router on the network will receive an update stating that the link is unreachable.