Dynamic Routing Protocol



The purpose of a routing protocol includes:

- Discovery of remote networks
- Maintaining up-to-date routing information
- Choosing the best path to destination networks
- Ability to find a new best path if the current path is no longer available


What are the components of a routing protocol?

- Data structures - Some routing protocols use tables and/or databases for its operations. This information is kept in RAM.

- Algorithm - An algorithm is a finite list of steps used in accomplishing a task. Routing protocols use algorithms for facilitating routing information and for best path determination.

- Routing protocol messages - Routing protocols use various types of messages to discover neighboring routers, exchange routing information, and other tasks to learn and maintain accurate information about the network.


 In general, the operations of a dynamic routing protocol can be described as follows: 


- The router sends and receives routing messages on its interfaces.

- The router shares routing messages and routing information with other routers that are using the same           routing protocol.
- Routers exchange routing information to learn about remote networks.
- When a router detects a topology change the routing protocol can advertise this change to other routers.



The most commonly used routing protocols are:


- RIP - A distance vector interior routing protocol

- IGRP - The distance vector interior routing developed by Cisco (deprecated from 12.2 IOS and later)
- OSPF - A link-state interior routing protocol
- IS-IS - A link-state interior routing protocol
- EIGRP - The advanced distance vector interior routing protocol developed by Cisco
- BGP - A path vector exterior routing protocol

Note: IS-IS and BGP are beyond the scope of this course and are covered in the CCNP curriculum.





An autonomous system (AS)
Otherwise known as a routing domain - is a collection of routers under a common administration. Typical examples are a company's internal network and an Internet service provider's network. Because the Internet is based on the autonomous system concept, two types of routing protocols are required: interior and exterior routing protocols. These protocols are:

- Interior Gateway Protocols (IGP) are used for intra-autonomous system routing - routing inside an autonomous system.
- Exterior Gateway Protocols (EGP) are used for inter-autonomous system routing - routing between autonomous systems.


IGPs are used for routing within a routing domain, those networks within the control of a single organization. An autonomous system is commonly comprised of many individual networks belonging to companies, schools, and other institutions. An IGP is used to route within the autonomous system, and also used to route within the individual networks themselves.

Routing protocols, and more specifically the algorithm used by that routing protocol, use a metric to determine the best path to a network. The metric used by the routing protocol RIP is hop count, which is the number of routers that a packet must traverse in reaching another network. OSPF uses bandwidth to determine the shortest path. 

EGPs on the other hand, are designed for use between different autonomous systems that are under the control of different administrations. BGP is the only currently-viable EGP and is the routing protocol used by the Internet. BGP is a path vector protocol that can use many different attributes to measure routes. At the ISP level, there are often more important issues than just choosing the fastest path. BGP is typically used between ISPs and sometimes between a company and an ISP. BGP is not part of this course or CCNA; it is covered in CCNP.



Interior Gateway Protocols (IGPs) can be classified as two types:
- Distance vector routing protocols 
- Link-state routing protocols

Distance Vector Routing Protocol Operation

Distance vector means that routes are advertised as vectors of distance and direction. Distance is defined in terms of a metric such as hop count and direction is simply the next-hop router or exit interface. Distance vector protocols typically use the Bellman-Ford algorithm for the best path route determination. 

Some distance vector protocols periodically send complete routing tables to all connected neighbors. In large networks, these routing updates can become enormous, causing significant traffic on the links. 

Although the Bellman-Ford algorithm eventually accumulates enough knowledge to maintain a database of reachable networks, the algorithm does not allow a router to know the exact topology of an internetwork. The router only knows the routing information received from its neighbors.

Distance vector protocols use routers as sign posts along the path to the final destination. The only information a router knows about a remote network is the distance or metric to reach that network and which path or interface to use to get there. Distance vector routing protocols do not have an actual map of the network topology.

Distance vector protocols work best in situations where:
- The network is simple and flat and does not require a special hierarchical design.
- The administrators do not have enough knowledge to configure and troubleshoot link-state protocols.
- Specific types of networks, such as hub-and-spoke networks, are being implemented.
- Worst-case convergence times in a network are not a concern.


Link-state Protocol Operation

In contrast to distance vector routing protocol operation, a router configured with a link-state routing protocol can create a "complete view" or topology of the network by gathering information from all of the other routers. To continue our analogy of sign posts, using a link-state routing protocol is like having a complete map of the network topology. The sign posts along the way from source to destination are not necessary, because all link-state routers are using an identical "map" of the network. A link-state router uses the link-state information to create a topology map and to select the best path to all destination networks in the topology. 


With some distance vector routing protocols, routers send periodic updates of their routing information to their neighbors. Link-state routing protocols do not use periodic updates. After the network has converged, a link-state update only sent when there is a change in the topology. For example, the link-state update in the animation is not sent until the 172.16.3.0 network goes down. 

Link-state protocols work best in situations where:
- The network design is hierarchical, usually occurring in large networks.
- The administrators have a good knowledge of the implemented link-state routing protocol.
- Fast convergence of the network is crucial.