OSPF and EIGRP Concepts and Configuration
OSPF and EIGRP Concepts and Configuration
OSPF and EIGRP Concepts and Configuration
• Link state protocols advertise a large amount of topological information about the network (tells
what every metric is for every link in the network)
• Routers must calculate the metric (using Shortest path First Algorithm)
2. Each router uses a reliable protocol to exchange topology information in its topology database.
3. Each router places the learned topology information in its topology database.
4. Each router then runs the SPF algorithm against its own topology database to calculate the best routes to
each subnet in the database.
5. Each router finally places the best route to each subnet in the IP routing table.
OSPF Topology Database: Consists of lists of subnet numbers (links), list of routers (and links they are
connected to).
-> Uniquely identifier each router in this database using OSPF Router ID (RID)
To select the RID
• The router first checks for any loopback interfaces that are up, and chooses the highest numeric
IP address of those.
• If no loopback exists, router chooses highest IP address from interfaces that are up and up.
Each Router chooses RID when OSPY is initialized (during initial loading of IOS). If other interfaces come up
after this, not used unless clear ip ospf process is issued.
Meeting OSPF Neighbors: Once router has assigned itself a RID, and some of its interfaces are up, the
router is ready to meet its neighbors (connected routers).
• To confirm that a Hello Packet was received, next Hello Message will include the sender’s RID
within the list of neighbors.
-> Once router sees its RID included, two-way state achieved, and more detailed information can be
exchanged.
Sometimes Designated Routers (DR) are required before sending Database Description (DD) packets.
After DR is elected, all updates flow through the Designated Router (DR). This means that the DR collects
and distributes the routing updates to alleviate OSPF update congestion.
• Non-broadcast Multiaccess (NBMA), for frame relay, sometimes needs DR, sometimes doesn’t.
Has 5 different variations, configured with ip ospf network [type] command
** Since DR’s are so important, loss of one could cause delay in convergence, so Backup DR (BDR) is
also needed. **
Electing The Designated Router
To elect, neighboring routers hold an election, and look at two fields in the Hello Packet:
* Router that sends the highest OSPF priority becomes DR
* If there is a tie, the highest RID wins.
Other Notes:
* Priority setting of 0 means router will never be DR
* Range of valid priority values is 1-255 (to become a DR)
* If DR is elected, then another router comes online with a higher priority, this router will not become DR until
both the DR and BDR fail.
2. DR relays these messages to 224.0.0.5 (BDR does not forward, only receives)
3. Once router has exchanged its entire link state database, transition to Full State
Steady-State Operation: If Hello Interval is not received for [dead interval] amount of time, the router
believes the neighbor has failed.
Loop Avoidance: Link state does not use SPF algorithm, but rather it relies on router broadcasting downed
link immediately. This is the main reason for fast convergence time (distance vector uses hold time, split
horizon, etc, while link state does not).
Scaling OSPF: If network has many routers (~50 or more, a few hundred subnets), would result in:
* Slow convergence time
* Memory shortages/processor overloading
** Note: doesn’t change of subnets know, just decrease of bytes/require memory to process updates **
RIP = public
Public/Proprietary? OSPF = public
IGRP = Cisco proprietary
EIGRP has some features that act like distance vector protocols, and some that act like link-state protocols.
Similarities Differences
Metric’s identical (EIGRP just scales by EIGRP can exchange for Novel IPX and AppleTalk, as well as
multiplying by 256) IP
EIGRP Processes and Tables: Follows three general steps to be able to add routes to routing table:
1. EIGRP neighbor table: Routers discover other EIGRP routers that are attached to same subnet, form a
neighbor relationship and keep a list in this table.
a. show ip eigrp neighbor
2. EIGRP topology table: Exchange of network topology information with known neighbors.
a. show ip eigrp topology
3. IP routing table: EIGRP analyzes topology information, puts lowest metric routes in this table.
a. show ip route -or- show ip route eigrp
** EIGRP could have up to 9 tables, since it supports IP, IPX, and AppleTalk **
Hello Messages: Used to perform neighbor discovery, continually sent to notice when connectivity has
failed.
• Routes with feasible successor can be used immediately after route fails
• Routes without on require EIGRP to perform Query and Response process to confirm that no loop
exists.
Successors are in topology table, and are the best route (the route with lowest metric, which is also in
routing table).
Feasible Successors are in topology table, and are placed when the neighbor has a lower metric for its
route.
Diffusing Update Algorithm (DUAL) is used in query and reply process, when both successor and feasible
successor fail. Sends query to confirm route exists, reply verifies route.
EIGRP Compared
Converges Quickly Y N Y
Bandwidth/delay metric Y Y N
Public Standard N N Y
IP Configuration Commands
auto-cost reference bandwidth Router subcommand that sets the numerator in formula to calculate
[number] cost.
ip ospf network [type] Interface subcommand that defines the OSPF network type.
Command Description
show ip route [ip address] Shows entire routing table, or subset if parameters entered.
show ip protocols Shows routing protocol parameters and current timer values.
show ip ospf interface List the area in which the router resides, and adjacent neighbors.
show ip ospf neighbor Lists neighbors and current status with neighbors, per interface.
debug ip ospf events Issues log messages for each OSPF packet.
debug ip ospf packet Issues log messages describing the contents of all OSPF packets.
debug ip ospf hello Issues log messages describing Hellos and Hello failures.
OSPF Single-Area Configuration
router ospf 1
network 10.0.0.0 0.255.255.255 area 0
Network : What interfaces you want to include in OSPF configuration . Here 10.0.0.0
Wildcard Mask: If bit set to 1, "don’t care" bit (and 0 = include) . Here 0.255.255.255
Area : What area this router is in. Here area 0
router ospf 1
network 10.1.1.1 0.0.0.0 area 0
network 10.1.4.1 0.0.0.0 area 1
network 10.1.6.1 0.0.0.0 area 0
Useful Commands
show ip ospf interface ->Details IP address, area , Router ID, Hello/Dead Interval, etc. for all interfaces
show ip route -> Shows all routes known by the router (C – Connected, O – OSPF)
Remember that the RID is that router’s highest IP address on a physical interface when OSPF starts running.
Alternatively, if a loopback interface has been configured, OSPF uses the highest IP address on a loopback
interface for the RID, even if that IP address is lower than some physical interface’s IP address.
OSPF Troubleshooting
* Run debugging:
debug ip ospf hello -> Output shows mismatched Hello interval
EIGRP Configuration
Configured exactly like IGRP, just switch "igrp" with "eigrp" in commands.
Command Description
show ip eigrp topology Lists RIGRP topology table, including feasible successors/successors.