3.5 Dynamic Routing
You already know that dynamic routing protocols are a means of exchanging routing information between routers. Thousands of complex networks run different types of routing protocols. The best-known example of such a network is the Internet, a community of independent providers, customer networks, and Internet exchanges (IXs), each having its own set of routers, which share common traffic policies and administration (Figure 3-6). Such a set of routers, controlled by a single organization or provider, is usually called an autonomous system (AS). This term is widely used in the Internet community.
Figure 3-6. The Internet, a group of autonomous systems
The term routing domain is frequently confused with the term autonomous system. A routing domain is a set of routers running a single dynamic routing protocol, such as RIP, OSPF, or IGRP. An autonomous system may consist of many routing domains, each running its own protocol, and still be a single entity to the outside world, as shown in Figure 3-7.
Figure 3-7. Autonomous systemsa set of routing domains<
All routing protocols can be classified as interior gateway protocols (IGPs) or exterior gateway protocols (EGPs). IGPs run inside an autonomous system and perform so-called intra-domain routing functions. This set of protocols consists of RIP v1/v2, IGRP, OSPF, EIGRP, integrated IS-IS, and some other, rarely used ones. EGPs run between autonomous systems. The set of EGPs includes two protocolsEGP and BGP. BGP version 4 is now the de facto standard for inter-AS routing, also called inter-domain routing. The main difference between the IGPs and EGPs is in the goals the two types are designed to achieve. IGPs are implemented to provide fast convergence within ASs, whereas EGPs are designed to share network reachability informationwhich networks are in which ASsand to permit application of routing policies, influencing the results of the local and remote best-path selection algorithms. This book describes intra-domain routing via the most widely used IGPsRIP, IGRP, OSPF, and EIGRP. (Inter-domain routing is not considered here, as this topic deserves a separate book.)
All routing protocols share the same basic concept: They exchange messages containing information about the networks routers know about. These messages are called routing updates. Every routing protocol has its own format for routing updates and its own algorithm for exchanging and analyzing them. Routing updates contain information about one or many remote networks that the sending router has information about. While sending information about a network in an update, routing protocols supply additional information that can be used to understand how far the network is from the advertising router and how optimal the route is. Based on this information, routers calculate metrics for the routes and use those metrics to characterize the quality of routes and to perform route comparison. Different routing protocols use different information for metric calculation. The simplest example is RIP, which uses the number of hops. More sophisticated protocols, such as IGRP and EIGRP, use a set of parameters, such as minimum path bandwidth, maximum path delay, and so on.
When it receives a dynamic routing update about a remote network, a router selects the best routesone or manyto the destination, based on the metrics associated with the routes. Having chosen the best route, the router can determine the two parameters for the routing table entries: the outbound interface and the next-hop address. In the simplest case, the outgoing interface is the one the routing update was received on, and the next-hop address is the address of the router that sent the update. Some protocols include the next-hop address in the routing update, and this address can be different from that of the advertising router. Also, link state protocols such as OSPF, do not care about the interface the update is received on. They calculate the routes on the basis of the network topology information.