Nov 22, 2011

Abstract of CCNA study guide-28 - OSPF 2

Configuring OSPF
These two elements are the basic elements of OSPF configuration:
-        Enabling OSPF
-        Configuring OSPF areas
Enabling OSPF
The easiest way to configure OSPF is to just use a single area. Doing this requires a minimum of two commands.
Lab_A(config)#router ospf ?
A value in the range 1–65,535 identifies the OSPF Process ID. It’s a unique number on this router that groups a series of OSPF configuration commands under a specific running process. Different OSPF routers don’t have to use the same Process ID in order to communicate. It’s local value that essentially has little meaning, but it cannot start at 0; it has to start at 1.

Configuring OSPF Areas
After identifying the OSPF process, you need to identify:
-        The interfaces that you want to activate OSPF communications on
-        The area in which each resides.
-        The networks you’re going to advertise to others.
-        Wildcards that with used in the configuration.
Here’s an OSPF basic configuration example for you:
Lab_A#config t
Lab_A(config)#router ospf 1
Lab_A(config-router)#network 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 area 0

The areas can be any number from 0 to 4.2 billion. Don’t get these numbers confused with the Process ID, which is from 1 to 65,535.
The arguments of the network command are the network number ( and the wildcard mask ( The combination of these two numbers identifies the interfaces that OSPF will operate on. OSPF will use this command to find any interface on the router configured in the network, and it will place any interface it finds into area 0.

A quick review of wildcards: A 0 octet in the wildcard mask indicates that the corresponding octet in the network must match exactly. On the other hand, a 255 indicates that you don’t care what the corresponding octet is in the network number.

Wildcard Example
let’s take a quick peek at a harder OSPF network configuration to find out what our OSPF network statements would be if we were using subnets and wildcards.
You have a router with these four subnets connected to four different interfaces:
All interfaces need to be in area 0. Seems to me, the easiest configuration would be this:
Test#config t
Test(config)#router ospf 1
Test(config-router)#network area 0
But it’s not likely to cover the CCNA objectives for you! So let’s create a separate network statement for each interface using the subnet numbers and wildcards.
Test#config t
Test(config)#router ospf 1
Test(config-router)#network area 0
Test(config-router)#network area 0
Test(config-router)#network area 0
Test(config-router)#network area 0
when configuring wildcards, they’re always one less than the block size. A /28 is a block size of 16, so we’d add  network statement using the subnet number and then add a wildcard of 15 interesting octet. For the /30, which is a block size of 4, we’d use a wildcard of 3.
Let’s use Figure 7.5 as an example and configure that network with OSPF using wildcards

Lab_A#config t
Lab_A(config)#router ospf 1
Lab_A(config-router)#network area 0
Lab_A(config-router)#network area 0

Lab_B#config t
Lab_B(config)#router ospf 1
Lab_B(config-router)#network area 0
Lab_B(config-router)#network area 0
Lab_B(config-router)#network area 0

Lab_C#config t
Lab_C(config)#router ospf 1
Lab_C(config-router)#network area 0
Lab_C(config-router)#network area 0

Verifying OSPF Configuration
There are several ways to verify proper OSPF configuration and operation:
First let’s issue a show ip route command on the Corp router: is subnetted, 12 subnets
O [110/65] via, 00:01:31, Serial0/2/0
O [110/65] via, 00:01:31, Serial0/2/0
O [110/74] via, 00:01:32, Serial0/0/1
 [110/74] via, 00:01:32, Serial0/0/0
C is directly connected, Serial0/2/0
C is directly connected, Serial0/1/0
The Corp router shows the routes for our networks, with the O representing OSPF internal routes
Important note: OSPF can load-balance only across links of equal costs. It can’t load-balance across unequal-cost links as EIGRP can.
It’s time to show you all the OSPF verification commands that you need to know.
The show ip ospf Command
The show ip ospf command is used to display OSPF information for one or all OSPF processes running on the router. Information includes the Router ID, area information, SPF statistics, and LSA timer information:
Corp#sh ip ospf
Routing Process "ospf 132" with ID
Start time: 04:32:04.116, Time elapsed: 01:27:10.156
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
-------cut out --------------------
Notice the Router ID (RID) of, which is the highest IP address configured on the router.

The show ip ospf database Command
Using the show ip ospf database command will give you information about the number of routers in the internetwork (AS) plus the neighboring router’s ID (this is the topology database I mentioned earlier).
Unlike the show ip eigrp topology command, this command shows the “OSPF routers,” not each and every link in the AS as EIGRP does.
The output is broken down by area. Here’s a sample output, again from Corp:
Corp#sh ip ospf database
OSPF Router with ID ( (Process ID 132)
Router Link States (Area 0)
Link ID            ADV Router                Age                  Seq#                Checksum        Link count                        72                    0x80000002    0x00F2CA       9                        83                    0x80000004    0x009197        6                        73                    0x80000001    0x00DA1C      4

Net Link States (Area 0)
Link ID            ADV Router                Age                 Seq#                Checksum                     68                    0x80000001    0x00A337

The show ip ospf interface Command
The show ip ospf interface command displays all interface-related OSPF information.
Data is displayed about OSPF information for all interfaces or for specified interfaces. (I’ll bold some of the important things.)
Corp#sh ip ospf interface f0/1
FastEthernet0/1 is up, line protocol is up
Internet Address, Area 0
Process ID 132, Router ID, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID), Interface address
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:01
Supports Link-local Signaling (LLS)
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 0
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)

The following information is displayed by this command:
- Interface IP address
- Area assignment
- Process ID
- Router ID
- Network type
- Priority
- DR/BDR election information (if applicable)
- Hello and Dead timer intervals
- Adjacent neighbor information

The show ip ospf neighbor Command
The show ip ospf neighbor command is super-useful because it summarizes the pertinent OSPF information regarding neighbors and the adjacency state. If a DR or BDR exists, that information will also be displayed. Here’s a sample:
Corp#sh ip ospf neighbor
Neighbor ID     Pri        State                 Dead Time                   Address           Interface         0          FULL/ -            00:00:37                       Serial0/2/0           0          FULL/ -            00:00:34                       Serial0/1/0           0          FULL/ -            00:00:38                       Serial0/0/1                      0          FULL/ -            00:00:34                       Serial0/0/0
Let’s take a look at the R3 and 871W routers outputs:
R3#sh ip ospf neighbor
Neighbor ID     Pri        State                 Dead Time                   Address           Interface           0          FULL/ -            00:00:39                       Serial0/0/1         1          FULL/BDR      00:00:31                     FastEthernet0/1
871W#sh ip ospf nei
Neihbor ID      Pri        State                 Dead Time                   Address           Interface         1          FULL/DR         00:00:30                     Vlan1
Since there’s an Ethernet link (broadcast multi-access) on the Corp router, there’s going to be an election to determine who will be the designated router and who will be the non-designated router. The 871W became the designated router because it had the highest IP address on the network.
The reason that the Corp connections to R1, R2, and R3 don’t have a DR or BDR listed in the output is that, elections don’t happen on point-to-point links.

The show ip protocols Command
The show ip protocols command provides an excellent overview of the actual operation of all currently running protocols. Check out the output from the Corp router:
Corp#sh ip protocols
Routing Protocol is "ospf 132"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks: area 0 area 0 area 0 area 0 area 0
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway Distance Last Update 110 00:28:53 110 00:28:53 110 00:28:53 110 00:28:53
Distance: (default is 110)

From looking at this output, you can determine the OSPF Process ID, OSPF Router ID, type of OSPF area, networks and areas configured for OSPF, and the OSPF Router IDs of neighbors.

Debugging OSPF

TABLE 7 . 4 Debugging Commands for Troubleshooting OSPF
Debug ip ospf packet
Shows Hello packets being sent and received on your router
Debug ip ospf hello
Shows more detail than the debug ip ospf packet output
Debug ip ospf adj
Shows DR and DBR elections

No comments:

Post a Comment