Tuesday, October 20, 2009

CCNA2 Chapter 10-11 note

Chap 10 Link state protocol

The IP link-state routing protocols are shown in the figure:
Open Shortest Path First (OSPF)
Intermediate System-to-Intermediate System (IS-IS)

Basic OSPF operations can be configured with a router ospfprocess-id command and a network statement.

Each router floods the LSP to all neighbors, who then store all LSPs received in a database

Each router learns about its own links, its own directly connected networks

the interface must be properly configured with an IP address and subnet mask and the link must be in the up state

An LSP only needs to be sent:
During initial startup of the router or of the routing protocol process on that router
Whenever there is a change in the topology, including a link going down or coming up, or a neighbor adjacency being established or broken

Note: The actual SPF algorithm determines the shortest path as it is building the SPF tree.

Note: OSPF routers do flood the own link-states every 30 minutes. This is known as a paranoid update and is discussed in the following chapter. Also, not all distance vector routing protocols send periodic updates. RIP and IGRP send periodic updates; however, EIGRP does not.

when there is a change in the topology, only those routers in the affected area receive the LSP and run the SPF algorithm.

Link-state routing protocols typically require more memory, more CPU processing, and at times more bandwidth than distance vector routing protocols.
1. Each router learns about its own directly connected networks.

2. Each router is responsible for "saying hello" to its neighbors on directly connected networks.

3. Each router builds a Link-State Packet (LSP) containing the state of each directly connected link.

4. Each router floods the LSP to all neighbors, who then store all LSPs received in a database.

5. Each router uses the database to construct a complete map of the topology and computes the best path to each destination network.

Each router determines its own link-states and floods the information to all other routers in the area. As a result, each router builds a link-state database (LSDB) containing the link-state information from all other routers. Each router will have identical LSDBs. Using the information in the LSDB, each router will run the SPF algorithm. The SPF algorithm will create an SPF tree, with the router at the root of the tree. As each link is connected to other links, the SPF tree is created. Once the SPF tree is completed, the router can determine on its own the best path to each network in the tree.

link-state routing protocol will faster convergence (EIGRP is an expeption)


Chapter 11 OSPF

By default, OSPF Hello packets are sent every 10 seconds on multiaccess and point-to-point segments and every 30 seconds on non-broadcast multiaccess (NBMA) segments (Frame Relay, X.25, ATM).

In most cases, OSPF Hello packets are sent as multicast to an address reserved for ALLSPFRouters at

The Dead interval is the period, expressed in seconds, that the router will wait to receive a Hello packet before declaring the neighbor "down." Cisco uses a default of four times the Hello interval. For multiaccess and point-to-point segments, this period is 40 seconds. For NBMA networks, the Dead interval is 120 seconds

To reduce the amount of OSPF traffic on multiaccess networks, OSPF elects a Designated Router (DR) and Backup Designated Router (BDR).

An LSU contains one or more LSAs and either term can be used to refer to link-state information propagated by OSPF routers.

OSPF is enabled with the router ospf process-id global configuration command. The process-id is a number between 1 and 65535 and is chosen by the network administrator. The process-id is locally significant, which means that it does not have to match other OSPF routers in order to establish adjacencies with those neighbors. This differs from EIGRP. The EIGRP process ID or autonomous system n-mber does need to match for two EIGRP neighbors to become adjacent.

R1(config)#router ospf 1

Router(config-router)#network network-address wildcard-mask area area-id

#network area 0

Unlike EIGRP, however, OSPF requires the wildcard mask

Although any area-id can be used, it is good practice to use an area-id of 0 with single-area OSPF.

The OSPF router ID is used to uniquely identify each router in the OSPF routing domain. A router ID is simply an IP address. Cisco routers derive the router ID based on three criteria and with the following precedence:

1. Use the IP address configured with the OSPF router-id command.

2. If the router-id is not configured, the router chooses highest IP address of any of its loopback interfaces.

3. If no loopback interfaces are configured, the router chooses highest active IP address of any of its physical interfaces.

R3:, which is higher than either or

One command you can use to verify the current router ID is show ip protocols.

Router(config)#interfaceloopback number
Router(config-if)#ip addressip-address subnet-mask

Router(config)#interface loopback 0
Router(config-if)#ip add

The advantage of using a loopback interface is that - unlike physical interfaces - it cannot fail. There are no actual cables or adjacent devices on which the loopback interface depends for being in the up state.

Router(config)#router ospfprocess-id

Modifying the Router ID

The router ID is selected when OSPF is configured with its first OSPF network command. If the OSPF router-id command or the loopback address is configured after the OSPF network command, the router ID will be derived from the interface with the highest active IP address.

The router ID can be modified with the IP address from a subsequent OSPF router-id command by reloading the router or by using the following command:

Router#clear ip ospf process

R1#show ip ospf neighbor
command can be used to verify that the router has formed an adjacency with its neighboring routers

Two routers may not form an OSPF adjacency if:
The subnet masks do not match, causing the routers to be on separate networks.
OSPF Hello or Dead Timers do not match.
OSPF Network Types do not match.
There is a missing or incorrect OSPF network command.

The SPF algorithm is CPU-intensive and the time it takes for calculation depends on the size of the area. The size of an area is measured by the number of routers and the size of the link-state database.

A network that cycles between an up state and a down state is referred to as a flapping link. A flapping link can cause OSPF routers in an area to constantly recalculate the SPF algorithm, preventing proper convergence. To minimize this problem, the router waits 5 seconds (5000 msecs) after receiving an LSU before running the SPF algorithm. This is known as the SPF schedule delay. In order to prevent a router from constantly running the SPF algorithm, there is an additional Hold Time of 10 seconds (10000 msecs). The router waits 10 seconds after running the SPF algorithm before rerunning the algorithm again.

#show ip protocols
#show ip ospf
#show ip ospf interface serial /0/0/0

OSPF may have different Hello and Dead intervals on various interfaces, but for OSPF routers to become neighbors, their OSPF Hello and Dead intervals must be identical. For example, in the figure, R1 is using a Hello interval of 10 and a Dead interval of 40 on the Serial 0/0/0 interface. R2 must also use the same intervals on its Serial 0/0/0 interface or the two routers will not form an adjacency.

Unlike RIPv2 and EIGRP, OSPF does not automatically summarize at major network boundaries.

Loopback interfaces counts as a directed connected network as it is not advertise in OSPF

OSPF metric
The reference bandwidth defaults to 10 to the 8th power, 100,000,000 bps or 100 Mbps. This results in interfaces with a bandwidth of 100 Mbps and higher having the same OSPF cost of 1. The reference bandwidth can be modified to accommodate networks with links faster than 100,000,000 bps (100 Mbps) using the OSPF command auto-cost reference-bandwidth

The cost of an OSPF route is the accumulated value from one router to the destination network.

Cisco routers, the bandwidth value on many serial interfaces defaults to T1 (1.544 Mbps). However, some serial interfaces may default to 128 kbps.

Never assume that OSPF is using any particular bandwidth value. Always check the default value with the show interface command.

show interface command to view the bandwidth value used for an interface

Router(config-if)#bandwidth bandwidth-kbps

The figure shows the bandwidth commands used to modify the costs of all the serial interfaces in the topology.


R1(config-if)#ip ospf cost 1562

The main difference between the two commands is that the bandwidth command uses the result of the cost calculation to determine the cost of the link. The ip ospf cost command bypasses this calculation by directly setting the cost of the link to a specific value.

Multiaccess networks can create two challenges for OSPF regarding the flooding of LSAs:

1. Creation of multiple adjacencies, one adjacency for every pair of routers.

2. Extensive flooding of LSAs (Link-State Advertisements).

The solution to managing the number of adjacencies and the flooding of LSAs on a multiaccess network is the Designated Router (DR).

DROthers only send their LSAs to the DR and BDR using the multicast address (ALLDRouters - All DR routers).

The end result is that there is only one router doing all of the flooding of all LSAs in the multiaccess network.

How do the DR and BDR get elected? The following criteria are applied:

1. DR: Router with the highest OSPF interface priority.

2. BDR: Router with the second highest OSPF interface priority.

3. If OSPF interface priorities are equal, the highest router ID is used to break the tie.

When two DROther routers form a neighbor adjacency, the neighbor state is displayed as 2WAY.

The DR and BDR election process takes place as soon as the first router with an OSPF enabled interface is active on the multiaccess network. This can happen when the routers are powered-on or when the OSPF network command for that interface is configured.

If a new router enters the network after the DR and BDR have been elected, it will not become the DR or the BDR even if it has a higher OSPF interface priority or router ID than the current DR or BDR. The current DR and BDR must both fail before the new router can be elected DR or BDR.

A previous DR does not regain DR status if it returns to the network.

So, how do you make sure that the routers you want to be DR and BDR win the election? Without further configurations, the solution is to either:
Boot up the DR first, followed by the BDR, and then boot all other routers, or
Shut down the interface on all routers, followed by a no shutdown on the DR, then the BDR, and then all other routers.

Instead of relying on the router ID to decide which routers are elected the DR and BDR, it is better to control the election of these routers with the ip ospf priority interface command.

Router(config-if)#ip ospf priority {0 - 255}

But if you change the default value from 1 to a higher value, the router with the highest priority will become the DR and the router with the next highest priority will become the BDR. A value of 0 makes the router ineligible to become a DR or BDR.

After doing a shutdown and a no shutdown on the FastEthernet 0/0 interfaces of all three routers, we see the result of the change of OSPF interface priorities.

in OSPF terminology, the router located between an OSPF routing domain and a non-OSPF network is called the Autonomous System Boundary Router (ASBR).

Static Default Configuration

R1(config)#ip route loopback 1

Like RIP, OSPF requires the use of the default-information originate command to advertise the static

Therefore, 100,000,000 is the default bandwidth referenced when the actual bandwidth is converted into a cost metric.

The reference bandwidth can be modified to accommodate these faster links by using the OSPF command auto-cost reference-bandwidth.

R1(config-router)#auto-cost reference-bandwidth ?
1-4294967 The reference bandwidth in terms of Mbits per second

R1(config-router)#auto-cost reference-bandwidth 10000

Router(config-if)#ip ospf hello-interval  seconds
Router(config-if)#ip ospf dead-interval seconds

No comments:

Post a Comment