ICND210S04L01-Implementing OSPF
ICND210S04L01-Implementing OSPF
OSPF
Advantages Disadvantages
• Fast convergence: Changes are • Significant demands on memory and
reported immediately by the source processing resources
affected • Requires very strict network design
• Robustness against routing loops • Requires a knowledgeable network
• Routers know the topology administrator
• Link-state packets are sequenced • Initial flooding can impede network
and aged performance
• The link-state database sizes can
minimized with careful network
design
Neighbors
Interfaces
Cost = 10
Token
Ring
Cost = 1785 Cost = 6
Neighbors
Token
Ring
Adjacency
database
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—4-11
OSPF terminology: Link-state database
Token
Ring
Adjacency Topological
database Database
Token
Ring
DR
Token
Ring BDR
E F G
2 2
1 4
(1, B)
C A
(4, B)
2 2
D
(4, E)
1
E F G
2 2
(3, C) (5, E) (6, A)
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—4-16
OSPF network types
The rules that govern the exchange of OSPF hello packets are called
the Hello protocol.
Hello packets use : 224.0.0.5 (all routers).
Hello packets are sent at regular intervals (default):
Multi access and Point-to-point: 10s
NBMA : 30s
On multi-access networks the Hello protocol elects a designated
router (DR) and a backup designated router (BDR).
The hello packet carries information that all neighbors must agree
upon before an adjacency is formed, and link-state information is
exchanged.
Broadcast
Multiaccess
Point-to-Point
NBMA X.25
Frame Relay
5 steps of operation:
1.Establish router adjacencies.
2.Elect a DR and BDR (if necessary).
3.Discover routes.
4.Select the appropriate routes to use.
5.Maintain routing information.
Broadcast
Multiaccess
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
Hello
B A C
Router ID
Hello/dead intervals
afadjfjorqpoeru
39547439070713 Neighbors
Area-ID
*
Router priority
*
Hello DR IP address
BDR IP address
Authentication password
Stub area flag
* *
Entry must match on neighboring routers
© 2007 Cisco Systems, Inc. All rights reserved.
* ICND2 v1.0—4-27
Step 2: Electing the DR and BDR (if
necessary).
P=3 P=2
DR BDR
Hello
Init State
Router
Router B
B
Neighbors
Neighbors List
List
172.16.5.1/24,
172.16.5.1/24, int
int E1
E1
Two-way
Router A State
Neighbors List
172.16.5.2/24, int E0
I am router ID 172.16.51, and I see 172.16.5.2.
Two-way
State
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—4-30
Step 3: Discover routes (cont.)
DR
E0 E0
172.16.5.1 172.16.5
afadjfjorqpoeru
39547439070713 .3
I will start exchange because I have router ID 172.16.5.1.
Hello
Exstart State afadjfjorqpoeru
39547439070713
DR
E0 E0
172.16.5.1 172.16.5.3
afadjfjorqpoeru
39547439070713
afadjfjorqpoeru
39547439070713
afadjfjorqpoeru
39547439070713
Loading State
I need the complete entry for network 172.16.6.0/24.
LSR
afadjfjorqpoeru
39547439070713
Cost=10
10.4.4.0/24
Topology Table
Net Cost Out Interface
10.2.2.0 6 To0
10.3.3.0 7 To0 This is the best route to 10.3.3.0.
10.3.3.0 10 E0
Link-State Change
DR
1 LSU
x A
B
1 LSU
x A
B
2
Link-State Change
DR
LSU
1 LSU
x
3
B
A
LSU
2
Link-State Change
DR
LSU
4 I need to update
my routing table.
1 LSU
x
3
B
A
LSU
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
X.25
Frame Relay
ATM
NBMA Topology
Single interface interconnects multiple sites
NBMA topologies support multiple routers but without
broadcasting capabilities
RouterX(config-router)#
network address wildcard-mask area area-id
Assigns networks to a specific OSPF area
RouterX(config-if)#
ip ospf authentication [message-digest | null]
Specifies the authentication type for an interface (as of Cisco
IOS Release 12.0)
OR
RouterX(config-router)#
area area-id authentication [message-digest]
Specifies the authentication type for an area
RouterX#show ip route
<output omitted>
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O 10.2.2.2/32 [110/782] via 192.168.1.102, 00:01:17, Serial0/0/1
C 10.1.1.0/24 is directly connected, Loopback0
192.168.1.0/27 is subnetted, 1 subnets
C 192.168.1.96 is directly connected, Serial0/0/1
RouterX#ping 10.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms
OSPF is a classless, link-state routing protocol that uses an area hierarchy for fast
convergence.
OSPF exchanges hello packets to establish neighbor adjacencies between routers.
The SPF algorithm uses a cost metric to determine the best path. Lower costs
indicate a better path.
The router ospf process-id command is used to enable OSPF on the router.
Use a loopback interface to keep the OSPF router ID consistent.
The show ip ospf neighbor command displays OSPF neighbor information on a
per-interface basis.
The commands debug ip ospf events and debug ip ospf packets can be used to
troubleshoot OSPF problems.
OSPF will load-balance across up to four equal-cost metric paths by default.
There are two types of OSPF authentication: Plaintext and MD5.