Professional Documents
Culture Documents
Enabling OSPF
2002, Cisco Systems, Inc. All rights reserved. 2002, Cisco Systems, Inc. All rights reserved.
ICND v2.05-2
OSPF overview
Open Shortest Path First (OSPF) is a link-state routing protocol based on open standards. The most recent description is RFC 2328. The Open in OSPF means that it is open to the public and is non-proprietary.
ICND v2.05-3
OSPF terminology
ICND v2.05-4
Links
Token Ring
ICND v2.05-5
Token Ring
ICND v2.05-6
ICND v2.05-7
OSPF AreasExample
Area 3
Area 0 Area 2
Area 1
2002, Cisco Systems, Inc. All rights reserved. ICND v2.05-8
Cost = 10
Token Ring
Cost = 1785
Cost = 6
ICND v2.05-9
Token Ring
Adjacency database
2002, Cisco Systems, Inc. All rights reserved. ICND v2.05-10
Token Ring
Adjacency database
2002, Cisco Systems, Inc. All rights reserved.
Topological Database
ICND v2.05-11
Token Ring
Adjacency Database
Topological Database
Routing Table
Token Ring
BDR
ICND v2.05-13
Calculates the shortest Adds distance vectors from path to other routers router to router Event-triggered update: Frequent, periodic update: Slow convergence Passes copies routing tables to neighbor routers Use flat topology Fast to convergence Passes link-state routing updates to other routers Allow hierarchical design for large internetworks
ICND v2.05-14
C
4
2 D 1 E F G
1
E (3, C)
2002, Cisco Systems, Inc. All rights reserved.
F (5, E)
G (6, A)
ICND v2.05-16
ICND v2.05-17
ICND v2.05-18
Hellos elect DR and BDR to present segment Each router then forms adjacency with DR and BDR
2002, Cisco Systems, Inc. All rights reserved. ICND v2.05-19
ICND v2.05-21
ICND v2.05-22
5 steps of operation:
1. Establish router adjacencies. 2. Elect a DR and BDR (if necessary). 3. Discover routes.
OSPF Topologies
Broadcast Multiaccess
Point-to-Point
NBMA
X.25
Frame Relay
ICND v2.05-24
Broadcast Multiaccess
www.cisco.com
4-25 25
First step in OSPF operation is to establish router adjacencies RTB sends hello packets, advertising its own router ID highest IP address:10.6.0.1(no loopback)
ICND v2.05-26
Hello
A
afadjfjorqpoeru 39547439070713
Hello
Router ID Hello/dead intervals Neighbors Area-ID Router priority DR IP address BDR IP address Authentication password Stub area flag
DR
BDR
Hello
P=1
P=1
P=0
The router with the highest priority value is the DR. The router with the second highest priority value is the BDR. The default for the interface OSPF priority is 1. In case of a tie, the routers router ID is used.
2002, Cisco Systems, Inc. All rights reserved. ICND v2.05-28
On multi-access network, the exchange of routing information occurs between the DR or BDR and every other router on the network. Link partners on a point-to-point or pointto-multipoint network also engage in the exchange process.
2002, Cisco Systems, Inc. All rights reserved. ICND v2.05-29
Exchange Process
A
172.16.5.1/24 E0 172.16.5.2/24 E1
Down State
ICND v2.05-30
E0
172.16.5.1
afadjfjorqpoeru 39547439070713
Hello
No, I will start exchange because I have a higher router ID. Exchange State
Hello
afadjfjorqpoeru 39547439070713
DBD
DBD
DR E0 172.16.5.1
afadjfjorqpoeru 39547439070713
E0 172.16.5.3
afadjfjorqpoeru 39547439070713
LSAck
afadjfjorqpoeru 39547439070713
LSAck
LSR
LSU
Full State
2002, Cisco Systems, Inc. All rights reserved. ICND v2.05-32
10.2.2.0/24 B
FDDI
10.3.3.0/24 C
ICND v2.05-33
1 LSU
A B
ICND v2.05-34
2
DR
1 LSU
A B
ICND v2.05-35
2
DR
1 LSU
A B
3
LSU
ICND v2.05-36
Point-to-Point Neighborship Router dynamically detects its neighboring router using the Hello protocol No election: Adjacency is automatic as soon as the two routers can communicate OSPF packets are always sent as multicast 224.0.0.5
ICND v2.05-37
X.25
Frame Relay ATM
NBMA Topology
ICND v2.05-38
39
Point-to-Point Network
S0
10.64.0.1
10.2.1.2
10. 2.1.1 S1
<Output Omitted> <Output Omitted> interface Ethernet0 interface Ethernet0 ip address 10.64.0.2 255.255.255.0 ip address 10.64.0.1 255.255.255.0 ! ! interface Serial0 <Output Omitted> ip address 10.2.1.2 255.255.255.0 router ospf 1 <Output Omitted> network 10.0.0.0 0.255.255.255 area 0 router ospf 50 vicardmark network 10.2.1.2 0.0.0.0 area 0
network 10.64.0.2 0.0.0.0 area 0
ICND v2.05-42
OSPF networks, the default Hello interval is 10 seconds Dead interval is 40 seconds. On nonbroadcast networks, the default Hello interval is 30 seconds Dead interval is 120 seconds. These timers must be configured to match those of any neighboring router.
2002, Cisco Systems, Inc. All rights reserved. ICND v2.05-43
ICND v2.05-44
show ip protocols
show ip route
show ip ospf
Router#
clear ip route *
Displays router interaction during the hello, exchange, and flooding processes
ICND v2.05-47
R2#sh ip ospf int e0 Ethernet0 is up, line protocol is up Internet Address 192.168.0.12/24, Area 0 Process ID 1, Router ID 192.168.0.12, Network Type BROADCAST, Cost: 10 Transmit Delay is 1 sec, State DROTHER, Priority 1 Designated Router (ID) 192.168.0.11, Interface address 192.168.0.11 Backup Designated router (ID) 192.168.0.13, Interface address 192.168.0.13 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:04 Neighbor Count is 3, Adjacent neighbor count is 2 Adjacent with neighbor 192.168.0.13 (Backup Designated Router) Adjacent with neighbor 192.168.0.11 (Designated Router) Suppress hello for 0 neighbor(s)
ICND v2.05-48
Pri 1 1 1 1
State Dead Time Address 2WAY/DROTHER 00:00:31 192.168.0.13 FULL/BDR 00:00:38 192.168.0.14 2WAY/DROTHER 00:00:36 192.168.0.11 FULL/DR 00:00:38 192.168.0.12
Neighbor ID 192.168.0.11
Pri 1
State FULL/
Address 10.1.1.2
Interface Serial1
ICND v2.05-49
Net Link States (Area 0) Link ID 192.168.0.14 ADV Router 192.168.0.14 Age 812 Seq# 0x80000002 Checksum 0x4AC8
ICND v2.05-50
Displays router interaction during the hello, exchange, and flooding processes
2002, Cisco Systems, Inc. All rights reserved. ICND v2.05-51
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. 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.
ICND v2.05-52
Summary (Cont.)
Use the router ospf command to start an OSPF routing process and the network command to associate addresses to an OSPF area. You can use any one of a number of show commands to display information about an OSPF configuration. To display information on OSPF-related events, such as adjacencies, flooding information, designated router selection, and SPF calculation, use the debug ip ospf events privileged EXEC command.
2002, Cisco Systems, Inc. All rights reserved. ICND v2.05-53