IP Routing Protocols Fundamentals and Distance Vector Routing
IP Routing Protocols Fundamentals and Distance Vector Routing
IP Routing Protocols
James Aweya
First edition published 2021
by CRC Press
6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742
The right of James Aweya to be identified as author of this work has been asserted by him in accordance
with sections 77 and 78 of the Copyright, Designs and Patents Act 1988.
Reasonable efforts have been made to publish reliable data and information, but the author and publisher
cannot assume responsibility for the validity of all materials or the consequences of their use. The authors
and publishers have attempted to trace the copyright holders of all material reproduced in this publication
and apologize to copyright holders if permission to publish in this form has not been obtained. If any
copyright material has not been acknowledged please write and let us know so we may rectify in any
future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter
invented, including photocopying, microfilming, and recording, or in any information storage or retrieval
system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, access www.copyright.com
or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-
750-8400. For works that are not available on CCC please contact [email protected]
Trademark notice: Product or corporate names may be trademarks or registered trademarks and are used
only for identification and explanation without intent to infringe.
Typeset in Times
by SPi Global, India
Contents
Preface....................................................................................................................... xv
Author......................................................................................................................xxi
v
viContents
1.4.6 Cost.............................................................................. 19
1.4.6.1 Example: OSPF Cost................................... 19
1.4.6.2 Cost Based on Interface Bandwidth............19
1.5 Classification of Routing Protocols.......................................... 20
1.5.1 Interior versus Exterior Routing Protocols.................. 21
1.6 Least-Cost Routing................................................................... 22
Review Questions................................................................................ 24
References........................................................................................... 24
xv
xviPreface
Autonomous System provides transit services, an IGP can be used to allow data to be
forwarded across the transit Autonomous System from ingress to egress. Routes are
distributed between Autonomous Systems by an Exterior Gateway Protocol (EGP).
BGP is currently the only EGP used in today’s internetworks. The EGP enables rout-
ers within an Autonomous System to choose the best egress point on an Autonomous
System when they have data for external destinations.
The IGPs and EGP running within each Autonomous System cooperate to route
data across internetworks. The EGP determines the Autonomous Systems in the
internetwork that data must travel over, in order to get from its source to the destina-
tion, while the IGP determines the best/optimal path within each Autonomous System
that data must travel over to get from the ingress point (i.e., the data source) to the
egress point (i.e., the final destination).
As discussed above, routing protocols run in routers and provide the intelligence
that guide how routers communicate with each other to determine the best/optimal
paths for routing user data. Routing protocols are a key component of a router. Many
books discuss routing protocols without sufficiently linking them to the other key
components of a router, and how all these components interact to allow a router to
perform its key functions. As will be discussed in greater detail in this two-volume
book, the key functions of a router are:
Volumes 1 and 2 of this two-part book, describe the most common IP routing proto-
cols in used today (RIPv2, EIGRP, OSPFv2, IS-IS, and BGPv4) by explaining the
underlying concepts of each protocol, and describing how the protocol components,
and processes fit within the typical router. Each routing protocol uses a number of
databases to perform its functions. This two-volume book also describes the types of
databases each routing protocol uses, how the databases are constructed and man-
aged, and how the various protocol components and processes relate and interact
with the databases. The description of the routing protocols is from a systems per-
spective, recognizing the most important routing and packet forwarding components
and functions of a router.
A majority of existing books tend to be vendor-focused, dealing instead with how
a particular vendor’s router and the routing protocols running on it are set up and
configured, and other matters related to troubleshooting. This two-volume book
appeals more to readers who want a detailed discussion of routing protocols, yet
do not want to be tied down or distracted by the often, lengthy discussions on con-
figuration and troubleshooting instructions and routines, found in a majority of IP
routing protocols books. The presentation is in a style that makes it appealing to
Preface xvii
undergraduate and graduate level students, research and practicing engineers and
scientists, IT personnel, and network engineers.
Volume 1 focuses on the fundamental concepts of IP routing and distance-vector
routing protocols (RIPv2 and EIGRP), while Volume 2 focuses solely on link-state
routing protocols (OSPF and IS-IS), and the only path-vector routing protocol in use
today (BGP). BGP is the only path-vector EGP in use today. Traditional distance-
vector routing protocols such as RIPv1 and RIPv2 determine the best routes to a
network destination based on a distance metric such as the number of routers (i.e., the
hop count) each candidate route has to that destination.
Routers running link-state routing protocols advertise routing information about
the network topology (which includes information about their directly connected
links and the state of those links) to all link-state routers in the routing domain until
all the routers have identical information about the network. The link-state routers
exchange routing information using multicast addresses and triggered routing
updates. The routers calculate the best path to each network destination based on
constraints such as minimum available path bandwidth, maximum delay, and other
path related parameters.
For each destination network, a router in a (traditional) distance-vector routing
protocol network constructs a distance-vector, which is a one-dimensional array or
vector that presents or indicates the destination network on the router’s least-cost tree
of network prefixes. The routing information is structured in the form of vectors or
arrays with elements (distance, direction) where “distance” in a vector is a route
metric (or cost), such as the hop count to reach the destination network, and “direc-
tion” is the next-hop IP router to be used to reach that destination. To prevent routing
loops, speed up network convergence, and improve network stability, the routers use
various protocol timers and loop prevention mechanisms such count to infinity, split
horizon, and poison reverse.
Newer distance-vector routing protocols such as EIGRP use a composite routing
metric that takes into account path hop count, delay, bandwidth, path Maximum
Transmission Unit (MTU), plus other factors such as traffic load, and path reliability.
EIGRP’s composite routing metric is designed to be flexible in such a way that these
route attributes (some of which are factors that reflect traffic on a given route) can be
selected as needed for a given EIGRP routing domain. Whereas RIPv1/2 uses the
Bellman–Ford algorithm to find the least cost path to network destinations, EIGRP
uses the Diffusing Update Algorithm (DUAL). Both RIPv1/2 and EIGRP support
routing loop prevention mechanisms such as count-to-infinity, split horizon, and poi-
son reverse. It may be argued if EIGRP is truly a distance-vector routing protocol, but
this book stays away from that debate.
Chapter 1 describes the various methods used by routers to learn routing informa-
tion. In this chapter, we introduce the main concepts of static routing and dynamic
routing including their benefits and limitations. We discuss the different sources of
routing information, the classification of the different dynamic routing protocols, and
the routing metrics or costs the routing protocols use to determine the best paths to
network destinations.
Chapter 2 describes the different categories of dynamic routing protocols in addi-
tion to their main distinguishing features (distance-vector routing protocol, link-state
xviiiPreface
routing protocols, and path-vector routing protocols). RIPv2 and EIGRP are classi-
fied as distance-vector routing protocols, while OSPFv2 and IS-IS fall under the
category of link-state routing protocols. BGPv4 is so far the only path-vector routing
protocol in use today. The discussion includes the characteristics of the different
dynamic routing protocols, and how they differ in design and operation. Understanding
the different routing methods available (whether static or dynamic), is important and
key to making informed decisions about which method to use for routing in a net-
work. This allows a network engineer to determine which routing method is most
suitable for a particular network environment.
A routing device, in general, maintains two key databases, the IP Routing Table
and IP Forwarding Table, which hold the routing information required for forwarding
packets in a network. Chapter 3 discusses these two key databases, their distinguish-
ing features, and how they are used for packet forwarding. The chapter describes the
difference between the routing and forwarding planes in an IP router. The chapter
also explains the processing steps involved in forwarding IP packets through an IP
router to their destinations.
Chapter 4 contrasts static routing and the widely implemented dynamic routing
methods. The discussion covers, in addition, the different methods used for configur-
ing static routes in Routing Tables. This chapter includes a description of different
types of static routes such as default static routes, summary static routes, and floating
(or backup) static routes. Many of today’s networks of all sizes, use a combination of
static and dynamic routing. Static routing is very appealing and widely used mainly
because it does not require the same amount of processing, memory and routing
information messaging overhead as in dynamic routing protocols. The advantages
and disadvantages of static routing are also discussed.
Chapters 5 and 6 provide detailed descriptions of the most common distance-
vector routing protocols RIPv2 and EIGRP, respectively. The discussion covers their
most identifying characteristics, operations, and the databases they maintain. Each
routing protocol maintains a number of databases which hold information about the
local router’s neighbor routers, and the routing information it has learned from other
routers in the network. Each database type is used for specific operations as defined
by the particular routing protocol. For each routing protocol, we discuss the main
components, data structures, routing protocol messages, and best path computation
algorithm. Each chapter also covers a high-level router architecture, processes, and
databases for the particular routing protocol being discussed.
Chapter 5 begins with a review of distance-vector routing protocols and a discus-
sion on the main features of RIPv2. The chapter then describes the packet formats
used by RIPv2, RIPv2 authentication mechanisms, and RIPv2 router high-level
architecture, processes, and databases. The discussion includes a high-level view of
the RIPv2 router and components, plus and overview of its inbound and outbound
message processing.
Chapter 6 starts by providing an overview of the main features of EIGRP. The
chapter then provides a detail description of the different databases used by EIGRP.
The chapter includes a detail discussion on EIGRP packets, protocol message pro-
cessing, EIGRP routing information generation and maintenance, and EIGRP
Preface xix
xxi
1 Introduction to IP
Routing Protocols
1.1 WHY WE NEED ROUTING PROTOCOLS
Each router in a network needs to be provisioned with the relevant routing informa-
tion to enable it correctly forward packets from their sources to their respective net-
work destinations. The information used in packet forwarding is maintained in a
Routing Table and can be configured manually or automatically (and dynamically)
through various means. To enable Layer 3 (or IP) forwarding of packets across inter-
networks, routers share the routing information they have learned with other routers
usually via dynamic routing protocols. A routing protocol is a set of procedures that
govern how a router communicates with other routers in order to share routing infor-
mation about the state and reachability of network destinations.
Dynamic routing protocols not only allow routers to determine single or multiple
paths to network destinations, but also the best paths to those destinations which in
turn can be installed in the Routing Tables. The routing protocols also support update
functions that allow the router to determine the next-best path if an existing best path
to a destination fails or becomes unavailable. Dynamic routing protocols support vari-
ous mechanism that allow them to determine network topology changes, and to com-
pensate for such changes with the goal of keeping the network operational and network
destinations reachable, as much as possible. This capability in particular makes the use
of dynamic routing protocols more important and advantageous over static routing.
This chapter describes the various methods (manual and dynamic) used by routers
to discover routing information. We introduce the main concepts of dynamic routing
protocols and their benefits. We discuss the classification of the different dynamic
routing protocols in use today, and the routing metrics (or costs) each protocol uses
to determine the best paths to network destinations.
1.2 ROUTING METHODS
The primary responsibility of the routing function (in a switch/router or router) is to for-
ward Layer 3 packets (IP packets) from one network, subnetwork, or Virtual Local Area
Network (VLAN), to another network, subnetwork, or VLAN. Routers must therefore be
configured with routing information to enable communication between different networks.
This section discusses the mechanisms used to configure routing information in routers.
All hosts within a network that want to communicate with other hosts in other
networks (subnetwork or VLAN) must have access to a router. Furthermore, wherever
a router has an interface that connects to a network, that interface must have an IP
address assigned to it. This assigned interface IP address serves as the address that
indicates to other routers (via routing protocols), reachability information about the
networks the router is connected to.
1
2 IP Routing Protocols
Also, when a router receives routing information from another router, the source
IP address allows the receiving router to know the router (interface) that sent the
routing update. The router interface must support the relevant Physical and Data Link
Layer protocols that allows it to connect to the network. These Physical and Data
Link Layer protocols also allow the router to be aware of the “up” or “down” state of
the attached link and network.
A number of mechanisms exist for a router to construct and maintain its Routing
Table. These routing information discovery mechanisms include the use of directly
connected interfaces, static routing, default routing, and dynamic routing. All of
these serve as information sources that provide a router with the network information
necessary to build and maintain its Route Table. The different routing methods and
mechanisms are described in this section.
Router
10.1.0.0/24 R1
Ge0/0
Ge0/1
192.168.0.0/24
• Networks that are directly connected to router R1’s interfaces are added to its Routing Table.
• The two active interfaces, Ge0/0 and Ge0/1 have been configured with IP addresses and are currently in the up-up state,
so router R1 adds these networks to its Routing Table.
• Router Ri will be able to route all packets destined to all hosts in the networks that are directly connected to its active
interfaces.
interface, in addition to the interface type and number, into the Routing Table as a
directly connected network.
When a router forwards a packet, for example, to a video, email, or web server
that is directly connected to one of its local interfaces, that host is considered to be
on the same network as the router’s connecting interface. A directly connected net-
work is inherently identified through the router’s configured local interface to which
the network is attached. Such networks are immediately recognizable by the router,
and packets are forwarded direct to these networks without requiring any assistance
from dynamic routing protocols.
Directly connected interfaces or networks have an Administrative Distance value
of 0 (the lowest value), and always take precedence over static routes or routes dis-
covered through dynamic routing protocols (see discussion in Chapter 2). When sev-
eral routes to the same destination (discovered by different routing methods) exist,
the Administrative Distance (also called the Route Preference) is the criterion that a
router uses to select which route among those routes to install in its Routing Table.
Since directly connected networks have the lowest possible (default) Administrative
Distance value of 0, they are always installed in the Routing Table.
A directly connected route is always the best paths to a destination because the
router will always clearly recognize when a packet is destined to such a destination.
The router does not have to rely on some other routing methods such as via static
configuration or dynamic routing protocols, to learn such a route. However, when
packets are destined to other (remote) networks not directly attached to the router’s
interfaces, then other routing methods are needed.
1.2.2 Static Routing
The mechanism used for configuring routing information in a router can be either
static or dynamic. A static mechanism requires manual configuration by the user and
the routing information does not change until the user changes it. A dynamic mecha-
nism on the other hand, involves using routing protocols that facilitate dynamic
exchange of routing information between routers. This allows all routers in a network
to learn and adapt to changes in the network topology and state. Network changes
may occur for a number of reasons, including failure of a router, introduction of a
new link, failure of a link, and change of link parameters. The dynamic routing pro-
tocols allow information in the Routing Tables of all routers to be updated when there
is a network topology change.
Static routes are paths to network destinations that have to be manually entered
into the router’s Routing Table by a network administrator (see Figure 1.2). The
information associated with a static route is the IP address of the next-hop router, and
the local outgoing interface on the router. The local router uses this information when
forwarding packets to a particular destination that is reachable over the static route.
Because a static route is a fixed entry in the Routing Table to a destination, it does not
change or adapt to dynamically changing conditions in the network. If the router
itself or the interface associated with the static route becomes unavailable or fails, the
static route defined to that destination also fails. The old static route entry has to be
manually reconfigured if a new static route is required.
4 IP Routing Protocols
Router Router
R1 R2
192.168.0.0/24 10.1.0.0/24
Static Route
• We assume router R1 is directly connected to router R2, which in turn is is directly connected to the network 10.1.0.0/24.
• Since network 10.1.0.0/24 is not directly connected to router R1, we can manually configure a static route on router R1
to route packets through R2 to network 10.1.0.0/24.
1.2.3 Default Routing
Default routes can be configured to provide an IP host a means to communicate out
of its local network to hosts on other networks. A default route can also provide a
router with a route of last resort to forward a packet if no other route specifically
matching its destination exists in the router’s Forwarding Table.
IP Address: 192.168.110.2
Mask: 255.255.255.0
Gateway: 192.168.110.1
Interface
192.168.110.1/24
IP Address: 192.168.110.3
Mask: 255.255.255.0 Internet
Gateway: 192.168.110.1
VLAN Residential ISP’s Router
Gateway 172.26.140.1
(Default Gateway)
Interface
172.26.140.2
IP Address: 192.168.110.4
Mask: 255.255.255.0
Gateway: 192.168.110.1
• The default gateway provides a default route or path packets will use when there is no explicit route from a host in
the VLAN to external destinations.
• Without the default gateway, each host in the VLAN would have to use a Routing Table containing explicit routes to
destinations on the Internet, a solution that is not workable.
A router may use a default route as a last resort when all other routes (directly
connected, static, or dynamic) in the Forwarding Table have not produced a match
for a destination address (see Figure 1.4). If a directly connected, static, or dynamic
route exists for the packet’s destination, the router forwards the packet out the appro-
priate outgoing interfaces to the next-hop router.
If the packet’s destination (i.e., next-hop router and outbound interface) is
unknown, that is, no routing method has produced a learned route, the router has no
other choice but to use a default route if one is configured. Typically, a network
administrator would implement default routes on point-to-point link (i.e., a link inter-
connecting two routers) for example, between a company’s network to the outside
world.
Generally, configuring a default route on a router is not necessary because the
router should already have the capability to learn routes and forward packets by con-
sulting its Forwarding Table for known network destinations. However, if the router
has no learned route to a destination, it may use the default route (the route of last
resort).
Router
R3
10.3.0.0
30.1.0.0
10.4.0.0
Router
R5 Internet
10.5.0.0
The various dynamic routing protocols are discussed in more detail in Chapter 2.
To summarize, the various routing protocols discussed are responsible for the
following:
Each routing protocol supports, at a minimum, built-in mechanisms for best path
determination, assigning costs or metrics to network routes, routing loop prevention,
facilitating faster network convergence, and load balancing across multiple paths.
Each protocol supports its own mechanisms for ensuring that other routers will
receive routing update information while at the same time preventing such routing
updates from looping, that is, circulating endlessly in the network.
As networks evolved to handle more network nodes and users, and consequently
became larger and more complex, newer routing protocols have been developed over
time. RIPv2 was developed as an improvement to RIPv1, and includes improved
addressing and security features that allow it to work better in today’s network
environments. However, RIPv2 still does not scale well for implementation in larger
networks. So, advanced routing protocols such as EIGRP (designed by Cisco), OSPF,
and IS-IS were developed with the goal of addressing the needs of larger and more
complex networks.
Furthermore, because of the need to interconnect and provide routing between
different large and complex internetworks, BGPv4 (Border Gateway Protocol) was
developed. With the advent of IPv6, newer versions of the routing protocols were
also developed for IPv6, such as IPv6 RIPng, EIGRP for IPv6, OSPFv3, IS-IS for
IPv6, and Multiprotocol BGP (MBGP).
Newer routing protocols such RIPv2, EIGRP, OSPFv2, and IS-IS are all classless
routing protocols and include the network mask in their routing updates. Classless
routing or Classless Inter-Domain Routing (CIDR) [RFC1517] [RFC1518]
[RFC1519] [RFC4632] allows the use of Variable Length Subnet Masks (VLSM)
[RFC1878] and provides better and efficient route summarization.
In spite of the availability of different routing protocols with different capabilities,
selecting the right protocol for a network is still a complex task. Determining which
routing protocol (whether IGP or EGP) is suitable for a particular network is often
influenced by a number of factors. At least, the following factors have to be considered
when selecting a routing protocol for a network: The size and complexity of the
network; support for VLSMs; the expected traffic levels in the network; the expected
8 IP Routing Protocols
1.2.4.1 Routing Updates
Routers (via their routing protocols) exchange routing updates that allow them to
learn about networks and routes to network destinations. Routing updates carry net-
work state and reachability information, and routers rely on these to construct and
maintain their Routing Tables. A router running routing protocols such as RIPv1
transmit routing updates in the form of broadcast messages to all other routers on the
same network, while those running protocols such as RIPv2 [RFC2453] and OSPF
[RFC2328] transmit updates as multicast messages addressed to routers belonging
to a multicast group on the network.
Sending routing updates as multicast messages reduces the network traffic, and also
helps in reducing the processing overhead in routers which are not target of a routing
update message type (an OSPF router that is not a Designated Router for a broadcast
network segment will not have to worry about listening to the IPv4 address 224.0.0.6).
Only the routers that are a target of a routing update type would join the multicast
group to which the routing update is addressed.
information about their directly connected routes. Thereafter, the router would send
routing updates (depending on the routing protocol type it is running), either driven
by periodic timers (i.e., periodic updates), or when a recognizable network event
takes place (i.e., triggered updates).
When a router receives periodic routing updates from a neighbor, it compares the
routes received to the routes it has already installed in its Routing Table. If the
Routing Table already contains a better route (e.g., one with a lower Administrative
Distance), the router does not enter the new route into the Routing Table. New and
better routes learned from neighbors are always installed in the Routing Table. When
the router sends its next routing update, it will advertise the better routes in its
Routing Table plus the new routes it has just learned from its neighbors.
In the case where updates are event driven (triggered updates), the router does not
send periodic routing updates, but instead would send an update, for example, only
when a change in the network occurs – this event causes or triggers an update to be
sent. EIGRP does not send periodic updates like RIPv1 and RIPv2, but does so only
when there is a change in the network topology. RIPv2 was designed to support
triggered updates unlike RIPv1 which supports only periodic updates. Routing
protocols that transmit periodic routing updates to their neighbors (solely driven by
periodic timers), do so even when no change in network topology or state has occurs,
creating network bandwidth wastage.
Generally, the speed of convergence is directly proportional to the size of the net-
work. The speed of convergence is influenced by how fast the routers propagate
information about a change in the network state or topology to their neighbors, and
how fast the routers calculate best routes using the new routing information they have
received. A network is generally not completely stable and correctly operational,
until convergence is achieved, making routing protocols with shorter convergence
times preferable.
RIPv2 has very slow convergence even in a network with a small number of
routers; the network can take a couple of minutes to converge. Thus, in the event a
new route is being advertised, routers can use triggered updates to speed up the
convergence of RIPv2. However, if a router wants to flush a route that previously
existed in its Routing Table, this process can take a long time due to the time delay
imposed by the Holddown timers used by RIPv2 (see discussion in Chapter 2).
EIGRP and OSPF are faster-converging routing protocols, and a network consisting
of a small of OSPF routers can converge in the order of just seconds.
1.3 AUTONOMOUS SYSTEM
Within the Internet, an Autonomous System (AS) is a group of interconnected rout-
ers and network address prefixes owned or under the control of one or more network
operators (e.g., organizations) but are managed by a single administrative entity
(e.g., Internet service provider [ISP]). Furthermore, this interconnection of routers
and network prefixes share a common routing policy or plan, and are presented by
the administrative entity to the Internet under this common, clearly defined routing
policy. The entire Autonomous System is viewed by the outside world as a single
entity.
A routing policy here refers to how routing decisions are made within the admin-
istrative entity/domain. Using its routing policy, the Autonomous System presents a
consistent and coherent view of the network destinations that can be reached through
it to other Autonomous Systems. A routing or network prefix represents, here, a
group of IP addresses that can be reached through the network of the administrative
entity, for example, the ISP’s network.
A route is defined with respect to a specific next hop to which packets can be sent
on their way toward their destinations (as defined by a destination network address
prefix). A route is the basic unit of information about a specific network destination
discovered by the routing protocols, and is a candidate for the Routing Table of a
router. In general, a route is expressed as the n-tuple <IP address prefix, Next Hop
[…other routing or non-routing protocol attributes…]> [RFC4098].
ASN 200
ASN 500
Internet
RIP
EIGRP
OSPF
IS-IS
Autonomous System
destination outside the Autonomous System is done over this single connec-
tion. A stub may have peering or private connections to other Autonomous
Systems that are not visible on the public Internet but the stub will appear to
have only a single connection to the public Internet.
• Transit Autonomous System: This type of Autonomous System connects one
Autonomous System to another and allows communication between them to
pass through it. An ISP is an example of a transit Autonomous Systems if it
offers other Autonomous Systems access to other Autonomous Systems in the
Internet.
• Multihomed Autonomous System: This type of Autonomous System main-
tains connections to two or more Autonomous Systems, but it does not allow
traffic from one Autonomous System to pass through on its way to another
Autonomous System. This allows the (multihomed) Autonomous System to
maintain connectivity to the Internet even if one connection fails. Traffic
received over one of these connections will not be forwarded out of the
Autonomous System to another. This type of Autonomous System does not
provide a transit service to other Autonomous Systems. A multihomed
Autonomous System is similar to a stub Autonomous System, except that the
ingress and egress paths for traffic traveling to or from the Autonomous System
can be selected from one of these (multiple) connections, depending on which
connection offers the best route to the ultimate destination. Many large corpo-
rate networks are normally designed as multihomed Autonomous Systems.
1.4.1 Hop Count
A hop count is a metric used to measure the distance from a particular router to a
network destination and is based on the number of (intermediate) routers a packet
would traverse to get to that destination. Each router a packet crosses counts as a
single hop. A routing protocol that uses hop count as its primary metric views the
16 IP Routing Protocols
Router
R2
Router
R1
10.1.0.0/24
Router Router
R3 R4
• When a router discovers two different routes to the same network using the same routing protocol, it has to
decide the best route among the two to be installed in its routing table. RIP, for example, uses hop counts
as its metric.
• In this figure, router R1 has two paths to reach the network 10.1.0.0/24. The path through router R2, has the
lowest hop count and will be the one installed in the routing table of router R1.
preferred or best path to a network destination (among multiple paths) to be the path
with the smallest hop count. The underlying assumption when a single hop count
metric is used, is that, the path with the least number of hops to a network destination
is the best path. A network that is directly connected to a router interface is assigned
a hop count of zero.
RIP uses a routing metric of hop count to determine the best route to a network
destination when multiple routes are available. Each router in a RIP network uses the
total number of hops on each route between itself and a given network destination as
the routing metric when determining the best route to install in its IP Routing Table.
The route having the fewest number of hops to the destination is considered the best
route: the lowest-cost route.
by RIP; a network with a hop count of 16 is considered unreachable. The router that
discards the routing message would generate an ICMP message to be sent back to the
source router indicating that the network destination is unreachable.
1.4.2 Bandwidth
A routing protocol can use the bandwidth or capacity of an interface or link (mea-
sured in bits per second) as a routing metric. In this case, links that support higher
bandwidth (Gigabit Ethernet) are preferred over lower bandwidth links (100 Mb/s
Ethernet). To determine the best paths, the routing protocols considers the bandwidth
of each link along the path up to the network destination. The best path is then taken
as the path with the overall higher bandwidth to that destination.
Unlike using the hop count metric, a path with a higher number of hops may have
a higher overall bandwidth while a path with fewer hops may have lower overall
capacity. In this case, the path hop count is irrelevant in the best path decision-making
process. A routing protocol using solely bandwidth as a metric would choose a
higher-bandwidth path over a lower-bandwidth path regardless of the path state (e.g.,
delay, traffic load, reliability, etc.).
Bandwidth by itself may not be a suitable routing metric because it does not
incorporate other useful information about the path, such as when it is heavily loaded
with traffic and when it is lightly loaded. This is because a higher-bandwidth path
when chosen as the best path, could be heavily loaded and have a higher end-to-end
delay.
18 IP Routing Protocols
1.4.3 Delay
The delay over a path is a measure of the time (in microseconds) it takes a unit of data
(a packet) to traverse that path. A routing protocol that uses path delay as a routing
metric would choose the path with the smallest end-to-end delay (among multiple
paths to the same network destination) as the best path. Path delay may include the
node processing delay, transmission delay (i.e., the time it takes to place data on the
transmission medium), queuing delay, and propagation delay (which is the travel
time over the transmission medium). Most often, the delay along the path is domi-
nated by factors such as router processing latency and queuing delay.
A router may implement mechanisms for delay measurements, or the path delay
may be not measured at all, but instead it may be static quantity defined for the path.
The delay may be an estimate based on the type of links that make up the end-to-end
path starting from the originating interface on the router. The performance of the best
path selection process of the routing protocol depends very much on how accurate
the path delay quantities are.
1.4.4 Traffic Load
This routing metric is a measure of the amount of traffic utilizing the links that make
up a path to a network destination. In this case, the routing protocol that uses this
metric would choose the path with the lowest load (among multiple paths to the same
network destination) as the best path. The load metric can be a measure of the amount
of traffic occupying the slowest link on the path over a measurement time period, and
expressed as a percentage of the link’s total bandwidth.
Unlike the hop count and bandwidth metrics, the traffic load on a path is dynamic
and changes from time to time. Therefore, the traffic load metric also changes, a
factor the routing protocol must take into account when determining best paths. This
means the routing protocol must handle frequent metric changes careful to avoid
route flapping. Route flapping occurs when a router alternates the advertisement of a
destination network from one route to another and then back to the first route in quick
(alternating) sequences.
The load metric used by a routing protocol may be manually configured as a static
value by a network administrator for a path, or it may be dynamically measured,
allowing the routing protocol to adapt to traffic changes in the network. Additionally,
a routing protocol may measure the traffic load to recognize when a path to a
destination is becoming heavily loaded or congested, and use an alternate path to that
destination, if available.
1.4.5 Reliability
The reliability metric reflects the degree to which a particular path to a network des-
tination can be dependent on to be operational and useable. The reliability metric
assigned to a path can be either fixed or variable and changes depending on other
factor network factors. A fixed reliability routing metric is generally based on a
defined value (as determined by the network administrator) assigned to a path that
Introduction to IP Routing Protocols 19
reflects the quality of the links that make up that path. The routing protocol will
choose the path (among multiple paths to the same network destination) with highest
reliability as the best path.
A variable reliability routing metric for a path can be based on the number of
times a link (on the path) has failed, or the number of transmission and data errors it
has experienced within a specified time period. Routers running a routing protocol
that uses a reliability metric may observe its attached interfaces and links to record
relevant error statistics and problems, such as interface errors, lost packets, link
failures, etc.
The router would then consider links experiencing more problems to be less reli-
able than those experiencing less – the higher the reliability of the constituent path
links, the better the path for routing. The routing protocol may rank the paths that
contain links with more problems as less desirable paths. If the reliability metric is a
measured quantity, then given that network conditions are continuously changing,
the path reliability metric will change accordingly.
1.4.6 Cost
Cost is a generic term that holds the same meaning as metric. It is almost pointless to
debate the differences since both terms are measures that a routing protocol uses
to decide which path (among multiple paths to a given destination) is the best one to
forward packets on. In general, cost represents the overhead required for a router
to forward packets across a certain interface/link or path.
to compute and select the best route for installation in the Routing Table. Given that
a packet will take less time in crossing a lower bandwidth 10 Mb/s link than crossing
a higher bandwidth 100 Mb/s link, OSPF uses this understanding to calculate the cost
for each path. The cost is taken as inversely proportional to the link bandwidth,
meaning a lower bandwidth interface/link has a higher cost while higher bandwidth
one has a lower cost. OSPF defines the following expression for calculating the cost:
For example, a 10 Mb/s link has a cost of 10 while a 100 Mb/s link has a cost of 1.
Some key points to note about the cost computation are that the cost is a positive
integer value meaning any resulting decimal value computed is rounded to the near-
est positive integer. Also, any value that is below 1 is always rounded up or consid-
ered as 1. The reference bandwidth can be changed to handle higher speed links.
ASN 200
ASN 100 EIGRP
RIP BGP
ASN 300
EGP EGP
IGP IGP BGP
IGP BGP
EGP OSPF
IGP
RIP EGP EGP
RIP
IGP BGP
IGP
RIP OSPF
ASN 400
Route Configuration
Directly Connected
Static Routes
Networks
Dynamic Routing
Protocol
RIP OSPF
BGP BGP
RIP OSPF
IGPs, for example, OSPF and RIP, is considered a member of two separate IGP rout-
ing domains in the Autonomous System. Such multirouting protocol routers are
called border routers because they are located on the border between the two separate
IGP routing domains.
BGP is an Exterior (or External) Gateway Protocols (EGP) which is used for
exchanging routing information between Autonomous Systems (Figure 1.10). In this
case, BGP is referred to as an external BGP (eBGP). EGPs, such as BGP, are typically
deployed to serve as entry/exit points for communication between different
Autonomous Systems. EGPs connect separate Autonomous Systems together,
providing transit paths between these Autonomous Systems, thereby facilitating the
forwarding of traffic across these internetworks.
Routers that run multiple routing protocols for the purpose of connecting different
Autonomous Systems are also referred to as border routers. Such a border router
typically runs an IGP over the local interfaces attached to its home Autonomous
Systems, and an EGP (BGP) over the external interfaces that connect this Autonomous
System to remote Autonomous Systems.
BGP can also be used for exchanging routing information between two peers
within an Autonomous System, in which case, it is referred to as an internal BGP
(iBGP). This means we can have scenarios where we have one or multiple IGPs, as
well as, iBGP running within a single Autonomous System, and eBGP sessions used
to exchange routing information between the various Autonomous Systems
(Figure 1.10).
1.6 LEAST-COST ROUTING
During routing, a packet is forwarded, hop by hop, from its source to its destination,
with each hop (or router) using its local Forwarding Table to decide how to forward
the packet. Most often, there are several paths a packet can take from the source to
the destination, and each hop or router must independently determine which is the
best route the packet should take.
Introduction to IP Routing Protocols 23
REVIEW QUESTIONS
1. What is the difference between static routing and dynamic routing?
2. Explain briefly the difference between a default route in an IP host and a
default route in an IP Router.
3. What are the main functions of a dynamic routing protocol?
4. What is a routing update?
5. What is the difference between periodic updates and triggered updates?
6. Why do dynamic routing protocols use authentication mechanisms?
7. What is the meaning of convergence in the operation of a routing protocol?
8. What is an Autonomous System in IP routing?
9. What is an Autonomous System Number?
10. What is the difference between Public Autonomous System Numbers (ASNs)
and Private ASNs?
11. What routing metric does RIP use?
12. Why does RIP define a maximum network diameter or hop count?
13. What are the limitations of using hop count as a routing metric?
14. What does sending a hop count of 16 signify in RIP?
15. What routing metric does OSPF use?
16. What is the difference between an Interior Gateway Protocol (IGP) and an
Exterior Gateway Protocol (EGP)?
REFERENCES
[RFC1517]. R. Hinden, Ed., “Applicability Statement for the Implementation of Classless
Inter-Domain Routing (CIDR)”, IETF RFC 1517, September 1993.
[RFC1518]. Y. Rekhter and T. Li, “An Architecture for IP Address Allocation with CIDR”,
IETF RFC 1518, September 1993.
[RFC1519]. V. Fuller, T. Li, J. Yu, and K. Varadhan, “Classless Inter-Domain Routing
(CIDR): An Address Assignment and Aggregation Strategy”, IETF RFC 1519,
September 1993.
[RFC1878]. T. Pummill and B. Manning, “Variable Length Subnet Table For IPv4”, IETF
RFC 1878, December 1995.
[RFC2328]. J. Moy, “OSPF Version 2”, IETF RFC 2328, April 1998.
[RFC2453]. G. Malkin, “RIP Version 2”, IETF RFC 2453, November 1998
[RFC4098]. H. Berkowitz, E. Davies, Ed., S. Hares, P. Krishnaswamy, and M. Lepp,
“Terminology for Benchmarking BGP Device Convergence in the Control
Plane”, IETF RFC 4098, June 2005.
[RFC4632]. V. Fuller, T. Li, “Classless Inter-Domain Routing (CIDR): The Internet Address
Assignment and Aggregation Plan”, IETF RFC 4632, August 2006.
[RFC4822]. R. Atkinson and M. Fanto, “RIPv2 Cryptographic Authentication”, IETF RFC
4822, February 2007.
[RFC7868]. D. Savage, J. Ng, S. Moore, D. Slice, P. Paluch, and R. White, “Cisco’s
Enhanced Interior Gateway Routing Protocol (EIGRP)”, IETF RFC 7868, May
2016.
2 Types of Dynamic
Routing Protocols
2.1 INTRODUCTION
Routers in a network need routing protocols to maintain the Routing Tables they use
to route traffic to network destinations. The Routing Tables must be maintained such
that they always contain the most current network reachability information. How this
is done, depends on the type of routing protocol used (distance-vector, link-state, or
path-vector), and the specific mechanisms supported within the particular routing
protocol (RIP, EIGRP, OSPF, BGP).
In this chapter, we describe the different categories of dynamic routing protocols
in use today, and their main distinguishing features. The discussion includes the dis-
tinguishing characteristics of the different dynamic routing protocols, and how they
differ in design and operation. Understanding the different routing methods available
(whether static or dynamic), is important and key to making informed decisions
about which routing method to use in a particular network. This allows a network
engineer to determine which routing method is most appropriate for a particular net-
work environment.
25
26 IP Routing Protocols
Basically, a router running a distance-vector routing protocol does not know the
entire path to a network destination, but instead knows only the local interface (i.e.,
direction) on which packets to a destination should be forwarded, and the distance
(i.e., how far it is) to that destination. A distance-vector router is only aware of the IP
addresses assigned to its local interfaces and the addresses of the remote networks it
can reach through its neighbor routers. The router does not possess any broader
knowledge of the entire topology of the network it is operating in. Essentially, the
routers running the distance-vector routing protocol are not aware of the entire net-
work topology.
The routing information that a router receives from its neighbor are stored (“as
is”) in a local routing database (i.e., a “route store”) that the distance-vector routing
protocol maintains. The distance-vector routing protocol then uses a distance-vector
algorithm (Bellman–Ford algorithm) to calculate the best (and possibly) loop-free
paths/routes to each destination, if multiple paths exist (Figure 2.1). The best paths
are then installed in the IP Routing Table, and are also advertised as routing informa-
tion to each neighbor router. Thus, once a router determines the best paths to all
known destinations, it advertises its entire IP Routing Table containing these best
paths to each directly connected adjacent router.
The above process shows that each router running a distance-vector routing pro-
tocol learns routes from its neighbors’ perspectives, and then calculates and
Router Router
R1 Routing Information R2
Exchange
Network B = 2 hops away Network Y = 2 hops away
• The routing information is flooded on all RIP - enabled interfaces at regular intervals (every 30 seconds) to create a network map
that is stored in each router's local routing table. We assume Routers R1 and R2 are interconnected on adjacent interfaces.
• Router R1 has known RIP neighbors , Networks A, B, and C, which are 1, 2, and 3 hops away, respectively.
• Router R2 has known RIP neighbors , Networks X, Y, and Z, which are 1, 2, and 3 hops away, respectively.
• Every 30 seconds, each router floods its entire routing table information out all its RIP - enabled interfaces. The flooding allows the
exchange of routing table information across the interconnecting link.
• When Router R1 receives routing information from Router R2, it adds 1 to the hop count to determine the new hop count.
o For example, Network X has a hop count of 1, but when Router R1 imports the route to Network X, the new hop count
becomes 2.
o The imported route also includes information about where the route was learned, so that the original route is installed
as a route to Network X through Router R2 with a hop count of 2.
• When multiple routes to the same network exist, RIP uses the distance - vector (or Bellman-Ford) algorithm to determine which
route to install in the routing table. The route with the smallest hop count is installed. If there are multiple routes with the same hop
count, all are installed in the routing table, and packets are forwarded along these routes in an equal-cost multipath routing
fashion.
advertises the best routes from its own view of how to get to those destinations (the
local router’s own perspective). For example, a router A may send a routing update
to a neighbor stating that “It takes 4 hops to reach Destination Y, in the direction of
next-hop router E”. The distance of 4 hops away is just the distance, router A has
derived from other routing updates received from its neighbors, but routers A has no
way of knowing the complete path to the destination or the individual routers that are
at each hop.
Each router simply advertises routing information to its neighbors consisting only
of the distance information it has gleaned from routing updates, but not from a com-
plete knowledge of the network topology map identifying potential routes to network
destinations. The router just creates a local perspective of getting to the destination
from the routing information that it has received (Figure 2.2).
This behavior prevents a distance-vector routing protocol from having a complete
map of the whole network up to any given destination network. Instead, the Routing
Table maintained by the protocol reflects simply how best a neighbor router knows
how to reach a particular destination network based on how far that neighbor thinks
it is from that destination network. The local router does not know how many hops
(or how many other routers) are on the best path leading to any of those destination
networks. This behavior has prompted distance-vector routing to be sometimes
referred to as “routing by rumor”. Each router learns from its neighbors how best to
reach a particular destination, routing information which the neighbors in turn may
have inferred from their neighbors, and so on.
Distance-vector routing protocols generally have slow convergence and poor scal-
ability, and are generally suitable for only small networks. Protocols such as RIPv1
and RIPv2 also have limitations because neighbors exchange routing updates as if
they only have unidirectional connectivity as illustrated in Figure 2.3. The advantage
of distance-vector routing protocols, however, is that they are less CPU/computation-
ally intensive, require less memory (which can run easily run out in low-end routing
platforms), and have simpler implementation and maintenance.
Router
R2
Router
R1
10.1.0.0/24
Router
R3
• We assume Router R1 is directly connected to Network 10.1.0.0/24. Router R1 sends routing updates to Routers
R2 and R3.
• The routing updates contain the network IP address, network mask and metric for this route.
• Router R2 and R3 receive this routing update and add the route to their respective routing tables. Both routers list the
metric of 1 because Network 10.1.0.0/24 is only one hop away.
Note that the maximum hop count for a RIP route is 15 and any route with a higher hop count is considered to be
unreachable.
Router
R1
Router Router
R5 R2
Router Router
R3 R4
• Distance vector routing protocols such as RIP networks are limited by their unidirectional connectivity. RIP cannot ensure
bidirectional connectivity because it processes routing information based solely on the receipt of routing table updates. On
the other hand, link state routing protocols such as OSPF establish bidirectional connectivity with a three - way handshake.
• Let us assume Routers R1 and R4 flood their routing table information to Router R2 describing routes to Router R5. Let us
assume also that Router R2 has data destined to a network connected to Router R5.
• Because the path from Router R2 to Router R5 through Router R1 has the smallest number of hops, Router R2 installs
that route in its Forwarding Table.
• Now, let us assume Router R1 is able to transmit traffic to but not receive traffic from Router R2 because of an unavailable
linkor invalid routing policy.
• Given that Router R2’s forwarding table has listed the only route to Router R5 to be the one through Router R1, any traffic
destined for Router R1 will be lost, because bidirectional connectivity was never established.
RIP:
• Uses hop count as routing metric.
• If the hop count is greater than 15, RIP considers the network to be
unreachable.
• Routing updates are broadcast (RIPv1) or multicast (RIPv2) every 30 seconds
(default setting).
• RIPv2 sends triggered updates as soon as a change in the reachability of a net-
work is detected, instead of waiting for the Update timer interval to expire.
RIPv2 immediately sends an update about this change to neighbor routers.
• RIPv2 supports CIDR [RFC1517] [RFC1518] [RFC1519] [RFC4632] and
includes the network mask (VLSM) [RFC1878] in routing updates. RIPv2
supports VLSM while RIPv1 does not.
• RIPv2 supports route summarization which reduces the size of Routing Tables
and allows the routers in a network to handle more routes. This improves effi-
ciency and scalability in large networks.
Types of Dynamic Routing Protocols 29
TABLE 2.1
Characteristics of Distance-Vector Routing Protocols
Characteristic Routing Protocol
Note 1: This interval relates to the rate at which a router running EIGRP transmits Hello messages to
neighbors. The default Hello interval setting is 60 seconds for low-speed, point-to-point links (T1/
E1) and non-broadcast multiple access network (NBMA) networks, and 5 seconds for other types
of networks. Note that in an NBMA network or point-to-point link, messages are transmitted and
travel only directly from one node to another over the communication medium (i.e., a link, virtual
circuit/connection or across a network/medium that emulates point-to-point communication).
Note 2: This refers to routing protocols that are capable of learning and advertising routing information
while accounting for the ToS (“differentiated service [DS]”) of traffic carried over the learned
routes. Such routing protocols are capable of making routing decisions based on specially
defined ToS related bits contained within the IP header of packets. These well-defined bits pat-
terns are typically set by network access devices and by trusted end systems as a way of request-
ing a specific level of service for packet forwarding.
Note 3: Although these protocols generally observe the notion of a maximum network diameter, this is not
used as a metric of distance value in best path computation and selection. EIGRP has no specific
limit on maximum network diameter which directly relates to how many neighbors the particular
implementation/instantiation of the protocol (Internet Operating System [IOS]) can support.
Generally, the true maximum network diameter is these cases are determined by a number of fac-
tors such as the particular platform running the protocol processor, memory devoted to the proto-
col, number of routers neighbors that are stub, number of routes are advertised to neighbors and
received from these neighbors. EIGRP being a significant enhancement over IGRP, can work with
a large number of neighbors. In Cisco IOS, the metric maximum-hops command, with com-
mand syntax, metric maximum-hops hops-number, where hops-number specifies a maxi-
mum hop count in decimal, can be used to configure EIGRP to advertise a route as unreachable
when the hop count is greater than the value assigned to the hops-number argument. The maximum
number of hops (hops-number) that can be specified is 255 and the default value is 100. Setting a
maximum hop count provides a safety mechanism in EIGRP that can be used to prevent any poten-
tial count-to-infinity problems in a network (similar to the maximum hop count used in RIPv1/v2.
30 IP Routing Protocols
• RIPv1 and RIPv2 supports load balancing over up to 6 equal cost paths (default
is 4 equal cost paths).
• RIPv2 supports authentication and key management mechanisms to secure
routing updates [RFC4822].
EIGRP:
network topology. Each router sends out routing updates periodically where all of the
router’s Routing Table is transmitted to all neighbor routers. Each router broadcasts
(in RIPv1) or multicasts (in RIPv2) its entire Routing Table to every neighbor at
every routing update period. Even if the network topology has not changed, a RIP
router still continues to send periodic updates to all neighbors.
RIP routers receiving these periodic routing updates, must process the entire
update to discover any relevant routing information and then discard the rest. The
information transmitted with the complete Routing Table, includes the IP addresses
of the destination networks, the hop count for each destination network (i.e., the
distance to all known networks), and possibly other information related to routing
update authentication (in RIPv2).
Once a router receives its routing information updates from neighbors, it modifies
its own Routing Table to reflect the changes transmitted to it, and then advertises
these changes to its own neighbor routers. Each router updates its Routing Table, and
sends this to its neighbors causing distance information (e.g., hop counts) to propa-
gate across the routing domain. With this process, eventually each router obtains
distance information about all reachable network destinations in the routing domain.
Each router relies solely on the routing information provided to it by other routers
and does not assess or map out the network topology by itself. As described above,
this process is referred to as “routing by rumor” because each router relies on the
routing information it receives from other routers but the receiver cannot reliably
determine if the routing information is actually valid and true.
• The CPU in a router’s control plane could be stressed due to looping of routing
updates in the network.
• A router could be preoccupied with forwarding routing updates that could fur-
ther negatively impact the convergence of the network.
• The router’s data plane itself could be stressed with forwarding useless packets
that will never get to their intended destinations.
• Precious network bandwidth could be used for forwarding traffic that end up
looping endlessly between routers in the network.
• Routing updates may eventually be discarded (because of lifetime limits), get
lost, or not reach their intended targets to be processed in a timely manner.
Such conditions could end up introducing additional routing loops, thereby,
creating more problems in the network, even additional routing loops.
• Routing updates and end user data may end up lost in “black holes” (see dis-
cussion below).
Networks that use distance-vector routing protocols are relatively more prone to
routing loops and have slow convergence. A router running RIP broadcasts or multi-
casts routing updates every 30 seconds (which is the default setting of the periodic
timer). This periodic update interval (an elapse time during which a lot can happen)
may be longer than required for a network, thereby causing slow convergence.
During these intervals (or periods between routing updates), the routers in the routing
domain may not learn about network topology changes in a timely manner. The rout-
ers in the routing domain may be using routing information that is incorrect or
outdated.
Slow convergence can lead to routing loops being created in the network, causing
packets to circulate endlessly amongst a series of routers if not detected early – a situ-
ation that causes the routers to start a “count-to-infinity” (as discussed below). As
already discussed above, routing loops can be created in the network when outdated
or bad routing information exists in the Routing Table.
Thus, the problem of slow convergence and routing loops stems mainly from the
reliance of routers in the routing domain on periodic routing updates (over longer
timer periods) to learn and propagate routing information. Recognizing this problem,
a number of mechanisms have been proposed that distance-vector routing protocols
can take advantage of to avoid or minimize the impact of routing loops in the net-
work. These mechanisms have been developed to enhance the stability and accuracy
of distance-vector routing protocols.
Types of Dynamic Routing Protocols 33
Typically, RIP and EIGRP use the following techniques (or some combinations)
to minimize the communications of incorrect routing information between routers,
and to avoid routing loops; count-to-infinity, split horizon, poison reverse, and the
use of Holddown timers. Split horizon and poison reverse also help reduce the
amount of routing protocol traffic sent by distance-vector routing protocols, as well
as allow more efficient transmission of routing information in a network. The actual
implementations and settings of these routing enhancement mechanisms are very
much vendor-dependent.
processing of routing updates in the routers in the network creates a situation where
the different update timers become synchronized. Routers may maintain asynchro-
nous updates using one of the following two methods [CCIEDOYDEH]:
• Each time the router sets a (scheduled) update period, it adds a small random
time, or timing jitter, to that period as an offset.
• Each router implements and runs its update timer independently of the routing
process it is running and, therefore, ensuring that it is not driven and affected
by the routing information processing loads it is carrying.
For example, if the periodic route update interval is set to 30 seconds, a router can
add a small random timing jitter to the update timer value each time the timer is reset.
When all routers in the network implement their update timers with this added ran-
dom time, network congestion that can occur if all routers send routing updates to
their neighbors simultaneously, can be prevented.
The Cisco IOS uses a specific variable called RIP_JITTER (in its implementation
of RIP) to prevent the synchronization of scheduled (periodic) updates between rout-
ers in a network running RIP. A router subtracts a variable amount of time from the
specified periodic routing update interval, and the resulting interval is used to sched-
ule the next routing update. This random length of time or jitter ranges from 0% to
15% of the specified/configured periodic update interval. Using this jitter range and
a default 30-second periodic update interval, the actual update interval takes random
values in the range from 25 to 30 seconds.
whenever the router is refreshed with information about this network, it also resets
the route invalid timer for that network or route. With this, if any router leading to this
particular network goes down, the router will no longer receive updates about the
network, and the timer will expire. The router will then flag this network/route (via
the failed router) as unreachable and will pass this information to other routers in its
next routing update.
Typical settings for the route invalid timer range from three to six times the peri-
odic update interval, also called the route update period (i.e., 90–180 seconds), but
the default is usually 180 seconds. A setting longer than the route update period is
based on the reasoning that a router should not just invalidate a route when one or
two updates have been missed, because this could have been the result of some lost
or corrupted routing update messages, or due to a long network delay. At the same
time, setting the route invalid timer value too large can cause network reconvergence
to be excessively long and slow.
Other than the Holddown timer (discussed below) and several timers specific to
EIGRP (which are different), distance-vector routing protocols used the following
basic timers (Figure 2.4).
Holddown
Flush
Invalid
Update
default setting of the route invalid timer is 180 seconds for RIP. The setting of the
route invalid timer should be at least three times the route update timer value.
When the timer expires for a route, the router places the route in a Holddown state
(see discussion below), where it is tagged as inaccessible, and also advertised to
neighbor routers as unreachable. The router will distribute the reachability informa-
tion for this route in routing updates to neighbors (with metric of 16 or greater). The
router will still retain the unreachable route in its Routing Table until the route flush
timer expires (see below).
As discussed below, a router places a route in the Holddown state when it receives
an update that indicates that the route is down or unreachable. The route is simply
marked as inaccessible and advertised as unreachable, however, the router may still
use this route to forward packets. However, when the Holddown timer expires (see
below), routing updates about this route will be accepted, and the route will be
declared as no longer inaccessible.
2.2.4.3 Holddown Timers
Holddown is a timer-based method used by distance-vector routing protocols to pre-
vent routing loops from occurring in a network. When a router receives a regular
(periodic) routing update about a route that is unreachable, it starts a Holddown
timer. The router ignores all other routing updates from other routers for that route
until the Holddown timer expires (RIP has a default setting of 180 seconds). During
that period, the router would accept only updates sent from the router that originally
advertised the unreachable route. If the originating router sends an update advertising
that route as reachable, the Holddown timer is stopped and the routing update is pro-
cessed (see Figure 2.5).
Basically, the route Holddown mechanism prevents a router from learning and
using information from other routers about a route it already knows is unreachable or
has failed. The Holddown timers allows a router to learned that a route is
Types of Dynamic Routing Protocols 37
Router Router
R1 R2
10.1.0.0/24 Ge0/1
Router Router
R1 R2
10.1.0.0/24 Ge0/1
10.1.0.0/24
unreachable, and at the same time, ensure that this route will not be inadvertently
reinstalled in its routing table by a routing update received from another router that
has not yet discovered that this route is unavailable.
The benefit of using a Holddown timer is that it helps to stabilize the propagation
of routing information in the network, and prevents the formation of routing loops
during periods when the network is converging on new routing information. Once a
router marks a route as unreachable, that route is held in Holddown state long enough
for all other routers in the network learn about the unreachable route.
Typically, a router will set the Holddown timer value to be greater than the typical
total convergence time of the network, thereby allowing all routers sufficient time to
learn, consolidate, and propagate accurate routing information through the network.
During the Holddown timer period, the router ignores any new routing updates
advertising routes it already knows to be unreachable or invalid that have similar or
less favorable routing metric value than what it has learned. This prevents the router
from inadvertently reinstalling an unreachable route, but would allow it instead to
accept and reinstall previously declared invalid routes only if it receives a new rout-
ing update with a better metric than what it has learned, or when the Holddown timer
has expired.
Distance-vector routing protocols implement Holddown timers to allow unreach-
able routes to recover, or the routers to switch to the next best routes available to the
same destination. This mechanism is typically useful in the scenario where routes go
down and come back up rapidly (a process called route flapping). A router entering
one of such (flapping) routes in and out of the Routing Table repeatedly, can cause
routing loops in the network, preventing it from converging. Holddown timers also
prevent a router from immediately making changes to a route entered in its Routing
Table that was recently declared failed or unreachable.
38 IP Routing Protocols
The use of Holddown timers involves a number of trade-offs. It reduces the likeli-
hood of entering wrong routing information into the Routing Table, but this can also
lengthen network reconvergence time. If the Holddown time for a route is set too
short, it may not be effective as intended, and if it is set too long, it could prevent
genuine and useful routing information from being received and entered into the
Routing Table. This means Holddown timers must be set carefully to avoid creating
undesirable conditions in the network and eventually defeating the purpose of
Holddown timers.
2.2.4.4 Triggered Updates
A router will immediately send out a triggered update (or flash update) as soon as it
is aware of a network topology change without waiting for its (periodic) route update
timer to expire. This allows network reconvergence to occur faster than it would if all
routers in the network had to wait to send periodic routing updates. This also greatly
reduces complete reliance on mechanisms such as count-to-infinity (see below) and
so on.
Types of Dynamic Routing Protocols 39
A router may still schedule regular (periodic) updates along with triggered updates
since the latter are only event driven. Sending only triggered updates by themselves
cannot guarantee that such updates would reach every other router in the network to
effect appropriate Routing Table updates immediately. Using only Triggered updates
(without additional routing mechanisms) is not often sufficient enough to effectively
handle problems such as the following:
Essentially, the use of triggered updates (on top of the other routing mechanisms)
adds responsiveness to a network that is in the process of reconverging. A router that
detects a network topology change will immediately transmit a triggered update to
neighbor routers. The receiving routers, in turn, will send out triggered updates to
notify their neighbors of the network change. Generally, a router sends triggered
updates when one of the following events occur:
The fact that distance-vector routing protocols learn routes to network destina-
tions “by rumor”, and have slow convergence, can lead to routing loops being created
in the network. RIP has a maximum hop count limit of 15, and Interior Gateway
Routing Protocol (IGRP), which is now obsolete but precedes EIGRP, has a maxi-
mum of 255.
Count-to-infinity happens when routers in a routing domain increment the metric
of a route to “infinity” based on inaccurate routing updates (e.g., due to a routing
loop). Any route with infinity metric is considered to be no longer reachable.
Protocols such as RIP define a maximum metric value (“infinity”) to prevent routers
from endless incrementing the routing metric of a route, as it is propagated and cir-
culates around in a network (see Figure 2.6). For example, RIP defines infinity as a
hop count that is greater than 15 (i.e., 16 hops and more), that is, a route that is
unreachable. Once a router “counts” the hop count of a route to “infinity”, it marks
that route as unreachable.
• The process continues on and on with Routers R1 and R2 continuing to advertise Network 10.1.20.0/24 with higher and higher hop counts until 16,
the infinite metric, is reached. When this happens, the network is considered unreachable and the route will be eventually timed out of the routing
tables. This process is referred to as the count-to-Infinity problem which takes some time to manifest.
• Note that during the count-to-Infinity process, the route from Router R1 to Network 10.1.20.0/24 points to Router R2. Router R2 thinks the opposite
(thinking the route points to R1) which means there is a routing loop between R1 and R2 for the duration of the count-to-Infinity problem.
• Speeding up the network convergence time is one of the reasons the maximum hop count of RIP is set to 15 (and 16 for unreachable).
2.2.4.6 Poison Reverse
Another method used by distance-vector routing protocols for preventing routing
loops is poison reverse, also referred to as route poisoning. With poison reverse or
route poisoning, a router uses any value greater than the maximum hop count to sig-
nal to other routers to stop using a route in order to prevent a routing loop from occur-
ring in the network. When a router loses a route or finds a route to be unavailable, it
can advertise that route by sending a routing update with a hop count value greater
than the maximum hop count (see Figure 2.7).
The router receiving that routing update would learn that destination network to
be unreachable, and would in turn advertise this route to others. The receiving router
will also send the routing update back toward the source router to ensure that the
failed route is now “poisoned” throughout the entire network. The process of also
updating the source router about the failed route is called poison reverse.
The benefits of poison reverse are as follows:
Router Router
R1 R2
10.1.0.0/24 Ge0/1
10.1.0.0/24, Metric = 16
• Router R1 sends a routing update to Router R2 advertising its directly connected network 10.1.0.0/24.
• When interface Ge0/1 on Router R1 fails, Router R1 sends a routing update to Router R2 indicating that
Network 10.1.0.0/24 is unreachable.
• The routing update has a metric of 16 (infinite metric) for the failed route, which is more than the RIP’s maximum
hop count of 15. This indicates to Router R2 that the route to Network 10.1.0.0/24 is definitely unreachable.
• Router R1 sends a routing update with an infinite metric 16, “poisoning the route”. R2 will receive this routing update
and will consider the route as unreachable and remove it from its routing table.
• The poison reverse technique helps to optimize the transmission of routing information and improve the time to reach
network convergence.
Router Router • Router R1 learns through one of its interfaces that routes to
R1 R2 Routers R3, R4, and R5 are unreachable.
• Router R1 readvertises those routes out the same interface
as unreachable.
• This advertisement informs Router R2 that Routers R3, R4,
and R5 are definitely not reachable through Router R1.
o Thus, when any router detects that one of its
directly connected routes has failed, it will
advertise a failed route with an infinite metric 16
(“poisoning the route”). Routers that receive this
routing update will consider the route as
unavailable and will remove it from their routing
tables.
o If Router R1 learns about unreachable routes
Router Router Router through one of its interfaces, it advertises those
R5 R4 R3 routes as unreachable (hop count of 16) out the
same interface.
2.2.4.7 Split Horizon
As discussed above, networks running distance-vector routing protocols generally
have slow convergence and are susceptible to routing loops. Split horizon is one of
the mechanisms that distance-vector routing protocols use to prevents routing
loops from occurring. With split horizon, when a router learns routing information
from a particular interface, it cannot advertise that information back on that interface
(Figure 2.8).
The router should never advertise a route back onto the interface on which that
routing information originated since doing so could create a routing loop. The route
that leads back to the router from which the routing information originates, is referred
to as a reverse route. Split horizon is therefore a method that prevents the creation of
reverse routes between two routers.
Types of Dynamic Routing Protocols 43
Router Router
R1 R2
10.1.0.0/24
10.1.0.0/24 10.1.0.0/24
When a change in the network occurs such as a link failure, the router noticing
that change would send routing updates advertising that change to neighbor routers.
The routers that receive these routing updates would in turn only advertise that
change in one direction, meaning routing updates should be sent out on all other
interfaces except the one from which the change was learned. Doing so prevents rout-
ing information from being transmitted back in the direction from which that infor-
mation was received. With split horizon, the receiving interface on each router for an
update becomes a starting point and the routing information is only propagated on
the other interfaces.
Split horizon also helps to limit the amount routing protocol traffic sent by dis-
tance-vector routing protocols by allowing routers to eliminate routing information
that the router and other neighbor routers on the receiving interface have already
learned. If a router receives a set of routing updates on a particular interface, the
router knows that those updates do not need to be advertised back on the same inter-
face thereby reducing traffic on that interface.
There are two ways of implementing split horizon, which are, simple split hori-
zon, and split horizon with poison reverse:
• Simple Split Horizon: The router should not advertise routes back to the rout-
ers from whom the routes were learned. In this method, when a router sends
routing updates on any one of its interfaces, it must not include routes that were
learned from updates received on that interface.
• Split Horizon with Poison Reverse: In this method, when a router sends rout-
ing updates on any one of its interfaces, the router can also designate some
routes that were learned from routing updates received on that interface as
unreachable by the router performing route poisoning (i.e., by sending a rout-
ing update with a hop count value greater than the maximum hop count). The
router advertises reverse routes but with routing update carrying an unreach-
able or infinity hop count value.
Unlike simple split horizon, split horizon with poison reverse is a modifica-
tion that provides more helpful routing information that is more constructive
for routing loop prevention and faster network convergence. Split horizon with
44 IP Routing Protocols
Router Router
R1 R2
1
10.1.0.0/24
10.1.0.0/24, 3
Metric = 16
10.1.0.0/24,
Metric = 16
2
10.1.0.0/24,
Metric = 2
Router
R3
1. Router R1 sends a routing update with metric of 16 to Router R2 indicating that Network 10.1.0.0/24 is unreachable.
2. Router R3, for some reason, is unaware of the failure of the route to Network 10.1.0.0/24, and sends a routing update
advertising this route possibly plus other routes to Router R2.
3. When Router R2 receives the routing update from Router R2, it will send a routing update with an infinite metric 16 back
to Router R3 to inform it of the failed route to Network 10.1.0.0/24 (“split horizon with route poisoning”). Router R3 will
receive this routing update and become aware that the network is unreachable. It will then remove it from its routing table.
o Using split horizon with poison reverse on this interface only, Router R2 will include in the routing update the
infinite metric of 16 for all unavailable networks learned on this interface.
Essentially, the poison reverse feature allows routers to break the split horizon rule
by allowing routers to send updates advertising (failed/unavailable and already
known) routing information learned from an interface out of the same interface.
However, this can only be done if the router performing poison reverse sends updates
advertising these failed/unavailable routes learned from the receiving interface back
on that interface with a value greater than the maximum hop count, indicating a des-
tination unreachable, or equivalently, “poisoning” the failed/unavailable route.
When both poison reverse and split horizon are implemented in a distance-vector
routing protocol, poison reverse takes precedence. When a router loses a route, or
finds a route to be unavailable, it can override split horizon by sending a routing
update that advertises the failed route with a destination unreachable (or equivalently
an infinity hop count) distance metric value on all the local interfaces including the
one on which the failed route was reported.
runs the Constrained Shortest Path First (CSPF) algorithm over this database to com-
pute the paths that MPLS label-switched paths (LSPs) should take. Resource
Reservation Protocol – Traffic Engineering (RSVP-TE) uses this path information to
set up the LSPs in the network, and also make bandwidth reservations for them.
To allow wider range of metrics to be communicated in the newer IS-IS TLVs, the
range of IS-IS metric values have been increased up to 16,777,215 (i.e., 224 − 1). With
this, the cost metric an IS-IS router can assign to a route is an arbitrary chosen dimen-
sionless integer that can range from 1 to 63 (for narrow metric), or from 1 to
16,777,215 if the router supports the newer wide metrics. By default, most routers
will support the communication of routing updates with wide metrics. But most
often, a router will allow a maximum narrow metric value of 63 and but generates
both narrow and wide metric TLVs.
• Narrow Metric: This is often the default metric set on an interface and the
default value is 10 for that interface. The narrow metric range for an interface
is always set to be value from 1 to 63, and the maximum total value that can be
calculated on all hops to a destination can be no more than 1023.
• Wide Metric: The wide metric type allows an IS-IS router to expand the met-
ric up to a maximum value of 16,777,215 per link/interface over a route with a
total path metric of 4,294,967,295 (= 232 − 1). IS-IS with wide metrics provide
finer path metric granularity, and make it possible to better support applica-
tions such as traffic engineering.
of the entire network. When this process converges, every router will have identical
information and topology map about the entire network, which then allows each
router to independently compute its own set of best routes to network destinations.
Each router in the network independently runs an SPF algorithm (usually a variant
of the Dijkstra’s algorithm) over the complete map of the network (stored in the local
LSDB) to calculate the best shortest loop-free paths to network destinations. The
router then uses the resulting best paths for all the reachable network destinations
from the SPF calculations to populate the local Routing Table.
The requirement of flooding link-state information, and maintaining a consistent,
identical, and synchronized complete map of the network, makes link-state routing
protocols require more memory, and relatively more computationally intensive than
distance-vector routing protocols. The advantage, however, is link-state routing pro-
tocols make better path decisions that are less prone to routing loops.
Furthermore, link-state routing protocols have extended features and capabilities
such as, opaque LSAs for OSPF, and TLVs for IS-IS, that allow the transmission of
arbitrary data that these protocols were not originally designed for. These extended
capabilities allow these link-state routing protocols to add extra information to LSAs
or LSPs. Router can add extra information to OSPF LSAs or IS-IS LSPs to support,
for example, services commonly required by service providers such as MPLS traffic
engineering. Both OSPF and IS-IS support VLSM which allows both protocols to
support CIDR.
The main advantage of link-state routing protocols is that, they have fast conver-
gence and high scalability, making them more suitable for large networks. Their
disadvantages, however, are they are relatively more complex to implement, and have
a high resource usage (CPU processing and memory resources). These drawbacks
stem mainly from the higher CPU cycles and overhead involved in processing rout-
ing updates when network changes occur, and higher memory resources that are
required to store Neighbor Tables, LSDBs (containing the complete topology map),
and Routing Tables. Table 2.2 summarizes the main characteristics of link-state rout-
ing protocols.
TABLE 2.2
Characteristics of Link-State Routing Protocols
Routing Protocol
2.3.3.1 Neighbor Discovery
As a first step, each router has to discover who its neighbors are, and establish a rela-
tionship (i.e., an adjacency) with each one of them. Each router has to determine
Types of Dynamic Routing Protocols 49
Neighbor Table
LSDB
Routing Table
R2
R4 Neighbor Table
LSDB
Routing Table
Shortest-Path
Tree (SPT)
which neighbor routers are connected to the links attached to its interfaces using a
reachability protocol and its messages. The local router also sends outs these special
messages periodically and separately to each of its directly connected neighbors.
The router sends these messages periodically on all interfaces in order to establish
and maintain relationships with its neighbors (point-to-point links, point-to-multi-
point links, multi access broadcast network segments, and virtual links). Also, a
router would multicast reachability protocol messages on any of its physical net-
works that has broadcast or multicast capabilities to enable dynamic discovery of
neighbor routers.
Link-state routing protocols achieve neighbor discovery and maintain adjacency
using a Hello protocol. The Hello protocol (specific to OSPF and IS-IS) defines a
Hello packet format and procedures for routers to exchange link-state routing infor-
mation, and how the information in these messages are processed by receiving rout-
ers. At a minimum, a Hello message contains the originating (or Advertising) Router
ID, IP address of the router’s interface, network mask, Hello Interval (i.e., the time
interval between sending Hello messages), and Router Dead Interval (i.e., the maxi-
mum time interval the router will wait to receive a Hello message before declaring
the neighbor to be unavailable or down).
The Router Dead Interval specifies the maximum time interval a router can wait
without receiving a Hello message from a particular neighbor. If the router does not
receive a Hello message from a neighbor within this time interval, it modifies its
50 IP Routing Protocols
LSDB (or Topology Database) to indicate that the neighbor is unavailable or unreach-
able. Router running link-state routing protocols periodically monitor the status of
their neighbors by sending and receiving Hello message that indicate whether each
neighbor is still operational. This is to ensure that the neighbors are still sending and
receiving LSA and acknowledgment messages. Link-state routing protocols transmit
such messages and expects to receive the same at specified time intervals.
In addition to establishing adjacencies, Hello messages serve as keepalive mes-
sages to the routers to allow them monitor the state of the adjacency between them.
If Hello messages are not received from a neighbor within a specified time period
(Router Dead Interval), that neighbor is considered unreachable and the adjacency is
terminated. A typical interval for the exchange of Hello messages in OSPF and IS-IS
is 10 seconds (for point-to-point links and broadcast networks), and 30 seconds (for
NBMA networks). The default OSPF Router Dead Interval is four times the default
OSPF Hello Interval, that is, 40 seconds (for point-to-point links and broadcast net-
works) and 120 seconds (for NBMA networks).
2.3.3.2 Link-State Flooding
After the routers have established adjacencies with their neighbors, they begin send-
ing out LSAs to these neighbors. Each LSA describes the originating router’s inter-
faces or links, neighbor routers, and the state of the links (including their costs). A
link might be a connection to another router, to a stub network (i.e., a dead-end net-
work with no other router attached to it), to networks in another area, or to external
networks (learned from another routing process). Because of the different types of
link connectivity and link-state information available from a router, link-state routing
protocols define different LSA types.
The LSAs are sent to every neighbor, who in turn, copy each received LSA, and
then forward them to every other neighbor except the one that originated the LSA.
The receiving router forwards LSAs almost immediately, thereby allowing link-state
routing protocols to converge much faster than distance-vector routing protocols
when network topology changes occur. The flooding of the LSAs throughout the
routing domain allows all routers to build identical LSDBs.
the router’s LSDB. Before a router propagates an LSA message out of one its inter-
faces, it must increment the age of the packet by the Interface Transit Delay
(InfTransDelay) [RFC2328]. The Interface Transit delay sets the estimated amount
of time required for the router to transmit an LSA over the interface (default Transit
Delay is 1 second).
A router must never increment the age of an LSA pass the Maximum Age
(MaxAge). LSAs with LS Age that have exceeded the MaxAge (e.g., 3,600 seconds
or 60 minutes) are not used in the calculation of the Routing Table. However, when a
router detects that an LSA’s age has reached MaxAge for the first time, the router will
reflood that LSA. The router finally flushes the LSA with MaxAge from its LSDB
when it detects that the LSA is no longer needed to ensure database
synchronization.
When a router receives two instances of the same LSA message with identical LS
Sequence Numbers and LS Checksums, it examines further the LS Age field. An
LSA instance with age of MaxAge is always accepted by the router as the most recent
advertisement since this allows the router flush old LSAs quickly from its routing
domain. Otherwise, if the router detects the ages of the two LSAs to differ by more
than the Maximum Age Difference or MaxAgeDiff (e.g., 900 seconds or 15 minutes),
it will accept the LSA instance with the smaller age as the most recent.
MaxAgeDiff (in seconds) represents the maximum dispersion or spread of the age
of a single LSA instance as it is flooded and propagated throughout a routing domain.
If the age difference between two LSAs is greater than MaxAgeDiff, the two LSAs
are assumed to be different instances of the same LSA. This situation could take
place when a router in a routing domain restarts and has lost track of the previous LS
Sequence Number of a particular LSA.
Each OSPF router sends LSAs periodically (a process called “Paranoid Updates”),
and when network topology changes occur. Each LSA is identified, at a minimum, by
the Link-State ID, Advertising Router ID generating the LSA, LS Sequence Number
(which increases every time the source router creates a new version of the LSA mes-
sage), and all the other neighbor routers or networks to which the originating router
is directly connected to. Each LSA is sent to all the router’s neighbors, and if the LSA
is determined by the receiving router to be newer (e.g., has a higher LS Sequence
Number), it is saved, and a copy is propagated in turn to each of that receiving rout-
er’s own neighbors.
The LSA flooding process rapidly propagates a copy of the latest version of each
router’s LSA to every other router in the routing domain. Networks running link-state
routing protocols can also be segmented into (smaller) areas and hierarchies, to limit
the scope of routing information flooding, and to allow effective routing control. The
area and hierarchical routing features allow link-state routing protocols to scale and
work more efficiently for larger networks.
2.3.3.3 Link-State Database
The primary objective of neighbor discovery and LSA flooding is to provide enough
information to the routers for them to construct their link-state databases. Each router
that runs link-state routing protocols maintains a LSDB or Topology Database that
holds records of the LSAs received from all routers in the routing domain.
52 IP Routing Protocols
The LS Age, LS Sequence Number, and LS Checksum plus other related informa-
tion in the LSA are mainly used to manage the LSA flooding process. On the other
hand, information such as the Link-State ID, Advertising Router ID, Neighbor Router
ID, Neighbor Interface ID, directly attached networks, and the cost (or metric) asso-
ciated with those neighbors and networks are important for the shortest path determi-
nation process. LSAs may include information for the link type such as point-to-point
connection to another router (OSPF Link Type 1), connection to a Transit Network
(OSPF Link Type 2), connection to a Stub Network (OSPF Link Type 3), and Virtual
Link (OSPF Link type 4).
When a router receives the complete set of LSAs from each router in the network,
it creates a complete topology map of the network. The router uses an algorithm that
iterates over all the LSAs received, one at a time, making links on the network map
from the router which originated that LSA, to all the routers that the LSA indicates
are neighbors of the originating router. Once a router builds its LSDB (or network
topology map), it can construct a tree (with itself at the root) that describes the short-
est path (lowest cost) to each other router and network in the routing domain by run-
ning the SPF algorithm on the LSDB.
Whenever the connectivity between a router and its neighbor changes, for exam-
ple, when an interconnecting link fails, the router recalculates the LSAs that describe
information about the router’s neighbors, and then refloods them throughout the net-
work. The reachability protocol (i.e., the Hello protocol and messages) which the
router uses to communicate with its neighbors, is responsible for detecting any such
network changes.
Note that a link is only considered to have been correctly reported when the two
routers terminating it, report it. That is, if only one router reports that it is connected
to the link (i.e., it is connected to a neighbor router), but the neighbor router does not
report that it is also connected to the same link, then the link is not considered and is
excluded from the network topology map.
• Tree Database: This database contains routers which have already been added
to the tree under construction – the branches (or links) already assigned to the
tree. The branches (or links) added to the shortest path tree being constructed
are stored in this database. At the end of algorithm execution, the Tree Database
describes the shortest path tree.
• Candidate Database: This database contains the links from which the next
link to be added to the Tree Database, will be selected. Links are copied from
the LSDB (or Topology Database) to the Candidate Database as candidate
links to be added to the tree under construction.
54 IP Routing Protocols
The remaining links (either rejected or not considered in the tree construction) are
left in the LSDB. The LSDB (or Topology Database) is still the repository of all links
that have been learned in the network.
The following steps summarize the process of applying Dijkstra’s algorithm to
construct a shortest path tree for a network:
1. The algorithm starts with both Tree and Candidate Databases empty. Then to
initialize the Tree Database (i.e., tree construction), a router adds itself as the
root of the tree. This first entry in the Tree Database indicates that the router is
its own neighbor with a link cost of 0.
2. The router adds to the tree, all neighbor routers which are directly connected
to it, except any routers which have already been added to either the tree or the
Candidate Database. All other routers are added to the Candidate Database.
3. The router compares each router in the Candidate Database to each of the rout-
ers already in the tree. The candidate router which is closest to any of the rout-
ers already added to the tree is itself moved (from the Candidate Database) into
the tree and connected to the appropriate neighbor router.
a. The router calculates the cost from the root (itself) to each router in the
Candidate Database. The router in the Candidate Database with the lowest
cost from the root is moved to the Tree Database. If two or more routers
have equal low cost from the root, the router just chooses one of them to be
added to the Tree Database.
b. When the router moves a router from the Candidate Database to the tree,
that router is removed from the Candidate Database and is not considered
in subsequent iterations of the SPF algorithm.
4. The router just added to the Tree Database is further examined. With the excep-
tion of any routers already in the Tree Database, routers in the LSDB described
as neighbors of the just added router are added to the Candidate Database.
5. If there are still more entries in the Candidate Database, the algorithm returns
to Step 3. If there are no entries in Candidate Database, then the algorithm is
terminated. Upon algorithm termination, a single router entry in the Tree
Database should represent every router discovered in the network, and the
shortest path tree is considered complete.
Steps 3–5 are repeated as long as there are any routers remaining in the Candidate
Database. When Candidate Database is empty, all the routers in the network will
have been added to the Tree Database. The algorithm terminates with the Tree
Database containing all the routers in the network, with the root of the tree being the
router on which the algorithm is running. The shortest path from that router (as the
root) to any other router in the network, is given by the list of routers that can be
traversed to get from the root of the tree, to the desired router in the tree.
from the root router, down and along the branch on the shortest-path tree leading
toward the desired destination router. The next-hop for a destination in the Routing
Table consists of the outgoing router interface (over which packets are to be for-
warded to the destination), and the IP address of the next-hop router (if any). The
next-hop can be connected to an IP unnumbered interface which is an interface that
has no explicit IP address assigned to it.
To install a route in the Routing Table, what is needed is to walk down the tree,
identifying the router at the head of each branch (leading to the desired destination),
and installing in the Routing Table an entry for that router (i.e., the head of that
branch). Whenever there is a change in the network topology (due to node or link
failures or recovery, or changes in a link’s routing cost), each router will have to
update its LSDB (from the Hello and LSAs sent and received), recompute its short-
est-path tree, and then modify the Routing Table. In most current link-state routing
protocol implementations, when a new LSA is received (obviously describing a new
network change), the entire shortest path tree is recomputed.
Current research focuses on how to recompute only that part of an existing shortest
path tree that could have been affected by a given change in the network topology (i.e.,
partial recomputation of the shortest path tree) [FRIGMARN98] [NARVSIUT00]
[NARVSIUTZ01] [QUYIYANG13] [XIAOCAOSH07] [XIAOCAOZH04]. Also,
issues such as filling in the Routing Table as the shortest-path tree is recomputed,
instead of handling this as a separate operation are being investigated. Most commer-
cial routers simply delete the current shortest path tree, and construct a new one using
variants of the Dijkstra’s algorithm. However, such recomputation of the entire short-
est path tree is inefficient and may lead to the consumption of considerable amount of
CPU cycles and result in slow network convergence.
Algorithms that perform complete shortest path tree construction become very
inefficient when only a small part of the tree needs to be updated for changes in the
network topology and state. This is because small changes in the topology or state
(even a single link-state change) still result in the recomputation of the complete tree
at every router, followed by entries in the Routing Table being updated accordingly.
In most cases, the new shortest path tree constructed by a router shows little or no
difference when compared with the old tree particularly when a small change occurs
in a large network.
The traditional method of constructing the complete shortest path tree even when
a small network change occurs incurs a lot of unnecessary computation and Routing
Table updates. Furthermore, the LSA flooding and the resulting routing protocol
message exchange that take place as a result of that small change (because of the
need to reconstruct the complete new shortest path tree), may create some undesir-
able traffic load and fluctuations in the network. This has created the need for algo-
rithms that can dynamically update shortest path trees efficiently when network
changes occur. Dynamic shortest path tree update algorithms tend to perform much
better since they utilize the information available from the existing tree in the new
tree computation.
The neighbor discovery and the LSA flooding process has to ensure that all the
routers in the network develop exactly the same network topology map and are work-
ing from an identical (or synchronized) LSDB, if not, routing loops can form in the
56 IP Routing Protocols
network. If any two or more routers end up with different topology maps (unidentical
LSDBs), then it is possible to have scenarios in which routing loops can be created
(similar to those in networks running distance-vector routing protocols).
2.3.3.6 Areas
We have discussed above that, in a network running a link-state routing protocol,
each link is associated with a cost, and routers exchange link-state information to
allow each one of them to have a complete and consistent picture of the network
topology. The basic idea is to have every router construct (in the form of a graph) a
complete map of the router and link connectivity in the network. This map shows
which routers are connected to which other networks and routers in the network.
Using the link cost and other routing information in the LSDB, each router inde-
pendently computes the shortest path tree (consisting of the best logical paths) to
every possible destination in the network with the router itself as the root. Then, the
resulting shortest path tree is used to construct a Routing Table, which stores the
routes with the least cost from the router (root) to each destination in the network.
The collection of best paths to each destination forms each router’s Routing Table.
Implementing a link-state routing protocol in a large network exposes some seri-
ous issues particularly regarding the processing and memory requirements in the
routers. Therefore, partitioning a large network into areas is a way to address the
three concerns commonly expressed about link-state routing protocols, namely, the
memory requirements for storing the LSDBs, CPU cycles (time) required to process
the relatively more complex link-state routing algorithms, and the effects of LSA
flooding on the available bandwidth in the network, particularly in unstable net-
works. An area is simply a partition of the network that contains a subset of the rout-
ers that make up the entire network (Figure 2.11).
When a (large) network is segmented into areas, the routers within each area flood
LSAs only within that area, and maintain a LSDB (topology map) only for that area.
Furthermore, routers in an area require a smaller LSDB, which implies less memory
in each router, and smaller CPU cycles to run the SPF algorithm (on the smaller
LSDB). In the event that network topology changes occur in an area, the routers only
have to flood LSAs only within that area. Furthermore, if there are any routing insta-
bilities (e.g., route flaps) in the area, they will be confined to that area only.
By utilizing areas with link-state routing protocols, network managers seek to
make routing in network more manageable, and at the same time, save on system
memory and router computing resources. Implementing areas can also be used as a
way of introducing a hierarchy to a network architecture, where an extra layer can be
added to a network hierarchical structure, by grouping (smaller) areas into larger
areas.
As discussed earlier on, an Autonomous System is an interconnection of networks
(or routing prefixes) that are under a common administration, and share a common
routing strategy. The links and routers that make up the Autonomous System are typi-
cally divided and organized in logical groups called areas (Figure 2.11). An
Autonomous System must define at least one area. Each area in a network running
OSPF or IS-IS is identified by a uniquely assigned (area) number.
Types of Dynamic Routing Protocols 57
ABR IR Area 10
ABR
IR IR
Area 20
IR IR
IR
IR
IR IR
LSAs are flooded
only in this area Each router
(Area 10) reruns the SPF
algorithm
ABR = Area Border Router
IR = Internal Router
LSAs = Link State Advertisements
SPF = Shortest-Path First
FIGURE 2.11 Use of Areas to Optimize Routing and Minimize Router Resource Usage
Partner
Company B
10.2.2.0/28 Network 10.3.3.0/24
Partner Partner
Company A Company C
Network Network
• Let us assume partner companies A and B have decided to use an IGP to share routing information between them,
including specific information about how hosts and servers within each other's networks can be reached.
• Let us also assume that 10.2.2.0/28 is one of the subnets within Company A that the two partners need to share routing
information about. So, Company A and Company B decide to set up an IGP with route redistribution between their networks
to allow this information be to leaked between the two routing domains.
• After some time of partnering, Company B also decides to partner with Company C, and again uses IGP route redistribution
to share information about reachable networks in their two routing domains.
• However, in this scenario, the routing information passed by Company C into Company B's routing domain will also be
leaked into Company A's routing domain, creating possibly overlaps (or conflicts) with the internal routing information in
Company A's routing domain.
• This scenario can result in some destinations within Company A's network becoming unreachable to even sources within
Company A's network because, for example, some actions of the network administrators in Company B’s routing domain
has caused a fault in Company A's network.
• Problems such as these are not only difficult to identify, but are also difficult to troubleshoot and fix, since this may involve
actions from the network administrators from, possibly, all three routing domains.
FIGURE 2.12 Illustrating the Impact of Routing Changes in one Routing Domain on
Another When Using IGP Instead of BGP
passed on to the other partners. Instead, BGP can be used to define policy-
based rules to prevent information about one routing domain/autonomous sys-
tem from leaking into other domains or systems.
Using BGP between routing domains in Figure 2.12, Company C can mark
the routing information it advertises to Company B so that this information
will be filtered and not be passed on to Company A. This prevents information
from being leaked inappropriately without having to maintain manual access
lists by Company B. BGP when implemented between the routing domains,
would mark routes so that they are not advertised beyond the adjacent routing
domain (Company B).
• Implementing Routing Policies between Routing Domains or Autonomous
Systems: Propagating routing policies within a routing domain or autono-
mous system is generally not important or a priority when routing with a
single system. This is because the routers within the Autonomous System or
routing domain are under a single administrative control, and management
and administrative policies can be implemented on all the routers (normally
through manual configuration or via a Dynamic Host Configuration Protocol
[DHCP] server). Thus, the IGPs do not need to propagate this kind of
information.
IGPs such as EIGRP, OSPF, and IS-IS are expressly designed for routing
protocols within a routing domain or Autonomous System, and consider net-
work speed of convergence as one of the most important design attributes.
These routing protocols focus on collecting and propagating accurate informa-
tion about a network topology as quickly and efficiently as possible. BGP is
60 IP Routing Protocols
The following types of routing policies that can be implemented with BGP
[CISCWHMCDA04]:
BGP allows several non-conflicting routing policies to be combined with the end
goal of achieving the desired routing behaviors in an internetwork. Chapter 7 dis-
cusses in greater detail, the path controls tools used with IGPs and BGP.
A path-vector routing protocol such as BGP determines the best loop-free path to a
destination by checking and considering a number of BGP Path Attributes. It also
analyzes any given path to a destination to determine if the path is loop free or not as
illustrated in Figure 2.13. IGPs advertise a list of network address prefixes and the
routing metrics to reach each address prefix. In contrast, routers in a path-vector rout-
ing domain (e.g., BGP) exchange network reachability information, called path-vec-
tors, made up of path attributes (Figure 2.13). The path-vector information includes
[RFC4271]:
• A list of the full path ASNs (listed hop-by-hop) necessary to reach a network
destination.
• Other path attributes including the interface IP address needed to get to the
next Autonomous System (the BGP Next-Hop Attribute), and how the network
address prefixes at the end of the path were introduced into the path-vector
routing protocol (the BGP Origin Attribute).
In path-vector routing, the Speaker router determines the best route from a source
using a routing policy that is defined for the network without assigning costs to the
62 IP Routing Protocols
• By recording each router (or hop) a routing advertisement passes as it traverses a network, a path vector routing protocol is able
to guarantee loop free paths through the network.
• Let us assume Router R1 advertises reachability to Network 10.1.0.0/24 to router R2. When Router R2 receives this information,
it adds itself to the path, and advertises it to Router R3.
• Router R3 adds itself to the path, and advertises to Router R4 that Network 10.1.0.0/24 is reachable in its direction.
• Router R4 receives the route advertisement and adds itself to the path as well.
• However, when Router R4 sends an advertisement to Router R1 that it can reach Network 10.1.0.0/24, Router R1 will reject the
advertisement, since the associated path vector contained in the advertisement already lists Router R1 in the path.
• Similarly, when Router R4 advertises to Router R2 reachability for Network 10.1.0.0/24, Router R2 also rejects it, since Router
R2 is also listed in the path.
• Therefore, any time a router receives an advertisement in which it is already listed as part of the path, that advertisement is
rejected, since accepting the advertisement can create a path that would effectively result in a routing information loop.
links and routes as done in distance-vector or link-state routing. The route from a
source to all network destinations is determined by the best spanning tree that satis-
fies a predefined set of criteria that is based a routing policy. The best path selection
algorithm a Speaker router uses is based on a predefined set of criteria. This algo-
rithm is used to determine the most efficient or best routes through the internetwork.
In the event that no specific or predefined set of criteria is created, the Speaker router
will route traffic over the shortest path that spans the lowest number of intervening
Autonomous Systems hops. Network administrators generally can change from
time to time the path selection criteria to route traffic according to their network
needs.
When a Speaker router starts up, it creates a path-vector based on the routing
information it obtains from its Autonomous System. After the creation of the initial
path-vector, each Speaker router, sends this to all its immediate neighbor Speaker
routers. When a Speaker router receives a path-vector from a neighbor, it updates its
path-vector by applying its own routing policy instead of using an algorithm that is
based on link-state or least cost metric of routes.
Network
10.1.0.0/24
AS 100 AS 300
10.1.0.0/24
AS 100, 200 10.1.0.0/24
10.1.0.0/24 AS 100, 200, 300
AS 100
AS 200 AS 400
The BGP routers in AS 400 see Network 10.1.0.0 as having an autonomous system path of 300, 200, and 100.
AS 100
Router R1 adds AS
Network
100 to the path, and
10.1.0.0/24
advertises to AS 200
AS 200
Router Router
R1 R2
Router
R6 Router
Router R6 rejects R3
advertisement since AS 100 Router R3 adds AS
is already listed in the path 200 to the path, and
Router advertises to AS 300
Router
R5
R4
Router R5 adds AS
300 to the path, and
advertises to AS 100
AS 300
• Network 10.1.0.0/24is advertised as a prefix with the list of autonomous systems the routing update has passed through.
The list of autonomous systems in the routing update is called the AS Path.
• AS 100 originates the prefix 10.1.0.0/24, adding itself to the AS Path, and advertises it to AS 200.
• AS 200 is added to the AS Path, and the prefix is advertised to AS 300.
• When AS 300 advertises the prefix 10.1.0.0/24 to AS 100, the prefix is rejected, since the AS 100 is already listed in the AS
Path, and accepting the advertisement would result in a routing information loop.
AS 100 Router
R2
Network
10.1.0.0/24
AS 200
Router
R1
Router
R3
The AS Path advertised is identical
on all of these internal routers in
the Autonomous System
• Every router within AS 200 receives the prefix 10.1.0.0/24 with the same AS Path, because BGP relies on the AS Path to
prevent the formation of routing information loops.
• But, since BGP cannot provide loop free routing within an autonomous system, BGP must ensure the following within the
system:
o Every router in the autonomous system must make the same routing decision as to which exit point on the
autonomous system to use when forwarding packets to a given destination, and
o Every router must use a constrained set of route advertisement rules within the autonomous system.
• BGP depends on the IGP running within the autonomous system to determine the best path to each of the autonomous
system exit points.
Two BGP routers set up a TCP connection between themselves at the beginning
of a BGP peering session, and this TCP connection is maintained throughout the ses-
sion. By using TCP, BGP delegates all reliable transport, data sequencing, retrans-
mission, error control, and connection keepalive issues to TCP. This allows BGP to
focus solely on the processing of the routing information exchanged with its peers.
After two BGP routers have established a TCP connection, each BGP peer ini-
tially sends all of its BGP Routing Table to the other. After this initial routing infor-
mation exchange, each router only sends incremental routing updates when there has
been a network topology change, or when a routing policy has been modified or a
new one implemented. During periods of inactivity between routing updates, the
BGP peers exchange BGP KEEPALIVE messages which are special messages used
to maintain BGP session connectivity between the peers.
recognize and accept this path attribute, and also advertise it to its own
peers. Examples attributes are: AS_PATH, ORIGIN and NEXT_HOP.
o Well-Known Discretionary: These Path Attributes must be recognized by a
BGP implementation but may or may not be written and carried in a specific
BGP UPDATE message. Their inclusion or not in a BGP UPDATE message
sent to BGP peers is at the discretion of the BGP implementation. Examples
attributes are: Local Preference (LOCAL_PREF) and ATOMIC_
AGGREGATE.
• Optional Path Attributes: A BGP implementation may decide to support or
not support these path attributes. Optional BGP Path attributes also have two
sub-categories:
o Optional Transitive: If this path attribute is sent in a BGP UPDATE mes-
sage, but not recognized by the BGP peer that receives it, the BGP peer
should passed it on to the next Autonomous System. The BGP peer has to
accept the path attribute in which it is included, and should advertise it on to
other peers even if the peer does not support these attributes. If the BGP
peer does not recognize any of these attributes, it checks if the transitive flag
in the attribute has been set. If it is set, then the peer should accept and pass
the attribute on to its other peers. Examples attributes are: The Aggregator
of the Route (AGGREGATOR) and Community String (COMMUNITY)
o Optional Non-transitive: These path attributes may not be supported in a
BGP implementation, and a BGP peer will not pass them on when received.
The BGP peer is not required to pass them on, and will simply ignore such
optional attributes. The transitive flag is not set in these attributes and the
BGP peer can quietly ignore them – it does not have to accept and advertise
them to its other peers. Examples attributes are: Multi-Exit Discriminator
(MULTI_EXIT_DISC or simply, MED), Route Originator ID
(ORIGINATOR_ID), Route Cluster List (CLUSTER_LIST), Multiprotocol
Reachable NLRI, and Multiprotocol Unreachable NLRI.
protocol. The route selection process selects routes to be entered in the Routing
Table based on the routing protocol’s Administrative Distance. The best routes
installed in the Routing Table are those from the routing protocols with the lowest
Administrative Distance.
If a particular routing protocol learns multiple routes to the same network destina-
tion, then these routes would have the same Administrative Distance, and the best
route is chosen based on the routing protocol’s metrics. The routing protocol associ-
ates metrics with specific routes it has learned, allowing the protocol to rank routes
from most preferred to the least preferred routes.
Default
Routing Method Administrative
Distances
OSPF 110
Lowest AD
IS-IS 115
iBGP 200
The reason for using an Administrative Distance is that, different routing proto-
cols use different metrics and algorithms for best path computations that are not simi-
lar or compatible with each other. In a router running multiple routing protocols, the
situation always arises that the routing function needs to select the best path for
packet forwarding locally, or exchange route information across the multiple proto-
cols (via a process called route redistribution as discussed in Chapter 7).
The Administrative Distance is a mechanism that the routing function can use to
select the best path when there are two or more routing protocols providing best
routes to the same destination. The Administrative Distance defines the level of
believability, trustworthiness, or reliability of a routing protocol. Each routing proto-
col is assigned a number that prioritized its level of trustworthiness (in order of most
to least). This number (which most often is configurable) is referred to as the Admin-
istrative Distance value of that particular routing information source.
Figure 2.17 lists the default Administrative Distances for the routing protocols
used in Cisco routing devices. A directly connected interface (or network) is assigned
a default Administrative Distance of 0 while a static route has Administrative Dis-
tance of 1. The smaller the Administrative Distance, the more the trustworthiness of
the protocol. For example, OSPF (default Administrative Distance of 110) is consid-
ered more believable/reliable than RIP (default Administrative Distance of 120). This
means the routing function will install routes from OSPF into the Routing Table over
routes from RIP.
destination. Each routing protocol then presents its best path to be installed in the
Routing Table. The Administrative Distance is a measure of the trustworthiness of
the supplier or source of the competing best path information. It has only local sig-
nificance for route selection in a routing device and is not information that is adver-
tised to neighboring routers in routing updates.
For example, if RIP determines a best path leading to network 10.1.2.0/24, it first
checks the Routing Table to see whether an entry exists for this network destination. If
no entry exists, this path (or route) is installed in the Routing Table. If an entry already
exists in the Routing Table for this destination, the routing function determines whether
to install the new route presented by RIP based on the Administrative Distance of RIP
and the Administrative Distance of the routing protocol that installed the existing route
in the Routing Table. If RIP has the lowest Administrative Distance to the destination
when compared to the routing protocol that installed the existing route in the Routing
Table, then the new route is installed in the Routing Table. If RIP is not the routing
protocol with the lowest Administrative Distance, the new route is rejected.
Now let us assume three routing protocols EIGRP (internal), OSPF, and IS-IS in a
router have each determined a best path with a different metric to the same destina-
tion network 10.1.5.0/24. Each of these three routing protocols will then present their
best paths to 10.1.5.0/24 to be installed in the Routing Table. Since the destination is
the same, the route to be chosen will be based on the Administrative Distance of these
protocols. The routing protocol with the lowest Administrative Distance will have its
route installed in the in the Routing Table. EIGRP internal has the lowest Administra-
tive Distance (90) and so, will have its route installed in the Routing Table.
The routing protocol that did not get its route installed in the Routing Table (OSPF
and IS-IS in this example) will keep that route so that it can be used as a backup route
when the accepted route entered in the Routing Table fails. The route selection algorithm
will request for these backup routes if the best path previously installed fails, so that they
can be examined once again if they qualify to be reinstalled in the Routing Table.
For example, if the best route learned by EIGRP to destination 10.1.5.0/24 (the
one installed in the Routing Table) fails for some reason, the route selection algo-
rithm takes the backup routes kept by OSPF and IS-IS, and examines them to see
which one can be installed in the Routing Table to replace the failed EIGRP route. In
this case, the preferred route is selected based once again on the Administrative Dis-
tance of OSPF and IS-IS, which results in the route from OSPF being selected
because of its lower Administrative Distance (of 110).
To calculate the prefix length (or network mask length or netmask), we first convert
the dotted-decimal representation of the network mask to a binary equivalent. Then,
we count the number of leading contiguous 1 bits in the binary number. For example,
255.255.248.0 in binary is 11111111 11111111 11111000 00000000
The number of contiguous 1 bits is 21, resulting in a prefix length of /21. This means
the prefix length of the IPv4 network address 128.42.6.5 with a network mask
255.255.248.0 is /21. This IPv4 network address can be written, equivalently, as
128.42.6.5/21
Finally, to calculate the (exact) network address (or prefix), we perform the logi-
cal AND of the corresponding bits in the binary representation of the IP address and
network mask. We then convert the individual four octets of the result back to dotted-
decimal representation as follows:
This shows that the IPv4 network address (prefix) of 128.42.6.5/21 is 128.42.0.0.
To explain the longest prefix matching lookup, let us assume that an IPv4 For-
warding Table has the following routes with different prefix lengths: 10.1.2.0/28,
10.1.2.0/26, and 10.1.2.0/24 (Figure 2.18). These prefixes or routes have different
prefix lengths (or network masks), and are installed in the Forwarding Table because
they are considered as different destinations. We consider the situation where the IP
forwarding engine has to select a route (next-hop node and egress interface) when the
packet’s destination address is within the network prefix range for multiple entries in
the Forwarding Table.
When a packet is to be forwarded, the forwarding engine selects its route based on
the longest matching prefix entry. For example, the prefix length /28 is given prefer-
ence over /26, and /26 has preference over /24. An arriving packet with destination
address 10.1.2.14, would match all three entries, but 10.1.2.0/28 gives the longest
prefix match, meaning the packet would be forwarded to next-hop address 10.2.2.1
through egress interface Gig 1/1.
A packet with destination address 10.1.2.42 would match network prefix
10.1.2.0/24 and 10.1.2.0/26, but because 10.1.2.0/26 gives the longest prefix match,
the packet would be forwarded to next-hop address 10.3.3.1 through egress interface
Gig 2/2. A packet with destination address 10.1.2.100 matches only 10.1.2.0/24, so
the packet is forwarded to next-hop address 10.4.4.1 through egress interface Gig 3/3.
Let us assume that a router is running EIGRP, OSPF, and RIP routing protocols
and each protocol has learned the following best routes each with a different prefix
length:
Next-Hop IP
Network Prefix Egress Interface
Address
10.1.2.0/28 10.2.2.1 Gig 1/1
Routing
Table
Forwarding
Table
10.2.2.1 10.1.2.0/28
Gig 1/1
Forwarding 10.1.2.0/26
Gig 2/2 10.3.3.1
Engine
Gig 3/3
10.4.4.1 10.1.2.0/24
FIGURE 2.18 Entries in the Forwarding Table with Different Prefix Lengths
The router has to decide which of these best routes will be installed in its Routing
Table. One might assume that since EIGRP internal route has the best Administrative
Distance, this route will be installed in the Routing Table. However, since all of these
three protocol-dependent best routes have different prefix lengths (of /26, /20, and
/24), the router will consider them as different network destinations, and will there-
fore, install all of them in the Routing Table.
REVIEW QUESTIONS
1. Why does RIPv2 send routing updates to a multicast address instead of a
broadcast address?
2. Explain the meaning of count-to-infinity in RIP.
3. Explain briefly how Poison Reverse works in Distance-Vector Routing
Protocols.
4. Explain briefly how Split Horizon works in Distance-Vector Routing Protocols.
5. What is the use of the Holddown Timer in Distance-Vector Routing Protocols?
6. Explain the differences between the Update, Invalid, and Flush Timers in
Distance-Vector Routing Protocols.
7. Explain the main difference between the Link-State Database and the Routing
Table in Link-State Routing Protocols.
8. Explain briefly the benefits of creating Areas in networks running Link-State
Routing Protocols.
9. Why is an EGP (like a Path-Vector Routing Protocol like BGP) preferred over
an IGP for routing between Autonomous Systems?
10. What that main functions of a Speaker in a Path-Vector Routing Protocol?
74 IP Routing Protocols
11. What is the difference between an internal BGP peer and an exterior BGP
peer?
12. How does a Path-Vector Routing Protocol (like BGP) detect and prevent rout-
ing loops?
13. What are BGP Path Attributes?
14. Explain the main difference between a Routing Metric (or Cost) and
Administrative Distance (also called Route Preference).
15. What are directly connected interfaces/networks preferred over all other rout-
ing information sources?
REFERENCES
[CCIEDOYDEH]. Jeff Doyle and Jennifer De Haven Carroll, Routing TCP/IP Volume I,
Chapter “Dynamic Routing Protocol”, CCIE Professional
Development, Cisco Press, October 19, 2005.
[CISCHALABS00]. Sam Halabi, Internet Routing Architectures, 2nd Edition, Cisco Press,
August 23, 2000.
[CISCWHMCDA04]. Russ White, Danny McPherson, and Srihari Sangli, Practical BGP,
Chapter "Introduction to the Border Gateway Protocol", Addison-
Wesley Professional, July 6, 2004.
[FRIGMARN98]. D. Frigioni, A. Marchetti-Spaccamela, and U. Nanni, “Fully Dynamic
Output Bounded Single Source Shortest Path Problem,” Proceedings
of the 7th Annual ACM-SIAM Symposium on Discrete Algorithms,
Atlanta, GA, pp. 212–221, 1998.
[ISO10589:2002]. ISO/IEC 10589:2002 – Information technology – Telecommunications
and Information Exchange between Systems – Intermediate System to
Intermediate System Intra-Domain Routing Information Exchange
Protocol for use in Conjunction with the Protocol for Providing the
Connectionless-Mode Network Service (ISO 8473)", International
Organization for Standardization (ISO). November 2002.
[NARVSIUT00]. P. Narvaez, K.-Y. Siu, and H.-Y. Tzeng, “New Dynamic Algorithms
for Shortest Path Tree Computation,” IEEE/ACM Transactions on
Networking, vol. 8, pp. 734–746, December 2000.
[NARVSIUTZ01]. P. Narvaez, K.-Y. Siu, and H.-Y. Tzeng, “New Dynamic SPT Algorithm
based on a Ball-and-String Model,” IEEE/ACM Transactions on
Networking, vol. 9, pp. 706–718, December 2001.
[QUYIYANG13]. H. Qu, Z. Yi, and S. X. Yang, “Efficient Shortest-Path-Tree
Computation in Network Routing Based on Pulse-Coupled Neural
Networks”, IEEE Transaction on Systems, Man, and Cybernetics:
Part B, Cybernetics, Vol. 43, No. 3, pp. 995–1010, June 2013.
[RFC1195]. R. Callon, “Use of OSI IS-IS for Routing in TCP/IP and Dual
Environments”, IETF RFC 1195, December 1990.
[RFC1517]. R. Hinden, Ed., “Applicability Statement for the Implementation of
Classless Inter-Domain Routing (CIDR)”, IETF RFC 1517, September
1993.
[RFC1518]. Y. Rekhter and T. Li, “An Architecture for IP Address Allocation with
CIDR”, IETF RFC 1518, September 1993.
Types of Dynamic Routing Protocols 75
77
78 IP Routing Protocols
Routing Control
Control Engine Plane
Table
Generic
Router
Architecture
Forwarding Data/
Packets In Forwarding Engine Packets out
Table Forwarding
Plane
The route processor in its simplest form, typically, consists of the following: CPU;
RAM for storage of the Routing Tables, Forwarding Tables, and data and instructions
for other processes; a primary storage (a flash drive) for configuration files, software
images, and microcode; secondary storage (hard disk); other storage for software
upgrades; and Ethernet interfaces for out-of-band device management access. It
should be emphasized that the control engine (and equally, the forwarding engine) is
not necessarily a physical module in the router but could be a logical software com-
ponent running in a processor in the router. In the architectures discussed below, the
control engine and forwarding engine are viewed more as logical entities than physi-
cal ones.
The route processor is responsible for the control plane functions in the router.
The route processor, in effect, holds the “intelligence” behind the router, and is dedi-
cated to communicating with neighboring routers, plus gathering all the routing
information required for forwarding packets to their destinations. This communica-
tion enables the route processor to build a network topology map of some sort
(depending on the routing protocol used), and a comprehensive Routing Database (or
Routing Table), that enables the forwarding engine to determine the router interfaces
on which to send packets toward their network destinations.
In most of today’s router architectures, route processing plus device management
is a centralized function on a centralized computing module in the router. This cen-
tralized architecture is based on the reasoning that, having a single repository for all
Routing Table information for the router, significantly reduces system complexity.
Running the routing protocol, computing best paths, plus device management, are all
activities that are do not required the kind of real-time urgency, as data plane func-
tions such as receiving user packets, performing Forwarding Table lookups, and for-
warding them to their next hops.
The route processor does not perform functions on a packet-by-packet basis, and
as a result can be a centralized module on the router. More so, running routing
protocols, best path computations, plus device management, are more compute-
intensive functions that are more suitable to conventional CPUs, unlike the data plane
functions that are more simplistic and repetitive. Routing protocol updates are sent at
a much more-slower rate than the rate of user data packet transmission, essentially,
making the control plane operations and control data reception and transmission,
independent of the data plane packet forwarding process.
This in essence, makes it unnecessary to scale route processing resources in a
router to be directly proportional to the number line cards or their speeds, in order to
maintain system throughput. Roughly, the route processing resource scale in
Routing and Forwarding Tables in Routing Devices 79
proportion to the size of the network, since mapping out the network topology and
determining optimal routes, is after all the main objective of route processing.
• Receive packets from router interfaces and perform packet verification to see if
they are valid for IP forwarding. This process, depending on the type of receive
interface and router architecture, may include decapsulation and reassembly of
packet entities (e.g., ATM cells), managing the buffering of cells in memory
and priority queueing, etc.
• Perform IP Forwarding Table lookups to determine if a received IP packet is
destined to the router itself, or is in transit to another network destination. If it
is a transit packet, the outcome of the lookup determines the next hop node and
outgoing interface for the packet.
• Perform a number of packet header updates (this will be explained in detail
below).
• Forward the packet out the correct outgoing interface to the next hop. This
process, depending on the type of outbound interface and router architecture,
may include segmentation and encapsulation of packet entities (e.g., ATM
cells).
As discussed above, the main function of the control engine is to communicate with
other routers and populate the IP Routing Table, which in turn then gets distilled into
the IP Forwarding Table (as explained below). On the other hand, the function of the
forwarding engine is to receive IP packets, perform Forwarding Table lookups, and
forward them out the correct interface to their destinations. This means, the opera-
tions of the control engine and the forwarding engine can be decoupled, making them
operationally independently, with the Forwarding Table being the only coupling
entity [AWEYA1BK18] [AWEYA2000] [AWEYA2001] [AWEYA2BK19].
Most high-performance, high-end routers adopt this architecture, where the rout-
ing engine and the forwarding engine perform their primary tasks independently,
although the Forwarding Table is continuously updated any time the control engine
makes changes to the Routing Table. This architecture eliminates processing and
traffic bottlenecks on the data plane, and streamlines routing and forwarding, allow-
ing routers and networks to scale to high speeds.
80 IP Routing Protocols
Control Engine
Control Routing Table
Processor
Module
Centralized
Forwarding Engine
Forwarding Table
Switch Fabric
shared-memory and shared bus switch fabrics, where packets cross the shared-bus
twice (to and from the centralized forwarding engine) before leaving the system to
their destinations.
In the centralized forwarding engine router architecture, all packets received on
any incoming interface, are forwarded to the centralized forwarding engine. The
forwarding engine parses the IP destination address of the received packet, and per-
forms a Forwarding Table lookup to determine the outgoing interface on which it
should be sent out. The forwarding engine, while competing with other system tasks
for the shared processing and memory resources, eventually completes all its
processing, and then forwards the packet to the outgoing interface to be sent on to the
next hop.
The first-generation router architectures implemented the control engine and
forwarding engine functions on the centralized processor, resulting in poor packet
forwarding performance and, consequently, poor network performance as network
traffic grow. In these architectures, all processing functions, including device
configurations and management, had to contend for the single centralized and finite
pool of processing and memory resources, regardless of the network load. These
architectures are still suited for residential and small business networks, because
such networks tend to be stable with little growth over relatively long periods of use.
Forwarding Engine
Forwarding Table
Switch Fabric
Control Engine
Control
Routing Table
Processor
Module
Forwarding Engine
Master
Forwarding Table
Switch Fabric
Control
Directly
Static Processor
Routing Table Attached
Routes Module
Networks
• ARP
Master Adjacency • Static
Forwarding Engine
Forwarding Table Table Entries
Switch Fabric
Adjacency
Adjacency
Adjacency
Table
Table
Table
Line Line
Forwarding Forwarding Forwarding
Card Card
Engine Engine Engine
Forwarding
Forwarding
Forwarding
Table
Table
Table
operations. The control engine is only responsible for building the master Forward-
ing Table from its Routing Table, and then distributing copies of that master table
information to the line cards.
The control engine is also responsible for synchronizing the contents of the dis-
tributed Forwarding Tables (in the line cards) with the master Forwarding Table,
whenever the routing protocols make changes to the Routing Table. Any updates to
the Routing Table are reflected in the master Forwarding Table. Route and network
topology changes trigger routing updates which are captured by the routing proto-
cols, and reflected in the Routing Table.
In the distributed forwarding engine architecture, a received packet is processed
directly by the incoming line card – the packet is processed by the local forwarding
engine on the card. A Forwarding Table lookup is performed by the local forwarding
engine to determine if the outgoing interface is local, or on another line card in the
router. If the outgoing interface is local to the line card, the forwarding engine for-
wards the packet out that local interface. If the outgoing interface is determined to be
on another line card, the local forwarding sends the packet across the switch fabric
directly to the outgoing line card (which then forwards it on the correct outgoing
interface). The line card forwarding engine bypasses the control engine all this time.
A packet being forwarded, crosses the switch fabric only once (for intercard forward-
ing), leading to lower forwarding delays and better switch fabric utilization.
Even in the distributed forwarding architecture, the control engine is most often
still a centralized function (which also provides the added benefit of supporting
84 IP Routing Protocols
control redundancy, if required [see discussion below]). As explained above, the con-
trol plane requires relatively more complex operations (running routing protocols, IP
control and management protocols, system configuration and management, etc.). So,
using a centralized control engine significantly reduces system complexity.
Furthermore, the functions running in the control engine tend to have a network-wide
impact and, change very slowly when compared to the forwarding engine operations
(e.g., routing updates, IP control and network management packets, system
management inputs).
Routing Routing
Table Table
Active Standby
Forwarding
Packets In Forwarding Engine Packets out
Table
A router may support dual route processor modules to provide 1+1 redundancy
for the control and management plane [CISCNEXHA16]. The dual route processor
configuration operates in an such that only one of the route processor modules is
active at any given time, while the other serves as a backup or standby route processor.
The state and configuration of the active processor is constantly synchronized with
the standby processor module to provide stateful switchover in the event the active
processor module fails.
Typically, an online diagnostics subsystem (plus additional monitoring processes)
on the active route processor will trigger a stateful failover to the redundant processor
when the diagnostics subsystem monitoring processes detect hardware failures,
unrecoverable kernel errors, service restartability errors, or any critical failures. If an
unrecoverable failure occurs in the active processor module, it triggers a switchover.
The standby processor then assumes the new active role, and uses its synchronized
state and configuration, for router operations while the failed previously active
module is reloaded.
If the failed router processor module is able to reload, and successfully goes
through self-diagnostics and pass, it initializes, and becomes the new standby route
processor module. It then synchronizes its operating state and configuration with the
newly active route processor module. This feature is stateful (and nondisruptive), and
allows control traffic to flow unaffected. There is no disruption to data traffic because
the forwarding engine modules are not affected, and there is no need to reset them.
3.4.1 Routing Table
The Routing Table contains a list of the routes to particular IP network destinations (or
IP address prefixes) in the network. These routes are discovered by all the dynamic
routing protocols, as well as, the directly connected interfaces (also called interface
routes or direct routes), and the static routes configured by the network administrator
and (Figure 3.7). Each entry in the Routing Table describes one or multiple (in the case
multipath unequal/equal cost routing) best paths to a particular network destination.
The Routing Table is sometimes referred to as the Routing Information Base (RIB).
Generally, the Routing Table stores and keeps track of routes to network destinations,
the source of the routing information, and the metrics associated with those routes.
Routing Protocols
Routing Protocols StaticRoutes
Static Routes
Master
Master Forwarding Table
Forwarding Table
standard parameters. Each entry in the Routing Table contains at least the following
parameters:
The additional parameters a RIPv2 router adds to its Routing Table are: the Address
Family; and Route Tag (see Chapter 5). An EIGRP router, for example, will contain
additional parameters such as: Successor (best route); Feasible Distance; and
Advertised Distance (see Chapter 6). An OSPFv2 router will have additional param-
eters such as: Destination Type (i.e., Network, Area Border Router [ABR], or
Autonomous System Boundary Router [ASBR]); Optional Capabilities; Area; Path
Type (i.e., Intra-area, Interarea, Type 1 External, or Type 2 External); Type 2 Cost;
Link-State Origin; and Advertising Router (see Chapter 7).
Routing and Forwarding Tables in Routing Devices 87
The entries of a BGP router has the following parameters (see Chapter 9): Network
Prefix; Next Hop (BGP NEXT_HOP Attribute); Metric (BGP Multiple Exit
Discriminator [MED] Attribute); BGP Local Preference Attribute; Weight (for Cisco
routers); and BGP AS_PATH Attribute. Essentially, each routing protocol has a num-
ber of protocol-specific parameters that it maintains in its Routing Table.
The entries of the Routing Table listed above can be constructed to store the fol-
lowing types of routes:
• Directly attached network IDs (i.e., route to a network or host that is directly
attached to a router interface).
• Remote network IDs (i.e., route to networks that can be reached through one or
more next hops).
• Default routes (see Chapter 1). Default routes are used by a router as the con-
ditional default gateway or route of last resort when no specific contributing
route is found. Packet with destinations which do not match the more specific
routes in the Routing Table will be forwarded using the default route. A default
route matches any destination address. The IPv4 default route is designated in
CIDR notation as the zero-address 0.0.0.0/0 (network mask is always
255.255.255.255), and for IPv6, it is 0:0:0:0:0:0:0:0 or ::/0.
If a router receives a packet and does not have a more specific route for the packet’s
destination address, it forwards the packet to the next hop associated with the default
route entry, if one is configured. Typically, network core routers or top tier routers in
a network have default-free Routing Tables – have no default routes configured.
These routers forward every packet to a specific next hop using the longest prefix
matching (LPM) of the packet’s destination IP address and the network address pre-
fixes in the Forwarding Table.
If the destination is not a directly attached network/host, the next hop is the
address of the next best router on the outgoing interface that can best route the packet
to the destination. The entries of the Routing Table can be maintained using any of
the following methods:
Most Routing Tables include the following parameters to each Routing Table entry to
describe the source of the route:
• Route Source: This identifies the routing method that provided the route, that
is, how the route was learned. Cisco routers identify routing sources using the
following route source codes [CISCINTROUT14]:
88 IP Routing Protocols
For purely IP packet forwarding purposes, the most important parameters from the
Routing Table are the three information fields: network ID, next hop, and outgoing
interface. The IP network mask and network ID are not considered as separate param-
eters since together they produce the IP network prefix.
It is important to understand the difference between the local Routing Database in
which a given routing protocol stores all routes to all known network destinations,
and the global IP Routing Table in which a router stores the best or optimal routes to
all known network destinations. The former is more like a topology database and
contains all non-optimal and optimal routes, plus directly connected routes and static
routes. The non-optimal and optimal routes are routing information the router has
learned from other routers running the same routing protocol. The best routes from
this table are installed in the IP Routing Table.
The discussion in this chapter refers to the global IP Routing Table that contains
the best routes. The exact implementation of these databases is vendor-specific and
will not be discussed further here. This book simply views these two databases (local
Routing Database and global IP Routing Table) as logically different and separate.
routes. Generally, a router may support additional Routing Tables where there is the
need to separate and maintain together a particular group of routes (sharing a specific
routing and forwarding characteristics), or where there is the need for greater flexi-
bility in managing or manipulating routing information.
Supporting additional Routing Tables may allow several specific uses such as,
importing routes from another routing protocol into more than one Routing Table,
applying different routing policies when routes are exported to different peer routers,
and providing greater flexibility in managing routing information when dealing with
multicast topologies or multitopologies that are not the same or not compatible. In
general, the use of additional Routing Tables can allow more complex manipulations
and operations to be performed on routing information.
The IOS installs all optimal or best routes (those with the lowest Administrative
Distance) into the Routing Table which are then copied into the Forwarding Table.
The optimal routes, indexed by their destination network addresses or prefixes, along
with their next-hop IP addresses and outgoing interfaces, are installed in the For-
warding Table, to be used for forwarding packets to their destinations. The IOS may
maintain a master Forwarding Table, copies of which are distributed to other for-
warding entities in the system (Figure 3.7). The IOS supports mechanisms for mak-
ing copies of the master Forwarding Table for the forwarding engines, which are the
actual components in the system responsible for forwarding packets. These mecha-
nisms are also responsible for synchronizing the distributed Forwarding Tables with
the master Forwarding Table whenever changes are made to the Routing Table.
The routing protocol route selection algorithm generally determines the best route
for the Routing Table by selecting the route with the lowest Administrative Distance
(or Route Preference Value). A router uses the Administrative Distance (see
Chapter 2) to select the best path when there are multiple routes to the same destina-
tion learned by different routing methods. An Administrative Distance provides a
router with ranking information when selecting which routing source (directly con-
nected, static, or dynamic routing) to consider when more than one method is avail-
able for supplying routes to the Routing Table. The router prioritizes each routing
source in the order of most to least trustworthy using the Administrative Distance of
the routing information source. The IOS typically uses some sort of tiebreaker reso-
lution mechanisms when a number of alternate routes or route options are available.
Routing protocols such as BGP and MPLS are designed to use additional mecha-
nisms alternate route and tiebreaker preferences when multiple routes exist.
Typically, an IOS would create and maintain several Routing Tables concurrently,
with each Routing Table holding routing information for a specific routing protocol
or forwarding method (unicast, multicast, Virtual Private Network [VPN], etc.). The
Forwarding Table could be partitioned based on Routing Table type, with each Rout-
ing Table populating its corresponding portion of the Forwarding Table. This mecha-
nism allows a network administrator to define a specific forwarding behavior for
each Routing Table. For example, when creating VPNs, where each VPN has its own
Routing Table (VPN-based outing tables or Virtual Routing and Forwarding [VRF]),
each VPN would be assigned its own VPN-specific partition in the (integrated) For-
warding Table.
90 IP Routing Protocols
• IPv4 Unicast Routes: This table maintains dynamically learned IPv4 routes,
static routes, direct routes, and interface local routes.
• IPv6 Unicast Routes: This table maintains dynamically learned IPv6 routes,
static routes, direct routes, and interface local routes.
• IPv4 MPLS Routes: This table is used only at a device that is the ingress node
(i.e., Label Edge Router [LER]) to a Label-Switched Path (LSP). An LSP is an
MPLS virtual circuit or path between two LERs. The table maintains the egress
address of an LSP, the name of the LSP, and the name of the outgoing interface
on the LER.
• MPLS Labels (for MPLS Network Label Switching Operations): This
table is used at a device that is a transit router in an MPLS network (i.e., Label
Switch Router [LSR]). The table maintains the short path labels (not the long
network addresses) that identify the virtual paths between an LER and LSR,
LSR and LSR, or LSR and LER.
• Layer 2 VPN Routes Learned from BGP: This table maintains Layer 2 VPN
routes learned via BGP from other Provider Edge (PE) routers. The Layer 2
routes are copied and maintained in Layer 2 VPN VRF (Virtual Routing and
Forwarding) instances based on BGP Route Target Communities [RFC4360].
A Route Target Community, in the MPLS VPN context, identifies a set of rout-
ers that are part of a VPN (i.e., members of the community) that need to know
about the routes within the VPN (i.e., receive a particular address prefix). A
BGP Community, in general, defines a group of network nodes that share a
common understood property. The Community information identifies mem-
bers of the BGP Community and is carried as a path attribute in BGP UPDATE
messages. The Community information allows a network to perform specific
actions on the group of Community members without having to provide details
on each member.
• Layer 3 VPN Routes Learned from BGP: This table maintains Layer 3 VPN
routes learned via BGP from other PE routers [RFC4364]. The Layer 3 routes
in this table are copied and maintained in Layer 3 VRFs that have matching
route tables.
• IS-IS Routes: Intermediate System-to-Intermediate System (IS-IS)
[ISO10589:2002] is a link-state Interior Gateway Protocol (IGP) that allows a
network (i.e., routing domain) to be organized into a group of flooding subdo-
mains similar to OSPF [RFC2328]. The subdomains are referred to as areas
and each is assigned an Area Address. A routing device in IS-IS is referred to
as an Intermediate System (IS), and is identified by a Network Entity Title
(NET). Specifically, the NET identifies an IS-IS routing protocol instance
(router) running on an IS. A NET contains (defines) an Area Address and the
Routing and Forwarding Tables in Routing Devices 91
System ID of the router (or IS). When IS-IS is used to support IP routing, this
IS-IS table maintains the NETs. Level 1 routing refers to routing within an
area, while Level 2 routing refers to routing between Level 1 areas.
3.4.2 Forwarding Table
The Forwarding Table (Figure 3.7) contains all the active routes along with the most
relevant forwarding information contained in the Routing Table directly used or rel-
evant to data plane operations. It contains the information used for making actual
packet forwarding decisions (network address prefixes, next-hop IP addresses, out-
going interfaces, next-hop MAC addresses [adjacency information]). The Forward-
ing Table is sometimes referred to as the Forwarding Information Base (FIB). Using
the destination IP address of an IP packet, the forwarding engine consults the For-
warding Table to determine the appropriate outgoing interface and next-hop router,
and forwards the packet accordingly.
An active route is a route that is still retained in the Routing Table and has not
been marked for removal from the table (e.g., in RIP, the RIP route flush timer has
not expired). Note that when the RIP invalid timer expires (as discussed in Chapter
2), the route is simply marked as inaccessible and advertised as unreachable, but the
route may still be used to forward packets. The router copies the active routes from
its Routing Table to the Forwarding Table.
When routing or topology changes occur in the network, the router updates the IP
Routing Table and those changes then get reflected in the Forwarding Table. The
synchronization of the routing information in the Routing Table and Forwarding
Table is handled by a routing protocol process in the router’s operating system. Any
time a network change occurs, the routing protocol process determines all the routes
in the Routing Table and installs these in the Forwarding Table.
92 IP Routing Protocols
• Obtained from ARP requests sent to neighbor devices (routers and hosts)
• Gleaned from ARP request sent by neighbor devices
• Configured manually by the network administrator by considering the devices
that are directly connected to the router, that is, connected by a Layer 2 net-
work (point-to-point, VLAN/subnet).
• When an address prefix in the Routing Table entry is removed, or a new prefix
is added.
• When the next-hop IP address for a Routing Table entry changes or is removed.
• The ARP cache entry for a next hop IP changes, removed, or times out.
The data plane process is responsible for using the routing information main-
tained in the Forwarding Table to actually forward IP packets to their respective
destinations. The two planes work together to get packets to their correct destina-
tions. The control plane defines the routes on which IP packets should be forwarded
on, while the data plane executes exactly how the IP packet should be routed. The
forwarding information includes the underlying Layer 2 addresses required in an
outgoing packet (so that it they can reach the next hop IP destination), as well as
other operations required for forwarding the packet (Figure 3.8). The data plane per-
forms operations such as decrementing the Time-To-Live (TTL) field and recomput-
ing the IP header checksum.
The following steps summarized the main processing at the router when an IP
packet carried in an Ethernet frame is received [AWEYA1BK18] [AWEYA2BK19]:
• Bit/Symbol Reception: Interface receives bits and Ethernet symbols from the
transmission medium and constructs an Ethernet frame.
• Ethernet Frame Verification: Interface performs verification of Ethernet
frame length, Ethernet checksum (or Frame Check Sequence [FCS]), destina-
tion MAC address, etc.
• Encapsulated Protocol Demultiplexing: Interface demultiplexes the encap-
sulated packet according to its Ethertype or protocol number (IPv4 (= 0x0800),
IPv6 (= 0x86DD), ARP (= 0x0806), etc.).
• IP Packet Validation: IP forwarding engine validates the IP(v4) packet by
verifying the total data length passed by the Data Link Layer, IP checksum, IP
version, IP header length, IP packet total length, etc.
Rewrite Operations:
• Decrement IP TTL
Routing
Control Engine • Update IP Header Checksum
Parse and Table • Rewrite Source and
Validate Destination MAC Addresses
Destination • Update Ethernet Frame
1 IP Address 4 Checksum
Forwarding Engine
Destination IP Destination IP
Address Address
Forwarding Table
The router forwards the packet to the next hop using the above process, and this pro-
cess is repeated on a hop-by-hop basis, until the IP packet reaches its final
destination.
The Forwarding Table also plays a key role in certain security operations, such as
in unicast Reverse Path Forwarding (uRPF). In this technique, in addition to perform-
ing normal IP destination address lookup of a received packet, the router also per-
forms a look up in the Forwarding Table, using the IP source address of the packet.
If the router determines that the interface over which the packet was received does
not lead back to the IP source address over the best path, the packet is assumed to be
involved in a network attack or is malformed, and is dropped.
OSPF, or IS-IS) do not necessarily translate seamlessly into the routing metrics of
another routing protocol. This means serious consideration must be given to these
differences when carrying out route redistribution between different routing proto-
cols. Careless manipulation of routing metrics and Administrative Distances, when
redistributing routes between different routing protocols, can create routing loops,
thereby resulting in serious degradation of network performance.
For example, RIP’s routing metric is based on hop count, while that of EIGRP is based
on a composite metric that uses bandwidth, delay, load, Maximum Transmission Unit
(MTU), and reliability, where bandwidth and delay are the only default parameters.
Therefore, when routes are redistributed from one routing protocol to another, a routing
metric must be defined for the redistributed route that is understood by the receiving pro-
tocol. During redistribution, the redistributed route is assigned an artificial seed or starter
routing metric, that is compatible with the receiving routing protocol (see Chapter 7).
As discussed in Chapter 2, the Administrative Distances (or Route Preferences)
are used in route selection when different routing protocols provide routes to the
same network destination. The Administrative Distance is used to rate the trustwor-
thiness of a routing information source when multiple sources provide routes to a
particular network destination. A router uses the Administrative Distances to select
which route to install in its Routing Table when several routing information sources
provide routes to the same network destination. The route with the lowest Adminis-
trative Distance is preferred. The discussion in Chapter 7 shows that when not prop-
erly used, the Administrative Distance setting of the routing protocols can cause
problems during route redistribution. These problems can be in the form of ineffi-
cient routing, convergence problems, or routing loops.
REVIEW QUESTIONS
1. What are the main functions of the control engine (also called the routing
engine or route processor) in an IP router?
2. What are the main functions of the forwarding engine in an IP router?
3. What is the main difference between the IP Routing Table and the Forwarding
Table.
4. What are the advantages of distributed forwarding architectures over central-
ized forwarding architectures?
5. What are the advantages of control plane (or route processor) redundancy?
6. Why is the IP checksum recomputed when a packet is being forwarded?
7. Why is the Ethernet checksum recomputed when a packet is being
forwarded?
8. When forwarding an IP in an Ethernet frame to the next hop, what gets written
into the destination MAC and source MAC address fields of the Ethernet
frame?
9. How is the Layer 2 Adjacency Table of an IP router populated?
98 IP Routing Protocols
REFERENCES
[AWEYA1BK18]. James Aweya, Switch/Router Architectures: Shared-Bus and Shared-
Memory Based Systems, Wiley-IEEE Press, ISBN 9781119486152,
2018.
[AWEYA2000]. James Aweya, “On the Design of IP Routers. Part 1: Router
Architectures,” Journal of Systems Architecture (Elsevier Science), Vol.
46, April 2000, pp. 483–511.
[AWEYA2001]. James Aweya, “IP Router Architectures: An Overview,” International
Journal of Communication Systems (John Wiley & Sons, Ltd.), Vol. 14,
Issue 5, June 2001, pp. 447–475.
[AWEYA2BK19]. James Aweya, Switch/Router Architectures: Systems with Crossbar
Switch Fabrics, CRC Press, Taylor & Francis Group, ISBN
9780367407858, 2019.
[CISCINTROUT14]. Cisco Networking Academy, Routing Protocols Companion Guide,
Chapter “Cisco Networking Academy's Introduction to Routing
Dynamically”, Cisco Press, February 24, 2014.
[CISCNEXHA16]. Cisco Nexus 9000 Series NX-OS High Availability and Redundancy
Guide, Release 6.x, Chapter “System-Level High Availability”, May
13, 2016.
[ISO10589:2002]. ISO/IEC 10589:2002 – Information technology – Telecommunications
and Information Exchange between Systems–Intermediate System to
Intermediate System Intra-Domain Routing Information Exchange
Protocol for use in Conjunction with the Protocol for Providing the
Connectionless-Mode Network Service (ISO 8473)", International
Organization for Standardization (ISO). November 2002.
[RFC1812]. F. Baker, Ed., “Requirements for IP Version 4 Routers”, IETF RFC
1812, June 1995.
[RFC2328]. J. Moy, “OSPF Version 2”, IETF RFC 2328, April 1998.
[RFC4360]. S. Sangli, D. Tappan, and Y. Rekhter, “BGP Extended Communities
Attribute”, IETF RFC 4360, February 2006.
[RFC4364]. E. Rosen and Y. Rekhter, “BGP/MPLS IP Virtual Private Networks
(VPNs)”, IETF RFC 4364, February 2006.
4 Static Routes in the
Routing Table
4.1 INTRODUCTION
Many of today’s networks of all sizes use a combination of static and dynamic rout-
ing. Static routing is very appealing and widely used, because it does not require the
same amount of processing and memory resources, and routing information messag-
ing overhead, as in dynamic routing protocols. In this chapter, we contrast static
routing with the widely implemented dynamic routing protocols. We discuss, in addi-
tion, the different methods used for configuring static routes in Routing Tables.
99
100 IP Routing Protocols
10.1.20.0/24
implement initially, they enable network managers circumvent the tedious and often
time-consuming process of configuring and maintaining only static routes in a net-
work. However, in real-world networks, dynamic routing protocols are not used
alone, but are used in combination with static routing.
10.1.20.0/24
other routers. The network connected to the passive interface can still be advertised
in routing updates sent out other router interfaces.
Even with the many benefits of dynamic routing, making it a better choice for
routing, there are some networking scenarios where static routing is more suitable
(Figure 4.2). Many of today’s networks, especially those with moderate levels of
complexity, employ both dynamic and static routing. It is not uncommon today to see
large networks that employ a combination of dynamic and static routing. In such
scenarios, the routers will maintain Routing Tables that contain directly attached
networks/interfaces, routes learned dynamically via routing protocols, and manually
configured static routes.
Static routing is most suitable for the following networking scenarios
[CISCNETAIRD14] [CISCNETAISR14]:
Static routing is more applicable to the above networking scenarios because the
routes stay the same, and do not change, which also makes network connectivity
problems fairly easy to troubleshoot. Another benefit is, static routes do not require
routing update messages to maintain them, and require very little administrative and
operational overhead as mentioned above.
Unlike dynamic routing protocols, static routing does not require routing update
algorithms and mechanisms, and route advertisement over the network. As a result,
static routing uses less network bandwidth (as routers do not exchange routing
information), has better security, does not use extra router processing and memory
resources (to calculate and communicate routing information) as in dynamic routing
(Figure 4.3).
However, it should be recognized that static routing is not easy to implement in a
large network, where configuring and managing a large number of static routes can
be time consuming, and a complete knowledge of the entire network is required for
proper implementation. In such networks, if there are link failures, a static route that
passes through such links cannot reroute traffic. Whenever link failures occur, such
events require manual intervention to reroute traffic in the network.
Thus, static routing does not scale well in networks that are growing and undergo-
ing changes because configuration and maintenance of routes can become over-
whelming and cumbersome. Manual intervention is always required to reconfigure
and manage changing routing conditions, and the configuration of routes can be
error-prone, especially in large and/or complex networks.
Despite the importance and benefits of implementing dynamic routing in a
network, network design practices recognize that static routing still has a role play in
networking. As discussed above, static routing is suitable for simple topologies such
as routing to a stub network, as a default static route, or to a smaller network with
only one path to the outside world. However, network engineers have come to
Static Route
192.168.2.0/24
192.168.4.0/24 Other Networks
Ge0/1 Ge0/3 Ge0/4 Ge0/2
Router Router
R1 R2
Default Static Route
• From the figure, network 192.168.4.0/24 attached to Router R1 has only one path to reach other networks attached to R2 or
beyond.
• This makes network 192.168.4.0/24 a stub network and Router R1 a stub router.
• Therefore, running a routing protocol between Routers R1 and R2 would be unnecessary and a waste of resources.
• With this, a static route can be configured on Router R2 to reach the R1.
• Furthermore, because Router R1 has only one path to send out traffic to other destinations outside network 192.168.4.0/24,
a default static route can be configured on R1 pointing to R2 as the next hop for all other networks.
recognize that configuring and managing static routes in large networks can become
cumbersome and time consuming and the complexity of configuration increases dra-
matically as the network grows.
Static routes are installed permanently in the Routing (and Forwarding) Tables
until manually removed or changed. These routes often contain only one or very few
hops to a destination prefix (e.g., a well-known server), and are configured manually
by the network manager and do not change. Through the use appropriate configura-
tion commands (depending on the routing platform), a static route can be created in
the Routing Table to a network destination. A network prefix can be added to the
Routing Table, by defining at minimum, the route as static, and associating with it, an
outgoing interface and a next-hop IP address.
The router then installs the static route in the Routing Table when the associated
next-hop IP address is reachable, and then forwards all traffic destined for the static
route to the next-hop IP address for delivery to the destination. As discussed in Chapter
2, static route, by default, has a lower Administrative Distance (or Route Preference)
than any dynamic routing protocol to the same destination. When multiple paths to a
network destination exists including dynamically learned routes and a static route, the
static route will take precedence over all the routes discovered via the dynamic rout-
ing protocols since the default Administrative Distance of a static route is 1.
and where there are any remote networks and routes that are not currently installed
in its Routing Table, it will add these to that table.
The routers in the network continue the exchange of routing information until full
knowledge and/or a converged view of the network takes place (depending on the
routing protocol in use). At some point in time, each router in the network will have
knowledge about its own directly connected networks, in addition to the routes to the
connected networks of its neighbor routers. The routers continue to exchange periodic
and/or triggered updates as a process of bringing the network toward convergence.
Each time a router receives an update, it checks it for new network information.
However, with static routing, the network administrator manually configures any
required static route to a specific remote network in the route table. The static routes
are not automatically or dynamically reconfigured, but instead have to be manually
reconfigured and reentered into the Routing Table whenever changes in the network
topology or state occur. This means a static route that becomes unavailable, still
remains in the Routing Table and does not change, until the network administrator
manually removes it, and reconfigures another route to that remote network.
Static routes can be redistributed into dynamic routing protocols, but obviously,
routing information learned by dynamic routing protocols cannot be redistributed
into a static Routing Table. We discuss below the types of static routes that can be
configured in routing platforms [CISCNETAISR14].
For example, when configuring a static route over a physical interface that leads to the
next hop, the IP address and prefix length (or enter the IP address and network mask),
can be used, followed by the outgoing interface number to be used as the next hop:
Router
R4
Router
R3
Router Router
R5 R2
Other Networks
192.168.4.0/24
Router
R1
use. The primary criterion for route selection is the Administrative Distance (or
Route Preference), which allows the router to control which of the routes to use as
the primary route for the destination.
Route selection can be influenced by setting the Administrative Distance (or Route
Preference) associated with each next hop to a specified value (to allow the ranking
of static routes) [JUNIPROINGUI20]. The static routes with a lower Administrative
Distance are always preferred and used for traffic forwarding. When a route prefer-
ence is not set, the source router can select in a random fashion one of the next-hop
addresses to install in its IP Forwarding Table to be used for traffic forwarding.
In general, when multiple static routes with different next-hop addresses are con-
figured for a given destination, they are all treated as standard static routes (they have
the default static routes properties). However, if there is the need to configure two
different next-hop addresses for a particular destination and have them treated differ-
ently, one of them can be defined as a qualified next hop [JUNIPROINGUI20] (see
also the concept of floating routes below).
Using qualified next hops, the network administrator can associate one or more
properties with any one of the next-hop addresses. In Juniper Network Operating
System (JUNOS), an overall preference can be set for a particular static route, and
then a different preference specified for the qualified next hop [JUNIPROINGUI20].
For example, let us assume two next-hop addresses (10.10.20.20 and 10.10.20.17)
are associated with the static route 192.168.50.6/32. The network administrator can
assign a general preference to the entire static route (192.168.50.6/32), and then a
different preference to only the qualified next-hop address 10.10.20.17. The qualified
next hop 10.10.20.17 can be assigned the preference 7, while the next-hop 10.10.20.20
is assigned the preference 6.
This means, entries in the Routing Table that identify a specific destination with a
larger network mask (or network prefix) for a packet’s destination address will take
precedence over the default static route.
The default static route identifies a gateway (or next-hop router) to which packets
with destination addresses that do not match specific dynamically learned or static
route, are forwarded. Configuring a static route to network 0.0.0.0/0 is a way of
adding a gateway of last resort on a router. At a minimum, the configuration
information required is the outgoing interface, destination IP address (0.0.0.0),
network mask (0.0.0.0), IP address of the IP next-hop router (or gateway), and an
optional Administrative Distance value (Figures 4.5 and 4.6).
Static Routes in the Routing Table 107
Router
R4
Router
R3
Router Router
R5 R2
Other Networks
192.168.4.0/24
Router
R1
Router R1 only needs to know about its directly connected networks and then use a default static route pointing to R2 to
send traffic to all other networks.
Router
R1
172.16.14.0
Router ISP
R3 Router
127.10.10.0/24
Internet
Default Route
Router
R2
172.16.15.0
• Let us assume the Routers R1, R2, and R3 in this network are running RIP.
• Router R3 is connected to the ISP’s router and has a static default route that points to it.
• It is possible to use RIP to advertise that default route to other routers in the local network, that is, Routers R1 and R2.
• On Router R3, we simply need to enter the default-information originatecommand in the RIP configuration mode:
• Routers R1 and R2 do not need any additional configuration since they learn the default route just like any other RIP
route
Step 1: Convert all the IPv4 addresses from dotted decimal notation to binary
format, and list and align each address in a row.
Step 2: Starting from the far-left bit, locate the bit position where the common
pattern or matching binary bits in each address ends.
Step 3: The network mask and address prefix for the summary route occupies
the bit positions where all the leftmost bits match consecutively, and ends
before the column of bits that do not match, which is, the summary
boundary.
Static Routes in the Routing Table 109
Router
R3
172.16.14.0
Router Router
R2 R1
Router
R4
• Router R1 would require four separate static routes to reach the 172.16.12.0/24 to 172.16.15.0/24
networks.
• Instead, Router R1 can be configured with one summary static route and still provide connectivity to
these networks.
Step 4: Count the number of leftmost matching bits (common pattern) found
above to determine the network address prefix length or, equivalently, the
network mask for the summary route.
Step 5: The IP address of the summary route is represented by the matching
bits (common pattern) followed by an all 0 bits up to the rightmost end to
make the 32 bits of the IPv4 address. The summary route address can be
expressed as the common pattern (in dotted decimal notation), followed by
a slash (/), then followed by the prefix length (or number of common pattern
bits) determined above.
A single static summary route can be configured in the Routing Table to replace a
set of static routes with contiguous IP addresses using the steps described above. This
helps reduce the number of (static) Routing Table entries and the number of routes
advertised, in addition to the other benefits described above. The steps for configuring
a summary static route are similar to that of a standard static route.
For example, instead of configuring four separate static routes to reach the net-
works 172.20.0.0, 172.21.0.0, 172.22.0.0, and 172.23.0.0, one summary static route
172.20.0.0/14 (with network mask 255.252.0.0) can be configured, and still provide
connectivity to all of these four networks. If these four static routes already exist in
the Routing Table, they can be removed and then replaced with the new summary
static route.
If multiple static routes use the same outgoing router interface or next-hop IP address to
reach destination networks that have contiguous IP addresses, then they can be
110 IP Routing Protocols
Example 4.1: Using these steps, the summary route for the networks
172.16.12.0, 172.16.13.0, 172.16.14.0, and 172.16.15.0 can be determined as
follows:
The four networks have been summarized into the single network address
and prefix 172.16.12.0/22 (with network mask 255.255.252.0). After the
summary route has been created, a router can replace all the component
routes with the single summary route in its Routing Table.
Example 4.2:
Example 4.3:
aggregated into a single summary static route. Configuring summary static routes mini-
mizes the administrative and operational overhead of managing a large number of static
routes in a network, and also makes their configuration less prone to errors.
ISP
Branch
Office Head Office
Network Network
Router Router
R1 R2
Private WAN
Primary Route
• The Branch Office router (Router R1) typically forwards all traffic to the Head Office router (Router 2) over the private WAN.
• Let us assume the routers exchange route information using OSPF (with default administrative distance of 110).
• A floating static route, with an administrative distance of 111 or higher, could be configured to serve as a backup route.
• If the private WAN route fails and the OSPF route disappears from the routing table, Router R1 selects the floating static route
as the best path to reach the Head Office network.
network convergence time. A primary route that experiences flapping (i.e., being
continuously dropped and re-established) can cause the floating static route and its
backup interface to be unnecessarily activated and deactivated.
REVIEW QUESTIONS
1. What are the benefits of dynamic routing?
2. What the benefits of static routing?
3. What are the limitations of static routing?
4. What is a stub network?
5. What is a default static route?
6. What are the benefits of route summarization?
7. What is a summary static route?
8. What is a floating static route?
9. Explain briefly how the Administrative Distance (also called the Route
Preference) is used when employing floating static routes.
REFERENCES
[CISCNETAIRD14]. Cisco Networking Academy's Introduction to Routing Dynamically,
March 24, 2014, Chapter from Cisco Networking Academy, Cisco
Press.
[CISCNETAISR14]. Cisco Networking Academy's Introduction to Static Routing, March
27, 2014, Chapter from Cisco Networking Academy, Cisco Press.
[JUNIPROINGUI20]. Juniper Networks, Protocol-Independent Routing Properties User
Guide, March 26, 2020.
[RFC1517]. R. Hinden, Ed., “Applicability Statement for the Implementation of
Classless Inter-Domain Routing (CIDR)”, IETF RFC 1517, September
1993.
[RFC1518]. Y. Rekhter and T. Li, “An Architecture for IP Address Allocation with
CIDR”, IETF RFC 1518, September 1993.
[RFC1519]. V. Fuller, T. Li, J. Yu, and K. Varadhan, “Classless Inter-Domain
Routing (CIDR): An Address Assignment and Aggregation Strategy”,
IETF RFC 1519, September 1993.
[RFC1878]. T. Pummill and B. Manning, “Variable Length Subnet Table for IPv4”,
IETF RFC 1878, December 1995.
[RFC4632]. V. Fuller, T. Li, “Classless Inter-Domain Routing (CIDR): The Internet
Address Assignment and Aggregation Plan”, IETF RFC 4632, August
2006.
5 Routing Information
Protocol (RIP)
5.1 INTRODUCTION
This chapter and the next describe, respectively, RIP and EIGRP, which are two
examples of the most common routing protocols used in today’s networks. We dis-
cuss the main features of each routing protocol, protocol packet formats, authentica-
tion mechanisms, and their high-level router architectures, processes, and databases.
The discussion covers some relevant topics related to RIP and EIGRP operations,
and the way these protocols generate routing information for use in IP packet for-
warding. Each routing protocol maintains a number of databases which hold infor-
mation about neighbor routers, routing information learned from other routers in the
network, and information used for protocol-specific operations. We discuss these
databases as well.
The router architecture discussions include the protocol-specific processes, rout-
ing databases and their contents, and the various router control plane and data plane
processes required for forwarding IP packet in an IGP routing domain. The discus-
sion covers in particular, how the routing information is used in the control and data
planes operations in a router. The router architecture discussions are limited to for-
warding of IP packet since forwarding at Layer 2 is relatively simple. The Layer 3
forwarding components are much more complex, and require the cooperation of
many more network devices to realize IP packet routing.
115
116 IP Routing Protocols
Different routing protocols use different databases that have different contents
and serve different purposes. The procedures and algorithms that a routing protocol
uses to learn about remote network destinations, and to dynamically detect and
adapt to changes in the network topology and state, depend very much on the spe-
cific procedures and algorithms the protocol uses and its operational
characteristics.
In this chapter and the next, we discuss RIP and EIGRP, respectively, with each
chapter describing the most identifying characteristics, operations, and databases of
each protocol. We discuss the main features of each routing protocol, which include:
• Routing Protocol Messages: These are the messages the routing protocol
sends and receives in order to discover neighbor routers, exchange routing
information, and maintain an up-to-date picture about the state of the network.
Each router in the network transmits and receives routing protocol messages
from neighbor routers reachable on its interfaces. The routers send routing
messages to indicate network reachability along with the cost associated with
routes to those networks. Exchanging routing information enables routers to
discover remote networks, detect network topology changes, and allow the
routers to advertise such changes or events to other routers in the network.
Routing updates generally are sent at regular intervals, and/or after a change in
network topology occurs, depending on the routing protocol type.
• Data Structures: These are the databases used to store all the routing informa-
tion the routing protocol needs for its operations.
• Best Path Computation Algorithm: These are the algorithms the routing pro-
tocols use to derive a picture of the network topology from which the best paths
to network destinations are determined.
Out of the different IPv4 IGPs available for distributing routing information within
an Autonomous System, the most widely deployed protocols today are RIPv2,
EIGRP, OSPFv2, and IS-IS. EIGRP is a proprietary IGP protocol commonly imple-
mented in Cisco routing devices [CISCID16406] [RFC7868]. As discussed in
Chapter 2, both RIP and EIGRP are distance-vector routing protocols, while OSPF
and IS-IS are link-state routing protocols.
As discussed in Chapter 2, a router running a distance-vector routing protocol
does not have a complete map of the entire network topology, and has no knowledge
of the entire path it takes to reach any particular remote network destination. The
router only knows the distance metric (e.g., hop count in RIP, or bandwidth and delay
in EIGRP) to reach that destination, and the outgoing interface (i.e., next hop) that
can be used to get there. RIPv2 uses the Bellman–Ford algorithm, while EIGRP uses
the Diffusing Update Algorithm (DUAL) to determine the best routes to each net-
work destination. These best routes are then installed in the router’s Routing Table.
The Routing Table generally contains the directly connected networks of the local
router, routes learned dynamically, and configured statically. As discussed in Chapter
4, a static route defines an explicit path that is configured manually by the network
administrator between two routers (a source router and a next-hop). It cannot be
Routing Information Protocol (RIP) 117
updated automatically when network topology changes occur but instead, must be
manually reconfigured.
5.3 RIP OVERVIEW
RIPv1 is a first-generation IPv4 routing protocol specified in RFC 1058 [RFC1058].
It was designed to be simple and easy to configure, and was very suitable for small
networks. RIPv1 had several limitations and had to be improved to a classless routing
protocol version, RIPv2 [RFC2453]. RIPv2 introduced a number of improvements
which included the following: support of VLSM and CIDR (it includes the network
mask in routing updates); transmission of routing updates to multicast address
224.0.0.9 for increased network efficiency, instead of the broadcast address
255.255.255.255; support of manual route summarization on any router interface (to
reduced Routing Table and update entries); and support of authentication mecha-
nisms to secure the exchange of routing updates between neighbor routers.
A RIPv2 router will advertise to neighbors its directly connected routes/networks
as well as the routes it has learned from other routers and installed in its Routing
Table. RIPv2 routers do not form neighbor relationships (adjacencies) with other
RIPv2 routers in the network, and do not use any form of Hello protocol to track
established adjacencies. They simply send routing updates message to the well-
known multicast address 224.0.0.9.
RIPv2 support the authentication of RIPv2 routing update messages using plain-
text passwords [RFC1388] [RFC1723] [RFC2453], or cryptographic authentication
[RFC4822] (e.g., Message Digest 5 [MD5] algorithm authentication [RFC1321],
see appropriate section below). Authentication helps to ensure that the routing
updates a router receives originate from authorized routing information sources. An
IPv6 version of RIP was also developed RIPng (RIP Next Generation) [RFC2080]
based on RIPv2 which still has a 15-hop limit, and a default Administrative Distance
of 120 (as RIPv2).
As discussed in Chapter 2, RIP is distance-vector routing protocol and an IGP
used for distributing routing information within an Autonomous System. RIP deter-
mines the best path to destinations within an Autonomous System by considering
only the number of hops it takes to get to the destinations. This technique does not
consider the differences in link speed on the available paths nor their traffic loads and
utilization, and all other metrics (as in EIGRP and OSPF), many of which constitute
important factors in determining the best path to a destination. This chapter describes
the main characteristics of RIPv2 and the processes and databases involved in the
creation of the Routing Table. RIP has already been described in greater detail in
Chapter 2; so, most of that material will not be repeated here.
0 7 15 23 31
Command Version must be zero Message Header
IPv4 Address
20-Byte
Subnet Mask Message
Entry
Next Hop Up to 25 Entries
(May be
of the 20-Byte
Metric Repeated)
Message Allowed
Field Meaning
Indicates the type of message being sent (e.g., request or response message). A request
message is sent for there sponding router to send all or part of its routing table. A response
Command (8 Bits) message may be sent inresponse to are quest message, or it may be an unsolicited routing
update transmitted by a router. Other command field type shave been defined for RIP running
on demand circuits (RFC1582, RFC2091).
Version (8 Bits) Specifies version of RIP used by the originating router
Specifies address family used by the originating router (The AFI for IP is 2). Each entry has an
Address Family
AFI to indicate the type of addresss pecified.The AFI is set to 0xFFFF for the first entry to
Identifier (AFI) (16 Bits)
indicate that the remainder of the entry contains authentication information.
Provides a method for distinguishing between internal routes (learned by RIP within the routing
Route Tag (16 Bits) domain) and external routes (learned and imported from other routing protocols). This field can
also be used for other purposes, including routing policy control.
IPv4 Address (32 Bits) Specifies the destination IPv4 address (IPv4 address of the route being advertised)
Mask associated with the destination IPv4 address (if this field is 0,no sub net mask has been
Subnet Mask (32 Bits)
specified for the address)
IPv4 address of the next-hop router to which packets are forwarded to reach the destination.
Next Hop (32 Bits) Specifying a value of 0.0.0.0indicates that routing should be done via the router that originated
the RIP advertisement.
Value of the metric advertised for the destination IPv4 address (metricis between 1 and 15 for a
Metric (32 Bits)
valid route or 16 for an unreachable route)
unsolicited routing update sent to other routers. RIP sends Response messages
periodically, and also when a Request message is received. Periodic RIP
Response messages are referred to as routing update messages.
Each RIPv2 message contains a 4-byte header containing the Command and Version
fields, with the remaining portion of the message consisting of routing entries with
each entry being of 20 bytes in length. A single RIP message can carry at most 25
routing entries, with each routing entry containing the AFI identifying the type of
network-layer protocol address used in the routing entry. A RIPv2 message has the
following properties:
• Each route entry in a RIPv2 message has five 32-bit (4-byte) words and these
are repeated for each entry (AFI [16 bits]; unused [16 bits]; Route tag [16 bits];
IPv4 address; Subnet mask [32 bits]; Next-hop [32 bits]; Metric [32 bits]).
• Each route entry takes five 8-byes words (20 bytes) and each RIP message can
carry up to 25 route entries.
• The maximum RIPv2 message size is limited to 512 bytes, excluding the IPv4
header (which has a fixed header size of 20 bytes).
o Multiplying 25 routes by 20 bytes (per route), plus the RIPv2 header (4
bytes), plus, the UDP header (8 bytes), gives a maximum RIPv2 message
size of 512 bytes.
• If the RIPv2 carries authentication fields (i.e., AFI specifies an authenticated
message), the RIPv2 message can only carry only 24 route entries.
• In the case of IP (IPv4 and IPv6) route entries, the AFI is 2 (the IPv4 Address
Family Identifier is referred to as AF_INET).
• When a RIPv2 carries authentication information, the first route entry space in
the RIPv2 routing update message is used to carry the authentication informa-
tion, and the AFI value in this route entry is set to 0xFFFF in hexadecimal (or
65535 in decimal to indicate authentication present).
• A RIP Request message that is sent asking for a neighbor router’s full Routing
Table update contains just one route entry, with the AFI for this single route
entry set to zero (0x0000).
o Anytime a RIP router processes an incoming Request message, it does so
entry by entry. Many times, a router will receive a Request message that has
120 IP Routing Protocols
a single entry in it with a routing metric (hop count) of 16, and an AFI field
that consists of all zeros. A Request message containing such information is
interpreted by the receiver as “Send me your entire Routing Table”.
A router may receive a Request message that contains one or more entries for specific
routes. The receiving router in this case will consult its Routing Table for each of the
destinations listed. If the router finds a listed destination, it will send the correspond-
ing information about that route back to the requesting router in a Response message
via unicast. If the router finds no corresponding requested destination or route, it will
send by unicast back to the requesting router, a Response message containing a met-
ric field for the route set to infinity (16).
• IPv4 Address: This is the IPv4 address of the destination network or host
• Next-Hop Router: This specifies the next router on the path to the
destination
• Outbound Interface: This is the exit interface on which packets should be
forwarded to reach the destination
• Metric: This indicates the number of hops that would be traversed to get the
destination
• Timers: These specifies various periodic time intervals for maintaining routes,
and include a timer that indicates the elapse time since a routing entry was last
updated
The Routing Table is initialized with networks are directly connected to the router,
and the contents are updated with routing information received in routing update
messages from neighboring routers. Each router in the routing domain sends routing
update messages that describe its current Routing Table.
5.4.4 RIPv2 Timers
RIPv2 uses a number of timers which have been described in Chapter 2 with the fol-
lowing default settings: Update timer (30 seconds); Invalid timer (six updates peri-
ods, that is, 30 × 6 = 180 seconds); Flush timer (60 seconds longer than the default
setting of the invalid timer and is 240 seconds); Holddown timer (180 seconds).
RIPv2 also supports a number of loop-prevention strategies such as counting to infin-
ity, poison reverse, and split horizon.
Request messages from its neighbors asking for all or some part of the local current
Routing Table contents. Also, when a router first boots up, or restarts its RIP routing
process, it will send Request messages asking for the Routing Tables of all active
neighbor routers. The router will send a Request message to each neighbor seeking
routing information that can be used to populate its local Routing Table as quickly as
possible.
then sends a triggered update. If the router determines the metric of the received
route to be equal to the infinity metric (16), it will start the process of deleting
the route from its Routing Table.
Prior to sending a Response message, a router will examine each route in its current
Routing Table. If the router determines that it should include a route in the Response
message due to local administrative controls, then it will add the destination address
and metric of the route to the message. Due to limitations imposed on the maximum
size of a RIP message, a Response message can contain no more than 25 routing
entries, or routes. When more than 25 routes need to be sent, the router will send
multiple Response packets covering the routes.
5.5 RIPV2 AUTHENTICATION
RIP routers exchange routing information through RIP Request and Response mes-
sages. RIPv2 supports authentication using plaintext passwords [RFC1388]
[RFC1723] [RFC2453], in addition to cryptographic authentication [RFC4822]
(e.g., using the MD5 algorithm [RFC1321]). RIPv2 does not set aside a specific field
in the message header for carrying authentication information. Instead, RIPv2 carries
authentication information in one of the fields used for a single route entry. When
Routing Information Protocol (RIP) 123
RIPv2 sends routing updates on an interface that has authentication enabled, the
authentication information is placed in the space normally reserved for the first route
entry in each routing update message.
RIPv2 authentication is on a per message basis. Since a RIPv2 message header
has only one 2-byte field available (the 2-byte unused field must be set to zero), and
since any good authentication scheme will take more than two bytes, RIPv2 authen-
tication uses the space occupied by an entire RIP route entry.
5.5.1 Plaintext Authentication
RIPv2 supports plaintext authentication by placing information in the fields that
would normally carry the first route entry of the RIPv2 message. RIPv2 identifies the
field as an authentication field, rather than a normal route entry, by specifying 0xFFFF
in the first two bytes, that is, the AFI field. The remainder of the first route entry space
contains the RIPv2 authentication information. RIPv2 has the following
Authentication Type values:
With the first route entry field used for carrying authentication information, a RIPv2
routing update message sent out an interface enabled for authentication can carry a
maximum of 24 routes. Figure 5.3 shows the format of a RIPv2 message carrying
plaintext authentication.
As shown in Figure 5.3, a RIPv2 message indicates the presence of authentication
information by setting the AFI field to 0xFFFF (all 1s). The Authentication Type for
simple plaintext authentication is 0x0002 (two). The remaining 16 bytes in the RIPv2
authentication header (Figure 5.3) can carry a simple plaintext password of up to 16
characters. The password is written in the 16-byte field left-justified, and if the pass-
word occupies less than 16 bytes, the unused bits of the 16-byte field are set to zero.
This plaintext password is transmitted along with the RIPv2 message to neighbor
routers who have a security association with the sender. RIPv2 messages are sent to
the IPv4 multicast address 224.0.0.9. The receiving router, knowing the same pass-
word, compares its own password to that in the transmitted RIPv2 message. If the
local password matches the password transmitted with the message, the message is
accepted, if not, it is rejected.
Plaintext authentication does not provide strong security because a router includes
the unencrypted password (authentication key) in every RIPv2 message it sends. This
method of authentication is very vulnerable to attacks, thereby, making cryptographic
authentication preferable. The growth of internetwork has created the need for stron-
ger authentication of routing information. Plaintext authentication is not really useful
from a security perspective because by simply sniffing information on the
124 IP Routing Protocols
0 7 15 23 31
Command Version must be zero
Address Family Identifier Authentication Type*
=0xFFFF = 0x0002
Password
Authentication
Password
Header
Password
Password
IPv4 Address
Subnet Mask
Next Hop
Metric
transmission medium, an attacker can read the plaintext RIPv2 password, and use
that knowledge to inject malicious routing information into the RIPv2 Routing Table.
5.5.2 Cryptographic Authentication
With both plaintext and cryptographic authentication, the maximum number of route
entries in a single RIPv2 routing update is reduced to 24. RIPv2 supports the keyed-
MD5 cryptographic authentication mechanism, and even stronger authentication
based on the SHA family of hash algorithms (HMAC-SHA-1, HMAC-SHA-256,
HMAC-SHA-384, and HMAC-SHA-512) [RFC4822]. The RIPv2 cryptographic
authentication mechanism is algorithm-independent, allowing for different types of
algorithms to be used as needed.
RIPv2 cryptographic authentication is intended to reduce the risk of attacks on
the exchange of RIPv2 routing information. Such a mechanism greatly reduces the
vulnerability of the routing information from malicious attacks. When crypto-
graphic authentication is used, instead of transmitting a plaintext password directly
in the RIPv2 message, the router will include the output of a keyed cryptographic
one-way function in the RIPv2 message’s authentication field. Only authorized
routers involved in the RIPv2 routing information exchange know the RIPv2 authen-
tication key.
The RIPv2 authentication key is never transmitted over the network to the receiver.
Also, RIPv2 authentication does not provide routing information confidentiality,
because RIPv2 messages are transmitted in the cleartext format. This is because the
Routing Information Protocol (RIP) 125
0 7 15 23 31
Command Version Routing Domain
Address Family Identifier Authentication Type
=0xFFFF = 0x0003
Authentication
RIPv2 Packet Length Key ID
Data Length
Sequence Number (non-decreasing)
Reserved must be zero
Reserved must be zero
0xFFFF 0x0001
Field Meaning
RIPv2 Packet Length (16 Specifies an offset from the start of the RIPv2 header to the end of the regular RIPv2 message
Bits) excluding the authentication trailer.
Key ID (8 Bits) Contains a value to identify the RIPv2 Security Association in use for this message.
Authentication Data
Contains the length in bytes of the trailing Authentication Data field
Length (8 Bits)
Sequence Number (32 Contains a non-decreasing number sent in all messages from a given source router with a
Bits) given Key ID value (initial sequence number is a random value).
Contains the cryptographic Authentication Data used to validate this message. The length of
Authentication Data
the data is stored in the Authentication Data Length above
RIPv2 message. Each RIPv2 security association established in a router also has a
lifetime (start time [valid time] and stop time [invalid]) specified for it.
If the router supports multiple authentication algorithms, then the RIPv2 security
association also includes information about the type of authentication algorithm and
mode (KEYED-MD5, HMAC-SHA-1, HMAC-SHA-256, HMAC-SHA-384, and
HMAC-SHA-512) used for a RIPv2 message. The actual authentication key that is
used with the selected cryptographic authentication algorithm (and is never carried in
any RIPv2 message), is also part of the RIPv2 security association. The authentica-
tion trailer (with AFI = 0xFFFF and Authentication Type = 0x0001) as shown in
Figure 5.4 carries the Authentication Data which is the output of the keyed crypto-
graphic hash function.
The MD5 algorithm takes as input a message of arbitrary length (RIPv2 routing
update), and a known secret password and generates as output, a 128-bit (or 16-byte)
one-way message digest (hash value). This makes it a more secure authentication
method than using plaintext passwords. The message digest is transmitted along with
the RIPv2 message (Figure 5.4). The receiving RIPv2 router, knowing the same
secret password (not transmitted in any RIPv2 message), computes its own message
digest (or hash value). If the contents of the received RIPv2 message has not been
modified or tampered with, the receiver’s computed hash value should match the
hash value transmitted with the RIPv2 message.
1. The router should calculate the standard UDP checksum (for the UDP data-
gram carrying the RIPv2 message), but may choose to set it to zero because the
use of any cryptographic authentication mechanism will provide stronger data
integrity check than the standard UDP checksum.
2. The router sets the Authentication Type field to 0x0003 to indicate crypto-
graphic authentication.
3. The 16-byte Authentication password field (i.e., 16 bytes after the
Authentication Type field) is used to carry a RIPv2 Packet Length (or offset),
Key-ID, Authentication Data Length, and Sequence Number.
The router uses the following process to create the RIPv2 Packet:
1. The size of the main body of the RIPv2 message is written into the Packet
Length field of the RIPv2 header.
2. The router selects an appropriate RIPv2 security association for the RIPv2
message being created packet, based on the message’s outbound interface. The
router can use any valid RIPv2 security association for that outbound interface.
The router then fills in the Packet Length (offset), Key ID, and Authentication
Data Length fields appropriately.
Routing Information Protocol (RIP) 127
The router writes the output of the authentication algorithm which is the Authentication
Data value into the Authentication Data field. The router will not transmit any trailing
pad, as it is entirely predictable from the Authentication Algorithm used and the mes-
sage length.
When the Keyed-MD5 algorithm is used, the router will append the RIPv2
Authentication Key (which is always 16 bytes when Keyed-MD5 is used) to the
RIPv2 message in router memory. The router will also add the Trailing Pad for the
MD5 algorithm and message length fields in memory as illustrated in Figure 5.5
(which shows how these fields appear in memory). The router will then calculate the
Authentication Data to be carried in the RIPv2 message according to the MD5 algo-
rithm defined in [RFC1321].
1. The receiver extracts the Authentication Data in the received RIPv2 message
and stores it for processing later.
2. The receiver determines the appropriate RIPv2 security association from the Key
ID field value and the interface on which the RIPv2 message was received. If the
router finds no valid RIPv2 security association on that interface for the received
Key ID, then the router will cease all processing for the incoming RIPv2 mes-
sage, and log a security event for the message as described in [RFC4822].
3. The router then performs cryptographic algorithm-dependent processing,
using the algorithm specified by the RIPv2 security association for the RIPv2
message. This calculation produces Authentication Data based on the informa-
tion carried in the received RIPv2 message, and the RIPv2 security association
information for the message.
Authentication Key
(16 Bytes Long)
Field Meaning
Specifies value of the cryptographic authentication key used with the chosen Authentication
Authentication Key
Algorithm. The authentication key must never be sent over the network in cleartext via any
(16 Bits)
protocol. The length of this key depends on the Authentication Algorithm used.
FIGURE 5.5 Creating Trailing Pad for Keyed MD5 and Message Length Fields in Sender’s
Memory
128 IP Routing Protocols
4. The router next compares the resulting Authentication Data with the received
Authentication Data.
5. If the calculated and received authentication data do not match, then the RIPv2
message must be discarded and a security event must be logged for the
message.
6. If the receiver has heard from the neighbor recently and long enough to have via-
ble routes in its Routing Table, and the Sequence Number in the received RIPv2
message is less than the last sequence number received, then the router must dis-
card the message without further processing, and must log a security event.
When a router loses connectivity with the neighbor, it should accept from
that neighbor, either a RIPv2 message with a Sequence Number of 0, or a mes-
sage with a sequence number higher than the Sequence Number of the last
received RIPv2 message.
7. When the receiver accepts a RIPv2 message, it will truncate the received mes-
sage to the standard RIPv2 message (discarding the authentication trailer), and
then process this part normally (in accordance with the RIPv2 standard in
[RFC2453]). The receiver will then update the last received Sequence Number
for that sender and RIPv2 security association.
Routing
RIP Process
Protocol
Input Other Routes
RIP Routing &
Route Store Redistribution
Routing Protocol Protocols
Process Manager Routing
Database Input Table
Manager
Socket IP
Interface
Manager Routing
Manager
Table
in their environments. This allows routers to detect and/or solve many networking
problems using information that routinely passes through them.
The Management Process in Figure 6 is responsible for gathering and displaying
system and network statistics. This allows a network administrator to display specific
router statistics such as traffic statistics (e.g., forwarded packets, dropped packets,
queue occupancies, and link utilization) and the contents of router databases (e.g.,
Routing Tables, Forwarding Tables, Route/Flow Caches, and Adjacency Tables). For
example, the traffic statistics can be used to determine system and network resource
utilization, and also to troubleshoot and solve network problems. A network admin-
istrator may also use various management tools to gather statistics that provide infor-
mation about the reachability of other nodes and discover the routes that packets take
in the network.
The Management Process typically supports tools and commands that can be used
to display the following:
• The current state of the Routing Table, including the network prefixes, next
hop IP addresses, outgoing router interfaces, routing protocol that derived each
route, Administrative Distance of the routing information source, and whether
the destination network is remote or directly connected, and possibly, any rout-
ing metrics.
• The current state of the active routing protocol process, including the settings
of its routing update timers, Administrative Distance, and active networks for
which the routing protocol process is the routing information source.
• The current state of the active accounting and statistics counters/databases,
including the number of packets and bytes received/forwarded over interfaces,
exchanged between particular sources and destinations.
• The contents of the Adjacency Table (or ARP cache), including the destination
or next hop IP address, the interface through which that destination is reach-
able, the encapsulation method used, and the Layer 2 address of that
destination.
• The current state of the router interfaces, including whether an interface and its
Physical Layer hardware are up, whether certain protocols (such as ARP and
ICMP) are enabled, and the current trust/security level of the interface.
• Router protocol statistics, including the number of packets received and sent
by the following protocols (plus errors experienced): IP, TCP, UDP, RIP,
EIGRP, OSPF, IS-IS, BGP, ARP, etc.
• Logging of all transactions carried out by the router protocols: ICMP, RIP,
EIGRP, OSPF, IS-IS, RIP, TCP, UDP, etc.
The RIP Process itself can be divided into subcomponents with well-defined inter-
faces between them as illustrated in Figure 5.6. These subcomponents are described
in greater detail in the subsections below.
Routing Information Protocol (RIP) 131
• Tracks All Routes Stored in the RIP Process: Upon startup, each RIP router
initializes its Routing Table with the network address prefixes and interfaces of
the networks that are directly connected to it. Then, periodically, each router
sends routing updates advertising its entire Routing Table over all of its inter-
faces to other RIP routers. Whenever such routing updates are received by a
RIP router, it installs all of the new routes into its Routing Table, generates a
Forwarding Table and starts forwarding packets.
The process of advertising routing updates ensures all routers in the network
eventually learn about the network destinations, and the routes over which they
can be reached. A router that does not continue to receive regular/periodic rout-
ing updates for a remote network would eventually time out that route and stop
using it for forwarding packets.
Each RIP router transmits periodic routing updates containing its entire
Routing Table to its neighbor routers every 30 seconds. When a router receives
such a periodic routing update, it updates its own Routing Table with the infor-
mation received, and then in turn, advertises its updated Routing Table to its
neighbors. This process is repeated at each router until all routers achieve con-
vergence and have a consistent view of the entire network topology.
• Implements the Soft State Mechanism for Timing out Old Routes: RIP routers
use various protocol timers to control the exchange of routing updates and
maintain routes in the Routing Tables. These protocol timers are described in
Chapter 2 and include a routing update timer, route invalid timer, and a route
flush timer. The invalid or timeout timer is used to mark/tag invalid routes in
the Routing Table.
A route that is not refreshed for a given period of time (i.e., the route-invalid
timer setting) is most likely invalid because of some change in the network. For
this reason, a RIP router maintains an invalid timer for each route in the Rout-
ing Table. When a route’s invalid timer expires, the router declares the route as
invalid but the route is still kept in the Routing Table, and only removed entirely
when its route-flush timer expires.
Each router sends routing updates every 30 seconds (default routing update
timer value), a process referred to as flooding. If a router does not receive a
routing update for a particular route after 180 seconds (default route invalid
timer), it marks that route as unusable. If the router still does not receive a rout-
ing update for that route after 240 seconds, the router removes the route from
its Routing Table.
• Calculates the Updates Needed to Keep RIP Peers and Routing Table Manager
Process in Sync with All Changes in the Network Topology: Using the
132 IP Routing Protocols
Bellman–Ford algorithm, each RIP router builds a unique Routing Table that
holds the best routes from itself to all other routers in the network. RIP routers
prefer shorter routes (smaller hop counts) to longer routes when deciding
which route among multiple routes to the same destination to install in the
Routing Table.
• Provides the RIP Route MIB for Querying the Routes in the RIP Routing
Database: A router running RIPv2 typically supports RFC 1724 (which defines
RIP Version 2 MIB Extensions) [RFC1724]. RFC 1724 is an IETF standard
that defines Management Information Base (MIB) objects that allow a network
administrator to use SNMP to monitor RIPv2 performance. The RFC 1724
RIPv2 MIB extensions allow network administrators to use SNMP to monitor
RIPv2 by allowing the addition of new table objects and global counters that
are not defined in the older RFC 1389 RIPv2 MIB.
The new table objects and global counters have been added to help network
administrators quickly debug failing RIPv2 neighbor routers or changing
routes. The RIPv2 MIB stores global counters which are useful and can facili-
tate the detection of the harmful effects of incompatibilities in RIP implemen-
tations; two “interfaces” tables, which stores interface-specific configuration
information and statistics; and an optional “peer” table which holds informa-
tion that is useful for debugging/troubleshooting RIP neighbor relationships.
• Monitors the State of the Router Interfaces and Updates Routes Accordingly:
RIP uses a number of techniques to monitor and control routing updates to and
from other routers with the goal of preventing routing loops, and speeding up
network convergence. The different techniques available are count to infinity,
split horizon, poison reverse, and the use of various timers that include hold-
down timers as discussed in Chapter 2.
The use of triggered updates in RIP increases its efficiency, particularly, on
low speed point-to-point, serial interfaces. With triggered updates, a RIP router
sends routing information on the low speed point-to-point link only when there
has been an update to its Routing Table. For this to work, the router will need
to suppress the transmission of periodic updates are over the point-to-point
interface in order to reduce RIP routing traffic is on the interface.
Triggered updates are transmitted on the point-to-point serial interface only
if one of the following occurs:
o A router receives a RIP Request message from a specific neighbor router
asking for a routing update, which causes the full Routing Table to be sent.
In the absence of RIP Request messages, a RIP router will broadcast or
multicast routing updates every 30 seconds to all RIP neighbors.
o A router receives routing information from an interface and updates its
Routing Table, which causes only the latest changes to be sent.
Routing Information Protocol (RIP) 133
• Sends and Receives RIP Messages (Requests and Responses): RIP routers use
RIP Request and RIP Response messages to exchange routing information in a
network. A RIP router sends a RIP Request to ask another RIP router to send
back part or all of its Routing Table. The RIP Response can be a reply to a
specific RIP request, or an unsolicited regular or periodic (broadcast or multi-
cast) RIP routing advertisement. RIP Response messages contain the Routing
Table entries of the sending router. Multiple RIP Response messages can be
used to carry the contents of large Routing Tables.
• Adds Routes Learnt from RIP into the Routing Table: RIP routers transmit rout-
ing updates at regular intervals (periodic updates), and when the network
topology changes (triggered updates). When a router receives a routing update
that advertises a new route to a network destination, it updates the correspond-
ing entry for that destination in its Routing Table to reflect the new route. In
addition, each entry in a RIPv2 Routing Table includes a Route Tag field which
stores additional information about the installed route. The Route Tag stores
information that can be used to distinguish between routes learned by RIPv2
(internal routes) and routes learned from other routing protocols (external
routes). Route tagging is discussed in greater detail in Chapter 7.
• Carries out RIPv2 Packet Verification and Authentication: Security is one of
the primary concerns of network designers today. Network security not only
deals with securing the data exchanged between end-users, but includes secur-
ing the routing information that is exchanged between routers. This is to ensure
that the routing information that routers enter into their Routing Tables is valid,
and not tampered or sourced by an entity that is trying to disrupt the operation
of the network. An attacker might try to inject malicious routing information
by introducing invalid routing advertisements in order to seriously degrade
network performance, or fool routers into sending data to wrong network des-
tinations. For these reasons, modern routing protocols support authentication
mechanisms to prevent invalid routing updates from ending up in the Routing
Tables.
RIPv2 supports authentication while RIPv1 does not. RIPv2 support mech-
anisms that can be used to authenticate RIP messages [RFC4822]. Unlike
RIPv1, RIPv2 authentication mechanisms enhance routing security by prevent-
ing the insertion of fraudulent routing information into the Routing Tables.
With RIPv2 authentication, only routing updates that pass authentication test-
ing can be inserted into the Routing Tables. A RIPv2 router applies authentica-
tion on a per RIP interface basis. Since RIPv2 authentication can be configured
Routing Information Protocol (RIP) 135
1. Define a key chain with a name. The key chain stores the set of keys that the
RIPv2 router will use on the interface requiring authentication. If the inter-
face has no key chain configured for it, then no authentication will be
performed.
2. Define a key, or multiple keys for the named key chain.
3. Specify the key string (or password) for each key in the key chain. Each key
string is the authentication string that the RIPv2 router must use to send and
receive routing update messages.
4. The interface requiring authentication must be enabled, and the key chain to
be used must be specified. RIPv2 authentication can be configured on a per
interface basis. The network administrator must ensure that the router inter-
faces on both sides of the link are correctly configured for the authentication
method used, ensuring that the key number and key string match on both
interfaces.
5. Specify the type of authentication to be used on the interface (plaintext or
MD5).
6. Key management (which is optional) can be configured as an added feature.
Key management provides a method for controlling how authentication
keys (within the key chain) are used. This allows the RIPv2 router to shift
from one authentication key to another.
• Calls Customizable Functions for Applying Routing Policy on Incoming or
Outgoing Routes: Routing policy determines how a router handles the routes it
receives from and sends to neighboring routers. The router decides which
routes to include in its Routing Table based on access filters (or access-lists)
that are defined for it. Interface-specific access-list (e.g., distribute-list) and
globally defined distribute-list (for inbound and outbound routes) can be
defined for a given RIP process.
Routing Information Protocol (RIP) 137
• Configures UDP Sockets for Use by the RIP Process: RIP routers send and
receive routing using UDP as the Transport Layer protocol, and with both
source and destination UDP port numbers set to 520. RIPv1 uses broadcasts
while RIPv2 uses multicasts to exchange routing information, all encapsulated
in UDP segments.
• Communicates with the Routing Table Manager Process across the Routing
Protocol Input (RPI) Interface, and Sends and Receives All RPI Interface
Messages: This module communicates with the Routing Table Manager (RTM)
to present routes for installation in the IP Routing Table, or export routes to
other routing protocols.
• Adds Redistributed Routes into the RIP Routing Database: There are situations
where routes may need to be transferred between two routing domains running
different routing protocols (e.g., RIP and EIGRP). This requires routes gener-
ated by one routing protocol to be redistributed into the second routing proto-
col environment. Redistribution refers to the process of using a routing protocol
to advertise routes that are learned or provided by another routing protocol or
source, including static routes, or directly connected routes. Route redistribu-
tion provides the network administrator the ability to run different routing pro-
tocols in routing domains in a network where each is particularly suitable and
effective. Most modern routers support route redistribution between the com-
mon routing protocols used in networks (RIP, EIGRP, OSPF, and IS-IS) in
addition to static routes.
Management (including)
• Static Routes
• Local Link/Peer Information
MIB
Routing
Protocol
Routing Routing Input Other Routes
Protocols Protocol &
(RIP, Input Routing Protocols
RoutingTable
Table
EIGRP Manager
Manager
OSPF,
IS-IS,
BGP) PIM
Active
Routes
Active Routes
The RTM also generates the unicast routing routes required for Reverse
Path Forwarding (RPF) checks in the Multicast Routing Information Base
(MRIB), a multicast topology table, used by multicast protocols such as
Protocol Independent Multicast (PIM). The RTM provides a mechanism to
combine information from different routing sources into a unified Routing
Table from which a separate Forwarding Table for high-speed network address
prefix lookups can be generated.
• Populates and Maintains the Forwarding Table with Active Routes: The
RTM Process stores the best routes provided by multiple routing protocols in
the master Routing Table and selects a single active route for each destination
to be installed in the Forwarding Table. Multiple active routes to the same des-
tination may be selected if equal-cost multipath (ECMP) routing is configured.
The RTM enters the best routes in the Forwarding Table (also known as the
Forwarding Information Base (FIB), and uses this table for all forwarding deci-
sions in the router.
When policy-based routing is configured, the RTM may select an active
route based on policy information configured through the RTM Process
Management function. The RTM transfers active routes through the Active
Routes Interface to the Forwarding Table. An active route is one that has not
been marked as unreachable but is still retained in the Routing Table (route
flush timer has not expired). Note that even if the invalid timer of a route
expires, the route may still be used to forward packets.
• Exports or Imports Routes between Routing Protocols: The RTM can be
configured to export routes that have been learned by RIP to other routing pro-
tocols. The routes exported can also include static routes. Static routes can be
configured through the management interface shown in Figure 5.7. For
Routing Information Protocol (RIP) 139
example, the RTM can be configured to export routing information from RIP
into EIGRP, OSPF, IS-IS, or BGP. OSPF in turn, can redistribute the routing
information using AS-external LSAs. IS-IS can do so in an IS-IS routing
domain as external routes. The network administrator can configure via the
RTM Management function, which routes to export to other routing protocols.
The RTM can also be configured to import routes from other routing protocols
(e.g., EIGRP, OSPF, IS-IS, or BGP).
planes. This can be used to create routing systems with high scalability and
fault-tolerance. For instance, in a system with two distributed RTM instances,
one RTM can be configured to operate as the primary (active) RTM, and the
other RTM as the secondary (standby) unit. Different redundancy architectures
can be conceived depending on the router processor architectures used and the
level of complexity acceptable.
5.7.2.1 Distribute-List In
An access-list can be configured on an interface to filter out certain routes contained
in incoming routing updates. The access-list is applied to the routes carried in the
routing updates and not to the routing information source or destination. A router
receiving routing updates will decide which routes to add to its Routing Table based
on the configured access-lists on its interfaces. Any incoming routing update on an
interface is checked against the configured access-list, and only routes that match any
network address prefix entry in the list is added to the Routing Table.
In Cisco routers, a network administrator can define one inbound interface-spe-
cific access-list (distribute-list) per interface, and one globally defined distribute-list
[CISCID9105]. A Cisco router uses the following algorithm to process routing
updates when multiple distribute-lists are configured:
1. Receive an inbound routing update and extract the next route (i.e., network
address prefix) contained in it.
2. Note the interface on which the routing update was received.
3. Does that interface have a distribute list configured for it?
o Yes: Is there a deny action in that list for the extracted route?
i. Yes: Do not enter the route into the Routing Table and return to Step 1
142 IP Routing Protocols
ii. No: Enter the route into the Routing Table and go to Step 4.
o No: Go to Step 4.
4. Is a global distribute list configured for the router?
o Yes: Is there a deny action in that list for the extracted route?
i. Yes: Do not enter the route into the Routing Table and return to Step 1.
ii. No: Enter the route into the Routing Table and return to Step 1.
o No: Enter the route into the Routing Table and return to Step 1.
5.7.2.2 Distribute-List Out
An access-list can be defined on an interface to determine which routes from the
local Routing Table will be carried in outgoing routing updates [CISCID9105].
Cisco routers use following algorithm to export routes when multiple distribute-lists
are configured:
The router will check the distribute lists as one of many other checks that it has to
perform for a distance-vector routing protocol route before it adds it in its Routing
Table or in an outbound routing update. The router also checks to see if split horizon,
poison reverse, routing policies, and other criteria should be applied to the route
before redistributing it.
• When a RIP router first starts up, it initializes its Routing Table with a list of its
directly connected networks.
Routing Information Protocol (RIP) 143
• Each router then periodically sends routing updates over all of its interfaces
that are RIP-enabled advertising the complete contents of its Routing Table.
o Whenever a RIP router receives such a routing update, it installs all of the appro-
priate routes announced into its Routing Table and starts using it to forward
packets. The ultimate goal of this process is to ensure that all routers eventually
become aware of every network connected to every router in the network.
o RIP is a “soft state” routing protocol in that, if a RIP router does not con-
tinue to receive periodic routing updates for a remote route (already installed
in the Routing Table), the router eventually times out that unrefreshed route
and stops forwarding packets over it.
• Every route has a “distance” metric associated with it, which indicates how far
(in hop counts) it is to the destination.
o Each time a RIP router receives a routing advertisement, it increments the
hop count.
o RIP routers give preference to shorter routes (smaller hop counts) over lon-
ger routes (larger hop counts) when deciding which of two routes (to the
same destination) to install in the Routing Table.
o The maximum hop count (or network diameter) permitted by RIPv1/v2 is
15, which means that a route with hop count greater than 15 is considered
unreachable. This limits RIP to networks which have not more than 15 hops
to a given destination.
o RIP uses the hop count as the routing metric and the Bellman–Ford algo-
rithm to determine the best route to a destination.
RIP also includes a number of mechanisms that help to improve network conver-
gence time and stability, and eliminate routing loops:
• When a router detects a network topology change (e.g., a failed link) which
gets reflected in its Routing Table, the router sends a triggered update immedi-
ately to its neighbors. The triggered update helps to speeds up network conver-
gence and stability, and prevents routing loops from occurring.
• When a router determines a route to be unreachable, it does not remove that
route from its Routing Table right away. Instead the router will continue to
advertise the route in routing updates with a hop count of 16 (meaning unreach-
able) to other routers. This is to ensure that the neighbor routers are quickly
notified of the unreachable route, and not have to wait for a soft state timeout
(using the invalid timer).
• When router A learns that a route from another router B has failed or unavailable,
it will advertise the same route back on the same interface to the source router B
with a routing update having hop count of 16 (unreachable). This technique
known as “split horizon with poison reverse” ensures that both the source and
receiving routers know that the route is unavailable for reaching the destination.
• A RIP router sends a Request message to another router to request all or part
of its Routing Table to be sent back to it. Thus, a newly started RIP router can
send a RIP Request message to allow it to quickly query all of its neighbor
routers for their Routing Tables.
144 IP Routing Protocols
REVIEW QUESTIONS
1. What Transport Layer Protocol does RIPv2 use?
2. Explain the maximum hop count in RIPv2 and how it is used.
3. What are the main message types used by RIPv2?
4. What are periodic updates in RIP and how are they sent?
5. What are triggered updates in RIP and how are they sent?
6. What is the infinity metric in RIP?
7. What is the significance of a Request message that has a single entry in it with
a routing metric (hop count) of 16, and an AFI field that consists of all zeros?
8. Which field in the RIPv2 message allows it to support Variable-Length Subnet
Masks (VLSMs)?
9. What is the maximum number of route entries in a RIPv2 update?
10. Explain the main difference between Plaintext Authentication and
Cryptographic Authentication in RIPv2.
REFERENCES
[CCIESOLK03]. Karl Solie and Leah Lynch, CCIE Practical Studies: Configuring Route-
Maps and Policy-based Routing, Sample Chapter, Cisco Press, Nov 26,
2003.
[CISCASA8.5]. Cisco ASA Services Module CLI Configuration Guide, 8.5, Chapter:
Defining Route Maps, November 17, 2013.
[CISCID8606]. Cisco Systems, “Redistributing Routing Protocols”, Document ID: 8606,
March 22, 2012.
[CISCID9105]. Cisco Systems, “Filtering Routing Updates on Distance Vector IP Routing
Protocols”, Document ID: 9105, August 10, 2005.
[CISCID13669]. Cisco Systems, “Introduction to EIGRP”, Document ID: 13669, August
10, 2005.
[CISCID13675]. Cisco Systems, “How Does the Passive Interface Feature Work in
EIGRP?”, Document ID: 13675, March 28, 2005.
[CISCID13719]. Cisco Systems, “Sample Configuration for Authentication in RIPv2”,
Document ID: 13719, August 10, 2005.
[CISCID16406]. Cisco Systems, “Enhanced Interior Gateway Routing Protocol”, Document
ID: 16406, September 5, 2017.
[CISCID49111]. Cisco Systems, “Route-Maps for IP Routing Protocol Redistribution
Configuration”, Document ID: 49111, August 10, 2005.
[RFC1058]. C. Hedrick, “Routing Information Protocol”, IETF RFC 1058, June 1988.
[RFC1321]. R. Rivest, “The MD5 Message-Digest Algorithm”, IETF RFC 1321, April
1992.
[RFC1388]. G. Malkin, “RIP Version 2 Carrying Additional Information”, IETF RFC
1388, January 1993.
[RFC1582]. G. Meyer, “Extensions to RIP to Support Demand Circuits”, IETF RFC
1582, February 1994.
[RFC1723]. G. Malkin, “RIP Version 2 Carrying Additional Information”, IETF RFC
1723, November 1994.
[RFC1724]. G. Malkin and F. Baker, “RIP Version 2 MIB Extension”, IETF RFC
1724, November 1994.
Routing Information Protocol (RIP) 145
[RFC2080]. G. Malkin and R. Minnear, “RIPng for IPv6”, IETF RFC 2080, January
1997.
[RFC2091]. G. Meyer and S. Sherry, “Triggered Extensions to RIP to Support Demand
Circuits”, IETF RFC 2091, January 1997.
[RFC2453]. G. Malkin, “RIP Version 2”, IETF RFC 2453, November 1998.
[RFC4364]. E. Rosen and Y. Rekhter, “BGP/MPLS IP Virtual Private Networks
(VPNs)”, IETF RFC 4364, February 2006.
[RFC4577]. E. Rosen, P. Psenak, and P. Pillay-Esnault, “OSPF as the Provider/
Customer Edge Protocol for BGP/MPLS IP Virtual Private Networks
(VPNs)”, IETF RFC 4577, June 2006.
[RFC4822]. R. Atkinson and M. Fanto, “RIPv2 Cryptographic Authentication”, IETF
RFC 4822, February 2007.
[RFC7868]. D. Savage, J. Ng, S. Moore, D. Slice, P. Paluch, and R. White, “Cisco’s
Enhanced Interior Gateway Routing Protocol (EIGRP)”, IETF RFC 7868,
May 2016.
6 Enhanced Interior
Gateway Routing
Protocol (EIGRP)
6.1 INTRODUCTION
EIGRP was developed by Cisco Systems as an improvement to IGRP (a Cisco dis-
tance-vector routing protocol now considered obsolete), and as a more scalable IGP
for large networks. Routers using EIGRP do not send routing updates periodically as
with RIP and IGRP. EIGRP provides a number of enhancements that allows rapid
network convergence and operating efficiency. Routers running traditional distance-
vector routing protocols like RIP send full routing updates periodically to their
neighbors which can result in unnecessary network bandwidth consumption.
EIGRP routers transmits packets (when sending routing updates and queries) as
multicasts and unicasts wherever necessary, thereby, resulting in more efficient use
of network bandwidth (compared to IGRP). This chapter discusses the main EIGRP
concepts, message formats, and other important issues such as neighbor discovery
and maintenance, network topology discovery, best path computations, route
summarization, and authentication.
6.2 EIGRP OVERVIEW
EIGRP is a classless routing protocol that supports Variable-Length Subnet Masking
(VLSM) and Classless Inter-Domain Routing (CIDR) similar to RIPv2, allowing
efficient use and scalable allocation of IP addresses than IGRP. EIGRP supports
authentication with simple passwords and cryptographic authentication (using MD5
and SHA-2) as in RIPv2 [RFC7868]. EIGRP supports both manual and automatic
summarization of networks, and load-balancing over equal or unequal cost paths.
EIGRP messages are sent directly over IP similar to OSPF, and use protocol number
88 (0x58 in hexadecimal). EIGRP is predominantly used in Cisco routers with very
limited support in other vendor routers.
EIGRP is considered an advanced distance-vector routing protocol, or a hybrid
routing protocol that has a number of characteristics similar to those typically
associated with link-state routing protocols (such as dynamic neighbor discovery). A
hybrid routing protocol like EIGRP takes some key features and advantages of link-
state routing protocols, and integrates them into a distance-vector routing protocol.
Put in another way, it tries to pick the best features of the two categories of routing
protocols to create a new protocol.
147
148 IP Routing Protocols
Unlike OSPF which requires different configurations to work over different Layer 2
protocols such as Ethernet and ATM (e.g., point-to-point links, dedicated links, and
non-broadcast multiaccess [NBMA] networks), EIGRP does not require such special
configurations. EIGRP works effectively over all these network types and also in
both LAN and WAN environments [CISCTEAPA06]. In multiaccess networks, such
as those based on Ethernet, and have built-in broadcast/multicast capabilities, EIGRP
routers form and maintain neighbor relationships using a reliable multicasting mech-
anism. EIGRP also handles, effectively, differences in media speeds and types, when
neighbor adjacencies are formed across WAN links.
6.3 EIGRP CONCEPTS
This section discusses the main components of EIGRP, including the processes and
databases used by EIGRP (see Figure 6.1). This section introduces some of the fun-
damental concepts underlining the design and operations of EIGRP. These concepts
are required to understand how EIGRP works. The rest of the EIGRP section focuses
on the details surrounding these fundamental concepts.
EIGRP
Routing
Table
EIGRP
Routes Topology
Route (Including Table
Updates Redistributed
Routes
EIGRP
Adjacency DUAL
Table
EIGRP Hello
EIGRP RTP
Protocol
• The DUAL module is a protocol-independent module that implements the diffusing algorithm. It is responsible for
maintaining the EIGRP Topology Table and computing the shortest-paths to all know network destinations. The DUAL
module sends and receives EIGRP Query, Update, and Reply messages passing through the EIGRP RTP module.
module computes best paths using the information in the Topology Table, and installs (via an associated routing table
interface) the best paths in the IP Routing Table. The routing table interface (not shown) provides routing table
management services for installing and deleting routing information, in addition to importing routes from the routing
table (during routere distribution).
• The EIGRP Hello protocol module is a protocol-independent module responsible for discovering new neigbors and
determining those that are unreachable. EIGRP routers send Hello messages periodically containing a number of
parameters.
• The EIGRP RTP module is a protocol-independent module that provides reliable EIGRP message delivery. It work
sover IP, and provides unicast and multicast transmissions.
• The Transport module provides transport services used by RTP to send and receive EIGRP messages. It is a
Network Layer client of EIGRP, and provides EIGRP message encapsulation, transmission, and reception functions.
• The Adjacency or Neighbor Table holds information about the EIGRP neighbors of a router . It is maintained by the
Hello protocol module, and the DUAL module uses information from this database.
• The EIGRP Topology Table maintains network prefixes associated with paths through directly connected neighbors.
The contents of this table are updated by the DUAL module.
Using RTP with a number of mechanisms, EIGRP is able to guarantee the delivery
of EIGRP packets, and to ensure that they are delivered in the correct sequence.
The main features of RTP are summarized as follows:
6.3.2.1 Neighbor Table
Neighbor Discovery and Recovery is the process by which EIGRP routers dynami-
cally learn about other routers they are directly connected to. An EIGRP router must
also be able to know when any neighbor becomes inoperative or unreachable. The
routers achieve this by exchanging, periodically, low overhead small EIGRP HELLO
packets. As long as a router receives HELLO packets from a neighbor, it can assume
that it is operational and functioning. Once the router has made that determination, it
can exchange routing information with the neighbor router.
Each EIGRP router maintains state information about its neighbors in a Neighbor
Table. An EIGRP router will use HELLO packets to discover neighbors and form
adjacencies with these new neighbors, and then include their information in the
152 IP Routing Protocols
Neighbor Table. The information includes among other parameters, when a neighbor
was newly discovered, the IP address and interface through which it is can be reached,
and the Hold Time as advertised in its HELLO packets.
The Hold Time (see appropriate discussion below) indicates to the router the
amount of time beyond which it should treats the neighbor as invalid, that is,
unreachable. If the router does not receive a HELLO packet from the neighbor within
the Hold Time and the Hold Time expires, it should consider the neighbor as
unreachable. When the Hold Time expires, the neighbor is declared invalid and
DUAL is informed of the network change.
The Neighbor Table also contains information required by RTP for its operations,
such as allowing the router to match ACKs with packets, record the Sequence
Number of the last EIGRP packet received from the neighbor, and detect packets that
are out-of-order [CISCTEAPA06]. The router also maintains a transmission list on
a per neighbor basis that is used to queue packets for possible retransmission when a
timeout occurs, or when packets are not acknowledged. For this, the router maintains
a number of round-trip timers in the Neighbor Table to estimate optimal retransmission
intervals for such packets.
6.3.2.2 Topology Table
This is a database used by an EIGRP router to store routing information it has learned
from neighbor routers in the network (to all known destinations). When an EIGRP
router first discovers a new neighbor, it will send a routing update informing the
neighbor about the routes it has learned, and will in turn, receive routing updates
from that new neighbor. The router will then use these new routing updates to popu-
late its Topology Table.
The Topology Table of a router maintains all known destinations advertised by
neighbor routers. Essentially, each EIGRP router stores the Routing Tables of its
neighbors in its EIGRP Topology Table [CISCTEAPA06]. This follows a key fea-
ture of all distance-vector routing protocols which says that if a neighbor router is
advertising a route to a network destination, it must also have that route in its Routing
Table (or equivalently, be using that route to forward packets to the destination).
At a high level, an EIGRP router will be associated with each entry in the EIGRP
Topology Table the following:
• The destination IP address and a list of neighbor routers that have advertised
the destination.
• The router will also record for each neighbor, the advertised routing metric or
cost to the destination. The neighbor’s advertised routing metric, also referred
to as the neighbor’s Reported Distance or Advertised Distance, is the cost value
that the neighbor advertises to its own neighbors and also stores in its Routing
Table (see “Reported (or Advertised) Distance” section below).
• The information maintained in each entry includes at a minimum, the desti-
nation network prefix and prefix length (or network mask), Reported
Distance for each EIGRP neighbor advertising reachability to the destina-
tion, and the local router’s Feasible Distance (which is determined from the
local router’s history of Computed Distances to the destination). The Feasible
Enhanced Interior Gateway Routing Protocol (EIGRP) 153
An EIGRP router will update its Topology Table whenever the state of an interface or
directly connected route changes, or when a neighbor router reports a route metric or
topology change.
The term “Topology Table” can be misleading, as this database does not actually
hold or represent the complete network topology, but rather the Routing Tables as
advertised by the directly connected neighbor routers. The different EIGRP distance
metrics are described in greater detail in appropriate sections below.
6.3.2.3 Routing Table
EIGRP routers use DUAL for all route computations, and for tracking all routes adver-
tised by neighbors in the network. DUAL uses a distance metric or cost to compute
loop free paths to network destinations, and then selects the best routes to be inserted
in the Routing Table based on the concept of Successor and Feasible Successors
(described in appropriate sections below). A router calculates the lowest-cost route to
a destination when multiple routes exist to that destination. For each route, the router
adds the cost between itself and the next-hop router, to the cost between the next-hop
(neighbor) router and the destination (the latter cost is also referred to as the neigh-
bor’s Reported or Advertised Distance). The cost that results from adding these two
costs can be used to determine the Feasible Distance of the local router.
A Successor is an EIGRP neighbor router (or the best next hop router) to which
the local router forwards packet to be sent to a network destination, and has the least-
cost route to that destination that is guaranteed to be not part of a routing loop in the
network. When a router determines that there are no Feasible Successors (or backup
routes, or equivalently, next best alternative loop-free routes) to a network destination,
but there are neighbors advertising routes to that destination, the router will perform
a route recomputation for the destination. The result of the route recomputation is the
determination of a new Successor for the destination, which will be inserted in the
Routing Table.
All least cost routes to a network destination form a local set of potentially useable
routes. The following summarizes how these routes are selected and used:
• The local EIGRP router will select from this set, the neighbor routers that have
a Reported Distance that is less than the router’s own local Feasible Distance
to be Feasible Successors (backup routes).
154 IP Routing Protocols
o The router will move a destination entry from the Topology Table to the
Routing Table when there is a Feasible Successor (and the route with the
overall least cost to that destination will become the Successor).
• Each Feasible Successor (or neighbor) has associated with it an advertised
routing metric (the Reported Distance) that is stored in the Topology Table.
When a topology change occurs in the network, or a neighbor router changes
the routing metric it has been advertising (the Reported Distance), the local
router may have to re-evaluate the set of Feasible Successors to use.
• When a topology change occurs, the router via DUAL will check if there are
any Feasible Successors available for any affected destination. If there are
Feasible Successors, the router will promote one (from the Topology Table) to
be a new Successor for the destination (and enter it into the Routing Table) in
order to avoid any unnecessary route recomputations, plus also speed up net-
work reconvergence.
• Successors (best next-hops) are stored in the Routing Table while Feasible
Successors (backup next-hops) are stored in the Topology Table (to be used
immediately if a Successor fails), unless the Feasible Successors are installed
in the Routing Table when the router is performing unequal cost load balancing
(over multiple routes to a network destination).
The Neighbor Table, Topology Table and Routing Table are discussed in greater
detail toward the end of this chapter.
• Base Topology: The Base Topology refers to a routing domain that represents
the actual physical (non-logical) view of the network topology (consisting of
various routing devices and network segments). The EIGRP routers form
neighbor relationships based on the Base Topology. EIGRP routers exchange
reachability information about the network destinations (network prefixes)
within the Base Topology with a Topology Identifier (TID) value of 0.
• Subtopology: A Subtopology in a given Base Topology represents an indepen-
dent collection of links and routers on which EIGRP routers perform indepen-
dent route computations. By creating subtopologies, a network engineer can
implement network topology subgroups each carrying specific network traffic
(class-specific network topologies). The network prefixes belonging to each
specific subtopology within the Base Topology is given a unique TID.
6.3.3 Neighbor Formation
EIGRP routers do not send periodic updates as in RIP. This means EIGRP routers
have to support other mechanisms and processes to discover and track the directly
connected networks on neighbor routers, and on other EIGRP routers in the net-
work. EIGRP routers must form a neighbor or adjacency relationship before they
can exchange routing information. EIGRP routers can be configured to discover
Enhanced Interior Gateway Routing Protocol (EIGRP) 155
IPv4 Header
EIGRP Message
(20 Bytes)
0 7 15 23 31
Header Version Opcode Checksum
Flags
Sequence Number
Acknowledgment Number
TLVs
Field Meaning
Header Version (8 Bits) Specifies the protocol version of the EIGRP packet header format. Current version is 2 (RFC 7868).
Indicates the type of EIGRP message (UPDATE = 1; REQUEST = 2; QUERY = 3; REPLY = 4; HELLO
Opcode (8 Bits)
= 5; SIA-Query = 10; SIA-Reply = 11)
Contains a checksum for the entire EIGRP packet. The checksum is the standard ones' complement of
Checksum (16 Bits) the ones' complement sum. To compute the checksum, the value of the checksum field is set to zero. A
received EIGRP packet is discarded if the packet checksum fails.
The flag bits define special handling conditions for the EIGRP packet. Four flag bits are currently
Flags (32 Bits)
defined in RFC 7868.
Sequence Number Specifies a sequence number that is unique with respect to the sending router. This is used by RTP for
(32 Bits) orderly delivery of EIGRP packets. A value of 0 means that an acknowledgment is not required.
Specifies the last sequence number seen from the neighbor router to which this packet is being sent. If
Acknowledgment the value is 0, then the packet carries no acknowledgment. A HELLO packet with a non-zero ACK field
Number (32 Bits) should be treated as an ACK packet rather than a HELLO packet. A non-zero value (meaning an ACK
packet) can only be sent as unicast-addressed packets.
Virtual Router ID Specifies a number that identifies the virtual router with which this packet is associated. Packets
(16 Bits) received with an unknown, or unsupported value are discarded.
Specifies a number that identifies the sending EIGRP system. This identifies the routing domain to
which the sending EIGRP router belongs. An EIGRP router is only allowed to process packets from
Autonomous System
routers belonging to the same routing domain. This field is also indirectly used as an authentication
Number (32 Bits) value. That is, a router that receives and accepts a packet from a neighbor must have the same AS
number or the packet is ignored. The range of valid AS numbers is 1 through 65,535.
0 7 15 23 31
Type High Type Low Length
6.4.1 HELLO Packets
EIGRP routers use HELLO packets to discover neighbor routers and to maintain
adjacencies. Specifically, routers use HELLO packets to identify neighbor routers,
and once they are identified, the transmission of HELLO packets serves as a keepal-
ive mechanism between the neighbor routers. IPv4 EIGRP routers transmit HELLO
packets addressed to either the IPv4 unicast address of a neighbor router, or a specific
IPv4 multicast group address.
The following summarize some important properties of EIGRP HELLO packets:
HELLO packets. Thus, HELLO packets are not transmitted via RTP, and carry
a Sequence Number field value that is always set to 0. An EIGRP router that
sends a HELLO packet does not require an ACK that it has been received.
Because HELLO packets do not require explicit acknowledgment, they are
referred to simply as “unreliable” EIGRP transmissions/packets.
• Sending ACK Packets: HELLO packets with a non-zero Acknowledgment
Number is treated as an ACK packet rather as a standard HELLO packet. The
non-zero value carried in the Acknowledgment Number field is the Sequence
Number of a reliable EIIGRP packet last seen by the sender. An Acknowledgment
Number of 0 indicates the packet does not carry any acknowledgment
information.
o An EIGRP router sends an ACK packet to a neighbor to acknowledge the
receipt of an EIGRP reliable transmission such as an UPDATE packet. An
ACK packet is simply a HELLO packet that carries no data, but always car-
ries a non-zero Acknowledgment Number.
o An EIGRP router sends the ACK packet to the unicast address of the neigh-
bor router that sent the UPDATE packet and not to the EIGRP multicast
group address.
• Addressing HELLO Packets: HELLO packets are multicast to the IPv4 All
EIGRP router address 224.0.0.10. IPv6 EIGRP routers transmit HELLO
packets with the source address of the transporting IPv6 packet being the
IPv6 link-local address of the router’s transmitting interface. When multi-
casting HELLO packets, the IPv6 EIGRP multicast address
(FF02:0:0:0:0:0:0:A) is used as the destination address of the IPv6 packet.
Unicast packets are transmitted to a specific neighbor router with the destina-
tion address of the IPv6 packet being the IPv6 link-local address of the
neighbor router.
o Unlike IPv4 EIGRP neighbors, two IPv6 EIGRP neighbors are not required
to share a common network prefix on the interfaces connecting them. IPv6
EIGRP routers will still check that HELLO packets received on their inter-
faces carry valid IPv6 link-local source addresses.
• HELLO Packet Transmission Rates: The rate at which EIGRP routers trans-
mit HELLO packets to neighbors is dictated by the Hello Time or Interval.
EIGRP routers multicast HELLO packets with a default setting of every 5 sec-
onds for most network types, and 60 seconds for WAN links with bandwidth of
1544 Mb/s speeds or less.
An EIGRP router sends HELLO packets to discover neighbors and form adjacencies
with them so that they can exchange routing updates. A router exchanges routing
information with only adjacent routers (i.e., directly reachable neighbors). Each
EIGRP router in the adjacency will then construct a Neighbor Table from the infor-
mation carried in the HELLO packets it receives from the adjacent routers.
Additional HELLO packet processing at an EIGRP router will include common
EIGRP checks such as, if the neighbors have matching ASNs and matching EIGRP
composite metric K values (see discussion below).
Enhanced Interior Gateway Routing Protocol (EIGRP) 159
6.4.2 UPDATE Packets
EIGRP routers use UPDATE packets to convey routing and reachability information
about network destinations to neighbor routers. An EIGRP router will send UPDATE
packets in unicast transmissions to newly discovered neighbors, but will multicasts
UPDATE packets to the multicast address 224.0.0.10 when a network topology or
link metric change occurs. When an EIGRP router discovers a new neighbor, it will
send UPDATE packets in a unicast transmission carrying a full Routing Table to that
new neighbor so that it can construct its EIGRP Topology Table.
UPDATE packets are always reliably transmitted via RTP, and require explicit
acknowledgement from neighbors to ensure reliable transmission of routing updates/
information. An UPDATE packet when transmitted, includes a Sequence Number
that allows the receiver to acknowledge receipt of the packet by responding with an
ACK packet specifying the packet’s Sequence Number. If an UPDATE or ACK
packet is lost and does not get to its intended recipient, the UPDATE packet will be
retransmitted.
6.4.3 QUERY Packets
EIGRP routers send QUERY packets to neighbors to request routing information to
network destinations. An EIGRP router will send QUERY packets to neighbors when
a route (to a destination) becomes unavailable, and the router requires immediate
knowledge of alternate routes to allow fast network convergence. If the router sends
QUERY packets and does not receive a response from any particular neighbors, it
will resend the QUERY packets as unicast transmissions directly to the non-respon-
sive neighbor(s).
The following summarize some important properties of EIGRP QUERY packets:
When there is a network topology change that causes a router to mark multiple des-
tinations to be in the ACTIVE state, the router will construct one or more QUERY
packets to be sent requesting routing information to all these destinations (in ACTIVE
state). The sending router will record the state of each destination individually, so
that a responding neighbor does not need to respond with a single QUERY or REPLY
packet that contains all these destinations in that single packet.
The SIA-QUERY message is a subtype of the QUERY message that a router
sends when a REPLY message has not been received within one-half of the Stuck-In-
Active (SIA) interval (which has the Cisco default setting of 90 seconds). SIA and
related matters are discussed in appropriate sections below.
6.4.4 REPLY Packets
EIGRP routers send REPLY packets in response to QUERY or SIA-QUERY packets
they have received. A neighbor can send a REPLY packet to provide a Feasible
Successor to the router that sent the QUERY packet.
The following summarize some important properties of EIGRP REPLY packets:
The SIA-REPLY message is a subtype of the REPLY message that a router sends in
response to a SIA-QUERY message. It indicates to the recipient that the sender is
Enhanced Interior Gateway Routing Protocol (EIGRP) 161
still attempting to resolve a loop-free route for the destination that is still in ACTIVE
state. A SIA-REPLY packet includes a TLV that carries information for each destina-
tion and its associated vector metric maintained in the sender’s Topology Table. The
SIA-REPLY indicates that the sending neighbor is still treating the given destination
as being in the ACTIVE state, and still actively engaged in finding a loop-free route.
Use of the SIA-REPLY message is discussed in a section below.
6.4.5 REQUEST Packets
EIGRP REQUEST packets are used to seek specific routing information from one or
more neighbor routers. This EIGRP packet type is typically used in route server
applications. REQUEST packets can be sent as either multicast or unicast packets,
and are always unreliable transmissions with no guarantees of reaching the
recipient.
6.4.6 EIGRP TLVs
As shown in Figure 6.3, the payload of an EIGRP message consists of one or more
TLVs. Figure 6.4 shows the general structure of a TLV. This section describes some
of the main TLVs defined in [RFC7868]:
• Parameter Type TLV (0x0001): This TLV is carried in EIGRP HELLO mes-
sages to indicate the K parameters and Hold Time of the sending router
(Figure 6.5). The K values are used for EIGRP composite metric computations.
This TLV is also carried in the initial EIGRP UPDATE packet when a neighbor
is discovered. Any two EIGRP neighbors must agree on K values for them to
form an adjacency. This is done in order to avoid the creation of routing loops
in the EIGRP domain.
• Authentication Type TLV (0x0002): This TLV may be included in any EIGRP
packet to indicate to the receiving neighbor, the authentication type and data
the sender supports (Figure 6.6). A neighbor router that receives this TLV con-
taining a mismatch in authentication information must discard the EIGRP
packet.
0 7 15 23 31
Type = 0x0001 Length = 0x000C (12)
K1 k2 K3 K4
K5 K6 Hold Time
Field Meaning
These are K-values associated with the EIGRP composite metric equation. The default values are: K1
K-values (6 Bytes)
= 1; K2 = 0; K3 = 1; K4 = 0; K5 = 0; K6 = 0
This specifies the amount of time (in seconds) that a receiving router should consider the sending
Hold Time (2 Bytes) neighbor valid. A valid neighbor is one that is able to forward packets and participates in EIGRP. A
router that considers a neighbor valid will store all routing information advertised by the neighbor.
0 7 15 23 31
Type = 0x0002 Length
Authentication Authentication
Authentication Data (Variable)
Type Length
Field Meaning
Authentication Type
This specifies the type of authentication used
(1 Byte)
Authentication Length
This specifies the length, measured in bytes, of the Authentication Data.
(1 Byte)
Depends on the type of authentication used. Multiple authentication types can be present in a single
Authentication Type TLV.
Authentication Data • MD5 Authentication Type (0x02): MD5 Authentication will use Authentication Type code 0x02, and
(variable) the Authentication Data will be the MD5 Hash value.
• SHA2 Authentication Type (0x03): SHA2-256 Authentication will use Authentication Type code
0x03, and the Authentication Data will be the 256-bit SHA2 Hash value.
• Sequence Type TLV (0x0003): An EIGRP router sends this TLV to inform
receivers to not accept EIGRP packets with the CR-Flag set. A router uses this
TLV to order/sequence multicast and unicast addressed packets.
• Software Version Type TLV (0x0004): An EIGRP router uses this field to
indicate to other routers the EIGRP TLV format versions it is using.
• Multicast Sequence Type TLV (0x0005): An EIGRP uses this TLV to
announce/report the Sequence Number of the next multicast packet that has the
CR bit set.
• Peer Termination Type TLV (0x0007): An EIGRP router includes this TLV
in HELLO packets to notify a list of neighbors that it has reset the adjacency.
A router sends this TLV anytime it needs to reset an adjacency, or signal that
an adjacency is going down.
• IPv4 Internal Routes TLV (0x0102): EIGRP routers send this TLV to adver-
tise routes that are internal to the EIGRP routing domain (Figure 6.7). A router
sends this TLV to announce the IPv4 destination addresses that it has learned
and the routing metrics for those IPv4 networks. An EIGRP router sends this
TLV to advertise the routes configured on its network interfaces as well as the
networks that are learned via other EIGRP routers.
• IPv4 External Routes TLV (0x0103): An EIGRP sends this TLV to describe
and inject information into its local Autonomous System about IPv4 destination
addresses and routing metrics it has learned via other routing protocols
(Figure 6.8). This TLV carries routes redistributed (or imported) into an EIGRP
routing domain from other routing information sources. The advertising router
provides the identity of the routing protocol that created the route, the external
routing metric associated with the route, the ASN providing the route, an indi-
cator if the route should be marked as part of the EIGRP Autonomous System,
and an administrative tag (also called a route tag) specified by the network oper-
ator to be used for route filtering at EIGRP Autonomous System boundaries.
Enhanced Interior Gateway Routing Protocol (EIGRP) 163
0 7 15 23 31
Type (0x0102) Length
Next-Hop Forwarding Address
Scaled Delay
Scaled Bandwidth
MTU Hop Count
Reliability Load Internal Tag Flags
Prefix Length Destination (variable)
Field Meaning
Next-Hop Forwarding If the value is zero (0), the IPv4 address from the received IPv4 header is used as the next hop for the
Address (4 Bytes) route. Otherwise, the specified IPv4 address will be use
This is an administrative parameter assigned statically on a per-interface-type basis and specifies the
Scaled Delay (4 Bytes)
total path delay. A delay of 0xFFFFFFFF represents an unreachable network.
Scaled Bandwidth (4
The effective bandwidth of the slowest link measured in units of 2,560,000,000/kbps.
Bytes)
MTU (3 Bytes) This specifies the minimum MTU value for the path to the destination
This specifies the distance to the destination in number of routers traversed (hops). The initial value for
Hop Count (1 Byte) locally originated routes is 0, and each router increments this value by 1. A route with a hop counter
greater than the maximum allowed is considered unreachable.
This specifies the current error rate for the path, measured as an error percentage. This is expressed
Reliability (1 Byte)
as a fraction of 255. A value of 255 indicates 100% reliability.
This specifies the load utilization of the path to the destination, measured as a percentage. This is
Load (1 Byte)
expressed as a fraction of 255. A value of 255 indicates 100% load.
This is a tag assigned by the network administrator that is untouched by EIGRP. This allows a network
Internal Tag (1 Byte)
administrator to filter routes in other EIGRP border routers based on this value.
• Source Withdraw (Bit 0): Indicates if the router that is the original source of the destination is
withdrawing the route from the network or if the destination is lost due as a result of a network
failure.
Flags (1 Byte) • Candidate Default (CD) (Bit 1): Set to indicate the destination should be regarded as a candidate
for the default route. An EIGRP default route is selected from all the advertised candidate default
routes with the smallest metric.
• ACTIVE (Bit 2): Indicates if the route is in the ACTIVE State.
Prefix Length (1 Byte) This specifies the length of the IP prefix being announced (i.e., number of 1s in the route mask).
This specifies the IP prefix being announced (i.e., IP subnet address, IP network address, or IP
Destination (variable)
supernet address)
• IPv4 Community Type (0x0104): A router sends this TLV to provide com-
munity tags for specific IPv4 destinations in a network. This TLV contains an
IPv4 Destination field describing the IPv4 address associated with the com-
munity information, a 2-byte Community Length field specifying an unsigned
number that indicates the length of the Community List, and a variable-length
Community List that contains one or more 8-bytes EIGRP communities.
• INIT-Flag (0x01): This bit is set in the initial EIGRP UPDATE message a router
sends to a newly discovered neighbor. The sending router sets this bit to instruct
the EIGRP neighbor to advertise the full set of routes in its Routing Table.
164 IP Routing Protocols
0 7 15 23 31
Type (0x0103) Length
Router Identifier
Administrative Tag
Delay
Bandwidth
Field Meaning
Router Identifier (4 This specifies the Router ID of the router that injected the external route into the EIGRP domain. This
Bytes) field is checked by EIGRP when an external route TLV is received.
This indicates the external AS in which the sending router is a member. If the source protocol is
External AS Number (4
EIGRP, this field will be the [VRID, AS] pair. If the external protocol does not have an AS, other
Bytes)
information can be used (for example, Cisco uses process-id for OSPF).
This is a tag assigned by the network administrator that is untouched by EIGRP. This allows a network
Administrative Tag (4
administrator to filter routes in other EIGRP border routers based on this value. This tag may be used
Bytes)
for route filtering or other policy management.
This contains the composite metric that resides in the routing table as learned by the foreign protocol.
External Protocol Metric
If the External Protocol is another EIGRP routing process, the value can optionally be the composite
(4 Bytes)
metric or 0.
This specifies the ID of the routing information source that originated the redistributed route. The
External Protocol (1
following codes have been defined: 1 = IGRP; 2 = EIGRP; 3 = Static; 4 = RIP; 5 = Hello; 6 = OSPF; 7 =
Byte)
IS-IS; 8 = BGP; 9 = IDRP; 10 = Connected
• CR-Flag (0x02): An EIGRP router sets this bit to indicate to any neighbor that
receives the packet to only accept it if the neighbor is in Conditionally Received
mode. An EIGRP router is considered to have entered the Conditionally
Received mode when it receives and processes an EIGRP HELLO packet con-
taining the SEQUENCE TLV.
• RS-Flag (0x04): An EIGRP router sets the Restart flag (RS-Flag) in the EIGRP
HELLO and UPDATE packets it sends during the restart period. The receiving
router checks the RS-Flag to detect if a sending router is restarting. From the
perspective of the (sending) restarting router, a neighbor router upon detecting
that the RS-Flag has been set, will maintain the adjacency, and will set the
RS-Flag in the EIGRP UPDATE packet it sends, to indicate it is performing a
soft restart. During a soft restart, the router uses stored prefix information to
reconfigure and activate its Routing Table without tearing down the existing
adjacency.
• EOT-Flag (0x08): An EIGRP router sets the End-of-Table flag to mark the end
of the startup process with a neighbor. If a router receives an UPDATE mes-
sage with this flag set, it indicates the sending neighbor has completed sending
all UPDATE packets. Upon receiving the flag bit, the receiving router will
Enhanced Interior Gateway Routing Protocol (EIGRP) 165
remove any stale routes learned from the neighbor (setting the End-of-Table
flag) prior to performing the restart. A stale route is any route that existed in the
Routing Table of the receiving router before the restart, and has not been
refreshed by the neighbor via any UPDATE packets.
6.5 EIGRP METRICS
EIGRP uses a classic composite metric that is based on bandwidth (BW), traffic load,
delay, and reliability on the path to a network destination [RFC7868]. EIGRP also
supports wide metrics as defined in [RFC7868], but these are not discussed further
in this chapter. EIGRP does not use the Maximum Transmission Unit (MTU) for
calculating the classic composite metric. The EIGRP composite metric is calculated
using the following formula:
K 2 BWE K5
EIGRPMetric K1 BWE K 3 Delay E 256
256 Load E K 4 Reliability E
where BWE is the minimum link bandwidth on the path to a destination, and DelayE
is the total path delays (i.e., total of all outbound interface delays). The K values
allow network operators to modify and tune the EIGRP composite metric for EIGRP
different deployments, and for achieving different EIGRP network behaviors. Cisco
recommends that network operators choose the K values after careful planning
because improperly selected K values can prevent EIGRP routers from forming
neighbor relationship, and cause the network to not converge.
K5 has special (conditional) handling or interpretation such that if K5 = 0, then the
reliability term (i.e., K5/(K4 + ReliabilityE)) is defined to be 1. Thus, if K5 = 0, the
composite metric reduces to:
K 2 BWE
EIGRPMetric K1 BWE K 3 Delay E 256
256 Load E
The EIGRP router does not dynamically measures reliability (ReliabilityE) and
load (LoadE), but only does so at the time a path change happens [RFC7868].
ReliabilityE represents the current error rate on the path, and is expressed as a
value from 1 to 255. With this, 100% reliability is expressed as 255/255, while
90% reliability is expressed as 229/255. LoadE is the load utilization on the path,
and is also expressed as a value from 1 to 255. A LoadE of 255/255 represents a
completely utilized link (100% utilization), while a value of 127/255 represents a
50% utilized link.
Typically, Cisco EIGRP routers use only the minimum link bandwidth and total
path delay to compute composite metrics. The bandwidth and delay values used by
an EIGRP router are those configured on the router’s interfaces connected to its next
hop on the path leading to the network destination. Although other metrics can be
configured, this is not recommended by Cisco as this can lead to routing loops in the
network. To compute the EIGRP composite metric, the bandwidth and delay metrics
are first scaled. The bandwidth is scaled using the following formula:
107
BWE 256,
BWmin
where BWmin is the smallest bandwidth (in kilobits per second) among all outgoing
interfaces on the route to the network destination. The delay is scaled using the fol-
lowing formula:
DelayE = Delaytot ⋅ 256,where Delaytot is the sum of all interface delays (in tens of
microseconds) on the route to the network destination. DelayE can take a maximum
value of 0xFFFFFFFF (in hexadecimal) which also indicates that the destination is
unreachable.
The bandwidth and delay for a Fast Ethernet interface are 100 Mb/s (100,000 kb/s)
and 0.1 milliseconds, respectively, and are scaled as follows:
The EIGRP bandwidth metric (BWE) is computed as:
107
BWFast _ Eth 256 25600
100000
The default Cisco setting of the K values are, K1 = K3 = 1 and K2 = K4 = K5 = 0.
This gives a default composite metric, adjusted for scaling factors, as follows:
The default K values were carefully selected by Cisco to provide optimal EIGRP
performance in most network deployment scenarios.
RFC 7868 [RFC7868] defines additional route metrics called Wide Metrics that
enable EIGRP routers to perform the route selection in networks that support high
bandwidth interfaces. To use these metrics, both the EIGRP message format and
composite metric formula have been modified. These changes allow EIGRP routers
to select routes based on delay values (measured in picoseconds) in the network.
Readers can refer to [RFC7868] for details on the use of Wide Metrics (which are
based on five vector metrics: load, latency, minimum throughput, reliability, and
MTU).
6.6.1 Feasible Distance
The Feasible Distance is the least-known total cost from a particular EIGRP router to
a network destination since the last time the destination entry in the EIGRP Topology
Table transitioned from ACTIVE state (i.e., no usable route available) to PASSIVE
state (i.e., usable route available) [RFC7868]. The Feasible Distance is not necessar-
ily the cost of the current best path to the destination, but instead, is a record of the
smallest known path cost since the last time the destination entered the PASSIVE
state (see Figure 6.9).
Each time DUAL runs, it selects a best path (through a next-hop referred to as the
Successor), and one or more second best paths (through next-hops referred to as the
Feasible Successors), if available, to reach each network destination. The Feasible
Distance is the lowest calculated total metric (among all paths) from the local router
to a particular network destination since the last time the destination was in the
PASSIVE state. Each EIGRP router computes only one Feasible Distance for each
network destination. The concept of Successor and Feasible Successor are discussed
below.
Router Router
R1 R2
Metric = 170 Metric = 30
10.10.1.0/24
• Reported (Advertised) Distance: This is the metric advertised by the neighbor router (R2) for a specific route. It is the
metric of the best route used by the neighbor router to reach that specific destination network.
• Feasible Distance: This is the local router’s (R1’s) metric of the best route to reach a specific network. The metric is
calculated using the metric reported by the neighbor (the Advertised Distance) plus the metric to the neighbor reporting
the route. The local router will install the route with the Feasible Distance or lowest metric in its routing table.
Note: In this diagram, we assume that the Feasible Distance is the lowest total cost from Router R1 to network 10.10.1.0/24
since the last time this network entry in the EIGRP Topology Table transitioned from Active state to Passive state
EIGRP messages carrying routing information [RFC7868] (see Figure 6.9). The
Reported Distance a router advertises is not equivalent to the router’s current cost or
distance to the network destination, and may be different when the router goes
through path recomputation for that destination. Each EIGRP router computes only
one (local) Reported Distance for each network destination.
The Reported Distance is used only to compute the Feasible Distance to a given
network destination. There could be cases where the Reported Distance associated
with a route to a network destination as reported by a neighbor could be promising,
but the overall routing metric through that neighbor ends up not being the best overall
route. Hence, the route through the reporting neighbor would not be selected as it
does not constitute the current Feasible Distance. Theoretically, the Feasible Distance
of a router to a given destination is equal to the lowest Reported Distance computed
by the router itself (among all available paths).
6.7.1 Successor
A Successor is an EIGRP neighbor that satisfies the Feasibility Condition for a spe-
cific network destination and, at the same time, provides the least-cost route to that
destination [RFC7868]. A Successor is the best next-hop router from the local router
to the destination, has the least-cost route to the destination, and is guaranteed not to
be part of a routing loop in the network (see Figures 6.10 and 6.11).
An EIGRP router chooses the Successor based on the least-cost route available to
reach that destination, in addition to the Feasibility Condition that requires that a
neighbor’s Reported Distance to the destination be less than the router’s own Feasible
Distance to that destination (see Feasibility Condition below) [RFC7868]. The
Successor for a given destination entry in the Topology Table is simply the best next
Enhanced Interior Gateway Routing Protocol (EIGRP) 169
Router
R2
Metric to
10.10.1.0/24
is 20
Router Router
R1 Metric to R4
10.10.1.0/24
10.10.1.0/24
is 30
Router
R3
Metric to
10.10.1.0/24
is 25
• Successor: This is the route with the best metric to reach a particular network. The router will install this route in its
Routing Table.
• Feasible Successor: This is an alternative routes to a particular network that can be used immediately if the currently
best route (the Successor) fails, without causing a routing loop. The router will store these routes in its EIGRP Topology
Table.
Not all alternative routes to a particular network can become Feasible Successors. In order for a route to become a feasible
successor, the following condition must be satisfied (the Feasibility Condition): The neighbor’s Advertised Distance for
the route must be less than the local router’s Feasible Distance (through the Successor).
• In the network, Router R1 has two routes to reach the network 10.10.1.0/24.
• The route through R2 has the best metric (30) and it is stored in the R1’s Routing Table.
• The other route, through R3, is a Feasible Successor route, because the Feasibility Condition has been met. That is,
R3’s Advertised Distance of 25 is less than R1’s Feasible Distance of 30. So, R1 stores that route in its EIGRP Topology
Table. This route can be immediately used if the primary route fails.
Router
R2
Metric to
10.10.1.0/24
is 20
Metric to
10.10.1.0/24
is 30 Metric to
Router 10.10.1.0/24 Router
R1 is 50 R5
Router
10.10.1.0/24
R3
Metric to
10.10.1.0/24
is 25
Router
R4
Router R5 has advertised the network 10.10.1.0/24. Router R1 has three paths to reach 10.10.1.0/24:
• Route R2 to R5: Let us assume that this is the best route (the Successor route). Router R1 will install this route in its
Routing Table, with the metric of 30.
• Route R3 to R2 to R5: For a route to become a Feasible Successor, the neighbor’s Advertised Distance for the route
must be less than the Feasible Distance through the Successor . This is not satisfied here since R3 has advertised the
metric of 50 to reach 10.10.1.0/24, which is greater that the Feasible Distance of R1 (30).
• Route R4 to R5: This route will become a Feasible Successor route, since R4’s Advertised Distance is less than the
Feasible Distance through the Successor (that is, 25 < 30). Router R1 will place this route in its EIGRP Topology Table
to be used immediately if the best route fails. Best routes (the Successors) from the Topology Table are stored in the.
Routing Table Feasible Successors are only stored in the Topology Table and can be used immediately if the primary
route fails.
Neighbor Table
Topology Table
Routing Table
R2
Interface Distance
Gi0 = 2000
Distance
Neighbor Table = 2000
Network
Topology Table 10.5.5.0/24
R1 Distance
Routing Table = 2000
Routing Table
Topology Table 1
Reported EIGRP Routing Table 1
Feasible
Network Feasible Outbound
Distance Distance Neighbor EIGRP Network Next-Hop
Distance Interface
10.5.5.0/24 4000 2000 R2 (Gi0) DUAL
10.5.5.0/24 4000 R2 Gi0
10.5.5.0/24 4500 2500 R3 (Gi1)
An EIGRP router compares the Feasible Distances of all routes in its Topology Table leading to a destination network.
The route(s) with the lowest cost will be installed in its Routing Table as the Successor route(s).
Topology Table 1 has 2 routes to network 10.5.5.0/24. The EIGRP distance from R1 to reach R2 or R3 is 2000. R1 selects
the route with the lowest Feasible Distance of 4000 as the best route and inserts this into its Routing Table.
FIGURE 6.12 EIGRP Neighbor Table, Topology Table, and Routing Table
hop router to which data traffic is forwarded on its way to the destination. Successors
are installed in the Routing Table to be used for forwarding packets, and multiple
successors can exist for a given destination if they have the same least cost.
Like all IP routing protocols, an EIGRP router only installs the next-hop router
(Successor) information in its Routing Table (Figure 6.12). The router does not
install information about the subsequent routers on the path (after the next-hop) to
the network destination in the Routing Table. Each router relies on the next-hop
router (which also maintains its own Routing Table) to make the correct routing deci-
sion when forwarding packets to the network destination.
Each router computes the best path to reach a given network destination and
installs the IP address and outbound interface of the corresponding best next-hop
router along the path in its Routing Table. Each router trusts the best next-hop router
(i.e., the Successor) to forward packets toward the intended destination. This hop-by-
hop forwarding of packets along the path through a network is performed one router
to the next. The EIGRP Routing Table, essentially, contains a subset of the informa-
tion in the EIGRP Topology Table. An EIGRP router uses the Topology Table to
maintain more detailed information about the route(s) to each network destination,
backup routes (if any exists), and information used by EIGRP DUAL.
6.7.2 Feasible Successor
A Feasible Successor is an EIGRP neighbor router that satisfies the Feasibility
Condition for a specific network destination and, hence, guarantees a loop-free route
Enhanced Interior Gateway Routing Protocol (EIGRP) 171
through that neighbor to the destination, but may not be the least-cost route available
[RFC7868]. A Feasible Successor can be described as a next hop router that leads to
the destination, but may not lie on the least-cost route to that destination.
The following are the main characteristics of a Feasible Successor:
The requirement that the Reported Distance of the backup route be less than the
Feasible Distance of the Successor ensures that the Feasible Successor lies on a loop-
free path to the destination. In this case, the Feasible Successor cannot use a route
through the local router to the destination thereby causing a routing loop. When the
Reported Distance of the next-best route is greater than or equal to the Feasible
Distance through the Successor, a Feasible Successor for the local router cannot be
chosen. In this case, the router must use EIGRP QUERY and REPLY messages to
find any alternative paths to the network destination.
The following are other properties of Feasible Successor:
upon network topology or route metric changes, thereby reducing the number
of route recomputations and speeding up network convergence. Unlike the
Successor, the EIGRP router always maintains the Feasible Successors to a
network destination in its Topology Table.
6.8.1 PASSIVE State
A destination entry in the Topology Table is in the PASSIVE state when there is at
least one EIGRP neighbor that can provide the current least-cost or best route, and
also satisfies the Feasibility Condition check that guarantees a loop-free network
topology (discussed below) [RFC7868]. A route entry for the destination is marked
in PASSIVE state, when it is considered usable for packet forwarding, and the EIGRP
router is not performing a route recomputation. With the destination entry in the
PASSIVE state (i.e., the stable operational state), the router does not coordinate with
its neighbors to perform any route recomputation because no such action is needed:
• The next hop EIGRP router for the destination marked in the PASSIVE state
(usable route) is still available for use in packet forwarding.
• For a destination to be in PASSIVE state, there must be at least one Successor.
The Feasible Successor that provides the least-cost route is also called a
Successor. Put in another way, for a destination to remain in the PASSIVE
state, there must be at least one neighbor that is a Feasible Successor that pro-
vides the least-total-cost route.
Enhanced Interior Gateway Routing Protocol (EIGRP) 173
6.8.2 ACTIVE State
A destination in the Topology Table is considered to be in the ACTIVE state if EIGRP
neighbors provide lowest-cost routes that do not pass the Feasibility Condition check,
therefore, meaning the routes cannot guarantee a loop free topology [RFC7868].
Specifically, in the ACTIVE state, any of these routes to the destination is considered
unusable for packet forwarding, and the EIGRP router must coordinate with its
neighbors to come out with a new loop-free least-cost route.
With the destination in the ACTIVE state, the router is actively coordinating
with its neighbors to recompute a new least-cost loop-free route for the destination.
If the least cost route is provided by any router that cannot be a Feasible Successor
(and therefore not a Successor), the destination entry in the Topology Table remains
in ACTIVE state, thereby requiring a new least-cost loop-free route to be recom-
puted. During the ACTIVE state, the router uses EIGRP QUERY and REPLY mes-
sages to actively coordinate with its neighbors to compute a new least-cost loop-free
route.
The properties of a destination in the ACTIVE State can be summarized as
follows:
• Destination Never Enters the ACTIVE State when Feasible Successors Are
Available: The destination is placed in the ACTIVE state when the router is
performing a route recomputation, however, if there are always Feasible
Successors available, the router will never place the destination in the ACTIVE
state, and will avoid a route recomputation. When no Feasible Successor is
available, the destination will go into ACTIVE state and a route recomputation
will commence. When the router detects that a link to a neighbor router that is
the only available Feasible Successor goes down, it will enter all destinations
reachable through that neighbor into the ACTIVE state, and will commence
route recomputations for these destinations.
• Commencing Route Recomputation: Recall that the router will perform
route recomputation when the Successor (i.e., the current best route) to a des-
tination becomes unavailable and there are no Feasible Successors available
for the destination. The router commences a route recomputation for a destina-
tion by sending QUERY packets to all of its neighbors (except the Successor)
inquiring if there is an alternative route leading to the given destination. A
neighbor router can either reply indicating it has an alternative route for the
affected destination, or return a QUERY packet indicating that it is also per-
forming a route recomputation for the destination.
o If the neighbor router has an alternative route to the destination, it will
respond to the QUERY packet with a REPLY packet containing the alter-
nate route and will not propagate the QUERY packet further. If the neighbor
does not have an alternative route, it will send QUERY packets to each of its
own neighbors seeking an alternative route to the destination.
o These QUERY packets are propagated through the routing domain, creating
an expanding tree of QUERY packets. Whenever a router replies to a
QUERY, it stops the propagation of QUERY packets through that branch of
the QUERY tree. However, QUERY packets can still propagate through
174 IP Routing Protocols
other parts of the routing domain as other EIGRP routers attempt to find
alternative routes to the destination, which might not be available or exist.
o While the destination is in the ACTIVE state, the router cannot change the
current next-hop router or Successor it is using to the destination. Once the
router receives all replies for a given QUERY from the neighbors, it can
select a new Successor and transition the destination to PASSIVE state.
• Failing the Feasibility Condition Check: A situation where the least-cost
route provided by a neighbor may fail the Feasibility Condition check is during
a network topology change. For instance, during a topology change when the
current least-cost route in the EIGRP Topology Table fails, the next least-cost
route available may traverse a neighbor that is not a Feasible Successor.
• Stuck-In-Active (SIA) Condition: The condition of SIA refers to when a des-
tination in the EIGRP router’s Topology Table has stayed in the ACTIVE state
for more than a predefined time period (the default Cisco setting for SIA is 90
seconds). When EIGRP routers are searching for an alternative route to a des-
tination, the reliable multicast protocol used by EIGRP, requires that a REPLY
be received for each QUERY packet sent in the network. This means when a
destination is placed in the ACTIVE state and a router sends QUERY packets,
the only way the destination can be removed from the ACTIVE state and placed
in the PASSIVE state is by receiving a REPLY for every QUERY packet sent,
a process which can take some time. Therefore, if the router does not receive
REPLY packets for all the outstanding QUERY packets it has sent within 90
seconds, the destination is placed SIA state
For both the PASSIVE and ACTIVE states discussed above, it is not really important
or critical if the Feasible Successors available do not provide the lowest total-cost
route to a destination. What matters is if these EIGRP neighbors are guaranteed to
provide a loop-free route to the destination, even if the route is potentially not the
shortest one available.
During the time an EIGRP router places a destination in the Topology Table in the
ACTIVE state, it must not change the Successor for that destination (i.e., change the
current Successor-Directed Acyclic Graph [SDAG]), nor change its own Feasible
Distance or Reported Distance until the destination returns to the PASSIVE state
[RFC7868]. Any further information the EIGRP router receives about this destina-
tion during the time it is in the ACTIVE state is reflected only in Computed Distances.
The router postpones any updates to the Successor, Feasible Distance, and Reported
Distance until the destination returns to PASSIVE state.
A SDAG is a graph constructed from the contents of the Routing Tables of
individual routers in the network for a particular destination, such that nodes of this
graph represent the routers in the network topology, and a directed edge connects
router/node A to router/node B only if router/node B is a Successor to router/node A.
In the absence of network topology changes and after network convergence, the
SDAG becomes a tree [RFC7868].
Enhanced Interior Gateway Routing Protocol (EIGRP) 175
6.9 FEASIBILITY CONDITION
The Feasibility Condition forms an integral part of DUAL. EIGRP routers use the
Feasibility Condition (which is a sufficient but not a necessary condition) to check
whether a neighbor EIGRP router provides a loop-free route to a network destina-
tion. Every route to a network destination that satisfies the Feasibility Condition is
guaranteed to not cause a routing loop. However, not all routes that are loop-free
satisfy the Feasibility Condition thereby, making the Feasibility Condition only a
sufficient but not a necessary condition [RFC7868].
All route selection in DUAL must undergo the Feasibility Condition check. After
a network topology or link metric change is detected, the result of the Feasibility
Condition check determines the state (PASSIVE or ACTIVE) of a destination entry
in the EIGRP Topology Table. A destination remains in the PASSIVE state if, after
the network change, the neighbor router providing the least cost route satisfies the
Feasibility Condition. The destination entry is marked in the ACTIVE state if after
the network change, no neighbor provides a least cost route that satisfies the
Feasibility Condition.
DUAL uses the Feasibility Condition as part of the diffusing computation process
to determine how soon (where and when) to terminate the computations. Routers that
are unaffected by a network topology or metric change are not required to participate
in a (DUAL) diffusing computation and may not even be aware that a network change
has occurred. A router may not perform a DUAL computation in the following two
cases [RFC7868]:
• The Feasibility Condition is satisfied when the neighbor reports that it is closer
to the destination than the router itself has determined it is, since the last time
that destination in the Topology Table was placed in the PASSIVE state.
• An EIGRP router does this by using the Source Node Condition which states
that a neighbor router satisfies the Feasibility Condition if the neighbor's
Reported Distance to a network destination is less than the router's own
Feasible Distance to that destination.
176 IP Routing Protocols
The Feasible Distance is not necessarily the current minimum distance (i.e., the least-
cost route) to a network destination, but instead, is a record of the least-cost distance
the router has known (historical minimum) since the last diffusing computation for
that destination was completed. This means, the Feasible Distance noted by a router
can be either equal or less than the current best distance computed.
Using diffusing computation, DUAL allows the routers affected by the network
change to coordinate among themselves to compute new least-cost routes to network
destinations. The diffusing computation expands by allowing routers to query addi-
tional routers for their current Reported Distances to the destinations affected by the
network change. The computation shrinks as routers receive replies to their queries.
Routers not affected by the network change simply send replies to queries immedi-
ately, thereby, ending the expansion of the diffusing computation through them.
These inherent properties of DUAL produce a diffusing computation process that
can adjust the scope its computation, and terminate at the right point and time. DUAL
is able to control the termination point of diffusion of route computation by managing
how reachability information is distributed through the network.
By using methods such as route summarization (or aggregation) and filtering,
DUAL is able to hide the reachability information of networks, and as a result control
the scope of the diffusing process. This provides a mechanism for creating effective
failure regions/domains within a single Autonomous System, and a mechanism
through which the route processing and convergence characteristics of a network can
be managed.
The SIA-QUERY and SIA-REPLY are two additional subtypes (as explained above)
that have been defined for the QUERY and REPLY messages, respectively, for use
with DUAL and EIGRP routers.
When a destination is in the PASSIVE state, a neighbor router may propagate a
received QUERY message if it is not a Feasible Successor (i.e., it has no alternate
route to that destination). However, if the neighbor router finds that it is a Feasible
Successor (i.e., it has an alternate route), it will not propagate the QUERY, and will
send a REPLY message for that destination with a metric set equal to the current
metric in its Routing Table. When the local router receives a QUERY message from
a neighbor that is not a Successor for a destination that it has placed in the ACTIVE
state, it will send a REPLY message to that neighbor, and will not propagate further
that QUERY message. The local router will send a REPLY message for that
destination containing a metric equal to its current Routing Table metric.
178 IP Routing Protocols
• Recall that an EIGRP router places a destination entry (in the Topology Table)
in PASSIVE state when it is not performing any route recomputations for that
destination. If the Successor for the destination becomes unreachable (or fails)
and the destination entry has Feasible Successors, then the router does not need
to perform any route recomputations and the destination entry does not go into
ACTIVE state.
• DUAL places the destination entry in ACTIVE state if the Successor fails and
there are no Feasible Successors available. The EIGRP router will send EIGRP
QUERY messages to its neighbor routers looking for a Feasible Successor to
the destination. A neighbor router can respond with a REPLY message indicat-
ing it has a Feasible Successor, or a QUERY message indicating that it does not
have a Feasible Successor and will participate in the route recomputation.
• The router does not return the destination entry to the PASSIVE state until it
has received a REPLY messages from all neighbors. However, if the router
does not receive REPLY messages from all neighbors before the "active-time"
timer expires (default timer setting is 90 seconds), it will declare the destina-
tion entry (in the Topology Table) as SIA.
The DUAL finite state machine described in [RFC7868] captures very well the
decision processes involved in route computations. The finite state machine allows
a router to tracks all the routes advertised by neighbor routers as well as the dis-
tance information (metrics) used by DUAL to compute loop-free routes to net-
work destinations. The DUAL finite state machine operates on a per destination
basis in the Topology Table, and also handles each destination independently. It
should be noted that when a single link fails, multiple destinations in the Topology
Table may go into ACTIVE state. When a network change occurs, each router
affected will compute a separate Successor-Directed Acyclic Graph (SDAG) for
each destination, allowing a loop-free route can be computed for each reachable
destination.
DUAL selects routes to be installed in the EIGRP Routing Table based on the
Feasible Successors available to each network destination. When a router finds no
Feasible Successors but there are neighbor routers still advertising reachability
information to the destination, the router will perform route recomputation to
determine a new Successor.
Enhanced Interior Gateway Routing Protocol (EIGRP) 179
The time it takes for routers in the network to compute new routes impacts the
network convergence time. Thus, to avoid unnecessary route recomputations, when a
network change occurs, DUAL will try to find if there are any Feasible Successors
available. If one Feasible Successor is available, the router will use it in order to
avoid performing unnecessary route recomputation.
• The router is not able to respond to a QUERY packet, which can happen as a
result of high CPU utilization or memory shortage (where the router cannot
allocate enough router memory to process a QUERY packet or construct a
REPLY packet).
• The link between a router and its neighbor is faulty resulting in some EIGRP
packets getting lost and not reaching the intended recipient. A neighbor router
may receive enough EIGRP packets to maintain the neighbor relationship, but
does not receive all QUERY or REPLY packets sent.
• A link failure between a router and its neighbor which causes traffic to flow in
only one direction (results in a unidirectional link).
6.10.4.1 Stuck-In-Active (SIA)
The SIA decision process and corresponding time interval is divided into two equal
intervals and this takes place immediately after a router sends a QUERY to its neigh-
bors. The process of determining if a destination is SIA starts immediately after a
router sends a QUERY to its neighbors. As soon as one-half of the SIA time interval
is up (default for Cisco routers is 90 seconds), the router will send an SIA-QUERY
to its neighbors which must respond with either a REPLY or SIA-REPLY message.
Any neighbor that fails to respond with either a REPLY or SIA-REPLY within the
second one-half of the preset SIA interval will result in the sending router placing the
particular destination in SIA state.
Cisco limits the number of SIA-REPLY messages expected by the originating
router to a maximum of three. If the SIA timer expires after three SIA-REPLY
messages have been received from the neighbors, and still the destination remains in
the ACTIVE state (as indicated in the SIA-REPLY messages), the router will declare
the destination as SIA.
180 IP Routing Protocols
When a destination is declared as SIA, the EIGRP router will take one of follow-
ing two actions [RFC7868]:
a. The router will delete the route through that neighbor to that destination, treat-
ing the neighbor as if it had responded with a REPLY message that says the
destination is unreachable.
b. The router will delete all routes advertised by that neighbor and reset the adja-
cency with that neighbor, treating the neighbor as if it had responded to indi-
cate that all routes it had advertised are unreachable.
6.10.4.2 SIA-QUERY
When an EIGRP router is still waiting for a REPLY message from a neighbor for a
QUERY message that is still outstanding, the router may not know what is preventing
the REPLY from being received. The absence of a REPLY message from a neighbor
could be due to a lost REPLY packet, possibly caused by network congestion, or a
slow neighbor that is yet to send a REPLY (due to high CPU utilization or insufficient
memory to process a received QUERY or construct the REPLY packet).
To enable a router to determine if the neighbor is still attempting to determine a
loop-free route to the destination that is in the ACTIVE state, the router may send a
SIA-QUERY message to that neighbor. This enables the router to ascertain if there is
a communication problem with the neighbor, or if the neighbor is still in the process
of finding a loop-free route to the destination through its downstream routers.
By transmitting a SIA-QUERY message, the router can extend the effective time
a destination remains in the ACTIVE state. The router does this by simply resetting
the ACTIVE timer that it has set for the destination, allowing the neighbor to continue
to search for a loop-free path, but as long as the neighbor successfully communicates
back that it is still doing so.
The router must send SIA-QUERY messages on a per-destination basis at the
halfway mark of the ACTIVE timer setting. Furthermore, the router can send up to
three SIA-QUERY messages for any particular destination, and each one of these
must be sent at one-half of the ACTIVE timer period, and so long as each message is
successfully acknowledged by the recipient of the SIA-QUERY with a SIA-REPLY.
A QUERY message is also transmitted on a per-destination basis and at the halfway
mark of the ACTIVE timer setting.
Upon receiving a SIA-QUERY message, the neighbor router must first respond
immediately with an ACK message to the sender, and then continue to process the
SIA-QUERY message. The neighbor router must respond to the originator of the
SIA-QUERY message with a SIA-REPLY message indicating that it is actively
processing routes for this destination by setting the ACTIVE flag in the SIA-REPLY
message.
If the neighbor router receives a SIA-QUERY message for a destination for which
it has not received the original QUERY message, the neighbor must treat the SIA-
QUERY message as though it was a QUERY message and act as follows:
6.10.4.3 SIA-REPLY
Upon receiving a SIA-QUERY message, an EIGRP neighbor will send a SIA-REPLY
message as response to the sender. The neighbor sends the SIA-REPLY message
after it has processed the full SIA-QUERY message received. The SIA-REPLY mes-
sage sent includes a TLV for each network destination along with its vector metric as
indicated in the neighbor’s Topology Table. If the destination is still in the ACTIVE
state, the neighbor will send the SIA-REPLY message with the ACTIVE bit set. This
indicates to the sender of the SIA-QUERY message that the neighbor processed the
message and is still in the process of finding a loop-free path to the destination (most
likely waiting for replies to QUERY messages it has sent to its own downstream
neighbor routers).
The SIA-REPLY message informs the sender of the SIA-QUERY that the neigh-
bor is still searching for a loop-free path or has completed that search. In the former,
the SIA-REPLY is an explicit notification that the neighbor is still actively perform-
ing route recomputations. This allows the sender of the SIA-QUERY message to
determine if it should continue to keep the destination in the ACTIVE state, or it
should reset its adjacency relationship with the neighbor, and delete all routes through
this neighbor from its Topology Table.
Unlike RIP, Routers running EIGRP discover and maintain information about
their immediate neighbors. The routers multicast HELLO messages to the multicast
address 224.0.0.10 (the All EIGRP routers address) every 5 seconds for most network
types. Each EIGRP router then constructs a Routing Table with the learned neighbor
information. EIGRP routers send routing updates only when necessary (i.e., when
topology changes occur) and advertises them only to neighbor routers. As a result, no
periodic update timers are used. Similar to OSPF and IS-IS, EIGRP uses HELLO
messages to discover and maintain adjacency relationships with neighbor routers.
The router will send the HELLO packets containing, in addition, the EIGRP metric
K values configured on it. Two routers can only become neighbors if they are config-
ured with the same EIGRP metric K values. This ensures that the EIGRP metric used
throughout the network of EIGRP routers is consistent.
route computation process, and will expect REPLY packets from each. The router
will not send a QUERY packet directly to any pending neighbor, and therefore, will
not expect a REPLY packet from any. However, if a pending neighbor resides on an
interface of the router that contains a mix of pending neighbors and fully established
neighbors (e.g., on a multiaccess broadcast network segment), the router might
receive a QUERY packet, but it is not expected to respond by sending a REPLY
packet.
• Recall that the Computed Distance is the total metric (cost) a router computes
for a path from itself to a destination network through a particular neighbor
using the link cost between itself and the neighbor, and the neighbor’s Reported
Distance.
• Each EIGRP router computes and maintains one Computed Distance for each
destination/advertising neighbor pair.
• Thus, the Reported/Advertised Distance of the local router to a given destina-
tion is the lowest Computed Distance to that destination.
• The Feasible Successor for a particular destination will advertise its lowest
Computed Distance to that destination as its local Reported Distance to own
neighbors.
o In other words, when a neighbor advertises its lowest Computed Distance to
a destination, this becomes its own Reported Distance, and is the metric that
the neighbor uses to represent or describe how far it is to that destination.
It should be noted that when a router advertises a route to a destination, then the
router must be using that route to forward packets to that destination (a feature that
distance-vector routing protocols use).
6.12.1 Route Management
A route in the EIGRP Topology Table is considered to be either an internal or exter-
nal route. Internal routes have precedence over external routes independent of their
associated routing metric or cost. If a router receives an internal route for a given
network destination, it will run the diffusing computation considering only the inter-
nal routes it has learned. The router will select the Successor from external routes, if
available, only when there are no internal routes for that network destination.
6.12.1.1 Internal Routes
Internal routes refer to routes to network destinations that have been learned from an
EIGRP Autonomous System and advertised within the same Autonomous System.
Enhanced Interior Gateway Routing Protocol (EIGRP) 185
Simply, these are routes that are originated and propagated in the same Autonomous
System. For example, a directly attached network on the interface of an EIGRP
router is considered an internal route within the router’s Autonomous System, and
this information is propagated throughout that Autonomous System. An EIGRP
router tags internal routes in its Topology Table with the following information:
• Router Identifier (ID) of the router within the EIGRP Autonomous System that
originated the route.
• An administrative tag (also referred to as a route tag that is configurable) that
can be used to define and apply network policies (e.g., for customized routing
and path selection, traffic engineering). By using administrating tagging of
EIGRP routes, a network administrator has a flexible means of tagging routes
and implementing network policy controls for customizing routing in a net-
work (see Chapter 7).
6.12.1.2 External Routes
External routes are routes to network destinations that have been learned by a differ-
ent routing protocol (e.g., RIP, OSPF), discovered in another EIGRP Autonomous
System, or originally configured manually as static routes. An external route can be
a route to a destination outside a particular EIGRP Autonomous System that has been
redistributed into that EIGRP Autonomous System. An EIGRP router marks each
external route in the Topology Table with the routing source (dynamic routing proto-
col or static routing) that originated the route. An EIGRP router tags external routes
with the following information [CISCID13669]:
• Protocol ID of the external routing protocol (e.g., RIP, OSPF) that learned the
external route being redistributed (e.g., routes learned by an OSPF router can be
redistributed into an EIGRP Autonomous System as discussed in Chapter 7).
• The routing metric (or default metric) assigned to the route being redistributed
from the external routing protocol into EIGRP. This is a 32-bit composite met-
ric value in entered in the local routing table for the external routing protocol
(see Chapter 7).
• Flag bit indicating if route can be used for default routing.
EIGRP running in a border router may advertise OSPF-learned routes within the
EIGRP Autonomous System. In this case, EIGRP would advertise these routes and
tag them as OSPF-learned routes with each route associated with a routing metric
that is set to the default metric assigned to OSPF.
Split horizon blocks a router from advertising routing information about a network
destination out of any of its interfaces that the router itself uses to route packets to
that destination. This optimizes communications among routers in the network, par-
ticularly when links or routers fail. Also, when a router makes changes in its Topology
Table that results in a change in the interface (or route) through which the router uses
to reach a destination, the router will turn off split horizon and perform a poison
reverse by advertising the old route with infinity metric out of all of its interfaces
indicating that the route is unreachable. This is to ensure that other routers in the
network will not attempt to use the old route that is now invalid.
Enhanced Interior Gateway Routing Protocol (EIGRP) 187
The EIGRP router will do so for a destination under any of the following
conditions:
• When Two EIGRP Routers Are in the Startup or Restart Mode: When two
EIGRP routers first establish a neighbor or adjacency relationship, they start by
exchanging their Topology Tables (the startup mode). Two EIGRP (neighbor)
routers are in the startup mode when they are exchanging their EIGRP Topology
Tables for the first time. During the startup mode, when a router receives rout-
ing information for each destination, it will advertise the same routing infor-
mation for that destination back to its new neighbor but with the routing metric
set to the maximum value which is infinity (a process referred to as Route
Poisoning). Neighbor startup also occurs when a link cost changes between the
two routers.
• When an EIGRP Router Is Advertising a Topology Table Change: If an
EIGRP router uses a specific neighbor router as the Successor (route) to a
given network destination, it will transmit an UPDATE packet for that destina-
tion carrying a routing metric of infinity when that Successor is unavailable or
equivalently, the destination is placed in the ACTIVE state.
• When an EIGRP Router Is Sending a QUERY or UPDATE Message: In
most circumstances, an EIGRP router follows the split-horizon rule as explained
above by never readvertising a route that it has learned out of the router interface
on which it was learned. When a router receives a routing metric change from
the Successor (to a given network destination) via a QUERY or UPDATE packet
that causes the destination to be placed in the ACTIVE state, the router will send
QUERY packets to its neighbors on all of its interfaces except the interface lead-
ing to the Successor. The router does not send a QUERY packet out of the
inbound interface on which the routing information was received (that causes
that destination to be marked as ACTIVE). Simply, the router applies the split
horizon rule when it receives a QUERY or UPDATE packet from the Successor
it is using to reach the destination reported in the QUERY packet.
the routes it has in its local Routing Table, except the routes the router has
learned through the receive interface (i.e., by applying the split horizon rule).
a. Router-Ex will send an EIGRP UPDATE packet to Router-Nw, even though
the two have not established a neighbor relationship (which happens when
Router-Ex sends a HELLO packet to Router-Nw).
b. The EIGRP UPDATE packet sent from Router-Ex has its initial bit (INIT-
Flag [0x01]) in the Flags field (Figure 6.2) set, indicating that this is the
beginning of the EIGRP startup process with a neighbor process
[RFC7868].
c. The EIGRP UPDATE packet conveys to Router-Nw information about the
routes that the neighbor Router-Ex has discovered/learned, in addition, to
the routing metric that the Router-Ex is advertising for each route/
destination.
3. After Router-Nw and Router-Ex have exchanged HELLO packets, and have
established a neighbor adjacency, Router-Nw will reply to Router-Ex with an
ACK packet, indicating that it has received the EIGRP UPDATE packet con-
taining the routing information.
4. Router-Nw installs the routing information in the EIGRP UPDATE packet in
its Topology Table. The Topology Table of Router-Nw contains the routes
advertised to all network destinations by its neighbor/adjacent routers. The
Topology Table is organized to list each network destination along with all the
neighbors through which the destination can be reached and their associated
routing metrics.
5. Router-Nw will then send an EIGRP UPDATE packet to Router-Ex after
updating its Topology Table.
6. Upon receiving the EIGRP UPDATE packet from Router-Nw, Router-Ex will
send an ACK packet to Router-Nw.
After Router-Nw and Router-Ex have successfully exchanged the EIGRP UPDATE
packets and updated their Topology Tables, they are now ready to transition to the
next process which is to make route computations, and then select the Successor
(best or primary route(s)) and Feasible Successor (backup route(s)) for their Topology
Table. Only the Successor routes will then be installed in the Routing Table. An
EIGRP router selects Feasible Successors at the same time the Successors are
selected. Multiple Feasible Successors for a given destination (if any exist) can be
maintained in the Topology Table.
The EIGRP routers use DUAL to keep track of all routes advertised by neighbors
and to compute the Successor to each network destination. DUAL computes the
Successor using an EIGRP composite metric, and also ensures that each selected
Successor provides a route that is loop-free. DUAL also computes Feasible Successors
(or backup routes), if available, to each destination that provide loop-free paths. This
allows an EIGRP router to immediately uses Feasible Successor if the Successor fails,
without having to initiate any Holddown timer as in RIP (see Chapter 2). The Feasible
Successor (if one is available) provides a loop-free path and results in fast network
convergence.
Enhanced Interior Gateway Routing Protocol (EIGRP) 189
The EIGRP router selects the Successor to each network destination and installs
these in the local Routing Table, along with the destination network address, the
routing metric to the destination, the IP address of the Successor, and the outbound
interface leading to the Successor. If the EIGRP Topology Table contains more than
one route that have the same least-cost (i.e., multiple Successors) to a given network
destination, then all of these Successors (up to four by default [CISCTEAPA06])
will be installed in the Routing Table.
Successor Route
R2
Distance
Distance = 200
= 10
Network
R1 10.1.1.0/24
Distance
= 10 Distance
= 200
R3
Successor Route
• Routers R2 and R3 are both connected to network 10.1.1.0/24 and advertise routes to reach that network to R1.
• Router R1 receives two routing updates for network 10.1.1.0/24 with the same Reported Distance.
• Router R1 installs both routes in its Routing Table and load balances across these Successor routes.
balancing when it has a Successor and one or more Feasible Successors in its Routing
Table. Load balancing can be performed on a per-packet, per-destination, per-source,
or per-flow basis. A router may maintain, for instance, up to 16 best routes in its
Routing Table but use a maximum of 4 routes for load balancing.
An EIGRP router uses a variance value for performing load balancing. The vari-
ance is a multiplier that controls the degree to which the router performs unequal-
cost load balancing [CISCTEAPA06]. The variance value or multiplier is a value in
the range of 1 to 128, and defines the range of routing metric (or cost) values that are
acceptable/permissible for load balancing, and also provides a mechanism for con-
trolling the degree of load balancing.
The default variance value of 1 indicates equal-cost load balancing. When a vari-
ance is configured, it is used to compute the range of the routing metric values (i.e.,
the Feasible Distances) the router uses to get to a given network destination
[CISCTEAPA06]. The router uses this range of routing metric values to determine
the feasibility of using a potential route in the load balancing procedure (i.e., a
Feasible Route with Variance).
An EIGRP router considers a route to a particular network destination to be
Feasible, if the next-hop router on the path is closer to that destination than the router
itself, and if the routing metric for the entire alternate path is within the range of the
routing metric values computed using the configured variance. The EIGRP router
installs only Feasible paths in its Routing Table and uses only these paths (that are
Feasible) for load balancing. The two Feasibility Conditions that govern load balanc-
ing are as follows [CISCTEAPA06]:
1. The best routing metric computed locally by the router (i.e., its current Feasible
Distance) must be greater than the best routing metric (i.e., the Reported
Distance) advertised by the next-hop router. This means the next-hop router on
the path must be closer to the destination than the local router itself, a condi-
tion that prevents routing loops.
2. The configured variance value multiplied by the best routing metric computed
locally by the router (i.e., its current Feasible Distance) must be greater than
the routing metric through the next-hop router (i.e., the alternative Feasible
Distance).
If these two conditions are satisfied, the route is declared Feasible and the router can
add it to its Routing Table (see examples in Figures 6.14 and 6.15).
An EIGRP router can use the following methods to control how traffic is distrib-
uted among routes when it has multiple routes leading to a given network destination,
and these routes have different routing metrics (costs) [CISCTEAPA06]:
1. The traffic the router distributes to a route is proportional to the inverse ratio of
the routing cost associated with that route.
2. The router installs all routes that are Feasible, and have routing metrics within
the range of routing metric values computed using the configured variance in
its Routing Table, but uses only the routes with the minimum cost in load
balancing.
Enhanced Interior Gateway Routing Protocol (EIGRP) 191
R2 Distance
Distance = 100
= 200
Feasible Reported EIGRP
Network Path 1
Distance Distance Neighbor
• Router R1 uses Router R2 as the Successor because its Feasible Distance of 200 is lowest.
• A variance equal to 2 is configured at Router R1, so the path through Router R2 meets the criteria for load balancing.
In this case, the Feasible Distance through Router R2 is less than twice the Feasible Distance for the Successor,
Router R3.
• Router R1 does not consider Router R4 for load balancing because the Feasible Distance through Router R4 is greater
than twice the Feasible Distance for the successor, Router R3.
• Router R4 would never be a Feasible Successor, regardless of what variance is used. Router R4 is not a Feasible
Successor because its Reported Distance of 250 is greater than Router R1’s Feasible Distance of 200. Therefore, to
avoid a potential routing loop, Router R4 is not considered closer to the destination than Router R1 and cannot be a
Feasible Successor.
Distance Distance
= 10 = 100
R2
Path 1
Feasible Reported EIGRP
Network
Distance Distance Neighbor
Distance Distance
110 100 R2 Path 2 = 10 = 100
R3 Network
R1 10.1.1.0/24
110 100 R3
Path 3
10.1.1.0/24
200 180 R4 Distance Distance
= 20 = 180
R4
400 360 R5
Path 4
Distance Distance
= 40 = 360
R5
Router R1 routes traffic to the destination using both Paths 1 and 2 which are Successor paths.
If a variance of 2 is configured at Router R1, it can load balance over Paths 1, 2, and 3, because 110 ×2 = 220, which shows
that the Feasible Distance through Router R4 (Path 3) is less than twice the Feasible Distance for the Successors, Routers R2
and R3.
If a variance of 4 is used instead, then Path 4 through Router 4 can be included in the load balancing.
• Different routing protocols use different routing metrics and so, when routes
are redistributed from one routing protocol into another, the metrics used by
each protocol can affect how the redistribution works.
• Different routing protocol have different Administrative Distances which can
be used to determine which route among routes from different routing proto-
cols to the same network destination should be the preferred route. But the
different Administrative Distances can cause problems when route redistribu-
tion is being performed.
Route redistribution, therefore, has to be used with care since it can potentially cause
routing problems such as slow network convergence, routing loops, or inefficient or
suboptimal routing in the network.
It is recommended in reference [CISCID8606] that a metric that is understand-
able to the importing/receiving routing protocol be defined when redistributing
routes. EIGRP preserves all EIGRP routing metrics when it is redistributing routes
from one EIGRP Autonomous System to another EIGRP Autonomous System.
Routes can also be redistributed between EIGRP and other routing protocols such as
RIP and OSPF [CISCID16406].
Cisco has defined a number of proprietary rules for route redistribution in Cisco
routers. These rules dictate that a route to be redistributed into another protocol, must
be present in the Routing Table of the exporting protocol [CISCID8606]. Just having
a route present only in the EIGRP Topology Table is not sufficient for redistribution.
Recall that the routes that are sourced by routing protocols with a lower Administra-
tive Distance are the ones installed in the Routing Table.
When an EIGRP router is redistributing routes from one EIGRP Autonomous
System to another, it will reply to QUERY messages from the originating Autono-
mous System using the normal QUERY processing rules, and will also transmit a
new QUERY message into the other Autonomous System [CISCID8606]. The origi-
nal QUERY message does not propagate through to the second Autonomous System,
and is bounded by the router at the Autonomous System border. Instead, the EIGRP
router at the border leaks the original QUERY message into the second Autonomous
System through the transmission of a new QUERY. A benefit of this technique is that,
it can prevent SIA problems in a network because the number of EIGRP routers a
QUERY must propagate through before a reply is received, is bounded or limited
[CISCID8606].
External administrative tags can also be used for breaking potential routing loops
that may occur when redistributing routes between EIGRP and other routing
Enhanced Interior Gateway Routing Protocol (EIGRP) 193
6.16.1 Auto-Summarization
With auto-summarization, EIGRP will summarize routes to their classful address
boundaries (Class A, B, or C) automatically when sending routing updates across
network boundaries. That is, each time EIGRP uses auto-summarization and sends
routing updates cross the border between two different major networks.
For example, let us assume an EIGRP router is connected to the networks
172.18.1.0/24 and 10.3.1.0/24. When the router sends updates from the network
10.3.1.0/24 into the network 172.18.1.0, it will send them with the address auto-
summarized to 10.0.0.0/8, which is the classful address boundary or mask. The
default network mask for the Class A address 10.x.x.x is /8. Updates from
172.18.1.0/24 will summarize the address as 172.18.0.0/16 (the Class B network
address with mask /16).
Auto-summarization is enabled by default, but is generally turned off as recom-
mended by Cisco (common best practice). The auto-summarization feature may be
useful in some case, but it can also cause problems when applied to networks with
discontiguous addresses. For example, when two or more separate subnetworks
within the same classful address block are connected together, the EIGRP auto-
summary route can end up being the same. This makes it problematic to route packets
in an internetwork that consists of different subnetworks within the same classful
address block, because the auto-route summaries are not distinct.
Let us assume that a router RA has a directly attached subnet 10.4.11.0/24 that it
advertises to a neighbor router RB. With auto-summarization, RA will summarize
the subnet 10.4.11.0/24 as the classful address 10.0.0.0/8 to RB. Because RB has
learned a route to the classful network 10.0.0.0/8 from RA, it will forward all packets
destined for any IP address within the Class A address range 10.0.0.0 to
10.255.255.255 to RA, which can cause problems if there are other networks
194 IP Routing Protocols
elsewhere with this address range. This is one among several other reasons why net-
work administrators usually turned off the auto-summarization feature.
EIGRP was developed from IGRP which uses classful addresses, and the auto-
summarization features stems from IGRP’s legacy classful addressing feature. So,
instead of advertising a specific route on a variable length classless address boundary,
EIGRP will only advertise the route as a Class A, B, or C network. EIGRP auto-
summarization creates the most optimal summary routes but these routes tend to be
“over-summarized” routes. EIGRP will auto-summarize an external route only if one
of its component networks is an internal route [CISCID16406].
6.16.2 Manual Summarization
Using manual summarization in EIGRP, a network administrator can summarize
internal and external routes on virtually any bit boundary in the IP address. For exam-
ple, the networks 192.3.1.0/24, 192.3.2.0/24, and 192.3.3.0/24 can be summarized
into the CIDR block 192.3.0.0/22. Manual summarization can be used to represent
multiple routes as a single route, and can be performed at any router in a network. It
is configurable on a per-interface basis on a router.
6.17 EIGRP AUTHENTICATION
An EIGRP router can be configured with neighbor router authentication (also referred
to as route authentication) to prevent it from receiving fraudulent routing information
from neighbors [CISCTEAPA06]. A router can be configured to participate in the
exchange of routing updates with neighbors based on predefined passwords. This
section describes the types of authentication methods used by EIGRP routers.
The default configuration of authentication in a Cisco EIGRP router is null
authentication, where a router does not authenticate routing protocol packets
exchanged with its neighbors. However, when a router interface is configured to
perform neighbor authentication, it will authenticate all EIGRP routing update
packets it receives from the neighbor. Any two routers involved in neighbor
authentication accomplish this by using an authentication key (or password) that is
known to both the sender and receiver.
EIGRP routers support two types of authentication:
Both types of authentication send authentication data in similar fashion, except that
routers using MD5 authentication send a message digest instead of the shared secret
authentication key (secret password) itself. The sender creates a message digest using
the secret authentication key (and in some protocols, possibly, a Key ID) and the
protocol data to be transmitted, but does not send the secret authentication key itself.
This prevents an attacker from reading the secret key while it is in transit to the
Enhanced Interior Gateway Routing Protocol (EIGRP) 195
receiver. On the other hand, a router using simple password authentication sends the
authenticating key (i.e., a plaintext password) itself along with the protocol data over
the transmission medium to the receiver.
6.17.2 MD5 Authentication
In MD5 authentication, a shared secret authentication key (or secret password), and
a Key ID are configured on each router (interface) participating in the exchange of
routing updates. The sending router applies an authentication algorithm on the rout-
ing protocol packet, the shared secret key (and possibly, the key ID) to generate a
message digest (also called a hash). The router then appends the message digest to
the routing protocol packet to be transmitted to the receiver.
Unlike the simple password authentication, the shared secret authentication key is
not transmitted over the transmission medium to the receiver. The router sends the
message digest instead of the shared authentication key, which prevents an attacker
Router Router
R1 R2
10.0.1.0/24
EIGRP 10.0.0.0/8
In EIGRP auto summarization, routes are summarized to classful address at network boundaries in the routing updates.
Router R1 has a locally connected network 10.0.1.0/24 that is advertised to Router R2. With auto summarization,
Router R1 summarizes the network 10.0.1.0/24 before sending the route to R2. R1 sends the classful route 10.0.0.0/8 to
R2 instead of the more specific 10.0.1.0/24 route.
Router Router
R1 R2
10.6.10.0/24
EIGRP 10.0.0.0/8
Router R1 has a directly connected network 10.6.10.0/24 that it advertises to R2. With auto-summarization, R1 will
summarize the network 10.6.10.0/24 and send the classful route 10.0.0.0/8 to R2.
• EIGRP manual summarization can be configured on a per-interface basis. A single route can be used to represent
multiple routes, which reduces the size of routing tables in a network.
• Router R1 has two directly connected networks: 10.0.0.0/24 and 10.0.1.0/24. EIGRP advertises these networks as two
separate routes.
• However, R1 can be configured to advertise only one summary route for both subnets, which helps reduce R2’s routing
table.
• R1 can send only one route 10.0.0.0/16 to reach both networks to R2. R2 can use only one route to reach both networks
on R1.
• NOTE: In this example, this summary route included the two networks on R1, but also some other addresses that are
not in these networks. The range of the summarized addresses is 10.0.0.0 – 10.0.255.255, so R2 thinks that R1 has the
routes for all addresses inside that range. That could cause some problems if these addresses exist somewhere else in
the network.
from eavesdropping on the medium, and learning the key during transmission. The
message digest carried in each EIGRP packet also prevents unapproved sources from
introducing unauthorized, malicious or false routing messages into the network.
With MD5 authentication, a shared secret authentication key and a Key ID is con-
figured on both the sending and receiving router. Each authentication key is associ-
ated with its own Key ID which is stored locally at each router. The authentication
algorithm and the MD5 authentication key in use at any given time, is uniquely iden-
tified by a combination of the Key ID, and the router interface over which the routing
protocol packets are transmitted.
The keys used by an EIGRP router can be managed using the concept of Key
Chains where each Key Chain has a number of different keys. A time interval (called
a lifetime) which specifies the time interval during which a particular key will be
active and valid, can be specified for each key defined within a Key Chain. This allows
the routers to perform transition from one key to another (key rollover) while sending
EIGRP packets. To configure EIGRP MD5 authentication, a Key ID (number), secret
authentication key (or secret password), and a lifetime has to be specified.
An authentication key cannot be used outside its lifetime, that is, outside the time
periods during which it is activated. To configure MD5 authentication, the Key ID and
secret authentication key have to match on both the sending and receiving routers.
However, the names of the Key Chain do not have to be the same on the two routers.
Best practice recommends that for a given Key Chain, the lifetimes of keys should
overlap to avoid any period of time during which no valid key is available for use. If
the configuration produces a time period during which no key is activated, the routers
cannot perform neighbor authentication, and therefore cannot exchange routing
updates. The routers also need to have a common notion of the time-of-day (via, e.g.,
clock synchronization using Network Time Protocol [NTP]) to allow all participating
routers to rotate through their shared keys in synchronized manner. This allows all
routers use the same shared secret key at the same time.
Enhanced Interior Gateway Routing Protocol (EIGRP) 197
During the lifetime of a given key, neighbor routers can send routing update
packets with that activated key. A router will send only one authentication packet
using one key at any given time, regardless of how many valid keys exist. The router
will examine the Key ID (number) associated with each key in the Key Chain from
lowest to highest number, and will use the first valid corresponding key it encounters
[CISCTEAPA06]. The first key is determined by the Key ID, while its validity
period is defined by the specified lifetime.
To configure a lifetime for a key (a period during which it is valid), an accept-
lifetime and send-lifetime parameters need to be configured. The accept-lifetime
specifies the time period during which the receiver will accept the key for use on
received packets. The send-lifetime specifies the time period during which the sender
will use the key for sending packets. Both the accept-lifetime and send-lifetime are
defined using parameters that consist of a start-time, end-time, and length of time (in
seconds) that a particular authentication key is valid for sending/receiving packets.
EIGRP Process
EIGRP
Route Routing
Calculator Database Routing
Routing Protocol
Protocol Input Other Routes
Database Topology Routing
Input &
Manager Table Table
Protocols
Manager
Neighbor
Table
Interface Neighbor IP Routing
Manager Manager Table
else in this book) only suggest a high-level relationship between the various protocol
components and not an example implementation.
The EIGRP Protocol Process component supports the core EIGRP protocol func-
tions which include:
As discussed earlier, an EIGRP router stores network topology and routing informa-
tion in three main databases: Neighbor Table, Topology Table, and Routing Table.
The design and contents of these databases are described in greater detail below. The
discussion goes beyond those presented in sections above.
6.18.1 Neighbor Table
An EIGRP router uses the Neighbor Table to maintain a list of routers that are directly
connected to it and have formed an adjacency (neighbor) relationship. Routers that
are not directly connected to the router but rather through another router, are not
considered neighbors and are not recorded in the Neighbor Table. The EIGRP router
uses this table to know which routers it can have a direct bidirectional communica-
tion with. The Neighbor Table is similar to the neighbor database used in link-state
routing protocols such as OSPF and IS-IS.
The Neighbor Table maintains important information for each neighbor router
such as the neighbor’s address, interface on which it is connected, Hold Time, and
other information relevant to the neighbor. Two EIGRP routers must form a neighbor
or adjacency relationships before they can exchange EIGRP packets including
routing updates.
6.18.2 Topology Table
The Topology Table maintains all advertised routes to all known network destina-
tions, plus the neighbor routers that have advertised these routes and the routing
metrics to those destinations. This table maintains all Successors and Feasible
Successors to all network destinations. Simply, the Topology Table maintains routes
that an EIGRP router has learned from its neighbor as stored in their Routing Tables.
Enhanced Interior Gateway Routing Protocol (EIGRP) 199
An EIGRP router will mark destinations in the Topology Table as being in the
PASSIVE or ACTIVE state. A PASSIVE state indicates that the EIGRP router has
determined a route for the particular destination and has finished route computations.
ACTIVE state indicates that the EIGRP router is still trying to compute the best route
for the destination. An EIGRP router never uses routes in the Topology Table for
actual traffic forwarding until they are installed in the Routing Table. Also, the router
will not insert routes in the Topology Table into the Routing Table if those destinations
have been marked as ACTIVE, have only a Feasible Successor (with no Successor
determined yet), or the routes have a higher Administrative Distance than another
available equivalent route.
6.18.3 Routing Table
Each router in a network performs path computations and selects the best paths to
reach each known destination and installs this in the Routing Table. An EIGRP router
will first examine its Topology Table and determine the best route among all avail-
able routes to each network destination. The router does so by comparing the Feasible
Distances to reach each destination, and then select the route with the lowest Feasible
Distance (Successor route) and install it in its Routing Table. The Feasible Distance
for the selected best route is entered in the Routing Table as the EIGRP routing met-
ric to reach that destination.
The router installs only the IP address of the best neighbor router (also referred to
as the next-hop router) along with the outbound interface (and possibly, the routing
metric) to reach the network destination. The router does not install any information
about the subsequent routers (after the next hop router) along the path in the Routing
Table. Instead, the router relies on the next-hop router called the Successor to route
traffic toward the network destination:
• An EIGRP router selects the best routes to all network destinations from the
EIGRP Topology Table and places them in the Routing Table. The EIGRP
router installs Successor routes in the Routing Table.
• The router inserts the relevant information required for packet forwarding from
the Topology Table into the Routing Table which can then be used for traffic
forwarding. The Routing Table contains a subset of the information maintained
in the EIGRP Topology Table.
• The Topology Table contains more detailed routing information to each net-
work destination, backup routes, routing metrics, plus other important infor-
mation required by DUAL for route computations.
A router will select Successors and Feasible Successors from the Topology Table
(when unequal-cost load balancing is used) and stored these in the Routing Table.
The (combined) IP Routing Table (Figure 6.18) maintains all best routes selected
from the EIGRP Topology Table and those provided by other routing protocol pro-
cesses. In Figure 6.18, the EIGRP Routing Table (or Database) and the IP routing
table are simply logical components, and an EIGRP router may choose to maintain
these as one integrated table and not as separate tables.
200 IP Routing Protocols
A Feasible Successor is the best alternative loop-free route (i.e., backup route) to a
network destination. This alternate route is not the least-cost route to that destination
and not selected as the primary route to forward packets, and as a result is not installed
in the EIGRP Routing Database. An EIGRP selects Successors and Feasible
Enhanced Interior Gateway Routing Protocol (EIGRP) 201
Successors to a destination are at the same time during the DUAL computation pro-
cess. The router will maintain Feasible Successor(s) in its Topology Table, as well as
in the Routing Table only when it is performing unequal-cost load balancing.
Feasible Successors play an important role in EIGRP and allow an EIGRP router
to recover and use alternative routes immediately upon experiencing network
topology failures. This feature allows EIGRP routers to reduce the number of DUAL
computations required to find new routes to network destinations and therefore
improve network convergence. It is important to note that an EGRP router maintains
Feasible Successor routes only in the Topology Table when unequal-cost load
balancing is not used.
• H: This is a number used internally by the Cisco IOS to lists the order in which
the neighbors are learned, with the starting number being 0.
• Address: This is the IP address of the neighbor seen in the source IP address
field of IP packets received from the neighbor. The local router uses this address
when sending a unicast packet to the neighbor.
• Interface: This is the router interface over which the neighbor was learned
(and reachable) and HELLO packets are sent.
• Hold: This value should not be greater than the Hold Time advertised by the
neighbor and not less than the Hold Time minus the Hello Time. If the timer
value reduces to 0, and the router has not received any EIGRP packets (includ-
ing HELLO packets), the neighbor is declared down (invalid). This value lies
between 15 and 10 seconds, for a Hold Time of 15 seconds and Hello Time of
5 seconds. When the local router receives an EIGRP message from the neigh-
bor, it resets the Hold Timer.
• Uptime: This is a timer that tracks how long the neighbor relationship or adja-
cency has been up (in hours, minutes, and seconds). It is the elapsed time since
the router established an adjacency with the neighbor.
• SRTT: This is the Smooth Round-Trip Time (in milliseconds), which is the
time between sending an EIGRP packet and receiving an acknowledgment for
it. It is the average time it takes for the router to send an EIGRP packet to the
neighbor and for an acknowledgment to be received for that packet.
• RTO: This is the Round-Trip Timeout (in milliseconds), which is the length of
time the router has to wait before retransmitting an EIGRP packet (from the
retransmission queue) if an acknowledgement is not received for it. The SRTT
timer is used to determine the RTO (i.e., the retransmit interval).
• Q Cnt: This is the output queue count representing the number of EIGRP
packets (QUERY, REPLY, and UPDATE) that the EIGRP software process has
202 IP Routing Protocols
queued and waiting to be sent, or has sent but not yet acknowledged. A value
equal to 0 indicates that there are no EIGRP packets in the queue. The local
router uses the output queue to store EIGRP packet descriptors corresponding
to the EIGRP messages that have been sent out but waiting for the receiver to
acknowledge them. The router removes packet descriptors from the output
queue only when acknowledged by appropriate EIGRP HELLO messages.
• Seq Num: This is the Sequence Number of the last EIGRP packet (sent via
reliable transmission (e.g., QUERY, UPDATE, and REPLY) that was received
from the neighbor. EIGRP packets, such as HELLO and ACK packets, are sent
via unreliable transmission and do not carry Sequence Numbers. The Sequence
Number is to ensure that reliable EIGRP packets received from the neighbor
are in the right order or sequence.
For neighbors that are slow to respond to reliable multicast EIGRP packets, and
have not unacknowledged these multicast packets when the RTO timer expires, the
router will retransmit these packets as unicast packets. This allows the router to
proceed with the reliable multicast transmission without delaying communications
with other neighbors, to ensure faster network convergence especially in networks
with variable link speeds.
The router uses the Multicast Flow Timer to determine how long it has to wait for
an ACK packet to a multicast packet before switching from multicast to unicast
transmission mode. The router uses the RTO to determine how long it has to wait
before retransmitting a unicast packet. The router adjusts the RTO dynamically over
time (with maximum value of 5,000 milliseconds or 5 seconds) based on the SRTT.
The router uses the Q Cnt variable to keep track of the number of enqueued
packets. The router will also record the Sequence Number of the last QUERY,
REPLY, or UPDATE packet received from the neighbor in its Neighbor Table. The
router (via RTP) uses the Sequence Numbers to ensure that reliable EIGRP packets
received from the neighbor are in the correct order. The router will record the last
Sequence Number received from the neighbor so that it can detect out of order
packets. The router will also use a transmission list maintained on a per neighbor
basis to queue packets for possible retransmission when they have not been acknowl-
edged on time or not acknowledged at all.
1. Each EIGRP router advertises its Routing Table (containing all routes it has
learned) to all neighbors that are registered in its Neighbor Table.
2. Each EIGRP router receives and stores the Routing Tables sent by their neigh-
bors in its Topology Table.
3. Each EIGRP router examines its local Topology Table to determine the
Successor and Feasible Successor to each known network destination.
4. Each EIGRP router selects the best route to a network destination from its
Topology Table and inserts this into its Routing Table
If a router does not receive an EIGRP packet before the Hold Time expires, it will
delete the associated neighbor adjacency, and remove all Topology Table entries
learned from that neighbor. This action is similar to what happens when a neighbor
sends a routing update stating that some routes passing through it are unreachable.
The router will also send out routing updates indicating that routes through that
neighbor are unreachable. If the unreachable neighbor is a Successor to some net-
work destinations, the router will remove these networks from its Routing Table, and
alternative routes (Feasible Successor), if available, will be recomputed using DUAL.
The network is able to quickly reconverge if an alternative route or Feasible Successor
is available. The following important points are worth noting:
1. If a router receives a QUERY packet from a neighbor and its Topology Table
does not contain an entry for the queried destination, or there is no current
Successor to this destination (and the destination is in ACTIVE state), it will
immediately reply indicating that the destination is unreachable (i.e., it has no
path leading to this destination).
Enhanced Interior Gateway Routing Protocol (EIGRP) 205
2. If a router receives a QUERY packet from a neighbor and its Topology Table
lists the neighbor as the Successor for the queried destination, it will attempt to
find new a Successor. If the Topology table contains one or more Feasible
Successors, the router will install the Feasible Successor with the lowest met-
ric (new Successor) into its Routing Table, and then immediately reply with
the information about the selected Feasible Successor to the neighbor that sent
the QUERY packet.
3. If a router receives a QUERY packet from a neighbor and its Topology Table
lists the neighbor as the Successor for the queried destination and contains no
Feasible Successor, it will propagate the QUERY to all of its neighbors (except
the neighbor that originated the QUERY) seeking an alternative Successor.
The router will not send a response to the querying neighbor until it has
received a reply for each QUERY packet it has propagated to its own
neighbors.
4. If a router receives a QUERY packet from a neighbor that is not the Successor
for the queried destination, it will immediately reply with the information of its
Successor to the neighbor.
To each neighbor a router sends a QUERY packet, it will set a Reply Status Flag (r)
to keep track of the outstanding replies to the QUERY packets it has sent out. The
router will then complete the DUAL route computation when it has received a reply
for every QUERY packet it has sent out.
When a router starts the DUAL computation, it will set an ACTIVE timer for 180
seconds. If the router does not receive a reply for each outstanding QUERY before
the ACTIVE timer expires, the affected network destination will be placed in the SIA
state. The router will reset its neighbor or adjacency relationship with the neighbor
that failed to reply, which may then cause the router to delete the route through that
neighbor to the destination, or to place all destinations known through that neighbor
in the ACTIVE state. The router will follow this by re-exchanging routing information
with that neighbor.
In a stable, well-designed network, when a link or a neighbor router fails, other
neighbor routers should easily detect this through the expiry of the Hold Timer,
instead of the ACTIVE timer. Such a failure normally should not cause network
destinations to be declared in SIA state. SIA may occur due to some routers being
overloaded in a network, heavily congested links, presence of low bandwidth links in
mainly high bandwidth network, or looping of QUERY packets sent by routers
seeking new routes to network destinations. In the worst case, SIA may lead to
routers deleting adjacencies with established neighbors, and flushing of valid routes
to network destinations which could end up affecting the overall stability of the
network.
to ACTIVE state when it determines that the current Successor no longer meets the
Feasibility Condition and there is no Feasible Successor (i.e., no backup route(s))
identified, or available for that destination.
The router changes the destination back from ACTIVE to PASSIVE state when it
has received replies to all QUERY messages it has sent to its neighbors, indicating
the availability of Feasible Successor. If the router determines that an existing
Successor no longer satisfies the Feasibility Condition but there is at least one
Feasible Successor available, it will elevate the Feasible Successor with the lowest
total path cost (i.e., the sum of the Reported Distance as advertised by the Feasible
Successor and the link cost to this neighbor) to become the new Successor, and the
destination will remain in the PASSIVE state.
• EIGRP uses HELLO messages and forms neighbor router relationships similar
to a link-state routing protocol. The HELLO messages also serve as keepalive
mechanism and are exchanged periodically to maintain adjacencies with
neighbor routers.
• EIGRP does not forward routing updates to broadcast address 255.255.255.255
but, instead to the multicast address 224.0.0.10 when multicast transmission is
used.
• EIGRP uses the proprietary Cisco RTP to transport routing updates to other
routers.
• Like RIPv2, EIGRP supports VLSM and CIDR.
• EIGRP uses a composite routing metric (that can be derived from bandwidth,
delay, path reliability, path load, and MTU size) for path calculations, instead
of a single routing metric of hop count as in RIP.
• An EIGRP router advertises routing updates only when there is a change in the
network (i.e., when changes in a path or metric for a route occur). The router
does not transmit full Routing Table updates in a periodic fashion like RIP – but
instead sends triggered partial updates where only the Routing Table changes are
propagated. Routing updates are only sent to the neighbors that need them, which
results in less bandwidth usage, especially in large networks with many routes.
• EIGRP uses a Feasibility Condition to select loop-free paths to network
destinations.
• EIGRP uses a Topology Table to maintain all the routes received from neigh-
bor routers. DUAL also maintains primary routes (Successors) and backup
routes (Feasible Successors), when available, in the Topology Table. If a pri-
mary route (Successor) in the Routing Table fails, the router can use any avail-
able backup route (Feasible Successor). The switchover to the backup route is
Enhanced Interior Gateway Routing Protocol (EIGRP) 207
immediate, and EIGRP does not coordinate with other routers to perform route
recomputation.
• An EIGRP router has the option to load balance traffic to a destination network
across multiple equal or unequal cost paths.
These enhancements allow EIGRP to have rapid convergence time when changes in
the network topology occur. Because EIGRP has characteristics of both distance-
vector routing and link-state routing protocols (e.g., forming adjacencies with neigh-
bor routers and using multiple route metrics such as bandwidth and delay for best
path calculations instead of hop count), it is sometimes referred to as a hybrid routing
protocol.
REVIEW QUESTIONS
1. How are EIGRP messages sent over IP? Directly or over a Transport Layer
Protocol?
2. How are EIGRP messages transmitted? Broadcast or multicast? Elaborate on
your answer.
3. What is purpose of the DUAL in EIGRP?
4. What is the purpose of the RTP in EIGRP?
5. Explain the main functions of the Neighbor Table, Topology Table, and
Routing Table in EIGRP.
6. Explain the difference between the Feasible Distance and Reported Distance
(also known as the Advertised Distance) in EIGRP.
7. Explain the difference between a Successor and Feasible Successor in EIGRP.
8. Explain the difference between a route in ACTIVE State and one in PASSIVE
State in EIGRP.
9. What is the Feasibility Condition in EIGRP?
10. What is Stuck-In-Active (SIA) in EIGRP?
11. Explain briefly how EIGRP uses Split Horizon and Poison Reverse.
12. What is the difference between equal-cost load balancing and unequal-cost
load balancing in EIGRP?
13. What is the variance parameter in EIGRP load balancing?
14. Why is EIGRP auto-summarization not a desirable feature, and why is it best
to disable it?
REFERENCES
[CCIESOLK03]. Karl Solie and Leah Lynch, CCIE Practical Studies: Configuring Route-
Maps and Policy-based Routing, Sample Chapter, Cisco Press, November
26, 2003.
[CISCASA8.5]. Cisco ASA Services Module CLI Configuration Guide, 8.5, Chapter:
Defining Route Maps, November 17, 2013.
[CISCID8606]. Cisco Systems, “Redistributing Routing Protocols”, Document ID: 8606,
March 22, 2012.
[CISCID13669]. Cisco Systems, “Introduction to EIGRP”, Document ID: 13669, August
10, 2005.
208 IP Routing Protocols
• Determine the specific routes from a neighbor that need to be filtered (permit/
deny).
• Specify which routes a router can advertise to its neighbor routers.
• Specify which network path control tools a router can use to accomplish cer-
tain desired routing behaviors.
In this chapter, we use the Cisco Internetwork Operating System (IOS), which is a
family of network operating systems used on Cisco Systems routers and network
switches, as the reference platform for all our discussions on network path control,
and router configuration tools and commands. Some aspects of the discussion in this
chapter assume some knowledge of OSPF, IS-IS, and BGP. Interested readers can
refer to Volume 2 of this two-part book for detail descriptions of these routing
protocols.
based on the Administrative Distance (or the Route Preference) values of the routing
protocols (see Chapter 2).
RIPv2
(Site A)
EIGRP OSPF
(Site B) (Partner 1)
IS–IS
(Partner 2)
Company Network
In addition, in OSPF, route filtering of summary routes can be done at the distribution
points, that is, at ABRs (Autonomous System Border Routers) and ASBRs
(Autonomous System Boundary Routers), while in EIGRP, route filtering for all
routes can be configured in any router. Figure 7.2 shows the flow of routing informa-
tion and packets within an IP router.
• Routing Information: This is the information a router learns about routes (to
all known network destinations) and exchanges with its neighbors. This could
be obtained via the directly connected networks on the router, static routing,
and/or dynamic routing protocols.
Routing Routing
Routing Information Routing Information Routing
Protocols Table Protocols
Active Routes
Forwarding
Table
IP Address
Lookups
• Transit Packets: These are pieces of data that pass through a router as they
travel from the data sources to their destinations.
• Local Packets: These are pieces of data that are originated by or destined for
the router itself. Local packets usually contain routing information data for
device configuration and network management protocols (such as Simple
Network Management Protocol [SNMP], Secure Shell [SSH], and Telnet),
and data for network control protocols (such as the Internet Control
Message Protocol [ICMP] and Internet Group Management Protocol
[IGMP]).
The decision about which routes to accept from and/or advertise to neighbors has an
impact on the traffic that crosses a network. Routing policies can be used to enforce
Neighbor Neighbor
Routers Routers
business agreements between two or more Internet Service Providers (ISPs) concern-
ing the type and amount of traffic allowed to pass between them.
The following are examples where a network operator would want to define net-
work-specific routing policies:
It is important to note that the actual routing policies used in a router are influenced
by the router’s architecture (input queuing, output queuing, or input/output queuing
capabilities), routing protocol implementation (some routing protocols are CoS-
aware or support traffic engineering, while others are not), network architectures
(some network support traffic engineering while others do not), the design and man-
agement practices of a particular network, contractual agreements with service pro-
viders, and so on.
Is there a filter
No Process routing
configured for
update normally
this interface?
Yes
Is there an
entry in the filter No Drop routing
for this network update
address?
Yes
End
Active Routes
Forwarding
Table
IP Address
Lookups
Packet Packet
Router Packets Packets Forwarding Packets Packets Router
Filter Filter
Interfaces Engine Interfaces
Policy Policy
“data plane traffic” through the router as illustrated in Figures 7.5 and 7.6. Figure 7.6
shows the flow of routing information and user packets through an IP router. The
route filters (route maps, distribute lists, or prefix lists) are implemented at the rout-
ing policy control points while the packet ACLs are implemented at the packet filter
policy control points.
Network Path Control and Factors That Affect Routing Table Properties 217
Routing
Table
Active Routes
Forwarding
Table
IP Address
Lookups
Gigabit Gigabit
Packet
Ethernet Ethernet
Filter Policy
Interface Interface
Gigabit Gigabit
Packet
Ethernet Ethernet
Filter Policy
Interface Interface
Forwarding
Engine
SONET/SDH Packet SONET/SDH
Interface Filter Policy Interface
As would be seen later in this chapter, route filters provide greater route filtering
flexibility and can be configured for the following:
It is important to recognize that if route filters are not configured correctly or if the
filters are applied to the wrong router interfaces, serious network performance issues
may arise.
Routing Table, and subsequently advertises this to its neighbors. Inbound rout-
ing policies can be defined to control the flow of this information. The network
administrator can define routing policies to control which routes get installed
in the Routing Table.
o For example, when a router imports routing information from a routing pro-
tocol into its Routing Table, it can use a routing policy to modify the route's
Administrative Distance and/or routing metric, tag the route to identify it
for later manipulation, or prevent the route from being installed in its Rout-
ing Table. A network administrator can also define routing policies for
redistributing routes learned by one routing protocol into another.
o The network administrator can configure a routing policy that does not
allow routes associated with a particular customer to be placed in the Rout-
ing Table. As a result, the router will not use these customer routes to for-
ward packets to various destinations, and these routes will not be advertised
to neighbor routers.
• Flow of Routing Information between the Router’s Routing Table and
Neighbor Routers: A router sends information about routes it has learned to
its neighbors. Routing policies can be defined to control which routes the router
advertises from its Routing Table to neighbors. When a router exports routes
from its Routing Table to a routing protocol, it can use a routing policy to
assign routing metric values to the routes, modify the BGP attributes associ-
ated with the routes, tag the route with additional information, or prevent the
route from being exported altogether.
ICMP packet), it forwards it to the appropriate local process for further pro-
cessing. The router can also originate packets destined for other network
devices in the network. Usually, a local process running in the route processor
(or routing engine) is responsible for handling these packets. Packet filter poli-
cies can be configured to control the flow of all these local packets.
Inbound packet filters can be defined to control packets that are received on a router
interface. Outbound packet filters can also be configured to control packets that are
sent out a router interface. Packet filter policies can also be used to protect a router
from malicious traffic destined for the router itself, or passing through the router to a
network destination. Packet filters can be configured to control local packets to a
router to protect it from external attacks such as denial-of-service (DoS) attacks.
These types of packet filters are also referred to as control plane packet filters. The
packet filter policies can be defined to control the data packets the router can accept
as local traffic, accept as transit traffic, and/or transmit on its interfaces to other
devices.
routers’ IP Routing Tables. Network operators can use PBR with defined routing
policies that selectively forward IP packets on network paths based on administrative
policy decisions and a number of packet parameters (e.g., source IP address, destina-
tion IP address, IP protocol types, Transport Layer port numbers, quality-of-service
[QoS] markings, or application types), rather than on the normal IP Routing Table
maintained by the routing protocols. PBR provides routing instructions that override
the normal routing behavior of the IP routers in the network.
PBR can be used as a path control tool to bypass the packet forwarding instruc-
tions provided by the IP Routing Table, and to define network paths based on user-
defined policies (user configured routing information). PBR allows the IP routers to
select routes based on these user-defined policies instead of using the IP Routing
Table. When PBR is configured, the IP routers forward packets according to the con-
figured rules. PBR does not change the destination of routed traffic. Instead, PBR
affects the next-hop to which traffic is forwarded before it is sent to its final
destination.
PBR provides an extremely powerful, flexible, yet simple tool that network oper-
ators can use to implement routing solutions in cases where contractual, geographi-
cal, legal, or political constraints demand that user traffic be routed through specific
paths in a network or internetwork. PBR can be used to force traffic to specific paths
and network destinations such as NAT devices, security appliances, and WAN band-
width optimization devices. A network operator can use PBR to control path selec-
tion in a network, providing capabilities and benefits such as the following
[CISCTEARDIA10]:
7.5 ROUTE SUMMARIZATION
Due to the continuous growth of corporate networks, service provider networks, and
the Internet as a whole, the number of network and subnets IP addresses in Routing
Tables also continue to grow rapidly. This growth has always taxed the processing
and memory resources in IP routers, and the bandwidth needed to exchange routing
updates and maintain the IP Routing Tables. The use of Variable-Length Subnet
Masks (VLSMs), route summarization (also called route aggregation), and Classless
Inter-Domain Routing (CIDR) have become very useful and powerful tools for man-
aging the IP address growth in networks and internetworks (see discussion in
Appendix B, “IPv4 Packet”, of [AWEYA1BK18]).
support route summarization at any bit boundary in a network address (in automatic
summarization mode), and at major network address boundaries (in manual summa-
rization mode). Because of some inefficiencies that can arise as a result of automatic
summarization, this mode of route summarization is not recommended. Routing pro-
tocols like OSPF support only manual route summarization.
We describe in this section, some of the methods and commands (as applied to
Cisco IOS) used for creating aggregate routes. The discussion covers the commonly
used routing methods and protocols (static routes, RIP, EIGRP, OSPF, and IS-IS).
Although, the router configuration commands used here may differ in some ways
from those used in current versions of router operating systems, the goal here is to
describe in a general sense, how route summarization can be carried out. In OSPF,
route summarization can be configured at ABRs and ASBRs, while in EIGRP, route
summarization can be configured in any router. The special section “Route
Aggregation in BGP” below focuses on route summarization in BGP.
interface type-number
ip summary-address rip ip-address network-mask
The use of RIPv2 manual summarization and this command comes with some guide-
lines and restrictions as described in [CISCRIPCOMD18] [CISCRIPCONGUI].
• The parameter ip-address specifies the summary address for the range of IP
addresses being summarized.
• The parameter mask specifies the IP subnet mask used for the summary route.
• The parameter administrative-distance (optional) specifies the Administrative
Distance (with valid range 1–255) of the summary route. EIGRP summary
routes are assigned a default Administrative Distance value of 5.
• The leak-map keyword (optional) allows a leak map to be used to advertise
a component (more-specific) route that would otherwise have been suppressed
by the manual summarization. Any subset of the component routes or addresses
that make up the summary route can be leaked. The network administrator
must define a route map and access list to source the route to be leaked.
• The parameter leak-map-tag (optional) specifies the name of a leak-map.
The Cisco IOS summary-metric command can be used to configure a fixed met-
ric for an EIGRP summary (aggregate) address [CISCEIGRPCOMD18]:
• The parameter ip-address specifies the summary address for the range of IP
addresses being summarized.
• The parameter mask specifies the IP subnet mask used for the summary route.
• The parameter prefix specifies the IP route prefix for the destination.
• The not-advertise keyword (optional) is used to suppress routes that
match the specified prefix/mask pair.
• The parameter tag (optional) specifies the tag value that can be used as a
“match” value for controlling redistribution via route maps.
• The nssa-only keyword (optional) sets the nssa-only attribute for the sum-
mary route generated (if any) for the specified prefix. This limits the summary
to OSPF NSSAs (Not-So-Stubby-Areas).
• The parameter address specifies the summary address for the range of addresses
being summarized.
• The parameter mask specifies the IP subnet mask used for the summary route.
• The level-1 keyword indicates that only routes redistributed into Level 1
are summarized with the configured address/mask value.
Network Path Control and Factors That Affect Routing Table Properties 225
• The level-1-2 keyword is used to indicate that the summary route applies
both when routes are being redistributed into a Level 1-2 router, and when a
Level 1-2 router advertises Level 1 routes that are reachable in its IS-IS area.
• The level-2 keyword indicates that routes learned by Level 1 routing are
summarized into the Level 2 IS-IS backbone with the configured address/mask
value, and also summarized routes redistributed into a Level 2 router.
• The parameter prefix specifies IP route prefix for the destination.
• The parameter mask specifies IP subnet mask used for the summary route.
• The parameter ip-prefix specifies the IP route prefix for the destination.
• The parameter ip-mask specifies the prefix mask for the destination.
• The parameter nh-address specifies the IP address of the next hop that can be
used to reach that network.
• The parameter interface specifies the network interface to use.
• The parameter distance (optional) specifies an Administrative Distance for the
static route.
• The parameter tag-value (optional) specifies a value that can be used as a
“match” value for controlling redistribution via route maps.
226 IP Routing Protocols
• The permanent keyword (optional) specifies that the route will not be removed,
even if the interface goes down or the next-hop IP address is not reachable.
To help understand the use of the parameters in the ip route configuration com-
mand, let us consider the following use cases of static routes [CISCN3000CONFG]:
7.6 ROUTE REDISTRIBUTION
We discussed earlier on that running a single routing protocol throughout a network
is preferable. However, when two companies, Company A running OSPF in its net-
work, and Company B running EIGRP, merge, the combined or merged company
may end up having two separate routing domains running these two protocols. Since
in many cases it is difficult to make the merged company run a single routing proto-
col, route redistribution becomes a very useful tool for internetworking the two sepa-
rate routing domains. In some cases, a single company may have a single network
with different parts under different administrative control, making route redistribu-
tion also necessary. Route distribution allows different routing protocols to exchange
routing information.
Network Path Control and Factors That Affect Routing Table Properties 227
One-Point Redistribution
Boundary Router
EIGRP OSPF
Multipoint Redistribution
Boundary Router
Boundary Router
EIGRP OSPF
Boundary Router
Assigning a routing metric to a route is one of the key considerations when per-
forming route redistribution. As discussed in Chapter 1, each routing protocol uti-
lizes a unique routing metric that is incompatible with other routing metric. So, a
boundary router must be capable of translating the routing metric of a redistributed
route into a metric that the receiving routing protocol can use. A redistributed route
must be assigned a routing metric (using a default metric or a manually configured
metric) that is compatible with the receiving routing protocol (see “Route Metric:
Route Redistribution and The Seed Metric” section below). The methods used to
configure route redistribution vary, and depend on the particular routing protocols
involved in the redistribution.
We discuss in the “Route Redistribution Configuration Tools” section below, the
different methods for configuring route redistribution between various IP routing
protocols.
When multiple routing protocols are run in different domains of a network, routes
have to redistributed between these protocols, but this has to be given careful consid-
eration. The main problems that can arise when redistributing routes are the follow-
ing [CISCTEARDIA10]:
• Routing Loops and Route Feedback: When more than one boundary router
is used to perform route redistribution, any one of them might redistribute
routes received from one routing domain back into the routing domain that
originated the routes.
• Incompatible Routing Information: Each routing protocol uses a different
routing metric to determine the best paths to network destination. The differ-
ences in the routing metrics and the best path selection algorithms, can make
path selection in the presence of the redistributed routes not optimal.
• Inconsistent Convergence Times: Different routing protocols, even when
applied to the same network, can have different convergence times. Thus,
redistributing routes between two routing domains running different routing
protocols that converge at different rates, can have an effect on the overall con-
vergence time and stability of the internetwork.
The routing metric, according to the routing protocol being used, is a value assigned
to a particular path between the local router and the network destination. Each rout-
ing protocol uses its own (internal protocol-specific) metric to determine the “best”
path to a particular destination when multiple paths exists. When routes are redistrib-
uted one routing protocol into another, it must also be recognized that the routing
metrics of the protocols involved play an important role in the route redistribution.
The Administrative Distance is used to rank the trustworthiness or believability of
different routing information sources when they provide routing information to the
same network destination. As discussed in Chapter 2, when more than one routing
protocol provides routing information to the same destination, the Administrative
Distance is used to determine which routing information source is more believabil-
ity. Directly comparing routes provided by different routing protocols (which have
different routing metric types) simply cannot be done. So, the Administrative
Distances of the routing protocols play an important role in route selection. As will
be discussed below, although the Administrative Distance helps with route selection
when different routing information sources are available, a number of problems can
still arise during route redistribution, such as, the formation of routing loops and
route feedback, inefficient routing, or inconsistent convergence problems
[CISCID8606REDIS12].
In Figure 7.8 (bottom diagram), the network operator sees the need to make
EIGRP and OSPF advertise the routes they have learned to one another and not use
a default route to the OSPF routing domain. This form of one-point route redistribu-
tion is called mutual route redistribution. Since, the single boundary router has one
interface in the OSPF routing domain and another interface in the EIGRP routing
domain, it is responsible for performing the route redistribution between the two
domains (see also Figure 7.9).
230 IP Routing Protocols
Boundary Router
EIGRP OSPF
Boundary Router
EIGRP OSPF
EIGRP OSPF
EIGRP OSPF
Router
R2
2
Router
R1
Redistribute Network
1
10.0.0.0/8 with AD =
110
3
Router
R3
Let us assume only Router R2 is configured to redistribute an external EIGRP route into the OSPF domain.
1. Router R1 advertises the external EIGRP route 10.0.0.0/8 with an administrative distance (AD) of 170 to both R2 and R3.
2. Because only Router R2 is configured to redistribute the EIGRP routes into the OSPF domain, it redistributes the
network 10.0.0.0/8 into the OSPF domain with an administrative distance of 110.
3. Although Router R3 has a direct route to R1, it will use the OSPF route via R2 to get to network 10.0.0.0/8 due to the
lower administrative distance of the advertised OSPF route. This will result in suboptimal routing from R3 to R1.
When not properly addressed, one-point one-way route redistribution can create
suboptimal routing when multiple boundary routers are used to connected two rout-
ing domains, and only one router is performing the one-point one-way route redistri-
bution (see Figure 7.10). When the external EIGRP network 10.0.0.0/8 (with
Administrative Distance of 170) is redistributed by Router R2 into the OSPF routing
domain, its Administrative Distance is set 110 (the default Administrative Distance
of OSPF). Although R3 and R1 have a direct connection, R3 will use the OSPF route
through R2 to reach the external EIGRP network 10.0.0.0 because this OSPF route
has the lower Administrative Distance of 110. This is one example of a scenario
where one-point one-way redistribution creates a suboptimal routing.
Boundary Router
EIGRP OSPF
Boundary Router
EIGRP OSPF
Boundary Router
one router interconnecting two routing domains. As will be discussed below, route
maps with route tagging is one of the methods that can be used to prevent the redis-
tribution of routes that have already been redistributed. When using two-way multi-
point route redistribution, route maps and route tags can be applied to filter routes in
both direction, and on the boundary routers performing the route redistribution.
Although performing route redistribution on only one boundary router in only one
direction within the network is the safest way of redistributing routes, this creates a
single point of failure in the network. However, if there is the need to perform route
redistribution in both directions or on multiple boundary routers, then extra steps
must be taken to avoid problems such as suboptimal routing and routing loops during
the route redistribution.
Multipoint one-way redistribution is more effective and works well when the rout-
ing protocol into which routes are being redistributed (i.e., the receiving routing pro-
tocol) is either EIGRP, OSPF, or BGP [CISCTEARDIA10]. This is because these
Network Path Control and Factors That Affect Routing Table Properties 233
Technique 1
Edge Routing Core Routing
Protocol Protocol
Redistribute routes from the edge into the core
Technique 2
Edge Routing Core Routing
Protocol Protocol
Redistribute routes from the edge into the core
Technique 3
Edge Routing Core Routing
Protocol Protocol
Technique 4
Edge Routing Core Routing
Protocol Redistribute all routes from the edge into the core Protocol
routing protocols support different Administrative Distances for internal and external
routes (External BGP = 20, Internal EIGRP = 90, External EIGRP = 170, Internal
BGP = 200).
The cost of an OSPF External Type-2 route is always the cost that came with the
external route, irrespective of the interior OSPF cost to reach the ASBR that adver-
tised that route. An OSPF External Type-1 cost is the sum of the cost that came with
the external route and the internal OSPF cost to reach the ASBR that advertised that
route. For the same network destination, an OSPF External Type-1 route is always
preferred over an External Type-2 route.
As described in Figure 7.13, because the Administrative Distance of external
EIGRP routes is higher than the Administrative Distance of OSPF routes, Routers R2
and R3 will use the suboptimal routes to destinations in the EIGRP routing domain.
234 IP Routing Protocols
EIGRP OSPF
Router
R2
2
Router
R1
Redistribute EIGRP
1
Routes with AD = 110
3
Router
R3
Let us assume the administrative distance (AD) of external routes advertised by EIGRP is higher than the
administrative distance of routes advertised by OSPF .
1. Router R1 advertises routes learned by EIGRP to both R2 and R3 with an administrative distance of 170.
2. Router R2 is configured to redistribute EIGRP routes into the OSPF domain with a lower administrative distance of
110.
3. Router R3 is also configured to redistribute EIGRP routes into the OSPF domain with a lower administrative
distance of 110
This will result in both R2 and R3 using suboptimal routes to get to R1 (that is, R2-to-R3-R1, and R3-to-R2-to-R1) due
to the lower administrative distance of the advertised OSPF route. This will result in suboptimal routing from either R2
or R3 to R1.
In Figure 7.13, marking the redistributed external EIGRP routes as an OSPF External
Type-1 route helps to avoid suboptimal routing from the OSPF routing domain.
The example in Figure 7.14 illustrates how a combination of filtering methods
such as route maps, distribute lists, and prefix lists can be applied to incoming or
outgoing routing information. If multiple route filters are configured on a particular
router interface as illustrated in Figure 14, they all must permit a route that is received
from a neighbor before it will be accepted into the IP Routing Table. Similarly, they
all must permit an outgoing route before it is propagated to downstream neighbors. It
is important to note that the use of distribute lists and prefix lists is mutually exclu-
sive, only one of these can be configured on a particular router interface at any given
time [CISCBGPCOMD19] [CISCIOSCOMD19].
Router
R2
Routing Protocols
Upstream Downstream
Router Router
R1 R3
Routing Table
A combination of methods, route maps, distribute lists, and prefix lists, can be applied to incoming or outgoing routing
information.
• All the methods configured must permit the routes received from a neighbor before they will be accepted into the IP
routing table.
• Outgoing routes must pass the outgoing distribute list, the outgoing prefix list, and the outgoing route map before
being forwarded to the neighbor.
maps, offset lists, PBR (policy-based routing), and Cisco IOS IP SLAs (Service
Level Agreements).
routes are not themselves redistributed to the originating routing domain, and traffic
flows the optimal way with no routing loops.
Furthermore, other than serving as a way of improving application response times,
user experience, and improving a comprehensive set of network and end-user perfor-
mance parameters, the desired outcome of a path control tool must be predictable –
the results should be deterministic and predictable as much as possible. Path control
tools should be implemented as part of an overall network strategy, and should fit in
with the routing policy implementation of the network.
external 1 – external routes that to the Autonomous System, but are redis-
tributed into OSPF as Type-1 external routes; external 2 – external routes
that to the Autonomous System, but are redistributed into OSPF as Type-2
external routes).
• The parameter metric-value (optional) associated with the metric keyword,
specifies the metric for the routes being redistributed. If no value is specified,
and no value is specified using the default-metric command, then the
default metric is set to 0 and interpreted as infinity (by RIP), meaning no routes
will be redistributed.
• The parameter map-tag (optional) associated with the route-map keyword,
is an identifier of a specific route map configured on the router. This route map
is interrogated to filter the routes from the source routing protocol to RIP. If
this parameter is not specified, all routes are imported.
• When redistributing from RIP (rip keyword), process-id is not needed; from
OSPF (ospf keyword), process-id is an appropriate OSPF process ID from
which the routes are to be redistributed; from IS-IS (isis keyword), process-
id is an optional tag value that defines a meaningful name for the routing pro-
cess; from BGP or EIGRP (bgp or eigrp keyword), process-id is an ASN.
• The parameter metric-value (optional) associated with the metric keyword,
specifies the OSPF seed metric used for the redistributed route. It is passed
unaltered when redistributing routes from one OSPF process to another OSPF
process on the same router, if no metric value is specified. When redistributing
from another routing protocol to OSPF, the default metric is 20 when no metric
value is specified.
• The parameter type-value (optional) associated with the metric-type key-
word, when applied to routes from OSPF, specifies the external link type asso-
ciated with the route being advertised into OSPF (Values = 1, means Type-1
External route; value = 2, means Type-2 External route). When applied to
routes from IS-IS: internal, means IS-IS metric (that is less than 63);
external, means IS-IS metric (that is greater than 64 and less than 128).
• The subcommand subnets (optional) is an OSPF parameter that specifies
that subnetted IP addresses (routes) should be redistributed into OSPF. When
not specified, only classful routes are redistributed.
• The parameter tag-value (optional) associated with the tag keyword, specifies
a 32-bit decimal value attached to each external route to be used by OSPF
ASBRs.
238 IP Routing Protocols
default-metric number
• For redistribution into RIP, number is a default metric value in the range 1–15.
• For redistribution into OSPF, number is a default metric value appropriate for
the specified routing protocol and is in the range 1–16,777,214.
• For redistribution into BGP, number is a default metric value applied to the
redistributed route and takes a value in the range 1–4,294,967,295.
• Note that as stated above, for the eigrp or bgp keyword, the process-id is an
ASN. For OSPF, process-id is an OSPF process ID. This value is not required
for RIP or IS-IS.
• The parameter metric-value (optional) associated with the metric keyword, speci-
fies the EIGRP seed metric for the redistributed route, expressed in terms of the
EIGRP metrics bandwidth, delay, reliability, load, and Maximum Transmission Unit
(MTU). If no value is specified when redistributing from another routing protocol,
and no default metric has been configured, then no routes will be redistributed.
The following commands shows how RIP routes are redistributed into EIGRP
with following metrics values: bandwidth-metric = 1,000, delay-metric = 100, reli-
ability-metric = 250, effective-bandwidth-metric = 100, and mtu-metric = 1,500:
• The level-1 keyword applies to IS-IS, and specifies Level 1 routes that are
redistributed into the other IP routing protocol independently.
• The level-1-2 keyword applies to IS-IS, and specifies both Level 1 and
Level 2 routes that are redistributed into the other IP routing protocol.
• The level-2 keyword that applies to IS-IS, and specifies Level 2 routes that
are redistributed into the other IP routing protocol independently.
• The metric transparent keyword (optional) instructs the RIP metric for
a redistributed route to be transported transparently to another routing
240 IP Routing Protocols
protocol. For example, when RIP routes are redistributed into BGP, the RIP
metric can be passed and carried in the BGP MED attribute value. When these
BGP routes are redistributed back into RIP at the remote end, the transpar-
ent keyword can be used to copy the propagated MED attribute value back as
the RIP metric. If a metric-value is specified instead, that value is applied to all
the routes listed.
• The nssa-only keyword (optional) applies to OSPF and sets the nssa-only attri-
bute for all routes being redistributed into OSPF. See discussion on OSPF NSSA
(Not-So-Stubby Area) type in Chapter 1 of Volume 2 of this two-part book.
router configuration command, or the seed metric can be specified as part of the
redistribute command, using either the metric optional keyword, or using a
route map [CISCEMPGARROT14] [CISCIOSCOMD19]. The default-metric
command is very useful when redistributing routes from multiple sources at the same
time because, it eliminates the need to define metrics for each redistributed route
separately.
For example, when routes are redistributed from RIP into EIGRP, the values used
in the default-metric command constitute the seed metric for the RIP routes
being redistributed. The seed metric is the initial value of the metric for the redistrib-
uted route used in the receiving routing protocol (EIGRP) and it must be consistent
with the receiving protocol.
In Cisco IOS, when no metric is specified for redistributed routes, each routing
protocol has its own default seed metric, which it assigns to the routes. The default
seed metrics when a route is being redistributed into the following routing protocols
are as follows:
Both RIP and EIGRP have default seed metrics of “infinity”, meaning these routing
protocols consider any route redistributed into them to be unreachable by default, and
therefore will not be advertised to any other routers (unless the default metrics are
modified). Note that a RIP route with a metric of “infinity” is never entered in the IP
Routing Table as discussed in Chapters 2 and 5. EIGRP is described in Chapter 6. So,
a default seed metric must be defined for RIP and EIGRP during route redistribution.
Note that the above default seed metrics are assigned when no metric is defined with
242 IP Routing Protocols
granular routing policy implementation capabilities, and offers (using a wide range
of BGP path attributes) more control over best path selection. This makes the BGP
routes imported into OSPF more trustworthy and preferable. BGP is discussed in
greater detail in Chapter 3 of Volume 2 of this two-part book.
If the network administrator wants to make a dynamic route more preferable over
a static route, the Administrative Distance of the static route is simply raised from the
default value of 1 to a value that is higher than that of the dynamic route. For exam-
ple, to make an OSPF route which has a default Administrative Distance of 110,
preferable over an eBGP route with default value of 20, the Administrative Distance
of the eBGP route can be set to a value greater than 110, say 120. The Administrative
Distance of any dynamic route can also be raised to override a static route.
It is discussed in Chapter 4 that a floating static route is a static route that is used
as a backup/standby route to a dynamic route. This is done by configuring the float-
ing static route with a higher Administrative Distance than that of the dynamic route,
so, that in the event the dynamic route fails or become unavailable, the floating static
route can be used. Raising the Administrative Distance of the static route higher
makes it less preferable to the dynamic route. By default, a static route router is pre-
ferred over a dynamic route because a static route has a lower Administrative Dis-
tance as discussed in Chapter 2.
In Cisco IOS, the distance command can be used in router configuration mode
to define an Administrative Distance for routes that are inserted into the Routing
Table [CISCIOSCOMD19] [CISCEMPGARROT14]:
When the above command is applied to BGP, it sets the Administrative Distance of
an eBGP route, while for EIGRP, it sets the Administrative Distance of only the inter-
nal routes of EIGRP neighbor routers.
References [CISCBGPCOMD19], [CISCEIGRPCOMD18], and
[CISCOSPFCOMD19] describe specific distance commands for BGP, EIGRP,
and OSPF, respectively. The distance bgp command [CISCBGPCOMD19] is
used to allow a better route provided by another routing protocol to a given destina-
tion to be used over one that was actually learned via eBGP, or if some internal routes
should be preferred by BGP:
distance bgp external-distance internal-distance local-distance
Network Path Control and Factors That Affect Routing Table Properties 245
When no Administrative Distance values are specified using this command, the default
values are: external-distance 20; internal-distance 200; local-distance 200. For example,
the configuration distance bgp 30 200 220 changes the Administrative Distance
for eBGP routes to 30, internal BGP routes to 200, and local BGP routes to 220.
The distance eigrp command [CISCEIGRPCOMD18] allows the use of
two Administrative Distances (internal and external Administrative Distances) that
could provide a better route to a node:
For example, the configuration distance eigrp 80 105 changes the Admin-
istrative Distance for internal EIGRP routes to 80, and changes the Administrative
Distance for EIGRP external routes to 105.
The distance ospf command [CISCOSPFCOMD19] defines Administra-
tive Distances for an OSPF route based on route type (external, interarea, or intra-
area routes):
• The parameter dist1 associated with the external keyword (optional) sets the
Administrative Distance (in the range 1–255) for routes learned by redistribution
from other routing domains. The default Administrative Distance value is 110.
• The parameter dist2 associated with the inter-area keyword (optional) sets
the Administrative Distance (in the range 1–255) for all routes sent from one
OSPF area to another area. The default Administrative Distance value is 110.
246 IP Routing Protocols
• The parameter dist3 associated with the intra-area (optional) sets the
Administrative Distance (in the range 1–255) for all routes within an OSPF
area. The default Administrative Distance value is 110.
The distance ospf command is used to set the Administrative Distance for an
entire group of routes, rather than a specific route that passes an access list. For
example, the configuration distance ospf intra-area 105 inter-
area 105 external 125 changes the Administrative Distance for both OSPF
intra-area and interarea routes to 105, and changes the Administrative Distance for
external routes to 125.
7.7.5 Route Tagging
Route tags are numeric values that are assigned or attached to routes to be used by IP
routers for filtering routes and applying administrative policies, such as when perform-
ing route summarization and redistribution. Route Tagging can be used to tag a group
of IGP or EGP routes so that they can be advertised (with their tag values) throughout
a routing domain. This also allows routers to easily filter the group of routes for secu-
rity purposes, or meet other routing policy and administrative requirements.
Also, in two-way multipoint routes redistribution, there is the potential of routing
loop formation in the network (see “Multipoint Route Redistribution” section above).
Route tagging can be used as one of the mechanisms for preventing the redistribution
of routes that have already been redistributed [CISCEMPGARROT14]. Route tags
must be applied in both directions, and redistributed routes must also be filtered in
both direction and on both routers performing the route redistribution. By simply
tagging routes, routers can use route maps to determine which routes have already
been redistributed, and then deny them from being redistributed once again.
This is to ensure that, for example, in an EIGRP-OSPF two-way multipoint route
redistribution, only routes originating from an EIGRP domain are redistributed into
OSPF, and only routes originating from the OSPF domain are redistributed into the
EIGRP domain. Other than route filtering and routing loop prevention, route tagging
can be used for traffic engineering purposes, where specific routes can be identified
and appropriate network resources reserved for them. In OSPF, route tags for exter-
nal routes can be added at the distribution points, that is, ASBRs and ABRs, while in
EIGRP, route tags for all routes have to be configured.
In Cisco IOS, the set tag command can be used in the route-map configura-
tion mode of an IP router to set a tag value for a route in a route map
[CISCEIGRPCOMD18] [CISCIOSCOMD19]:
• The parameter tag-value specifies a route tag value in plain decimals (in the
range 0–4,294,967,295).
• The parameter tag-value-dotted-decimal specifies a route tag value in dotted
decimals (in the range 0.0.0.0–255.255.255.255.).
Network Path Control and Factors That Affect Routing Table Properties 247
In Cisco IOS, a route tag is a 32-bit value that is attached to a specific route. A tag
value can be set as a plain decimal or in dotted decimals. The typical usage of the
set tag command is to assign administrative tags to routes within a route map.
The route map then uses the route tags to filter routes (see “Route Maps” section
below). Route tags have no impact on routing decisions and are only used to flag or
mark routes so that routing loops can be prevented when routes are redistributed
between routing protocols.
The match tag or match tag list command can be used to match tagged
routes within a route map so that administrative policies can be applied to the matched
tagged routes. The match tag list command is used within a route map to
match a list of route tags.
• To Match a Route Tag in a Route Map: In Cisco IOS, the route-map com-
mand can be used in global configuration mode to enable policy routing or, to
define conditions for redistributing routes from one routing protocol to another:
1. route-map map-tag [permit | deny] [sequence-number]
2. match tag {tag-value | tag-value-dotted-decimal} [...tag-value |
tag-value-dotted-decimal]
o The parameter map-tag specifies the name for the route map.
o The permit keyword (optional) is used to permit only routes that
match the route map to be forwarded or redistributed.
o The deny keyword (optional) is used to block routes that match the
route map from being forwarded or redistributed.
o The parameter sequence-number (optional) specifies a number that indi-
cates the position that a new route map statement will take in the list of
route map statements that have already been configured with the same
name (map-tag).
• To Create a Route Tag List: In Cisco IOS, the route-tag list command
can be used in global configuration mode to create a route tag list:
route-tag list list-name {deny | permit | sequence number
{deny | permit}} tag-dotted-decimal mask
o The parameter list-name specifies the name of the route tag list.
o The deny keyword specifies packets that have to be rejected.
o The permit keyword specifies packets that have to be forwarded.
o The sequence keyword specifies the sequence number of an entry.
o The parameter number specifies the sequence number, and has valid range
from 1 to 4,294,967,294.
o The parameter mask specifies a wildcard mask.
• To Match a Route Tag List:
1. route-tag list list-name {deny | permit | sequence number
{deny | permit}} tag-dotted-decimal mask
2. route-map map-tag [permit | deny] [sequence-number]
3. match tag list list-name [...list-name]
248 IP Routing Protocols
7.7.6 Passive Interfaces
Configuring a router interface as passive is one way to control the advertisement of
routing information in and out of a router (see also Chapter 4). To prevent other rout-
ers in a network from learning about routes dynamically, routing update messages
can be suppressed from being sent through some router interfaces. The behavior of a
passive interface varies and depends very much on the routing protocol running on
the specified interface (RIP, EIGRP, OSPF, IS-IS).
In general, a passive interface suppresses the transmission of certain protocol-
specific messages and routing updates over that interface, while allowing protocol
messages and routing updates to be exchanged normally over other interfaces. By
regulating the types of routing protocol messages allowed inbound and outbound,
and possibly, the establishment of router adjacency relationships, passive interfaces
are capable of affecting the properties of IP Routing Tables. Passive interfaces can
affect the routing information a router receives and consequently, the routes a router
will install in its IP Routing Table.
7.7.7 Static Routes
Static routes are user-defined routes that are manually entered in the Routing Table
and allow packets to travel from a source to a destination along a specified path. Such
routes do not change unless explicitly updated, and typically, consist of a small num-
ber of router hops. Unlike routes that are learned via dynamic routing protocols,
which must be imported into the Routing Table each time a network address or prefix
comes online, static routes become useable immediately as soon as they are installed
in the Routing Table. Static routes are assigned the default Administrative Distance
of 1, and are generally preferred over other types of routes, except directly connected
networks (see Chapter 2).
Network administrators manually configured static routes for the following
purposes:
• Define routes over a network to remote destinations to eliminate the need for a
dynamic routing protocol.
• Define a route to a destination when there is no dynamically learned route, or
when there is the need to override a dynamically learned route.
250 IP Routing Protocols
• To reduce the number of static route entries in the IP Routing Table of a router,
a default static route can be defined, where appropriate as discussed in
Chapter 4.
• If a router is to advertise a static route to other routers, there may be the need
for the static route to be redistributed into another routing protocol.
• The parameter prefix specifies the IP route prefix for the destination.
• The parameter mask specifies the IP network mask for the destination.
• The parameter ip-address specifies the IP address of the next hop that is to be
used to reach the destination.
• The parameters interface-type and interface-number specify, respectively, the
router’s interface type and interface number.
• The dhcp keyword (optional) causes a DHCP (Dynamic Host Configuration
Protocol) server to assign a static route to a default gateway.
• The multicast keyword (optional) specifies that the static route being con-
figured is a multicast route.
• The parameter distance (optional) specifies an Administrative Distance for the
static route (in the range 1–255). The default Administrative Distance for a
static route is 1 which gives it precedence over routes learned by any dynamic
routing protocol. A route is considered unreachable when it has an Administra-
tive Distance of 255. A static route with an Administrative Distance of 255 will
never be installed into the IP Routing Table. The parameter distance allows the
network administrator to give preference to the static route when multiple
entries for the same network destination exist. Routes with the lowest Admin-
istrative Distance are preferred.
• The parameter next-hop-name associated with the name keyword (optional)
specifies a name for the next hop route. This allows static routes to be associ-
ated with names (e.g., name Ottawa2Toronto). If several static routes are
being configured, names can be specified that describe the purpose of each
static route so that they can easily be identified.
Network Path Control and Factors That Affect Routing Table Properties 251
• The permanent keyword (optional) specifies that the static route will not be
removed, even if the router interface on which the static route is configured
shuts down.
• The parameter number associated with the track keyword (optional) spec-
ifies a number (in the range 1–500) that associates a track object (e.g.,
Domain Name System [DNS] server) with the static route. This parameter
specifies that the static route will be installed in the IP Routing Table only if
the state of the track object (e.g., a DNS server located somewhere in the
network) is up.
• The parameter tag associated with the tag keyword (optional) specifies a tag
value that can be used as a “match” value (in route maps) for controlling route
redistribution.
Creating a static route in the IP Routing Table, requires at a minimum, the route
to be defined as static and a next-hop IP address associated with it. In its simplest
form, the ip route command used to configure a static route is:
7.7.8 Default Routes
A default route is a route in the IP Routing Table of a router that is used when no
entry in the Routing Table matches the destination address of an IP packet. The
default route becomes the route of last resort when the address is unknown. A
default route also provides a network with a redundant path in the event of network
failures and loss of connectivity (a gateway of last resort). When an IP router is not
able to find a match in its Routing Table for a packet’s destination address and a
default route is defined, the router forwards the packet to the default route.
Universally, the IPv4 default route is represented by the address and mask
0.0.0.0/0.0.0.0 (or 0/0).
Default routes, when used, can provide a small reduction in the size of the Routing
Table. The need for default routes arises because, in many cases, a router may not be
able to determine routes to all network destinations. To implement default routes, the
common practice is to deploy some routers as “destination-aware routers” to provide
full routing capabilities for a network, and configure the remaining routers with
default routes to these “destination-aware routers”.
The “destination-aware routers” have Routing Tables that contain routing infor-
mation for the entire internetwork. The default routes can be propagated dynami-
cally, or can be manually configured in the Routing Tables of the individual routers.
Most IGPs support mechanisms for causing a “destination-aware router” to generate
default routing information dynamically that is then propagated to other routers.
default network, but does have a path leading to it, the router will consider the network
as a possible candidate default route, and then will select the router that leads to the
best default route to become the gateway of last resort [CISCIPCONGUI20].
• The on-passive keyword (optional) causes the RIP router to send default
routes only on passive interfaces.
• The parameter map-name associated with the route-map keyword (optional)
specifies that the RIP routing process will generate the default route if some
conditions in the route map are satisfied (see “Route Maps” section below).
The default route is a network route with which the RIP router will communicate
when no other route exists in the router’s IP Routing Table for a given IP packet’s
destination address. When the default-information originate is config-
ured with the on-passive keyword specified, the RIP router will send the default route
on that passive interface.
• The allowed keyword configures the EIGRP router to accept default routing
information.
• The in keyword configures the EIGRP router to accept exterior or default
routing information.
• The out keyword configures the EIGRP router to advertise external routing
information.
• The parameter acl-number (optional) specifies a standard access list number (in
the range 1–99), or an expanded standard access list (in the range 1,300–1,999).
• The parameter acl-name (optional) specifies the name of a standard access list.
This command can be used to redistribute the network 0.0.0.0 into an EIGRP Auton-
omous System.
• The always keyword (optional) causes the router to always advertises the
default route regardless of whether the routing process has a default route in its
Routing Table or not.
• The parameter metric-value associated with the metric keyword (optional)
specifies a metric to be used for generating the default route. The default metric
value is 10 if a value is omitted and at the same time a value is not specified
using the default-metric router configuration command.
• The parameter type-value associated with the metric-type keyword (optional)
specifies an OSPF external link type to be associated with the default route that is
being advertised into the OSPF Autonomous System: External Type-1 route or
External Type-2 route. The default type-value is External Type-2 route.
• The parameter map-name associated with the route-map keyword (optional)
specifies that the OSPF routing process will generate the default route if some
conditions in the route map are satisfied.
The way OSPF generates default routes depends on the OSPF area type the default
route is being injected into:
• In a standard OSPF area, the ABR does not automatically generate default
routes. Instead, the default-information originate command
must be used on the router.
• In an OSPF Stub Area and a Totally Stubby Area, the ABR automatically gen-
erates a default route via Summary Link-State Advertisements (LSAs) (Type-3
LSAs) with the Link-State ID set to 0.0.0.0 (see Chapter 1 of Volume 2 of this
two-part book). The default-information originate command is
not required for configuring a default route even if the ABR does not have a
default route in its Routing Table.
• In an NSSA, the ABR can generate a default route, but not by default. Instead,
the area area-id nssa default-information-originate com-
mand can be used to force the ABR to generate the default route.
• In a Totally NSSA, the ABR automatically generates a default route via a
Summary LSAs (Type-3 LSAs).
7.7.9 Route Maps
In IP networking, route filters appear in various forms such as route maps, distribute
lists, or prefix lists. Route filters can be configured in IP routers to provide specific
control of routing updates in a network, and as part of security mechanisms that can
hide specific network destinations from receiving routing information and traffic. Route
maps and traditional ACLs are similar in function, except route maps support features
that provide far more flexibility and control on filtering thanACLs [CISCID49111RMP05]
[CISCIOSCOMD19] [CISCTEARDIA10]. The typical route map not only permits a
route to be redistributed into a routing protocol, but can also modify information associ-
ated with the route when it is redistributed (e.g., routing metrics). A route map can also
be used to verify if a route is an internal or an external route.
• Route Redistribution:
o We have already discussed above that, route filtering (via route maps) can
be used during route redistribution. We saw that all IP routing protocols
(RIP, EIGRP, OSPF, IS-IS, BGP) can use route maps for filtering during
route redistribution (see “Route Redistribution Configuration Tools” section
above).
o The route-map keyword is an option that can be applied to the redis-
tribute command when redistributing routes. The redistribute
command uses the name specified by the map-tag parameter to reference a
route map. Multiple route maps may also share the same map tag (map-tag).
Route maps provide greater control over how routes are redistributed
between routing protocols.
• Policy-Based Routing (PBR):
o Another application of route maps is to enable PBR. PBR allows a network
operator to define routing policies other than that based on the standard or
normal IP destination addressed-based packet forwarding. In the standard
routing method, packets are forwarded based on the routing information
provided by the IP Routing Table. Route maps can be used to determine
which packets are subjected to policy routing. Route maps can be created on
more sophisticated criteria for PBR, allowing complex routing decisions to
be implemented.
o A route map, for example, can be configured on a router to control and filter
routing updates in one direction, thereby affecting traffic flowing in the
opposite direction with the goal of preventing that traffic from reaching
certain network destinations.
o By using route maps with route tagging, routing priorities for specific desti-
nations can be defined among multiple paths, allowing these prioritized
paths to be used in a deterministic manner. For example, when multiple exit
points exist out of a company network to the Internet connection, route
maps can be used to tag and define priorities for specific destinations along
those multiple exit points.
o Routes maps can be applied to PBR using the ip policy route-map
interface configuration command as discussed in the “Using Policy Based
Routing (PBR) for Path Control” section below.
• Network Address Translation (NAT):
o Route maps can be applied to NAT to provide more control over which pri-
vate IP addresses can be translated to public routable IP addresses. For
example, an internal IP address (for instance a server) may be translated to
one public IP address when communicating with a particular company part-
ner, and to a different public IP address when communicating with users on
the public Internet.
• BGP Policy Implementation:
o Route maps play an important role when implementing BGP routing poli-
cies (importing and exporting routes). They are the primary tools for imple-
menting inbound and outbound route filtering in BGP policies.
258 IP Routing Protocols
• The parameter map-tag specifies the name for the route map.
• The permit | deny keywords (optional) specify the action to be taken if the
route map match conditions are met; the meaning of permit or deny is depen-
dent on how the route map is used (route advertisement or route redistribution).
For example,
o The permit keyword (optional) is used to permit only routes that match
the route map to be passed on or redistributed.
o The deny keyword (optional) is used to block routes that match the route
map from being passed on or redistributed.
• The parameter sequence-number (optional) specifies a number that indicates
the position that a new route map statement will take in the list of route map
statements that have already been configured with the same name (map-tag).
• The parameter sequence-name associated with the ordering-seq keyword
(optional) orders the route maps based on the string provided.
Figure 7.15 describes, at a high-level, the operation logic of a route map (for route
distribution). A typical route map has the following structure [CISCIOSCOMD19]:
Is there a route
Incoming map applied to No Process routing
routing update the incoming update normally
interface?
Yes
Is there a
Do not
match with a Yes
redistribute this End
deny
route
statement?
No
Is there a
match with a Yes Apply set
permit commands
statement?
No
• deny — If the match criteria are met for the route map and the deny keyword is specified, the route is not
redistributed.
• permit — If the match criteria are met for this route map, and the permit keyword is specified, the route is
redistributed as controlled by the set actions.If the match criteria are not met, and the permit keyword is specified,
the next route map with the same map tag is tested. If a route passes none of the match criteria for the set of route
maps sharing the same name, it is not redistributed by that set.
o A route map may have several parts (i.e., multiple references or clauses)
when routes are passed through a route map, and any route that does not
satisfy at least one match clause is ignored.
• If the match criteria are satisfied, and the permit keyword is specified in the
route-map command, the route is redistributed according to the set actions.
If the match criteria are not satisfied, and the permit keyword is specified,
the next route map with the same map tag is processed. If none of the match
criteria for the set of route maps sharing the same map tag (map-tag) are met,
the route will not be redistributed.
• If the match criteria are satisfied and the route-map command includes the
deny keyword, the route will not be redistributed.
To configure route maps for route redistribution, the following steps may be taken
[CISCEMPGARROT14]:
• Define and name the route redistribution route map using the route-map
command.
o Define the match criteria (the match statements).
o Define the set actions to be performed when there is a match (the set
statements).
• Specify the route map to be used when redistributing routes.
o Run the redistribute protocol route-map map-tag command.
260 IP Routing Protocols
RIPv2 Router
R1 172.16.1.0/24, AD = 110
OSPF
Router Area 0
R3
When routes are redistributed by more than one router such as in the multi point two-way redistribution configuration on R1
and R2, there is the possibility that routes can be feed back into a routing domain and cause sub optimal routing. The following
explain show such a routing feed back loop can occur:
• RIPv2 on R3 advertises network 172.16.1.0 and R1 red is tributes that network into OSPF.
• OSPF then propagates this route through the OSPF domain and an OSPF router eventually advertises the network
172.16.1.0 to R2.
• R2 then redistributes 172.16.1.0 from OSPF back into the original RIPv2 network creating a routing feed back loop.
To prevent the routing feed back loop, a route map can be applied to Routers R1 and R2:
• A route map can be configured such that any route matching 172.16.1.0/24 is denied and will not be redistributed back into
RIPv2.
• A route map can be configured such that all other routes are permitted to be redistributed into RIPv2 and will be assigned
a RIPv2 metric of 5.
FIGURE 7.16 Route Feedback: Using Route Maps to Avoid Route Feedback
When not properly implemented, route redistribution can cause routing loops as well
as route feedback in the network. Route feedback happens when a route that is redis-
tributed from a routing protocol domain gets redistributed back into the same proto-
col domain from which it originated (see Figure 7.16). This route feedback can lead
to suboptimal routing or routing loops in the in the overall internetwork. Route feed-
back and routing loops might occur when routes are redistributed by more than one
router such as in a two-way multipoint route redistribution (Routers R1 and R2 in
Figure 7.16).
As explained in Figure 7.16, route maps can be configured on Routers R1 and R2
to deny routes coming from a particular routing domain from being redistributed into
that domain. Sometimes it is difficult to know which routing source or protocol origi-
nated a particular route, so the best way to filter redistributed routes is to use route
maps with route tagging. In this case, a router sets a route tag in a route map which
enables routers in the internetwork to correctly filters out redistributed routes that are
being fed back into their source routing domains.
Routers R1 and R2 can tag RIP routes going into the OSPF domain, and also
deny or filter these already redistributed routes from going back from OSPF into
RIP. For example, let us assume a route tag number of 222 is used to identify RIP
routes, and a tag of 111 to identify OSPF routes. The following statements can be
configured on both Routers R1 and R2 to tag and filter redistributed routes
[CISCEMPGARROT14]:
• Create a route map named RIPtoOSPF to deny the redistribution of all routes
having the route tag value 111 (i.e., OSPF routes).
route-map RIPtoOSPF deny 10
match tag 111
Network Path Control and Factors That Affect Routing Table Properties 261
• Create a second statement for route map RIPtoOSPF to permit the redistribu-
tion of all other routes having the route tag value 222.
route-map RIPtoOSPF permit 20
set tag 222
• Create a route map named OSPFtoRIP to deny the redistribution for all routes
having the route tag value 222.
route-map OSPFtoRIP deny 10
match tag 222
• Create a second statement for route map OSPFtoRIP to permit the redistribu-
tion of all other routes having the route tag value 111.
route-map OSPFtoRIP permit 20
set tag 111
• Enters OSPF configuration mode.
router ospf 11
• Redistributes all RIP routes having route tag value 222 into the OSPF domain.
redistribute rip route-map RIPtoOSPF
• Enters RIP configuration mode.
router rip
• Redistributes all OSPF routes having route tag value 111 into the RIP domain.
redistribute ospf route-map OSPFtoRIP
The result of this configuration on both Routers R1 and R2 is to ensure that only
routes originating from the RIP domain are redistributed into OSPF, while only
routes originating from the OSPF domain are redistributed into the RIP domain.
7.7.10 Distribute Lists
A distribute list is another way of controlling how routing updates are sent out or
received into the IP Routing Table. A distribute list allows an ACL or a route map to
be applied to incoming or outgoing routing updates for route filtering purposes
[CISCBGPCOMD19] [CISCEMPGARROT14] [CISCIOSCOMD19]. Using
distribute lists, network administrators can control which routes get distributed into
and out of an IP router for security, management, and other network routing policy
implementation purposes. Similar to route maps, distribute lists can also be used to
filter routes in order to avoid route feedback (as discussed above).
It is important to distinguish the difference between distribution lists and ACLs.
Distribute lists are used for controlling (filtering) routing updates while ACLs are
used for filtering user traffic. In Cisco IOS, the distribute-list in router
configuration command is used for filtering incoming routing updates while the
distribute-list out command is used for filtering outgoing routing updates.
An access list, a gateway, prefix list, or route map, must be defined on the IP router
prior to configuring the distribute-list commands.
7.7.11 Prefix Lists
Prefix filtering using prefix lists is a technique for marking routes for possible
exclusion from the Routing Table of an IP router. This is done by matching the
network address prefix in a route against a list of network prefixes that the router
maintains [CISCBGPCOMD19] [CISCEMPGARROT14]. A prefix-list entry
consists of an IP address and a network mask. The IP address can be for a single
host route, a subnet, or a classful network. Prefix lists can be configured to filter
routes based on an exact match of a network address, or match a range within the
address.
The primary use of prefix list is filtering routing information exchanged between
IP routers. Generally, prefix lists offer a more intuitive way of configuring filtering
rules than traditional access list. Prefix lists (using statement sequence numbers)
allow relatively more flexible and easy additions, deletions, and modification to a list
without the need to completely rebuild or reconstruct the list.
The ip prefix-list command can be used in global configuration mode to
create a prefix list or add a prefix-list entry [CISCBGPCOMD19]:
264 IP Routing Protocols
• The parameter list-name specifies a name that identifies the prefix list.
• The parameter number associated with seq keyword (optional) specifies a
sequence number for a prefix-list entry. The sequence number can take a value
from 1 to 4,294,967,294. If a sequence number is not entered, the number 5 is
applied to the first prefix-list entry, and subsequent unnumbered entries are
incremented by 5 (default sequence numbers are in increments of 5 (i.e., 5, 10,
15, and so on).
o A prefix list consists of statements with sequence numbers. A search for a
match begins at the top of the prefix list, which is the statement with the
lowest sequence number. When a match is found, the search ends and there
is no need to go through the rest of the prefix list.
• The deny or permit keywords specify the action to be taken when a match
is found. For example, deny denies access for a matching condition, and
permit permits access for a matching condition. For example, if a route
lookup yields a permit, the route is used, and if it yields a deny, the route is not
used.
• The parameter network/length specifies the IP address (or IP prefix) to be
matched and the network mask length (a number from 1 to 32).
• The parameter ge-length associated with the ge keyword (optional) specifies
the minimum prefix length to be matched.
• The parameter le-length associated with the le keyword (optional) specifies
the maximum prefix length to be matched.
• The parameter description associated with the description keyword
(optional) specifies a descriptive name for the prefix list (1–80 characters in
length).
• The sequence-number keyword (optional) enables or disables the use of
sequence numbers for the prefix list.
A prefix list is evaluated starting with the lowest sequence number, and the process-
ing progresses down the list (i.e., continues on higher sequence numbered state-
ments) until a match is found. When an IP address match is matched, the permit or
deny statement is applied to that route/network and the rest of the list is not evalu-
ated. When a route is evaluated against the prefix list, the first statement that matches
(either a permit or deny) ends the processing.
To increase processing efficiency, the prefix list statements that are more fre-
quently processed (i.e., the most common [permits or denies] matches) should be
assigned the lowest sequence numbers so that they can be placed near the top of the
prefix list. The parameter number and the seq keyword can be used for re-sequenc-
ing statements.
Prefix lists can be used as an alternative to route maps, distribute lists, and access
lists in many cases where route filtering is required. Figure 7.17 shows a networking
example where route maps and prefix lists can be configured to accomplish similar
Network Path Control and Factors That Affect Routing Table Properties 265
Router
R3
Router Router 172.16.16.0/24
R2 R1 172.16.17.0/24
172.16.18.0/24
172.16.19.0/24
172.16.20.0/24
Router
R4 OSPF ISP
In the OSPF network, Router R1 receives route sad vertised by the ISP and in turn advertises some of these routes to
Router R2. The configuration involves filtering some specific routes:
• Router R1 advertises only routes 172.16.17.0/24, 172.16.18.0/24, and 172.16.19.0/24 to Router R2.
• Router R3 accepts only the route 172.16.18.0/24.
• Router R4 accepts all the routes advertised by Router R2.
Multiple approaches exist to configure the network to meet these requirements, such as using route maps and prefix lists:
• Using Route Maps:
• Configure a route map on Router R1 and as an export policy of R1 to be used byOSPF.
• Configure another route-map on Router R3 and as an import policy of Router R3 to be used by OSPF.
• Using IP Prefix Lists:
• Configure an IP prefix list on Router R1 and as an export policy of R1 to be used by OSPF.
• Configure another IP prefix list on Router R3 and as an import policy of R3 to be used by OSPF.
When compared with IP prefix lists, route maps allow route attributes to be modified and provide a more flexible way of
controlling routes, but are relatively more complex to configure.
FIGURE 7.17 Example: Filtering Received and Advertised Routes using Route Maps and
Prefix Lists
route filtering results. The characteristics of a prefix list include, support for incre-
mental modifications of a list, significant performance improvement over ACLs
when looking up routes in a large list, and greater flexibility in specifying network
mask ranges.
• The parameter map-tag specifies the name of the route map that is to be used
for policy routing. This name must match the map-tag specified by the route-
map command.
266 IP Routing Protocols
The route map statements used for PBR can be configured as permit or deny:
• If the deny keyword is specified, a packet meeting the match criteria is not
policy-based routed but is forwarded through the normal destination-based IP
forwarding process, using the information in the IP Routing Table (Figure 7.18).
Is there a route
map applied to No
Incoming packet
the incoming
interface?
Yes
Forward the
Is there a
packet using the
match with a Yes
normal IP End
deny
forwarding
statement?
algorithm
No
Is there a
match with a Yes Apply set
permit commands
statement?
No
• deny — If the match criteria are met for the route map and the deny key word is specified, the packet is not policy
routed, instead, the normal IP forwardng algorithm is used.
• permit — If the match criteria are met for this route map, and the permit key word is specified, the packet is policy
routed as controlled by the set actions. If the match criteria are not met, and the permit key word is specified, the
next route map with the same map tag is tested. If a route passes none of the match criteria for the set of route maps
sharing the same name, the packet is not policy routed but forwarded through the normal IP forwarding algorithm.
• If the permit is specified, a packet meeting all the match criteria will have
the set commands applied.
• If no match criteria are met in the route map, the packet is not dropped, instead,
it is forwarded through the normal destination-based IP forwarding process.
• If there is the need to drop a packet when it does not match the specified criteria
instead of using the normal destination-based IP forwarding process, a set
statement can be configured as the last entry in the route map to route the pack-
ets to interface null 0 [CISCTEARDIA10]. The null 0 interface is a kind of
“route to nowhere” interface, causing the packet to be dropped.
• Define and name the policy route map using the route-map command.
o Define the match criteria (the conditions under which policy routing is
allowed on the router interface).
o Define the set criteria (the policy routing actions to be performed if the
match criteria are met).
• Define the router interface to which the route map will be attached to using the
ip policy route-map command.
• Apply the defined route map to the specified incoming interface.
It is important to note that when configuring PBR, the PBR is applied to incoming
packets on a given router interface (and not on the interface on which packets are
sent). PBR causes the router to use the configured route map to evaluate all packets
received on the interface.
7.7.13 Offset Lists
An offset list is another mechanism for path control, but only applicable to distance-
vector routing protocols such as RIP and EIGRP [CISCEIGRPCOMD18]
[CISCRIPCOMD18] [CISCTEARDIA10]. An offset list is a mechanism that can
be configured on a router to increase the metrics of incoming and outgoing routes
learned via RIP or EIGRP. In Cisco IOS, the offset-list command in router con-
figuration mode can be used to add an offset to incoming and outgoing metrics asso-
ciated with routes learned via RIP or EIGRP:
offset-list {access-list-number | access-list-name} {in | out} offset
[interface-type interface-number]
When an offset value is configured on a RIP or EIGRP router, that value is added
to the routing metrics of the routes passing through the specified interface. Based on
the configured offset lists, a router can add a value to the metric of a route, either
before a routing update is sent (the out keyword is used), or when a route is received
in a routing update and is being accepted into the IP Routing Table (the in keyword
is used). An offset list uses an ACL (i.e., parameter access-list-number | access-list-
name) to match routes; any matched routes will have the specified offset applied/
added to their metrics. Routes that do not match the offset list will not have their
metrics changed. Figure 7.19 shows an example of a networking scenario where an
offset list is used on a RIP router to make a specific route more preferable.
RIPv2
ISP
10.1.1.0
Router
R5
• We assume that users on network 10.1.1.0 attached to Router R1 can access the Internet through Routers R4 or R5.
• Router R2 receives routes is from each of the edge routers R4 and R5. The RIP routing metric between Routers R2
and R5 is smaller than the metric between Routers R2 and R4.
• Router R5 is only one hop away from R2 and therefore is the preferred RIP route to the ISP. However, the link between
R2 and R5 is the slower speed link.
• An off set list and ACL can be configured on R2 to ensure that the preferred route to the network 10.1.1.0 will point
towards Router R4.
• For example, an offset-list can be configured on R2 to add an offset of 2 to the metric of the routes learned from R5.
customers use the services. An SLA may cover how the guarantees are monitored
and how exception reports (i.e., failure to comply with the service guarantees) are
generated. The service guarantees may include packet loss, delays, service availabil-
ity, and maintenance and/outage notification times.
To monitor SLAs in real time, a service provider may use SLA probes to gather
information about the performance of the network providing the service(s) to the
customer. In this section, we discuss how network routing operations and path con-
trol can be based on the ability to continuously reach a target object in the network.
That is, evoke network routing and path control decisions based on the reachability
of the target object. Typically, the network uses probe traffic to detect the reachability
of the object.
Router ISP 1
R2
Primary
.1
Customer Path
Network Router 10.1.4.4
R1
Internet
172.16.5.5
Backup
Path
.1
Router
R3
ISP 2
• Assume that Router R1 is multihomed to the Internet through ISP 1 and ISP 2.
• The customer network is multihomed to the two ISPs through Router R1. R1 is configured with two equal cost default static
routes which enable it to load balance over the two links on a per-destination basis.
• We assume R1 can detect if there is a failure on its direct link to one ISP, and in that case use the other ISP for all traffic.
• How ever, a serious problem occurs if a link within ISP1 infra structure were to fail. This is be cause the link from R1 to R2
would still remain up and R1 would continue to use that link be cause the static default route would still be valid.
• The use of Cisco SLA probesis one effective solution to this situation.
• Static routes or PBR can be configured on R1 to be multihomed through ISP 1 and ISP 2 to the Internet, but make these
routes subject to reachability tests to ward critical destinations, such as DNS servers within each ISP.
• If the DNS servers in anyone of the ISPs go down or are unreachable, R1 would remove the static route to ward that ISP.
• Configuring IP SLA probes to continuously check the reachability of a specific destination within the ISP (such as the ISP’s
DNS server, or any other specific destination) will conditionally announce that static route as available if the connectivity is
verified to be available (using IP SLA probes).
• IP SLA probes can be configured on R1 to probe the DNS servers frequently. The IP SLA probes are attached or assigned to
the static routes.
link (and static route) to that ISP will still remain up, and Router R1 would continue
to use that link, because the static default route would still be valid.
The following are some solutions to the problem describe in Figure 7.20 but with
IP SLA probes-based method offering a better solution [CISCTEARDIA10]:
Cisco IOS IP SLAs operations involve the use of sources and responders. The
source is the network entity that sends probe messages to a target (device). The IP
SLAs source (which initiates all IP SLAs measurement probe operations) can be
configured either via a CLI or a SNMP tool that supports the operation of the Cisco
IP SLAs [CISCTEARDIA10]. A responder in Cisco IP SLAs operations is a com-
ponent that is embedded in a Cisco IOS device, that allows it to listen and respond to
IP SLAs request messages sent to it.
Two types of Cisco IP SLA probe operations have been defined as described in
Figure 7.21:
The accuracy of the IP SLAs probe measurement is significantly improved when the
target device is also operating as an IP SLAs responder. The source and the responder
use the IP SLAs Control Protocol to communicate, before the source starts sending
probe messages. To secure the exchange of control messages, IP SLAs Control
Protocol uses MD5 authentication similar to RIPv2, EIGRP, and OSPFv2.
To implement path control using Cisco IP SLAs, the following tools and pro-
cesses are needed [CISCTEARDIA10]:
272 IP Routing Protocols
Router Router
A B
• In this method, the target device is running the IP SLAs responder component (such as a router)
• Measurement accuracy is improved when the target is also the SLAs responder.
• This method also allows additional statistics to be gathered.
To deploy Cisco IOS IP SLAs probes, it is very important to consider the impact of
the additional probe traffic that is to be generated, including how the probe traffic
affects network congestion and bandwidth utilization levels. The steps involved in
configuring Cisco IP SLAs include the following [CISCTEARDIA10]:
An IP SLAs operation includes defining the type of protocol to be used for probe
messages, frequency of probes, thresholds to trigger actions, and traps to be sent to a
network management system. Each IP SLAs operation is specific to a target device.
A number of tasks performed by the network administrator include configuring the
IP SLAs source with the IP address of the target device, protocol, and TCP and UDP
port numbers for the operation. Upon completion of the operation and the response
has been received, the source stores the results in an IP SLAs MIB, which can then
be retrieved using SNMP
Each IP SLAs operation can be described by the following sequence of events
[CISCTEARDIA10]:
1. The IP SLAs operation starts with a control phase. At the beginning of this
phase, the source sends a control message with the configured information for
the IP SLAs operation to the responder.
a. The source sends the control message to UDP port number 1967 which is
the IP SLAs control port on the target router (the responder). Included in
the control message are the protocol to be used, TCP or UDP port number,
and duration of the IP SLAs operation.
b. If MD5 authentication is enabled, the source computes an MD5 checksum
which is included in the control message.
c. The responder verifies the MD5 checksum to ensure that it is communicat-
ing with the right sender. The responder returns an "authentication failure"
message if the authentication fails.
2. If the control message is successfully processed, the responder returns an
“OK” message to the source. The responder then listens on the TCP or UDP
port specified in the control message for a specified period of time.
a. In the event the responder is not able to process the control message, it will
return an error to the source.
b. The source tries to retransmit the control message if it does not receive a
response from the responder, and it will eventually time out if it does not
receive a response.
3. If the source receives an “OK” message from the responder, it will move the
IP SLAs operation to the probing phase.
a. In this phase, the source sends one or more test packets to the responder.
b. The source uses the response from these test packets to compute response
times.
274 IP Routing Protocols
4. The responder receives the test packets and prepares the appropriate response
messages.
a. Based on the type of IP SLAs operation agreed upon with the source, the
responder may include an “in” timestamp (for the received test message)
and an “out” timestamp (for the outgoing response message) in the payload
of the response packet to account for the local CPU processing time spent
processing receive/test and transmit/response messages.
b. The source uses these timestamps to make accurate assessments of the one-
way delay and the processing time in the target device. To calculate the
round-trip time (RTT), the source uses four timestamps.
c. The responder then closes the user-specified TCP or UDP port after it has
sent response packets to the IP SLAs test packet, or when the specified
operation time has expired.
• The parameter acl-number specifies a number in the range 1–500 that specifies
the AS-Path access-list number.
• The permit keyword permits BGP advertisement satisfying the matching
conditions.
• The deny keyword denies BGP advertisement satisfying the matching
conditions.
Network Path Control and Factors That Affect Routing Table Properties 277
• The parameter regexp specifies a regular expression that defines the AS-Path
filter. The ASN is expressed in the range from 1 to 65,535. The 4-byte ASNs
are in the range 65,536 to 4,294,967,295.
For an AS-Path access list, the input string is the BGP AS-Path of the routes to which the
access list is applied. The router compares each BGP route's AS-Path against each condi-
tion in the access list. If the first match is for a permit condition, the route is accepted
or passed. If the first match is for a deny condition, the route is rejected or blocked.
AS-path filters can be applied to both inbound and outbound BGP paths. In Cisco IOS,
the first step in configuring a BGP AS-Path route filter is to create the AS-Path access
list, after which the access list is linked to the desired BGP neighbor. Other ways to filter
BGP advertisements are using the neighbor prefix-list command, the neigh-
bor distribute-list command, the neighbor filter-list command,
and the neighbor route-map command as discussed below.
A BGP router can use a combination of BGP AS-Path access lists and prefix lists,
where the AS-Path access list ensures that network traffic takes the desired route
through an internetwork, and the prefix lists prevents BGP routers from learning
illegitimate or unwanted routes. A network operator can configure prefix lists to spe-
cifically allow only those network prefixes that are permitted by the routing policy of
the operator.
The neighbor prefix-list command and the neighbor distribute-
list command cannot be both applied to a BGP neighbor to filter routes in any
given direction (inbound or outbound) [CISCBGPCOMD19]. These two commands
are mutually exclusive; meaning only one of these can be applied to filter routes in
278 IP Routing Protocols
each direction at any given time. The neighbor filter-list command can also
be used to filter BGP advertisements (see command details in [CISCBGPCOMD19]).
Note that the route-map command (discussed above in the “Route Maps” section)
is used to define the conditions under which routes will be redistributed from one
routing protocol into another, or used to enable PBR.
injection of routes into BGP because the network administrator might see
that total injection of static routes into the Internet may be problematic
(unwanted routes may be advertised). However, injecting a large number of
routes may be tedious, so, this can also be accomplished using the redis-
tribute command with route maps as discussed above.
3. Using the redistribute command: When this command is used, all the
IGP routes are injected into BGP. For example, running the following com-
mands on a BGP router in AS 65000 will redistribute OSPF routes into BGP:
router bgp 65000
redistribute ospf
The main problem with this method is that, redistributing all the IGP routes
into BGP might end up leaking unwanted routing information into BGP (such
as private addresses, or unregistered/illegal internal addresses), thereby, caus-
ing other routing problems elsewhere. However, route maps can be used to
filter routes to avoid unwanted routes leaking into BGP as discussed above.
4. Using the network command: In this method, the user manually specifies a
subset of the IGP routes to be injected into BGP. Using this command involves
listing all the routes to be passed into BGP. For example, running the following
commands on a BGP router in AS 65000 will inject only the network 10.120.0.0
into BGP:
router bgp 65000
network 10.120.0.0 mask 255.255.0.0
This method is not fully dynamic because the network address prefixes that
need to be injected into BGP must be individually specified and maintained in
the BGP router. These network prefixes are not automatically injected into
BGP. Even though this method has the advantage of providing fine grain con-
trol of route injection into BGP, it can be impractical or tedious to use when a
large number of network prefixes have to be passed to BGP.
When this command is used, the BGP router assumes that the networks
specified exist and tries to verify that by checking its IP Routing Table
Network Path Control and Factors That Affect Routing Table Properties 281
[CISCHALABS00]. If the BGP router does not find an exact match for any
of these networks in its IP Routing Table, it will not advertise that network.
This IP Routing Table verification is to ensure that the router itself and peers
in other Autonomous Systems will not mistake accept networks that do not
actually exist.
• If the routes 10.10.0.0, 11.11.0.0, and 12.12.0.0 are passed into BGP using the
network command, and 12.12.0.0 is not in the IP Routing Table, only
10.10.0.0 and 11.11.0.0 will be advertised by BGP. BGP will assign to these
networks the ORIGIN attribute value of 0 (i.e., IGP).
• If the IGP route 13.13.0.0 is injected into BGP via the redistribute com-
mand, BGP will assign this route the ORIGIN attribute value of 2 (i.e.,
INCOMPLETE).
• Let us assume that the routes 10.10.0.0, 11.11.0.0, and 12.12.0.0 are defined as
static routes, and are injected into BGP statically using the redistribute
command, and 11.11.0.0 which is listed in the IP Routing Table, is also passed
to BGP using the network command. In this case, 11.11.0.0 will have the
ORIGIN attribute value of IGP, while 10.10.0.0 and 12.12.0.0 will be given the
ORIGIN attribute value of INCOMPLETE.
Network: Network:
192.210.1.0/24 192.210.1.0/24
AS_PATH = [100] AS_PATH = [200, 100]
Router AS 200
R1
AS 100
AS 500
192.210.1.0/24
Router 10 Gb/s
R2 Link Network: 192.210.1.0/24
AS 300 AS 400 AS_PATH = [400, 300, 100]
Network:
192.210.1.0/24 Network: 192.210.1.0/24
AS_PATH = [100] AS_PATH = [300, 100]
Router 10 Gb/s
R2 Link Network: 192.210.1.0/24
AS 300 AS 400 AS_PATH = [400, 300, 100]
Network:
192.210.1.0/24 Network: 192.210.1.0/24
AS_PATH = [100] AS_PATH = [300, 100]
• Let us assume the network prefix 192.210.1.0/24 is being propagated from AS 100 to AS 500 and onwards.
• Without AS-Path prepending, the path through AS 200 is the shorter path even though the links on this path have lower
bandwidth compared to the path through AS 300 and AS 400.
• In this scenario, autonomous systems up stream of AS 500 will prefer the shorter path via AS 200 and will use this to send
traffic to AS 100 and then network 192.210.1.0/24.
• How ever, even though the path through AS 100 is shorter, the longer path through AS 300 and AS 400 offers much higher
bandwidth.
• So, to force the higher bandwidth path through AS 300 and AS 400 to be preferred, Router R1 in AS 100 can manipulate the
AS_PATH attribute in UPDATE message it sends by inserting dummy ASNs into the attribute.
• Router R1 can repeat (prepend) its local ASN into the AS_PATH as necessary to make the path through AS 300 and AS 400
appear shorter. This process is geneally referred toas “BGPAS-Path Prepending”.
• With AS-Path prepending, AS 500 and upstream autonomous systems will see the path through AS 300 and AS 400 as
shorter, and will direct traffic to network 192.210.1.0/24 through this path.
FIGURE 7.22 BGP AS-Path Prepending: AS-Path Attribute Manipulation using Dummy
Entries
length indicated in the AS-Path attribute for the route longer and therefore, least
preferable.
“AS-Path Prepending”, as this path control method is called, involves the eBGP
router adding ASNs at the beginning (i.e., leftmost position) of the BGP AS-Path
attribute to make the path longer as explained in Figure 7.22. AS-Path prepending is
typically used as a workaround if other path control tools such as the MED attribute
Network Path Control and Factors That Affect Routing Table Properties 283
are not supported, and a specific BGP route in the internetwork is required to be
followed.
In practice, the eBGP router doing the AS-Path prepending uses its own ASN, or
the ASN of the eBGP peer from which it learned the route, as the dummy ASNs
[CISCHALABS00]. This is because using any other ASN can have unintended side
effects include misleading other routers to think that these ASNs were actually tra-
versed, or this could potentially create routing loops or traffic blackholes in the inter-
network. As shown in Figure 7.22, Router R1 prepends its own ASN to avoid creating
such problems.
The Autonomous System path length as indicated by the AS-Path attribute, is a
BGP metric used to influence the best path selection process as explained in Chapter
2. By extending the length of the Autonomous System path as indicated in the
AS-Path attribute, a BGP router can influence the best-path selection in downstream
BGP peers. The set as-path prepend command can be used in Cisco IOS and
many commercial routers to prepend an arbitrary number of ASNs to the AS-Path
attribute in order to extend the Autonomous System path length of BGP routes
[CISCBGPCOMD19] [CISCHALABS00].
The command syntax is, “set as-path {tag | prepend as-path-string}”,
where tag applies only when redistributing routes into BGP, and also converts the
manually set tag of the redistributed route into an Autonomous System path. For
example, the command used in Figure 7.22 will be, “set as-path prepend
100 100”. Usually, the local ASN is prepended multiple times to the attribute, mak-
ing the Autonomous System path length appear longer to downstream BGP routers.
Unlike the network command which applies to routes in the IP Routing Table,
BGP route aggregation applies to routes in the BGP Routing Table [CISCHALABS00].
The BGP Routing Table of a router contains the list of all routes learned from the
BGP neighbors, plus the routes originating from the local Autonomous System. The
BGP router installs the best routes from the BGP Routing Table to all known network
destinations in its IP Routing Table. A BGP router can perform route aggregation if
at least one more-specific route exists in the BGP Routing Table.
route. The aggregate route is advertised as a route originating from the local Autono-
mous System, and will have its BGP Atomic Aggregate path attribute set to indicate
that some information might have been lost as a result of the aggregation. The BGP
Atomic Aggregate attribute is set, by default, unless the as-set keyword is speci-
fied [CISCBGPCOMD19].
After the router has performed route aggregation, it will advertise a new network
prefix with a shorter prefix length into BGP. The aggregated prefix is considered a
new route, and the router performing the route aggregation becomes the originator
for this new aggregate route. BGP considers aggregated routes as local routes when
modifying the BGP Administrative Distance. The BGP Aggregator path attribute
identifies the BGP Autonomous System and router that created an aggregate route
(see Chapter 3 of Volume 2 of this two-part book).
• For example, if one of the original routes being aggregated contains the BGP
Communities NO_EXPORT attribute, the aggregate route will not be exported
(see Chapter 3 of Volume 2 of this two-part book).
• Furthermore, if the AS-Path information for the individual routes being aggre-
gated change, the aggregate route will be continually withdrawn and updated,
causing route flaps. Note that the AS_SET contains information about each
individual route that is summarized. This means changes in the AS-Path infor-
mation of an individual route will cause the aggregate route to be updated. If
the aggregate route is formed from tens or hundreds of routes and these routes
have problems, there can be a constant aggregate route flap.
service provider, the customer might want to send the aggregate route on the
different links with different MED values to influence the entry point to the
service provider’s Autonomous System. The MED attribute (sometimes called
the metric) is an optional non-transitive BGP path attribute that a BGP router
uses in its BGP path selection process to determine the preferred entry point
when multiple entry points exist to a neighboring Autonomous System.
the aggregate route, it is easier to decide which BGP attributes will get passed to the
aggregate route. The advertise-map keyword can be used to exclude a specific
route (e.g., having the BGP Communities NO_EXPORT attribute) from the aggregate
route; preventing the aggregate route from inheriting the NO_EXPORT attribute. With
this configuration, the aggregate route can be advertised to other eBGP neighbors.
7.9 UNNUMBERED INTERFACES
Each interface on a router requires a unique IP address that will be installed in the
Routing Table so that routing updates and IP packets can be processed. An IP unnum-
bered interface allows IP processing to be carried out on a serial point-to-point inter-
face without assigning an explicit IP address to the interface. IPv4 unnumbered
interfaces are applicable only to point-to-point links and not to multiaccess networks
like Ethernet. Whenever possible, it is beneficial to use IP unnumbered interfaces as
it helps conserve the IPv4 address space of the network.
AS 100 AS 200
eBGP eBGP
(Default AD = 20) (Default AD = 20)
Router R3
AS 300
• AS 100 receives routing updates from two different routing information source about network 128.200.1.0/24, eBGP and
OSPF.
• AS 100 receives routes via eBGP on the link to AS 300 and via the backdoor link running OSPF between AS 100 and AS 200.
• According to the default Administrative Distances (ADs) of the two routing protocols, the route provided by BGP should be
preferred over the one provided by OSPF. The lower the AD, the higher the precedence for the route from that routing source.
• In AS 100, Router R1 that learns the route via eBGP will install it in its routing table.
• This means, traffic sent toward network 128.200.1.0/24 will take the indirect eBGP route via AS 300 and then AS 200, rather
than the direct OSPF route between AS 100 and AS 200.
• To use the direct OSPF route instead, the network backdoor command can be used to change the AD of the eBGP route
128.200.1.0/24 from 20 to 200, which makes the OSPF route with AD of 110 to be preferred.
• A good feature of the network backdoor command is that it will not cause BGP to generate an advertisement for that
network.
AS 100 AS 500
Router R1 Router R5
eBGP
eBGP eBGP
Router R4
Router R2
Router R3 Network
172.20.1.0/24
AS 300
• Router R2 as a BGP router receives a route to Router R4 and network 172.20.1.0/24 through eBGP, but this route traverses
at least two autonomous systems.
• Router R2 and Router R4 are also connected through RIP network (for example), and this route has a shorter path.
• RIP routes, however, have a default AD of 120, and eBGP routes have a default ADof 20, so BGP will prefer the eBGP
route.
• To cause BGP to prefer the RIP route, the network backdoor command can be used to change the AD of the eBGP
route from 20 to 200 so that the RIP route will be preferred.
• BGP treats the network specified by the network backdoor command as a locally assigned network, except that it does
not advertise the specified network in BGP updates.
• This means that Router R2 will communicate to Router R4 using the shorter RIP route instead of the longer eBGP route.
point-to-point serial interface on the router has only two end points on the point-to-
point link that need IP addresses, assigning an entire IP subnet to each serial interface
uses up all the 254 available IP addresses in the subnet for that router interface
although only two IP addresses are needed.
However, if an IP unnumbered interface is configured on each serial interface on
the router, this would save the IP address space significantly. The IP unnumbered
interface can “borrow” the IP address of a functional interface on the router. The
router can then use this borrowed IP address as the source IP address for routing
updates and packets sourced from the point-to-point serial interface. This allows the
IP address space to be conserved. IP unnumbered interfaces are only applicable to
interfaces attached to point-to-point links.
configured on the interface Ethernet 0 is also assigned to the interface Serial 0, and
both interfaces involved will function normally. The “unnumbered interface”, Serial
0, is the interface that borrows its IP address from one of the other functional inter-
faces of the router.
interface loopback 0
ip address 127.10.10.4 255.255.255.0
interface Serial 0
ip unnumbered loopback 0
• Update Timer: This timer specifies the rate at which RIP sends routing
updates. The routing-update timer clocks the interval between periodic routing
updates. The default timer setting is 30 seconds. A small random amount of
time is added to the timer setting whenever the timer is reset. This is done to
prevent all routers from attempting to send routing updates to their neighbors
simultaneously, when their timers are reset.
• Invalid Timer: This timer specifies the maximum time the RIP router waits for
a routing update before declaring the route as invalid. The default setting is 180
seconds and should be at least three times the update timer value. Once the
timer expires, the route goes into holddown and is tagged as inaccessible, and
is also advertised to neighbor routers as unreachable. When the invalid timer
expires, the route is marked as invalid but is still retained in the RIP router’s
Routing Table until the flush timer expires.
• Holddown Timer: This specifies the maximum amount of time that the RIP
router must wait before accepting any new routing updates for a route that is
placed in holddown. The default setting is 180 seconds.
Network Path Control and Factors That Affect Routing Table Properties 295
• Flush Timer: This timer specifies the maximum amount of time the RIP router
must wait before removing a route from its Routing Table. The default setting
is 240 seconds. This timer is used to purge invalid routes from the Routing
Table.
RIP maintains these timers for each known route; each Routing Table entry has these
timers associated with it.
For EIGRP, the following timer are used (see Chapter 6):
• Hello Interval Timer: This timer specifies the rate at which EIGRP sends
HELLO packets. The default setting is 60 seconds for low-speed (not more
than 1,544 Mb/s) and NBMA (non-broadcast multiple access network) net-
works, and 5 seconds for other types of networks.
• Hold Timer: This specifies the maximum amount of time a router will con-
sider an EIGRP neighbor as alive when it does not receive a HELLO from the
neighbor. The default Hold Time is 15 seconds, which is three times the default
Hello Time (of 5 seconds). Each time a router transmits a HELLO packet, it
also includes its Hold Time in it. The EIGRP router uses the Hold Timer to
determine how long it should maintain the neighbor relationship without
receiving EIGRP HELLO messages. Each time the router receives a HELLO
message from the neighbor, it will reset the Hold Timer to the Hold Time and
will decrement it until a HELLO message is received or until it expires. When
the Hold Timer reaches zero, the router declares the neighbor as unreachable.
The router then marks all paths through that neighbor as unusable and the
neighbor relationship is torn down. The EIGRP router then runs the EIGRP
Diffusing Update Algorithm (DUAL) over these destinations to determine if
the route needs to be placed in the ACTIVE State (see Chapter 6).
The Hold Timer is also used by the EIGRP Reliable Transport Protocol
(RTP) as an upper bound on how long an EIGRP router should wait for a
neighbor to acknowledge the receipt of an EIGRP QUERY, REPLY, or
UPDATE packet. The EIGRP router tries to retransmit up to a maximum of 16,
or until the Hold Time of the neighbor expires, which will cause it to terminate
the neighbor relationship.
• Active Timer: This timer specifies the maximum time the EIGRP router waits
for a reply after sending an EIGRP QUERY before declaring the route as
Stuck-in-Active (SIA), and resetting the neighbor or adjacency relationship.
It also is possible to tune the different timers to enable faster convergence of the rout-
ing protocol. The desired outcome is to minimize disruptions to end users in the
network in situations where quick network recovery is essential.
BGP uses two main adjustable timers to control periodic activities, such as, the
rate at which BGP KEEPALIVE messages are sent (Keepalive Timer), and the maxi-
mum interval a BGP router must wait for a BGP KEEPALIVE or UPDATE messages
from a neighbor before declaring it as unavailable or unreachable (i.e., Hold Timer)
[RFC4271]. When a BGP connection is started, BGP will negotiate the Hold Time
with the neighbor. The router uses the smaller of the two Hold Times as its Hold
296 IP Routing Protocols
Time. The router then sets its Keepalive Timer to be one third of the negotiated Hold
Time [RFC4271]. The timers used in OSPF, IS-IS, and BGP are discussed in Volume
2 of this two-part book.
REVIEW QUESTIONS
1. Explain why a network would run multiple routing protocols.
2. What is a routing policy? Explain the differences between a routing policy and
a packet filter policy.
3. What is policy-based routing (PBR)? Describe three example uses of PBR.
4. Explain how automatic route summarization in RIP and EIGRP is performed.
5. What is the purpose of a default seed metric?
6. What is difference between a RIP passive interface and an OSPF passive
interface?
7. What is route redistribution? Explain some of the pitfalls of route
redistribution.
8. What is the difference between one-point route redistribution and multipoint
route redistribution?
9. Explain how the Administrative Distance is used as a path control tool.
10. What is route tagging?
11. What is an offset list? Which routing protocols use offset lists?
12. Explain how IP SLA Probes can be used for network path control.
13. What is a BGP AS-Path filter list?
14. What is the difference between injecting a route into BGP via the redis-
tribute command or the network command?
15. What is BGP AS-Path prepending?
16. What is an IGP backdoor route? Why is it sometimes necessary to use a back-
door route?
17. What is an IP unnumbered interface and what benefits does it provide?
18. Name and describe the four main timers used in RIP.
19. Name and describe the three main timers used EIGRP.
REFERENCES
[AWEYA1BK18]. James Aweya, Switch/Router Architectures: Shared-Bus and
Shared-Memory Based Systems, Wiley-IEEE Press, ISBN
9781119486152, 2018.
[CISCID118263STR19]. Cisco Systems, Specify a Next Hop IP Address for Static Routes,
Document ID: 118263, June 4, 2019.
[CISCID49111RMP05]. Cisco Systems, Route-Maps for IP Routing Protocol Redistribution
Configuration, Document ID: 49111, August 10, 2005.
[CISCID5441AGGR05]. Cisco Systems, Understanding Route Aggregation in BGP,
Document ID: 5441, August 10, 2005.
[CISCID8606REDIS12]. Cisco Systems, Redistributing Routing Protocols, Document ID:
8606, March 22, 2012.
Network Path Control and Factors That Affect Routing Table Properties 297
299
300Index