OSPF and EIGRP Concepts and Configuration
Distance vector protocols were designed to advertise just the basic routing information across the network to save bandwidth.
Link-state protocols advertise a large amount of topological information about the network, and the routers perform some CPU-intensive computation on the topological data. They even discover their neighbors before exchanging routing information.
The algorithm used to calculate routes with link-state protocols is called the Shortest Path First (SPF) algorithm.
OSPF sends several types of packets—link-state updates (LSUs) and Database Description (DD) packets—that contain topology information as well as individual link-state advertisements (LSAs). For instance, a link LSA describes a subnet number and mask, the cost (metric), and other information about the subnet. Also, OSPF uses a reliable protocol to exchange routing information, ensuring that lost LSU packets are retransmitted. So OSPF routers can know with certainty whether a neighbor has yet received all the LSAs when exchanging routing information.
Basic process of learning routes for the first time with OSPF goes something like this:
1. Each router discovers its neighbors on each interface. The list of neighbors is kept in a neighbor table.
2. Each router uses a reliable protocol to exchange topology information (LSAs) with its neighbors.
3. Each router places the learned topology information in its topology database.
4. Each router runs the SPF algorithm against its own topology database to calculate the best routes to each subnet in the database.
5. Each router places the best route to each subnet in the IP routing table.
Identifying OSPF Routers with a Router ID
To uniquely identify each router in the database, OSPF uses a concept called the OSPF router ID (RID). The end goal is to have a way to uniquely identify each router in the database, and to make sure that no two routers have the same RID to avoid confusion. So, OSPF has each router use one of the routers’ IP addresses, because the routers should not use duplicate IP addresses.
Of course, routers typically have several interfaces and several IP addresses. A Cisco router uses the following criteria to select its RID:
- ■ The router first looks for the existence of any loopback interfaces that are up. If so, the router picks the highest numeric IP address among the loopback interfaces
- ■ If no loopback is found, the router picks the highest numeric IP address from all its working (up and up) interfaces
Interface loopback interface-number command…
Meeting Neighbors by Saying Hello
The Hello messages themselves have the following features:
- ■ The Hello message follows the IP packet header, with the IP packet protocol type 89.
- ■ Hello packets are sent to multicast IP address 224.0.0.5, which is intended for all OSPFspeaking routers.
- ■ OSPF routers listen for packets sent to IP multicast address 224.0.0.5, in part hoping to receive Hello packets.
The Hello message includes the sending router’s RID, Area ID, Hello interval, dead interval, router priority, designated router, backup designated router, and a list of neighbors that the sending router already knows about on the subnet…
When Router A receives a Hello from Router B, Router A needs to somehow tell Router B that Router A got the Hello. To do so, Router A adds Router B’s RID to the list of OSPF neighbors inside the next Hello that Router A multicasts onto the network.
The following must match before a pair of routers will become neighbors:
- ■ Subnet mask used on the subnet
- ■ Subnet number (as derived using the subnet mask and each routers’ interface IP address)
- ■ Hello Interval
- ■ Dead Interval
- ■ OSPF Area ID
Reducing OSPF Overhead Using Designated Routers:
In some cases, a Designated Router (DR) must be elected for the subnet before Database Description (DD) packets, containing LSAs, can be exchanged between routers. DRs are always required on a LAN, and sometimes (depending on topology and configuration) required with Frame Relay and ATM.
The DR concept prevents overloading a subnet with too much OSPF traffic when many routers are on a subnet.
A router decides whether it needs to elect a DR, plus some other details of operation, based on an interface’s OSPF network type. For instance, a point-to-point link has a default OSPF network type of point-to-point, which does not require a DR. Similarly, LAN interfaces default to an OSPF network type of broadcast, which always requires a DR. For Nonbroadcast Multiaccess (NBMA) networks such as Frame Relay, OSPF allows for the configuration of five different variations of OSPF network types, with some options that require a DR, and with others that do not. (These types can be configured with the ip ospf network type command.)
OSPF includes the concept of a Backup DR (BDR) on each subnet…
With distance vector protocols, when a router fails to hear routing updates from a neighbor for some multiple of the update interval, the router believes the silent router has failed. The router then marks all routes it learned from the now-silent router as having an infinite metric.
Loop Avoidance
The SPF algorithm prevents loops as a natural part of the processing of the topology database with the SPF algorithm. Unlike distance vector protocols, link-state protocols do not need loop-avoidance features such as split horizon, poison reverse, and hold-down timers.
Scaling OSPF Through Hierarchical Design
■ a larger topology database requires more memory on each router.
■ processing the larger-topology database with the SPF algorithm requires processing power that grows exponentially with the size of the topology database.
■ a single interface status change (up to down or down to up) forces every router to run SPF again!
…
OSPF Areas: Using OSPF areas solves many, but not all,

Balanced Hybrid Routing Protocol and EIGRP Concepts :
EIGRP has some features that act like distance vector protocols and some that act like link-state protocols.
1. EIGRP routers discover other EIGRP routers that are attached to the same subnet, and then the routers form a neighbor relationship with each other. Each router keeps a list of the neighbors in its EIGRP neighbor table.
2. EIGRP then exchanges network topology information with known neighbors, placing the information in the EIGRP topology table. (There is no requirement for a DR or BDR concept like OSPF.)
3. EIGRP analyzes the topology information, and puts the lowest-metric routes into the IP routing table.
EIGRP actually works with three tables:
■ The EIGRP neighbor table—Viewed with the show ip eigrp neighbor command
■ The EIGRP topology table—Viewed with the show ip eigrp topology command
■ The IP routing table—Viewed with the show ip route or show ip route eigrp commands

EIGRP avoids loops by keeping some basic topological information but not full information .When a router learns multiple routes to the same subnet, it puts the best route in the routing table.
Failed routes that have an EIGRP feasible successor can be used immediately after the route fails. Failed routes without a feasible successor require EIGRP to use a Query and Response process to confirm that no loop exists before an alternate route can be used. Both processes result in fast convergence, typically quicker than 10 seconds, but the query and response process does take slightly longer.
EIGRP Successors and Feasible Successors:
Of the other suboptimal routes, some may be used immediately if the currently-best route fails, without fear of having a loop occur. EIGRP runs a simple algorithm to identify which routes could be used immediately after a route failure, without causing a loop.
EIGRP calls the best route (the route with the lowest metric) the successor. Any backup routes that could be used without causing a loop are called feasible successors.
The Query and Reply Process:
When a route fails and the route has no feasible successor, EIGRP uses a distributed algorithm called Diffusing Update Algorithm (DUAL). DUAL sends queries looking for a loop-free route to the subnet in question. When the new route is found, DUAL adds it to the routing table.
OSPF Configuration
The router ospf command has a parameter called the OSPF process-id. In some instances, you might want to
run multiple OSPF processes in a single router, so the router command uses the process-id to distinguish between the processes. Although the process-id used on the three routers is the same, the actual value is unimportant, and the numbers do not have to match on each router.
network 10.1.1.1 0.0.0.0 area 0
The OSPF network command matches interfaces differently than does the network command for RIP and IGRP. The OSPF network command includes a parameter called the wildcard mask.
The wildcard mask of 0.0.0.0 means that all 32 bits must be compared…
OSPF Configuration with Multiple Areas
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
ip ospf cost x interface subcommand…
If you do not set an interface’s cost, IOS defaults to use the formula 108 / bandwidth, where bandwidth is the interface’s bandwidth.
EIGRP Configuration
router eigrp autonomous-system(The range of valid AS numbers is 1 through 65,535, as is the range of valid Process IDs with the router ospf command)
network network-number
IGRP to EIGRP Migration
To make migration simple, Cisco created a feature of EIGRP called automatic redistribution:ex…
