Professional Documents
Culture Documents
Objectives
Identify the key features of link-state routing Explain how link-state routing information is maintained Discuss the link-state routing algorithm Examine the advantages and disadvantages of link-state routing Compare and contrast link-state routing with distance vector routing Enable OSPF on a router Configure a loopback address to set router priority Change OSPF route preference by modifying the cost metric
Objectives
Configure OSPF authentication Change OSPF timers Describe the steps to create and propagate a default route Use show commands to verify OSPF operation Configure the OSPF routing process Define key OSPF terms Describe the OSPF network types Describe the OSPF Hello protocol Identify the basics steps in the operation of OSPF
3
Distance RIP v1 and RIP Copies routing table to vector v2 neighbors Updates frequently Interrior Slow converge Gateway RIP v1 and RIP v2 use hop Routing count as metric Protocol (IGRP) View network from neighbors perspective Susceptible to routing loops Easy to configure and administrate
6
Link-stateOpen Shortest Use shortest path Path First Updates are event triggered (OSPF) Fast to converge
Send link-state packets to all network routers
Has common view of network Not as susceptible to routing loops Harder to configure Requires more memory and processing power than distance vector Consumes less bandwidth than
Uses the shortest path first (SPF) algorithm (Dijkstra algorithm) to calculate the shortest route to each network
The resulting SPF tree
Hello mechanism
Perth1 network
Perth2 network
P1
Hello
Hello
P2
Hello
Hello
P3
Hello
Perth3 network
Hello
P4
Hello Perth4 network
P1
Hell o Hell o
Hell o
P2
Hell o
Hell o Hell o
P3
Network 3
P4
Hell o Perth4 network
They are known collectively as shortest path first (SPF) protocols. They maintain a complex database of the network topology. They are based on the Dijkstra algorithm.
A
Cost=1
20 30 40 40 10 30 40
B C C B A C D
1 1 2 2 1 1 1
A
B
A
Cost=1 Cost=1
A A B B B B
Cost=1
Cost=1
Net 30
1
Net 40
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.
OSPF terminology
Links
Token Ring
Neighbors
Links
Token Ring
Area 1
Token Ring
Area 0
Cost = 10
Token Ring
Cost = 1785
Cost = 6
Token Ring
Adjacency database
2
Token Ring
Adjacency database
2
Topological Database
Token Ring
Adjacency Topological Routing Database Database Table Lists neighborsLists all routes Lists best routes
2
DR
Token Ring
BDR
View network topology from neighbors perspective Adds distance vectors from router to router Frequent, periodic update: Slow convergence
Gets common view of entire network topology Calculates the shortest path to other routers Event-triggered update: Fast to convergence
Passes copies routing Passes link-state tables to neighbor routers routing updates to other routers Use flat topology
2
Allow hierarchical
F (5, E)
G (6, A)
Hellos elect DR and BDR to present segment Each router then forms adjacency with DR
3
OSPF Topologies
Broadcast Multiaccess
Point-to-Point
NBMA
X.25
Frame Relay
Broadcast Multiaccess
www.cisco.com
4-39
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)
Hello
B B
A A
afadjfjorqpoeru 39547439070713
C C
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
On difference network have differ discover process. 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 point-tomultipoint network also engage in the exchange process.
4
Exchange Process
A
172.16.5.1/24 E0 172.16.5.2/24 E1
Down State
Router B Router B Neighbors List Neighbors List 172.16.5.1/24, int E1 172.16.5.1/24, int E1 I am router ID 172.16.5.2, and I see 172.16.5.1. Router A Neighbors List 172.16.5.2/24, int E0
Two-way State
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
4
DR E0 172.16.5.1
afadjfjorqpoeru 39547439070713
E0 172.16.5.3
afadjfjorqpoeru 39547439070713
LSAck
afadjfjorqpoeru 39547439070713
LSAck
LSR
LSU
Full State
10.2.2.0/24 B
F D D I
10.3.3.0/24 C
1 LSU
2
DR
1 LSU
Router A tells all OSPF DRs on 224.0.0.6 DR tells all others on 224.0.0.5
4
2
DR
1 LSU
3
LSU
Router A tells all OSPF DRs on 224.0.0.6 DR tells all others on 224.0.0.5
5
2
DR
3
LSU
Router A tells all OSPF DRs on 224.0.0.6 DR tells all others on 224.0.0.5
5
Yes
Yes
Is seq. # the same? No Is seq. # higher? No Send LSU with newer information to source End
Yes
Is seq. # the same? No Is seq. # higher? No Send LSU with newer information to source End
Yes
Go to A
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
5
X.25
Frame Relay ATM
NBMA Topology Single interface interconnects multiple sites NBMA topologies support multiple routers but without broadcasting capabilities
5
Point-to-Point Network B
S0 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 0router ospf 50 network 10.2.1.2 0.0.0.0 area 0 network 10.64.0.2 0.0.0.0 area 0
The priorities can be set to any value from 0 to 255 The command show ip ospf interface will display the interface priority value as well as other key information.
Cost is calculated using the formula 108/bandwidth, where bandwidth is expressed in bps. Bandwidth dividend is user configurable: Interface subcommand: bandwidth 64
6
The authentication key, known as a password, is a shared secret between the routers. The password can be up to eight characters. The password is sent as plain text.
Specifies the type of message-digest hashing algorithm to use and key value
The value of encryption-type field is 0 means none and 7 means proprietary. The key-id is an identifier (1 to 255) The key is an alphanumeric password up to sixteen characters. Neighbor routers must use the same key identifier with the same key value.
! After that, authentication must be enabled: Router(config-router)#area area-id authentication message-digest
6
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.
6
Router(config)#ip route 0.0.0.0 0.0.0.0 [interface | next-hop address] ! To propagate this route to all the routers in a normal OSPF area Router(config-router)#default-information originate
6
show ip protocols
show ip route
show ip ospf
clear ip route *
Displays router interaction during the hello, exchange, and flooding processes
7
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)
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
R2#show ip ospf database OSPF Router with ID (192.168.0.12) (Process ID 1) Router Link States (Area 0) Link ID 192.168.0.10 192.168.0.11 192.168.0.12 192.168.0.13 192.168.0.14 ADV Router 192.168.0.10 192.168.0.11 192.168.0.12 192.168.0.13 192.168.0.14 Age 817 817 816 816 817 Seq# 0x80000003 0x80000003 0x80000003 0x80000003 0x80000003 Checksum 0xFF56 0xFD55 0xFB54 0xF953 0xD990 Link count 1 1 1 1 1
Net Link States (Area 0) Link ID 192.168.0.14 ADV Router 192.168.0.14 Age 812 Seq# 0x80000002 Checksum 0x4AC8
Summary
Link-state routing protocols collect routing information from all other router in the network or within a defined area of the network. Link-state routing protocols perform the following functions: Respond quickly to network changes Send triggered update only when a network change has occurred Send periodic updates know as link-state refreshes Use a hello mechanism to determine the reachability of neighbors OSPF is link-state routing protocol based on open standards. OSPF routing uses the concept of area. Each router contains a complete database of link-states in specific area
7
Q&A