Short course programs
Division
Course Name: CCNA
Chapter 7: Enhanced IGRP
(EIGRP) and Open Shortest Path
First (OSPF)
1
All Rights reserved For JUST
Distance Vector vs. Link State
Link State
Distance Vector Updates are event
Updates frequently triggered
Each router is "aware" Each router is "aware"
only of its immediate of all other routers in
neighbors the "area"
Fast convergence
Slow convergence
Less subject to routing
Prone to routing loops loops
Easy to configure More difficult to
configure 2
All Rights reserved For JUST
Comparison Continued
Distance Vector Link State
Fewer router resources More router resource
required intensive
Updates require more Updates require less
bandwidth bandwidth
Does not "understand" the Has detailed knowledge of
topology of the network distant networks and routers
3
All Rights reserved For JUST
4
All Rights reserved For JUST 4
EIGRP
IGRP
• DV OSPF
• Easy to configure • LS
• Neighbor • Incremental Updates
• Advanced Metric • Multicast
• Periodic • Open Standard
• Broadcast
• EIGRP
– Hybrid
– DUAL
– Topology Database
– Rapid Convergence
– Reliable 5
All Rights reserved For JUST
Overview
Enhanced Interior Gateway Routing Protocol (EIGRP) is a Cisco-
proprietary routing protocol based on Interior Gateway Routing
Protocol (IGRP).
Released in 1994, Unlike IGRP, which is a classful routing protocol,
EIGRP supports CIDR and VLSM.
it is probably one of the two most popular routing protocols in use
today.
Compared to IGRP, EIGRP boasts faster convergence times, improved
scalability, and superior handling of routing loops.
All Rights reserved For JUST 6
Introducing EIGRP
EIGRP supports:
Rapid convergence
Reduced bandwidth usage
Multiple network-layer protocols
All Rights reserved For JUST
EIGRP Tables
EIGRP maintains 3 tables
– Neighbor table
– Topology table
– Routing table
8
All Rights reserved For JUST
Neighbor Discovery
There are three conditions that must be met for
neighbor-ship establishment
Hello or ACK received
AS numbers match
Identical metrics (K values) ? AS
?K
K1 – BW
K2- Delay
K3-Load
K3-Reliability
K5-MTU
9
All Rights reserved For JUST
Metric Calculation
The metrics used by EIGRP in making routing decisions are (lower the metric the better):
bandwidth
delay
load
Reliability
MTU
By default, EIGRP uses only:
Bandwidth
Delay
Analogies:
Think of bandwidth as the width of the pipe
and
delay as the length of the pipe.
Bandwidth is the carrying capacity
Delay is the end-to-end travel time. 10
All Rights reserved For JUST
Neighbor Table
The neighbor table is the most important table in EIGRP
Stores address and interface of neighbor
11
All Rights reserved For JUST
Diffusing Update Algorithm
Diffusing Update Algorithm (DUAL)
– Purpose
• EIGRP’s primary method for preventing routing loops
– Advantage of using DUAL
• Provides for fast convergence time by keeping a list of
loop-free backup routes
All Rights reserved For JUST
Topology Table
The topology table is made up of all the EIGRP routing tables in the
autonomous system.
Contains all destinations advertised by neighboring routers
DUAL takes the information and calculates the lowest cost routes to each
destination.
By tracking this information, EIGRP routers can identify and switch to
alternate routes quickly.
The information that the router learns from the DUAL is used to determine
the successor route, which is the term used to identify the primary or best
route.
Every EIGRP router maintains a topology table. All learned routes to a
destination are maintained in the topology table.
13
All Rights reserved For JUST
Successor & Feasible Successor
A successor is a route selected as the primary route to
use to reach a destination.
DUAL calculates Successor (Primary Route) and places it
in the routing table (and topology table)
Can have up to 4 successors of equal or unequal value
DUAL calculates Feasible Successor (Backup Route) and
places it in the Topology Table.
Promoted to successor if the route goes down if it has a
lower cost than current successor
If no FS in Table - Send query
Multiple feasible successors for a destination can be
retained in the topology table although it is not
mandatory
14
All Rights reserved For JUST
EIGRP Concepts & Terminology
EIGRP routers that belong to different autonomous
systems (ASes) don’t automatically share routing
information
The only time EIGRP advertises its entire routing table
is when it discovers a new neighbor and forms an
adjacency with it through the exchange of Hello packets
When this happens, both neighbors advertise their entire
routing tables to one another
After each has learned its neighbor’s routes, only changes
to the routing table are propagated 15
All Rights reserved For JUST
EIGRP Terms
Feasible distance (FD) - This is the lowest calculated metric to reach
destination. This is the route that you will find in the routing table,
because it is considered the best path
Reported distance (RD) - The distance reported by an adjacent
neighbor to a specific destination.
Route status - The status of a route. Routes are identified as being
either passive, which means that the route is stable and ready for use,
or active, which means that the route is in the process of being
recomputed by DUAL
16
All Rights reserved For JUST
EIGRP Terminology and Operations
Successor – Current Route
A successor is a route selected as the primary route to use to reach a
destination.
Successors are the entries kept in the routing table.
Feasible Successor - A backup route
A feasible successor is a backup route.
These routes are selected at the same time the successors are identified,
but they are kept in the topology table.
Multiple feasible successors for a destination can be retained in the
topology table.
17
All Rights reserved For JUST
Reliable Transport Protocol (RTP)
Used by EIGRP for its routing updates in place of TCP
EIGRP can call on RTP to provide reliable or unreliable service
EIGRP uses reliable service for route updates
Unreliable for Hellos
Reliable Transport Protocol (RTP) is a transport layer protocol that
guarantees ordered delivery of EIGRP packets to all neighbors.
On an IP network, hosts use TCP to sequence packets and ensure their
timely delivery. RIP uses UDP
18
All Rights reserved For JUST
Diffusing Update Algorithm (DUAL)
All route computations in EIGRP are handled by DUAL
One of DUAL's tasks is maintaining a table of loop-free paths to
every destination.
This table is referred to as the topology table
DUAL saves all paths in the topology table
The least-cost path(s) is copied from the topology table to the
routing table
In the event of a failure, the topology table allows for very quick
convergence if another loop-free path is available
If a loop-free path is not found in the topology table, a route
recomputation must occur
DUAL queries its neighbors, who, in turn, may query their
neighbors, and so on...
Hence the name "Diffusing" Update Algorithm
19
All Rights reserved For JUST
VLSM Support
EIGRP supports the use of Variable- Length Subnet Masks
Can use 30-bit subnet masks for point-to-point networks
Because the subnet mask is propagated with every route
update, EIGRP also supports the use of discontiguous
subnets
Discontiguous network is the one that has two or more
subnetworks of a classful network connected together by
different classful networks
20
All Rights reserved For JUST
Discontiguous Network
Assignment
Build the network
shown in the figure, in
packet tracer,
configure it with
EIGRP and submit it
to day
21
All Rights reserved For JUST
Configuring EIGRP
Router(config)#router eigrp autonomous-system
• Defines EIGRP as the IP routing protocol
Router(config-router)#network network-number
• Selects participating attached networks
All Rights reserved For JUST
EIGRP Configuration Example
All Rights reserved For JUST
EIGRP Configuration
S0 S1
200.0.0.10 200.0.0.13
255.255.255.252 R2 255.255.255.252
R1 R3
S0
S0 200.0.0.9
200.0.0.14 200.0.0.33
E0
200.0.0.17 E0
255.255.255.224
255.255.255.240 200.0.0.18 200.0.0.34
A B
R3#config t
R1#config t Enter configuration commands, one per line. End with
Enter configuration commands, one per line. End with CNTL/Z. CNTL/Z.
R1(config)#router eigrp 10
R3(config)#router eigrp 10
R1(config-router)#network 200.0.0.16
R3(config-router)#network 200.0.0. 32
R1(config-router)#network 200.0.0. 8
R1(config-router)#^Z R3(config-router)#network 200.0.0. 12
R3(config-router)#^Z
24
All Rights reserved For JUST
Verifying the EIGRP Configuration
To verify the EIGRP configuration a number of show
and debug commands are available.
25
All Rights reserved For JUST
26
All Rights reserved For JUST 26
Open Shortest Path First (OSPF)
OSPF is an open standards routing protocol
This works by using the Dijkstra algorithm
OSPF provides the following features:
– Minimizes routing update traffic
– Allows scalability (e.g. RIP is limited to 15 hops)
– Has unlimited hop count
– Supports VLSM/CIDR
– Allows multi-vendor deployment (open standard)
27
All Rights reserved For JUST
Link State
There are two types of Packets
Hello
LSA’s
28
All Rights reserved For JUST
OSPF Hello
B C
When router A starts it send Hello packet – uses 224.0.0.5
Hello packets are received by all neighbors
B will write A’s name in its neighbor table
C also process the same way
29
All Rights reserved For JUST
"Hello" Packets
• Small frequently issued packets
• Discover neighbours and negotiate "adjacencies"
• Verify continued availability of adjacent neighbours
• Hello packets and Link State Advertisements (LSAs)
build and maintain the topological database
• Hello packets are addressed to 224.0.0.5.
30
All Rights reserved For JUST
Link State Advertisement (LSA)
An OSPF data packet containing link state and routing
information that is shared among OSPF routers
LSAs are shared only with routers with whom it has
formed adjacencies
LSA packets are used to update and maintain the
topology database.
31
All Rights reserved For JUST
Link State
There are three type of tables
– Neighbor
– Topology
– Routing
32
All Rights reserved For JUST
Tables
Neighbor
Contain information about the neighbors
Neighbor is a router which shares a link on same network
Another relationship is adjacency
Not necessarily all neighbors
LSA updates are only when adjacency is established
33
All Rights reserved For JUST
Tables
Topology
Contain information about all network and path to reach any
network
All LSA’s are entered in to topology table
When topology changes LSA’s are generated and send new LSA’s
On topology table an algorithm is run to create a shortest path,
this algorithm is known as SPF or dijkstra algorithm
34
All Rights reserved For JUST
Tables
Routing Table
Also knows as forwarding database
Generated when an algorithm is run on the topology database
Routing table for each router is unique
35
All Rights reserved For JUST
OSPF Terms
Backbone area
Link
Internal routers
Router ID
Area Border Router
Neighbours (ABR)
Adjacency Autonomous System
OSPF Area Boundary Router
(ASBR)
36
All Rights reserved For JUST
Link
A network or router interface assigned to a given
network
Link (interface) will have "state" information
associated with it
Status (up or down)
IP Address
Network type (e.g. Fast Ethernet)
Bandwidth
Addresses of other routers attached to this interface
37
All Rights reserved For JUST
OSPF Term: Link
A link is a network or router interface assigned to any given network
This link, or interface, will have state information associated with it
(up or down) as well as one or more IP addresses
38
All Rights reserved For JUST
OSPF Term: Link State
Status of a link between two routers
Information is shared between directly connected routers.
This information propagates throughout the network unchanged and is also
used to create a shortest path first (SPF) tree.
39
All Rights reserved For JUST
Router ID
The Router ID (RID) is an IP address used to identify the router
Cisco chooses the Router ID by using the highest IP address of all
configured loopback interfaces
If no loopback interfaces are configured with addresses, OSPF will
choose the highest IP address of all active physical interfaces.
You can manually assign the router ID.
The RID interface MUST always be up, therefore loopbacks are
preferred
40
All Rights reserved For JUST
Neighbours
Neighbours are two or more routers that have
an interface on a common network
E.g. two routers connected on a serial link
E.g. several routers connected on a common
Ethernet or Frame relay network
Communication takes place between / among
neighbours
neighbours form "adjacencies"
41
All Rights reserved For JUST
Adjacency
A relationship between two routers that permits
the direct exchange of route updates
Not all neighbours will form adjacencies
This is done for reasons of efficiency – more later
42
All Rights reserved For JUST
OSPF Design
Each router connects to the backbone called area 0, or the backbone area.
Routers that connect other areas to the backbone within an AS are called Area Border Routers (ABRs). One interface must
be in area 0.
OSPF runs inside an autonomous system, but can also connect multiple autonomous systems together. The router that
connects these ASes together is called an Autonomous System Boundary Router (ASBR).
43
All Rights reserved For JUST
OSPF Areas
An OSPF area is a grouping of contiguous networks and
routers
Share a common area ID
A router can be a member of more than one area (area
border router)
All routers in the same area have the same topology
database
When multiple areas exist, there must always be an area
0 (the backbone) to which other areas connect
44
All Rights reserved For JUST
Why areas?
Decreases routing overhead
Compare to multiple smaller broadcast domains instead
of one large one
Speeds convergence
Confines network instability (e.g. route "flapping") to
single area of the network
Adds considerably to the complexity of setting up OSPF
CCNA certification deals only with single-area OSPF
45
All Rights reserved For JUST
Area Terminology
46
All Rights reserved For JUST
Path Calculation
Changes to the topological database of a router trigger a
recalculation to re-establish the best route(s) to known
networks
Uses the SPF (shortest path first) algorithm developed
by a computer scientist named Dijkstra
This is done by each individual router using its detailed
"knowledge" of the whole network
Leads to rapid and accurate convergence
Based on detailed knowledge of every link in the area and
the OSPF "cost" of each
builds an OSPF tree with itself at the route
47
All Rights reserved For JUST
Terminology: Cost
Various criteria can be selected by the
administrator to determine the metric
Usually,
OSPF cost=108/bandwidth
Do not forget to
configure the
bandwidth`
command on serial
links to ensure
correct
default OSPF cost
48
All Rights reserved For JUST
Types of Neighbors
OSPF can be defined for three type of neighbors
• Broadcast Multi Access (BMA) ex- Ethernet
• Point to Point
• Non-Broadcast Multi Access (NBMA)
49
All Rights reserved For JUST
OSPF Network Types
50
All Rights reserved For JUST
Adjacencies
Point to Point all routers form adjacencies
BMA & NBMA one router is elected as DR
DR establish adjacency with every neighbor router
LSA updates are exchanged only to DR
DR is the router which has highest priority
All CISCO routers has priority 1
If priority is same then router id is seen
The RID is highest IP address of all interfaces
51
All Rights reserved For JUST
Point-to-Point Links
Usually a serial interface running either PPP
or HDLC
No DR or BDR election required
OSPF auto-detects this interface type
OSPF packets are sent using multicast 224.0.0.5
All routers form adjacencies
52
All Rights reserved For JUST
Multi-access Broadcast Network
• Generally LAN technologies like Ethernet and Token Ring
• DR and BDR selection required
• All neighbor routers form full adjacencies with the DR and
BDR only
• Packets to the DR use 224.0.0.6
• Packets from DR to all other routers use 224.0.0.5
53
All Rights reserved For JUST
Electing the DR and BDR
Hello packets are exchanged via IP multicast.
The router with the highest priority is
selected as the DR.
If Priority is same then Router ID is seen
Use the OSPF router ID as the tie breaker.
54
All Rights reserved For JUST
Terminology: DRs and BDRs
The designated
router (DR) is
responsible for
generating LSAs
on behalf of all
routers
connected to the
same segment
55
All Rights reserved For JUST
Basic OSPF Configuration
Router(config)# router ospf 1
The number 1 in this example is a process-id # that
begins an OSPF process in the router
More than one process can be launched in a router, but
this is rarely necessary
Usually the same process-id is used throughout the entire
network, but this is not required
The process-id # can actually be any value from 1 to
"very large integer“
The process-id # cannot be ZERO
56
All Rights reserved For JUST
Configuring OSPF Areas
After identifying the OSPF process, you need to identify the interfaces that
you want to activate OSPF communications
Lab_A#config t
Lab_A(config)#router ospf 1
Lab_A(config-router)#network 10.0.0.0 0.255.255.255
area ?
<0-4294967295> OSPF area ID as a decimal value
A.B.C.D OSPF area ID in IP address format
Lab_A(config-router)#network 10.0.0.0 0.255.255.255
area 0
Every OSPF network must have an area 0 (the backbone area) to which other
areas connect
So in a multiple area network, there must be an area 0
The wildcard mask represents the set of hosts supported by the network and
is really just the inverse of the subnet mask.
57
All Rights reserved For JUST
OSPF Configuration
OSPF Process ID number is irrelevant. It can be the same on every
router on the network
The arguments of the network command are the network number
(10.0.0.0) and the wildcard mask (0.255.255.255)
Wildcards - A 0 octet in the wildcard mask indicates that the
corresponding octet in the network must match exactly
A 255 indicates that you don’t care what the corresponding octet is in
the network number
A network and wildcard mask combination of 1.1.1.1 0.0.0.0 would
match 1.1.1.1 only, and nothing else.
The network and wildcard mask combination of 1.1.0.0 0.0.255.255
would match anything in the range 1.1.0.0–1.1.255.255
58
All Rights reserved For JUST
OSPF Configuration -1
S0 S1
20.0.0.2 30.0.0.1
R2
R1 R3
S0
S0 20.0.0.1
30.0.0.2 40.0.0.1
E0
10.0.0.1 E0
40.0.0.2
10.0.0.2
A B
59
All Rights reserved For JUST
OSPF Configuration -1
S0 S1
20.0.0.2 30.0.0.1
R2
R1 R3
S0
S0
30.0.0.2 40.0.0.1
E0
10.0.0.1 E0 20.0.0.1
40.0.0.2
10.0.0.2
A B
R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router ospf 1
R1(config-router)#network 10.0.0.0 0.255.255.255 area 0
R1(config-router)#network 20.0.0.0 0.255.255.255 area 0
R1(config-router)#^Z
60
All Rights reserved For JUST
OSPF Configuration -2
S0 S1
200.0.0.8/30
200.0.0.12/30
R2
R1 R3
S0
S0
E0
E0
200.0.0.16/28 200.0.0.32/27
A B
61
All Rights reserved For JUST
OSPF Configuration -2
S0 S1
200.0.0.10 200.0.0.13
255.255.255.252 R2 255.255.255.252
R1 R3
S0
S0 200.0.0.9 200.0.0.14 200.0.0.33
E0
200.0.0.17 E0
255.255.255.224
255.255.255.240 200.0.0.18 200.0.0.34
A B
62
All Rights reserved For JUST
OSPF Configuration -2
S0 S1
200.0.0.10 200.0.0.13
255.255.255.252 R2 255.255.255.252
R1 R3
S0
S0 200.0.0.9
200.0.0.14 200.0.0.33
E0
200.0.0.17 E0
255.255.255.224
255.255.255.240 200.0.0.18 200.0.0.34
A B
R3#config t
R1#config t Enter configuration commands, one per line. End with
Enter configuration commands, one per line. End with CNTL/Z.
CNTL/Z. R3(config)#router ospf 1
R1(config)#router ospf 1 R3(config-router)#network 200.0.0. 32 0.0.0.31 area 0
R1(config-router)#network 200.0.0.16 0.0.0.15 area 0 R3(config-router)#network 200.0.0. 12 0.0.0.3 area 0
R1(config-router)#network 200.0.0. 8 0.0.0.3 area 0 R3(config-router)#^Z
R1(config-router)#^Z
63
All Rights reserved For JUST
OSPF and Loopback Interfaces
Configuring loopback interfaces when using the OSPF routing
protocol is important
Cisco suggests using them whenever you configure OSPF on a router
Loopback interfaces are logical interfaces, which are virtual,
software-only interfaces; they are not real router interfaces
Using loopback interfaces with your OSPF configuration ensures
that an interface is always active for OSPF processes.
The highest IP address on a router will become that router’s RID
The RID is used to advertise the routes as well as elect the DR and
BDR.
If you configure serial interface of your router with highest IP
Address this Address becomes RID of t is the RID of the router
because e router
If this interface goes down, then a re-election must occur
It can have an big impact when the above link is flapping
64
All Rights reserved For JUST
Configuring Loopback Interfaces
R1#config t
Enter configuration commands, one per line. End
with CNTL/Z.
R1(config)#int loopback 0
R1(config-if)#ip address 172.16.10.1
255.255.255.255
R1(config-if)#no shut
R1(config-if)#^Z
R1#
65
All Rights reserved For JUST
Verifying OSPF Operation
Router#
show ip protocols
• Verifies the configured IP routing protocol processes,
parameters and statistics
Router#
show ip route ospf
• Displays all OSPF routes learned by the router
Router#
show ip ospf interface
• Displays the OSPF router ID, area ID and adjacency
information 66
All Rights reserved For JUST
Verifying OSPF Operation (Cont.)
Router#
show ip ospf
• Displays the OSPF router ID, timers, and statistics
Router#
show ip ospf neighbor [detail]
• Displays information about the OSPF neighbors,
including Designated Router (DR) and Backup
Designated Router (BDR) information on broadcast
networks
67
All Rights reserved For JUST
The show ip route ospf Command
RouterA# show ip route ospf
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,
B - BGP, D - EIGRP, EX - EIGRP external, O - OSPF,
IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, E - EGP, i - IS-IS, L1 - IS-IS
level-1, L2 - IS-IS level-2, * - candidate default
Gateway of last resort is not set
10.0.0.0 255.255.255.0 is subnetted, 2 subnets
O 10.2.1.0 [110/10] via 10.64.0.2, 00:00:50, Ethernet0
68
All Rights reserved For JUST
The show ip ospf interface Command
RouterA# show ip ospf interface e0
Ethernet0 is up, line protocol is up
Internet Address 10.64.0.1/24, Area 0
Process ID 1, Router ID 10.64.0.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DROTHER, Priority 1
Designated Router (ID) 10.64.0.2, Interface address 10.64.0.2
Backup Designated router (ID) 10.64.0.1, Interface address 10.64.0.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:04
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 10.64.0.2 (Designated Router)
Suppress hello for 0 neighbor(s)
69
All Rights reserved For JUST
The show ip ospf neighbor Command
RouterB# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.64.1.1 1 FULL/BDR 00:00:31 10.64.1.1 Ethernet0
10.2.1.1 1 FULL/- 00:00:38 10.2.1.1 Serial0
70
All Rights reserved For JUST
show ip ospf neighbor detail
show ip ospf database
71
All Rights reserved For JUST
Setting Priority for DR Election
Router(config-if)#
ip ospf priority number
This interface configuration command assigns the OSPF
priority to an interface.
Different interfaces on a router may be assigned different
values.
The default priority is 1. The range is from 0 to 255.
0 means the router is a DROTHER; it can’t be the DR or
BDR.
72
All Rights reserved For JUST
Question & Answer
73
All Rights reserved For JUST