Nov 22, 2011

Abstract of CCNA study guide-30 - OSPF 4


Troubleshooting OSPF
This section will have you verify sample OSPF configurations and configuration outputs in order to troubleshoot, maintain, and fix OSPF-related issues.
Problem 1:
If you see a configuration as shown here, you must know that there is no way a router will accept this input because the wildcard is incorrect:
Router(config)#router ospf 1
Router(config-router)#network 10.0.0.0 255.0.0.0 area 0
This would be correct statement:
Router(config)#router ospf 1
Router(config-router)#network 10.0.0.0 0.255.255.255 area 0

Problem 2:
look at a figure and determine which of the routers will become the designated router of the area. 
 All the router OSPF priorities are at the default.
Notice the RIDs of each router. The routers with the highest RIDs are routers A and B, since they have the highest IP addresses. RouterB should be the DR and RouterA should be the BDR. Okay, now here’s the thing: Since elections do not occur on point-to-point links by default, RouterB is the best answer.

Problem 3:
Let’s use another command to verify an OSPF configuration: the show ip ospf interface command. Look at the following output for routers A and B and see if you can determine why the two directly connected routers cannot establish an adjacency:
RouterA#sh ip ospf interface e0/0
Ethernet0/0 is up, line protocol is up
Internet Address 172.16.1.2/16, Area 0
Process ID 2, Router ID 172.126.1.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 172.16.1.2, interface address 172.16.1.1
No backup designated router on this network
Timer intervals configured, Hello 5, Dead 20, Wait 20, Retransmit 5
RouterB#sh ip ospf interface e0/0
Ethernet0/0 is up, line protocol is up
Internet Address 172.16.1.1/16, Area 0
Process ID 2, Router ID 172.126.1.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 172.16.1.1, interface address 172.16.1.2
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

Everything in the two outputs looks pretty good, except that the Hello and Dead timers are not the same. RouterA has Hello and Dead timers of 5 and 20, and RouterB has Hello and Dead timers of 10 and 40, which are the default timers for OSPF.
Problem 4:
Take a look at the network shown in Figure 7.8 with four routers and two different routing protocols.

If all parameters are set to default and redistribution is not configured, which path do you think RouterA will use to reach RouterD? Since IGRP has an AD of 100 and OSPF has an AD of 110, RouterA will send packets to RouterD through RouterC.
Problem 5:
Study Figure 7.9 carefully. You are running OSPF on the routers and an ISDN link provides connectivity to the remote sales office.

What type of route should be configured on the Corporate router to connect to the sales office’s remote network while minimizing network overhead on the ISDN link as shown in Figure 7.9?
The only way we can do that is to create a static route on the Corporate router to connect to the remote network; anything else would be too bandwidth intensive.

Configuring EIGRP and OSPF Summary Routes
This section will provide you with the commands to summarize both EIGRP and OSPF.

Figure 7.10 shows six networks with four block sizes of 4 (WAN links) and two block sizes of 8 (LAN connections). The network address used is 192.168.10.64 and with a block size of 32, the mask would be 255.255.255.224. On the core router, for EIGRP we’ll place the summary route on Ethernet0, which will advertise our summary route out to the backbone network (10.10.10.0 network). This will stop all six of our networks from being advertised individually and instead advertise them as one route to the other routers in the internetwork. Here is the complete configuration of EIGRP on the core router:
Core#config t
Core(config)#router eigrp 10
Core(config-router)#network 192.168.10.0
Core(config-router)#network 10.0.0.0
Core(config-router)#no auto-summary
Core(config-router)#interface ethernet 0
Core(config-if)#ip summary-address eigrp 10 192.168.10.64 255.255.255.224

The above EIGRP configuration for autonomous system 10 advertises directly connected networks 192.168.10.0 and 10.0.0.0. Since EIGRP auto-summarizes at classful boundaries, you must use the no auto-summary command as well. The summary route we will advertise to the backbone network is placed on the interface connected to the backbone, not under the routing process. This summary route tells EIGRP to find all networks in the 192.168.10.64 network with a block size of 32 and advertise them as one route out interface E0. This means, basically, that any packet with a destination IP address of 192.168.10.64 through
192.168.10.95 will be forwarded via this summary route.
To summarize the contiguous network with OSPF we used with the EIGRP example we need to configure OSPF into multiple areas, as shown in Figure 7.11.
To summarize area 1 into the area 0 backbone, use the following command under the OSPF Process ID. Here is the complete OSPF configuration for the Core (backbone) router:
Core#config t
Core(config)#router ospf 1
Core(config-router)#network 192.168.10.64 0.0.0.3 area 1
Core(config-router)#network 192.168.10.68 0.0.0.3 area 1
Core(config-router)#network 10.10.10.0 0.0.0.255 area 0
Core(config-router)#area 1 range 192.168.10.64 255.255.255.224

The no auto-summary command is not needed since OSPF does not summarize at any boundary by default. The preceding OSPF configuration will summarize all the networks from area 1 to the backbone area as one entry of 192.168.10.64/27.

Abstract of CCNA study guide-29 - OSPF 3


OSPF DR and BDR Elections
 I need to expand the section on designated routers and backup designated routers.
To start with, I need to make sure you fully understand the terms neighbors and adjacencies again.
Neighbors
Two routers won’t become neighbors unless they agree on the following:
-        Area ID
-        Authentication OSPF allows for the configuration of a password for a specific area.
-        Hello and Dead intervals OSPF exchanges Hello packets on each segment. OSPF requires these intervals to be exactly the same between two neighbors. You can see these timers with the show ip ospf interface command.
Adjacencies
Adjacent routers are routers that go beyond the simple Hello exchange and proceed into the database exchange process.
In order to minimize the amount of information exchanged, OSPF elects one router to be a designated router (DR) and one router to be a backup designated router (BDR) on each multi-access segment.
The BDR is elected as a backup router in case the DR goes down. The idea behind this is that routers have a central point of contact for information exchange.

DR and BDR Elections
only segments that are broadcast and non-broadcast multi-access networks(such as Ethernet and Frame Relay) will perform DR and BDR elections. Point-to-point links, like a serial WAN for example, will not have a DR election process.
On a broadcast or non-broadcast multi-access network, the router with the highest OSPF priority on a segment will become the DR for that segment.
This priority is shown with the show ip ospf interface command, which is set to 1 by default. If all routers have the default priority set, the router with the highest Router ID (RID) will win.
The RID is determined by the highest IP address on any interface at the moment of OSPF startup. This can be overridden with a loopback (logical) interface.
If you set a router’s interface to a priority value of zero, that router won’t participate in the DR or BDR election on that interface.
OSPF and Loopback Interfaces
Loopback interfaces are logical interfaces, which are virtual, software-only interfaces. Using loopback interfaces with your OSPF configuration ensures that an interface is always active for OSPF processes.
By default, OSPF uses the highest IP address on any active interface at the moment of OSPF startup.
this can be overridden by a logical interface. The highest IP address of any logical interface will always become a router’s RID.

Configuring Loopback Interfaces
First, let’s see what the RID is on the Corp router with the show ip ospf command:
Corp#sh ip ospf
Routing Process "ospf 132" with ID 10.1.5.1
[output cut]
We can see that the RID is 10.1.5.1, or the serial 0/2/0 interface of the router. So let’s configure
a loopback interface using a completely different IP addressing scheme:
Corp(config)#int loopback 0
*Mar 22 01:23:14.206: %LINEPROTO-5-UPDOWN: Line protocol on Interface
Loopback0, changed state to up
Corp(config-if)#ip address 172.16.10.1 255.255.255.255
The IP scheme really doesn’t matter here, but each router has to be in a separate subnet. By using the /32 mask, we can use any IP address we want as long as the addresses are never the same on any two routers.

Let’s check into that by taking a look at the Corp’s RID:
Corp#sh ip ospf
Routing Process "ospf 132" with ID 10.1.5.1
What happened?
You should reboot the router or delete OSPF and re-create the database on your router to see the changes.
Now let’s look and see what our RID is:
Corp#sh ip ospf
Routing Process "ospf 132" with ID 172.16.1.1

there is one other way about adding a new RID for the router under the router ospf  process-id command instead?
Here’s an example of doing that on the 871W router:
871W#sh ip ospf
Routing Process "ospf 1" with ID 10.1.12.1
871W#config t
871W(config)#router ospf 1
871W(config-router)#router-id 172.16.10.5

Reload or use "clear ip ospf process" command, for this to take effect
871W(config-router)#do clear ip ospf process
Reset ALL OSPF processes? [no]: yes
871W(config-router)#do sh ip ospf
Routing Process "ospf 1" with ID 172.16.10.5

We changed the RID without reloading the router! But wait—remember, we didn’t set a loopback (logical interface) yet. So let’s try that now—let’s set a logical interface IP address, reload the router, and see if the loopback interface overrides the router-id command we just used:
871W(config-router)#int lo0
871W(config-if)#ip address 172.16.10.6 255.255.255.255
871W(config-if)#^Z
871W#reload
System configuration has been modified. Save? [yes/no]: y
Building configuration...
871W#sh ip ospf
Routing Process "ospf 1" with ID 172.16.10.5
Well, there’s our answer. A logical (loopback) interface will not override the router-id command, and we don’t have to reboot the router to make it take effect as the RID.

OSPF Interface Priorities
we can use priorities instead of logical addresses to force a certain router to become the DR or BDR in a network.
R2#config t
R2(config)#int f0/0
R2(config-if)#ip ospf priority ?
<0-255> Priority
R2(config-if)#ip ospf priority 2
All router interfaces default to a priority of 1, so by setting this interface to 2, I’ve ensured that it will automatically become the DR of the LAN segment. Setting an interface to 255 means that no one can beat your router!
Notice that: Even if you change the priority of the interface, the router will not become the DR of the LAN segment until both the existing DR and the BDR are shut down.
You can see your priority with the show ip ospf interface command:
R2(config-if)#do show ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 10.1.13.1/24, Area 0
Process ID 132, Router ID 172.16.30.1, Network Type BROADCAST,Cost:1
Transmit Delay is 1 sec, State UP, Priority 2

Notice that, we have three options to ensure that Router will be elected the DR for the LAN segment:
-        Configure the priority value of the interface of the router to a higher value than any other interface on the Ethernet network.
-        Configure a loopback interface on the Router with an IP address higher than any IP address on the other routers.
-        Change the priority value of Other Routers interfaces to zero.

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 ?
<1-65535>
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 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

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 (10.0.0.0) and the wildcard mask (0.255.255.255). 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 10.0.0.0 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:
_ 192.168.10.64/28
_ 192.168.10.80/28
_ 192.168.10.96/28
_ 192.168.10.8/30
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 192.168.10.0 0.0.0.255 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 192.168.10.64 0.0.0.15 area 0
Test(config-router)#network 192.168.10.80 0.0.0.15 area 0
Test(config-router)#network 192.168.10.96 0.0.0.15 area 0
Test(config-router)#network 192.168.10.8 0.0.0.3 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 192.168.10.64 0.0.0.7 area 0
Lab_A(config-router)#network 10.255.255.80 0.0.0.3 area 0

Lab_B#config t
Lab_B(config)#router ospf 1
Lab_B(config-router)#network 192.168.10.48 0.0.0.7 area 0
Lab_B(config-router)#network 10.255.255.80 0.0.0.3 area 0
Lab_B(config-router)#network 10.255.255.8 0.0.0.3 area 0

Lab_C#config t
Lab_C(config)#router ospf 1
Lab_C(config-router)#network 192.168.10.16 0.0.0.7 area 0
Lab_C(config-router)#network 10.255.255.8 0.0.0.3 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:
10.0.0.0/24 is subnetted, 12 subnets
O         10.1.11.0 [110/65] via 10.1.5.2, 00:01:31, Serial0/2/0
O         10.1.10.0 [110/65] via 10.1.5.2, 00:01:31, Serial0/2/0
O         10.1.6.0 [110/74] via 10.1.3.2, 00:01:32, Serial0/0/1
 [110/74] via 10.1.2.2, 00:01:32, Serial0/0/0
C          10.1.5.0 is directly connected, Serial0/2/0
C          10.1.4.0 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 10.1.5.1
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 10.1.5.1, 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 (10.1.5.1) (Process ID 132)
Router Link States (Area 0)
Link ID            ADV Router                Age                  Seq#                Checksum        Link count
10.1.5.1           10.1.5.1                       72                    0x80000002    0x00F2CA       9
10.1.7.1           10.1.7.1                       83                    0x80000004    0x009197        6
10.1.9.1           10.1.9.1                       73                    0x80000001    0x00DA1C      4

Net Link States (Area 0)
Link ID            ADV Router                Age                 Seq#                Checksum
10.1.11.2         10.1.12.1                     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 10.1.1.1/24, Area 0
Process ID 132, Router ID 10.1.5.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 10.1.5.1, Interface address 10.1.1.1
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
-Cost
- 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
10.1.11.1         0          FULL/ -            00:00:37                      10.1.5.2           Serial0/2/0
10.1.9.1           0          FULL/ -            00:00:34                      10.1.4.2           Serial0/1/0
10.1.7.1           0          FULL/ -            00:00:38                      10.1.3.2           Serial0/0/1
10.1.7.1                      0          FULL/ -            00:00:34                      10.1.2.2           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
10.1.5.1           0          FULL/ -            00:00:39                      10.1.5.1           Serial0/0/1
10.1.11.2         1          FULL/BDR      00:00:31                      10.1.11.2         FastEthernet0/1
871W#sh ip ospf nei
Neihbor ID      Pri        State                 Dead Time                   Address           Interface
10.1.11.1         1          FULL/DR         00:00:30                      10.1.11.1         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 10.1.5.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.1.1.1 0.0.0.0 area 0
10.1.2.1 0.0.0.0 area 0
10.1.3.1 0.0.0.0 area 0
10.1.4.1 0.0.0.0 area 0
10.1.5.1 0.0.0.0 area 0
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway Distance Last Update
10.1.11.1 110 00:28:53
10.1.11.2 110 00:28:53
10.1.9.1 110 00:28:53
10.1.7.1 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
Command
Description/Function
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