© 2006 Cisco Systems, Inc. All rights reserved. ICND v Determining IP Routes Enabling OSPF
© 2006 Cisco Systems, Inc. All rights reserved. ICND v Outline Overview OSPF Features OSPF and Distance Vector Routing Protocol Comparison Hierarchical Routing Shortest Path First Algorithm Single-Area OSPF Configuration Loopback Interfaces OSPF Configuration Verification OSPF Configuration Troubleshooting Summary
© 2006 Cisco Systems, Inc. All rights reserved. ICND v Introducing OSPF Open standard Shortest path first (SPF) algorithm Link-state routing protocol (vs. distance vector)
© 2006 Cisco Systems, Inc. All rights reserved. ICND v OSPF as a Link-State Protocol OSPF propagates link-state advertisements rather than routing table updates. –Link = router interface –State = description of an interface and its relationship to neighboring routers LSAs are flooded to all OSPF routers in the area. The OSPF link-state database is pieced together from the LSAs generated by the OSPF routers. OSPF uses the SPF algorithm to calculate the shortest path to a destination.
© 2006 Cisco Systems, Inc. All rights reserved. ICND v OSPF Hierarchical Routing Consists of areas and autonomous systems Minimizes routing update traffic
© 2006 Cisco Systems, Inc. All rights reserved. ICND v Shortest Path First Algorithm Places each router at the root of a tree and calculates the shortest path to each destination based on the cumulative cost Cost = 10 8 /bandwidth (bps)
© 2006 Cisco Systems, Inc. All rights reserved. ICND v Configuring Single-Area OSPF Router(config-router)# network wildcard-mask area area-id Assigns networks to a specific OSPF area Router(config)# router ospf process-id Defines OSPF as the IP routing protocol
© 2006 Cisco Systems, Inc. All rights reserved. ICND v OSPF Configuration Example
© 2006 Cisco Systems, Inc. All rights reserved. ICND v Router ID Number by which the router is known to OSPF Default: The highest IP address on an active interface at the moment of OSPF process startup Can be overridden by a loopback interface: Highest IP address of any active loopback interface Can be set manually using the router-id command Configuring Loopback Interfaces
© 2006 Cisco Systems, Inc. All rights reserved. ICND v Verifying the OSPF Configuration Router# show ip protocols Verifies that OSPF is configured Router# show ip route Displays all the routes learned by the router Router# show ip route Codes: I - IGRP derived, R - RIP derived, O - OSPF derived, C - connected, S - static, E - EGP derived, B - BGP derived, E2 - OSPF external type 2 route, N1 - OSPF NSSA external type 1 route, N2 - OSPF NSSA external type 2 route Gateway of last resort is to network O E [160/5] via , 0:01:00, Ethernet2 E [200/128] via , 0:02:22, Ethernet2 O E [160/5] via , 0:00:59, Ethernet2 O E [160/5] via , 0:00:59, Ethernet2 E [200/128] via , 0:02:22, Ethernet2...
© 2006 Cisco Systems, Inc. All rights reserved. ICND v Router# show ip ospf interface Verifying the OSPF Configuration (Cont.) Displays area ID and adjacency information Router# show ip ospf interface ethernet 0 Ethernet 0 is up, line protocol is up Internet Address , Mask , Area AS 201, Router ID , Network Type BROADCAST, Cost: 10 Transmit Delay is 1 sec, State OTHER, Priority 1 Designated Router id , Interface address Backup Designated router id , Interface addr Timer intervals configured, Hello 10, Dead 60, Wait 40, Retransmit 5 Hello due in 0:00:05 Neighbor Count is 8, Adjacent neighbor count is 2 Adjacent with neighbor (Backup Designated Router) Adjacent with neighbor (Designated Router)
© 2006 Cisco Systems, Inc. All rights reserved. ICND v Verifying the OSPF Configuration (Cont.) Router# show ip ospf neighbor Displays OSPF neighbor information on a per-interface basis Router# show ip ospf neighbor ID Pri State Dead Time Address Interface FULL/DR 0:00: Ethernet FULL/DROTHER 0:00: Fddi FULL/DROTHER 0:00: Fddi FULL/DR 0:00: Fddi0
© 2006 Cisco Systems, Inc. All rights reserved. ICND v Verifying the OSPF Configuration (Cont.) Router# show ip ospf neighbor Neighbor , interface address In the area via interface Ethernet0 Neighbor priority is 1, State is FULL Options 2 Dead timer due in 0:00:32 Link State retransmission due in 0:00:04 Neighbor , interface address In the area via interface Fddi0 Neighbor priority is 5, State is FULL Options 2 Dead timer due in 0:00:32 Link State retransmission due in 0:00:03 Router# show ip ospf neighbor detail Neighbor , interface address In the area 0 via interface GigabitEthernet1/0/0 Neighbor priority is 1, State is FULL, 6 state changes DR is BDR is Options is 0x42 LLS Options is 0x1 (LR), last OOB-Resync 00:03:08 ago Dead timer due in 00:00:36 Neighbor is up for 00:09:46 Index 1/1, retransmission queue length 0, number of retransmission 1 First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0) Last retransmission scan length is 1, maximum is 1 Last retransmission scan time is 0 msec, maximum is 0 msec
© 2006 Cisco Systems, Inc. All rights reserved. ICND v OSPF debug Commands Router# debug ip ospf events OSPF:hello with invalid timers on interface Ethernet0 hello interval received 10 configured 10 net mask received configured dead interval received 40 configured 30 Router# debug ip ospf packet OSPF: rcv. v:2 t:1 l:48 rid: aid: chk:6AB2 aut:0 auk: Router# debug ip ospf packet OSPF: rcv. v:2 t:1 l:48 rid: aid: chk:0 aut:2 keyid:1 seq:0x0
© 2006 Cisco Systems, Inc. All rights reserved. ICND v Summary OSPF is an interior gateway protocol similar to IGRP, but based on link states rather than distance vectors. OSPF advertises information about each of its links rather than sending routing table updates like a distance vector protocol does. Hierarchical routing enables separation of a large internetwork into smaller internetworks, called areas. The SPF algorithm places each router at the root of a tree and calculates the shortest path to each destination based on the cumulative cost required to reach that destination.
© 2006 Cisco Systems, Inc. All rights reserved. ICND v Summary (Cont.) The router ospf command starts an OSPF routing process. The network command is used to associate addresses to an OSPF area. The interface loopback command is used to modify the OSPF router ID to a loopback address. Any one of a number of show commands can be used to display information about an OSPF configuration. The debug ip ospf events privileged EXEC command can be used to display information on OSPF-related events, such as adjacencies, flooding information, designated router selection, and SPF calculation.
© 2006 Cisco Systems, Inc. All rights reserved. ICND v