Académique Documents
Professionnel Documents
Culture Documents
By MANJU DEVARAJ
Intro
Open Shortest
Path First
Link State or SPF technology
Developed by the IETFs OSPF
working group (RFC 1247)
Designed for TCP/IP
Fast Convergence
Manju Devaraj
OSPF Features
Supports subnetting
Supports multicasting
Enables load balancing by allowing traffic to be split evenly across routes with
equal cost
Manju Devaraj
Terminology
Manju Devaraj
Node A: to reach F go to B
Node B: to reach F go to D
Node D: to reach F go to E
Node E: go directly to F
In link state routing, each node has a complete map of the topology
Note:
The optimal path is determined by adding the
costs of the interfaces :
Cost = 10^8/(Bandwidth)
E
B
C
A
D
E
Manju Devaraj
D
A
A
F6
F
Manju Devaraj
Manju Devaraj
Received
LSAs
Link State
Database
Dijkstras
Algorithm
IP Routing
Table
Manju Devaraj
LSA
N1
R1
Manju Devaraj
10
Manju Devaraj
11
Manju Devaraj
12
Multi-Access networks
All routers must accept packets sent to the
AllSPFRouters (224.0.0.5) address
All DR and BDR routers must accept packets sent to
the AllDRouters (224.0.0.6) address
Manju Devaraj
13
10.10.10.2
.2
.2
LS Age
Router-LSA 10.1.10.1
10.1.10.1
0x9b47
0x80000006 0
Router-LSA 10.1.10.2
10.1.10.2
0x219e
0x80000007 1618
Router-LSA 10.1.10.3
10.1.10.3
0x6b53
0x80000003 1712
Router-LSA 10.1.10.4
10.1.10.4
0xe39a
0x8000003a 20
Router-LSA 10.1.10.5
10.1.10.5
0xd2a6
0x80000038 18
Router-LSA 10.1.10.6
10.1.10.6
0x05c3
0x80000005 1680
Manju Devaraj
LS SeqNo
/2
Checksum
2 .0
Adv. Router
10.1.7.0 / 24
.4
.3
.5
.3
.3
.5
.5
10.1.5.0/24
10.10.10.2
.6
.2
/2
.1 .
Link StateID
.6
8 .0
10
LS Type
10.1.4.0 / 24
10.1.6.0 / 24
.1
.4
10.1.3.0 / 24
10.1.1.0 / 24
.4
10.10.10.6
.1 .
.1
10.10.10.4
10
10.10.10.1
10.10.10.5
Manju Devaraj
15
16
Ethernet = 10
Fast Ethernet = 1
Cost =
100,000,000/Bandwidth
Notes:
Cisco routers default to T1 (1.544 Mbps) on all serial interfaces and require manual modification with the bandwidth command.
ospf auto-cost reference-bandwidth reference-bandwidth can be used to modify the reference-bandwidth for higher speed
interfaces
Manju Devaraj
17
Manju Devaraj
18
Manju Devaraj
19
20
HelloInterval - Cisco default = 10 seconds or 30 seconds and can be changed with the
command ip ospf hello-interval.
RouterDeadInterval - The period in seconds that the router will wait to hear a Hello
from a neighbor before declaring the neighbor down.
Cisco uses a default of four-times the HelloInterval (4 x 10 sec. = 40 seconds, 120 secconds
for NBMA) and can be changed with the command ip ospf dead-interval.
Note: For routers to become adjacent, the Hello, DeadInterval and network types
must be identical between routers or Hello packets get dropped!
Manju Devaraj
21
Unless you are configuring an NBMA network like Frame Relay, this wont be an
issue.
Many administrators prefer to use point-to-point or point-to-multipoint for
NMBA to avoid the DR/BDR and full-mesh issues.
Manju Devaraj
22
23
Manju Devaraj
24
Manju Devaraj
25
26
1. Establishing Adjacencies
Hello 10.6.0.1 10.5.0.1
Hello 10.6.0.1
2-way
Down
Init
2-way
Down
Init
Hello 10.5.0.1
Hello 10.5.0.1 10.6.0.1
27
On multi-access, broadcast links (Ethernet), a DR and BDR (if there is more than one router) need to
be elected.
DR - Designated Router
Without a DR, the formation of an adjacency between every attached router would create many
unnecessary LSA (Link State Advertisements), n(n-1)/2 adjacencies.
Flooding on the network itself would be chaotic.
Manju Devaraj
28
Router with the highest Router ID is elected the DR, next is BDR.
The routers priority field can be set to either ensure that it becomes the DR or prevent it from being the DR.
Rtr(config-if)# ip ospf priority <0-255>
Default = 1
The router can be assigned a priority between 0 and 255, with 0 preventing this router from becoming the DR (or BDR)
and 255 ensuring at least a tie. (The highest Router ID would break the tie.)
Manju Devaraj
29
All other routers, DROther, establish adjacencies with only the DR and BDR.
DRother routers multicast LSAs to only the DR and BDR
(224.0.0.6 - all DR routers)
DR sends LSA to all adjacent neighbors (DROthers)
(224.0.0.5 - all OSPF routers)
Backup Designated Router - BDR
Listens, but doesnt act.
If LSA is sent, BDR sets a timer.
If timer expires before it sees the reply from the DR, it becomes the DR and takes over
the update process.
The process for a new BDR begins.
Manju Devaraj
30
Clarifications
Hello packets are still exchanged between all
routers on a multi-access segment (DR, BDR,
DROthers,.) to maintain neighbor adjacencies.
OSPF LSA packets (coming) are packets which are
sent from the BDR/DROthers to the DR, and then
from the DR to the BDR/DROthers. (The reason
for a DR/BDR.)
Normal routing of IP packets still takes the lowest
cost route, which might be between two
DROthers.
Manju Devaraj
31
Manju Devaraj
32
Formally, routers in ExStart state are characterized as adjacent, but have not yet
become fully adjacent as they have not exchanged data base information.
Manju Devaraj
33
DBD Packet
0
1
2
3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Version #
|
2
|
Packet length
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Router ID
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Area ID
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Checksum
|
AuthType
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Authentication
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Authentication
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Interface MTU
|
Options
|0|0|0|0|R|I|M|MS
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
DD sequence number
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
+-+
|
|
+An LSA Header
-+
|
|
+-+
|
|
+-+
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
...
|
(LSA descriptions)
Manju Devaraj
34
Manju Devaraj
35
If a router has entries in its Link State Request list, meaning that it needs additional
information from the other router for routes that are not in its LSDB or has more
recent versions, then it enters the loading state.
If there are no entries in its Link State Request list, than the routers interface can
transition directly to full state.
Complete routing information is exchanged in the loading state, discussed next.
Manju Devaraj
36
If a router has entries in its Link State Request list, meaning that it needs
additional information from the other router for routes that are not in its LSDB or
has more recent versions, then it enters the loading state.
The router needing additional information sends LSR (Link State Request) packets
using LSA information from its LSR list.
Manju Devaraj
37
The other routers replies by sending the requested LSAs in the Link State Update
(LSU) packet.
The receiving router sends LSAck to acknowledge receipt.
When all LSAs on the neighbors Link State Request list have been received, the
neighbor FSM transitions this interface to Full state.
Manju Devaraj
38
OSPF is a link state routing protocol and does not send periodic updates
like RIP.
OSPF only floods link state state advertisements when there is a change in
topology (this includes when a routers are first booted).
OSPF uses hop-by-hop flooding of LSAs; an LSA received on one interface
are flooded out other OSPF enabled interfaces.
If a link state entry in the LSDB (Link State DataBase) reaches an age of 60
minutes (MaxAge) without being updated, it is removed and SPF is
recalculated.
Every 30 minutes (LSRefreshTime), OSPF routers flood only their link
states to all other routers (in the area).
This is known as a paranoid update
These do not trigger SPF recalculations.
Special note: When a link goes down and a router wants to send a LSA to
tell other routers to remove this link state, it sends this link state with a
value of 60 minutes (MAXAGE).
Manju Devaraj
42
You can also configure the hold time between two consecutive SPF calculations
(spf-holdtime).
44
OSPF characteristics
OSPF areas are designed to keep issues like flapping links within an area. SPF is not
recalculated if the topology change is in another area.
The interesting thing is that OSPF distributes inter-area (between areas) topology
information using a distance-vector method .
ABRs do not announce topological information between areas, instead, only routing
information is injected into other areas.
ABRs relay routing information between areas via distance vector technique similar to RIP
or IGRP. This is why show ip ospf does not show a change in the number of times SPF has
been executed when the topology change is in another area.
Note: It is still a good idea to perform route summarization between areas, announcing
multiple routes as a single inter-area route. This will hide any changes in one area from
affecting routing tables in other areas.
45
DR sends ACK to R1
46
47
Physical layer or data link layer directly reporting a state change on a directly connected
interface.
The Hello subprotocol The routers interface has not received a Hello packet from an
adjacent neighbor within the OSPF RouterDeadInterval time (40 seconds or 120 seconds on
NBMA links).
48
FYI: LSAs are not originated any faster than every 5 seconds (MinLSInterval) to prevent
flooding storms in unstable networks.
When the router wants to report a down link, it sets the LS Age field to the MaxAge value
(3,600 seconds), which tells routers to flush this entry from their LSDB.
LSU packet
Router LSA
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Version #
|
4
|
Packet length
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Router ID
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Area ID
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Checksum
|
AuType
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Authentication
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Authentication
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
# LSAs
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
++-+
|
+|
LSAs
...
|
+-+
|
49
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
LS age
|
Options
|
1
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Link State ID
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Advertising Router
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
LS sequence number
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
LS checksum
|
length
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
0
|V|E|B|
0
|
# links
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Link ID
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Link Data
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Type
|
# TOS
|
metric
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
...
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
TOS
|
0
|
TOS metric
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Link ID
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Link Data
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Periodic updates
Each LSA entry in the link-state database has its own age timer, with a default of 60
minutes (3,600 seconds). this is known as the MaxAge value of the LSA entry.
When an LSA reaches MaxAge, it is flushed from the LSDB.
Before this happens the LSA has a Link State Refresh Time (LSRefreshTimer), 30
minutes, (1,800 seconds) and when this time expires the router that originated
the LSA will floods a new LSA to all its neighbors, who will reset the age of the LSA
in its LSDB.
This is also known as the paranoid update. or periodic update.
These updates do not trigger recalculation of the routing table.
50
Enabling OSPF
Rtr(config)# router ospf process-id
process-id: 1 - 65,535
Cisco feature, which allows you to run multiple, different OSPF routing processes
on the same router. (But dont!)
Process-id is locally significant, and does not have to be the same number on
other routers (they dont care).
This is different than the process-id used for IGRP and EIGRP which must be the
same on all routers sharing routing information.
Extra: FYI - Cisco IOS limits the number of dynamic routing processes to 30. This
is because it limits the number of protocol descriptors to 32, using one for
connected route sources, one for static route sources, and 30 for dynamic route
sources.
192.168.20.0/30
.2
.1
192.168.1.0/24
.1
fa0
Merida
lo1
S0
S0
.1
Vargas
lo1
.1
fa0
192.168.30.0/24
.5
Non-OSPF link
192.168.2.0/24
192.168.20.4.0/30
Merida
Merida(config)#router ospf 1
Merida(config-router)#network 192.168.1.0 0.0.0.255 area 0
Merida(config-router)#network 192.168.2.0 0.0.0.255 area 0
Merida(config-router)#network 192.168.20.0 0.0.0.3 area 0
Only
192.168.20.0/30
255.255.255.252
NOT
192.168.20.4/30
Vargas
Vargas(config)#router ospf 10
Addressing
Area 0
Network 192.117.49.0
Range 255.255.255.0
Area 1
Network 131.108.0.0
Subnets 17-31
Range 255.255.240.0
Area 2
Network 131.108.0.0
Subnets 33-47
Range 255.255.240.0
area 3
Network 131.108.0.0
Subnets 49-63
Range 255.255.240.0
Other times you may wish to get more specific or less specific.
Rtr(config-if)#ip add 10.5.1.1 255.255.255.0
Rtr(config)# router ospf 10
Rtr(config-router)#network 0.0.0.0 255.255.255.255 area 0
Matches all interfaces on this router, not recommended
Rtr(config)# router ospf 10
Rtr(config-router)#network 10.5.1.2 0.0.0.0 area 0
Matches only the interface 10.5.1.2 and not any other 10.5.1.n interfaces.
MANJU DEVARAJ
55
192.168.30.0/29
.1
.9
Rubens
192.168.10.0/27
192.168.20.0/30
.10
.1
.2
Chardin
.1
Goya
.2
Area 0
.65
.33
192.168.10.0/28
Area 1
192.168.10.0/26
Area 192.168.10.0
Matisse
Extra Info
Rubens
router ospf 10
network 0.0.0.0 255.255.255.255 area 1
MANJU DEVARAJ
56
192.168.30.0/29
.1
.9
Rubens
192.168.10.0/27
192.168.20.0/30
.10
.1
.2
Chardin
.1
Goya
.2
Area 0
.65
.33
192.168.10.0/28
Area 1
192.168.10.0/26
Area 192.168.10.0
Matisse
Extra Info
Chardin
router ospf 20
network 192.168.30.0 0.0.0.255 area 1
network 192.168.20.0 0.0.0.255 area 0
Chardin is a ABR (Area Border Router) which we will discuss next chapter, and belongs
to two different areas.
We need to be more specific here as each interface belongs to a different area.
Here we are saying that any interface that has 192.168.30.n in the first three octets
belongs to area 1 and any interface that has 192.168.20.n in the first three octets
belongs to area 0.
Notice that the inverse mask does not have to inversely match the subnet mask of the
interface (255.255.255.248 and 255.255.255.252).
MANJU DEVARAJ
57
192.168.30.0/29
.1
.9
Rubens
192.168.10.0/27
192.168.20.0/30
.10
.1
.2
Chardin
.1
Goya
.2
Area 0
.65
.33
192.168.10.0/28
Area 1
192.168.10.0/26
Matisse
Area 192.168.10.0
Extra Info
Goya
router ospf 30
network 192.168.20.0 0.0.0.3 area 0.0.0.0
network 192.168.10.0 0.0.0.31 area 192.168.10.0
58
192.168.30.0/29
.1
.9
Rubens
192.168.10.0/27
192.168.20.0/30
.10
.1
.2
Chardin
.1
Goya
.2
Area 0
.65
.33
192.168.10.0/28
Area 1
192.168.10.0/26
Area 192.168.10.0
Matisse
Extra Info
Goya
router ospf 30
network 192.168.20.0 0.0.0.3 area 0.0.0.0
network 192.168.10.0 0.0.0.31 area 192.168.10.0
59
192.168.30.0/29
.1
.9
Rubens
192.168.10.0/27
192.168.20.0/30
.10
.1
.2
Chardin
.1
Goya
.2
Area 0
.65
.33
192.168.10.0/28
Area 1
192.168.10.0/26
Area 192.168.10.0
Matisse
Extra Info
Matisse
router ospf 40
network 192.168.10.2 0.0.0.0 area 192.168.10.0
network 192.168.10.33 0.0.0.0 area 192.168.10.0
MANJU DEVARAJ
60
MANJU DEVARAJ
61
DR/BDR Elections
Router with the highest Router ID is elected the DR, next is BDR.
But like other elections, this one can be rigged.
Rtr(config)# interface fastethernet 0
Rtr(config-if)# ip ospf priority <0-255>
Higher priority becomes DR/BDR
Default = 1
Ineligible to become DR/BDR = 0
MANJU DEVARAJ
62
bandwidth command
Rtr(config-if)# bandwidth kilobits
(ex: 64 = 64,000bps)
Changes the default bandwidth metric on a specific interface.
Used in the 108/bandwidth calculation for cumulating the cost of a route from
the router to the network on the outgoing interfaces.
Does not modify the actual speed of the link.
ip ospf cost command
RTB(config-if)# ip ospf cost value
(ex: 1562, same as bandwidth = 64kbps)
Configures the cost metric for a specific interface
Uses this value for the cost of this interface instead of the 108/bandwidth
calculation
Common for multivendor environments.
MANJU DEVARAJ
63
After a password is configured, you enable authentication for the area on all
participating area routers with:
Rtr(config-router)# area area authentication
Configured for an OSPF area, in ospf router mode.
MANJU DEVARAJ
64
70.0.0.0/8
s2
RouterA
172.16.0.0/16
RouterB
192.16.64.1/24
192.16.64.2/24
RouterA
RouterB
interface Serial1
interface Serial2
router ospf 10
router ospf 10
network 192.16.64.0 0.0.0.255 area 0
area 0 authentication
area 0 authentication
MANJU DEVARAJ
65
After a password is configured, you enable authentication for the area on all
participating area routers with:
Rtr(config-router)# area area authentication [messagedigest]
message-digest option must be used if using message-digest-key
If optional message-digest is used, a message digest, or hash, of the password is
sent.
MANJU DEVARAJ
66
70.0.0.0/8
s2
RouterA
172.16.0.0/16
RouterB
192.16.64.1/24
192.16.64.2/24
RouterA
RouterB
interface Serial1
interface Serial2
router ospf 10
router ospf 10
network 192.16.64.0 0.0.0.255 area 0
MANJU DEVARAJ
67
MD5 Encryption
MD5 authentication, creates a message digest.
This is scrambled data that is based on the password and the packet
contents .
The receiving router uses the shared password and the packet to recalculate the digest.
If the digests match, the router believes that the source of the packet
and its contents have not been tampered with.
In the case of message-digest authentication, the authentication data
field contains the key-id and the length of the message digest that is
appended to the packet.
The Message Digest is like a watermark that cant be faked.
MANJU DEVARAJ
68
69
If the default-information originate command is not used, the default quad-zero route will
not be propagated.
Important: The default route and the default-information originate command are usually
only be configured on your Entrance or Gateway router, the router that connects your
network to the outside world.
This router is known as the ASBR (Autonomous System Boundary Router)
Extra: The always option will propagate a default quad-zero route even if one is not
configured on this router.
MANJU DEVARAJ
70
0.0.0.0/0
ip route 0.0.0.0/0
s0
10.0.0.0/24
Automatically Propagated
11.0.0.0/24
Entrance
Static Route
ISP
0.0.0.0/0
Marketing
Engineering and Marketing will have 0.0.0.0/0 default routes forwarding packets to
the Entrance router.
71
show ip route
Router# show ip route
172.16.0.0/16 is variably subnetted, 4 subnets, 3 masks
O IA
172.16.51.1/32 [110/783] via 172.16.1.2, 00:11:44,
FastEthernet0
O
172.16.20.0/24 [110/782] via 172.16.10.6, 00:12:29, Serial0
C
172.16.10.4/30 is directly connected, Serial0
C
172.16.1.0/24 is directly connected, FastEthernet0
O E2 11.0.0.0/8 [110/20] via 172.16.1.1, 00:11:44, FastEthernet0
O E1 12.0.0.0/8 [110/782] via 172.16.1.1, 00:11:44, FastEthernet0
72
show ip ospf
Router#show ip ospf
Routing Process "ospf 1" with ID 192.168.3.1
Supports only single TOS(TOS0) routes
It is an area border router
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
Number of external LSA 3. Checksum Sum 0x97E3
Number of DCbitless external LSA 0
Number of DoNotAge external LSA 0
Number of areas in this router is 2. 2 normal 0 stub 0 nssa
External flood list length 0
Area BACKBONE(0)
Number of interfaces in this area is 1
Area has no authentication
SPF algorithm executed 8 times
<text omitted>
Area 1
<text omitted>
MANJU DEVARAJ
73
Pri
1
1
1
1
State
FULL/DROTHER
FULL/BDR
2WAY/DROTHER
FULL/ -
Dead Time
00:00:33
00:00:32
00:00:30
00:00:32
Address
206.202.0.3
206.202.0.4
206.202.0.1
206.202.1.2
Interface
Ethernet0
Ethernet0
Ethernet0
Serial0
MANJU DEVARAJ
75
Shows much of the same information as debug ip ospf adj in the previous
slide including, adjacencies, flooding information, designated router
selection, and shortest path first (SPF) calculation.
This information is also displayed with debug ip ospf events.
R = Received
C = Current (?)
MANJU DEVARAJ
77
Link states within this area, this is what the SPF uses.
Seq#
Checksum Link count
0x80000003 0xCE56
2
0x80000003 0xFD44
3
Seq#
Checksum
0x80000005 0xD339
0x80000001 0xB329
Seq#
Checksum
0x80000003 0x93CC
States
Age
1302
1303
78
Seq#
Checksum Tag
0x80000001 0x3FEA
0
0x80000001 0x32F6
0
MANJU DEVARAJ
79
show ip route
show ip ospf
show ip ospf interface
show ip ospf neighbor
show ip ospf database
debug ip ospf adj
debug ip ospf events
MANJU DEVARAJ
80
SPF re-calculations are done only for changes within that area.
Large routing table
Typically, the larger the area the larger the routing table.
A larger routing table requires more memory and takes more time to
perform the route look-ups.
Solution: Divide the network into multiple areas
MANJU DEVARAJ
81
With this technique, routing still occurs between the areas (called inter-area routing),
but many of the smaller internal routing operations, such as recalculating the
database re-running the SPF algorithm, are restricted within an area.
MANJU DEVARAJ
82
Question: I understand the routing table is recalculated every time the router receives
an new version of an LSA.
Does OSPF recalculate its routing table when their is a topology change in another
area?
Show ip ospf displays no change in SPF execution, but show ip ospf database shows a
change in the topology?
Answer: Good question! OSPF areas are designed to keep issues like flapping links
within an area. SPF is not recalculated if the topology change is in another area. The
interesting thing is that OSPF distributes inter-area (between areas) topology
information using a distance-vector method. OSPF uses link-state principles only
within an area. ABRs do not announce topological information between areas,
instead, only routing information is injected into other areas. ABRs relay routing
information between areas via distance vector technique similar to RIP or IGRP. This is
why show ip ospf does not show a change in the number of times SPF has been
executed when the topology change is in another area.
Note: It is still a good idea to perform route summarization between areas,
announcing multiple routes as a single inter-area route. This will hide any changes in
one area from affecting routing tables in other areas.
MANJU DEVARAJ
83
MANJU DEVARAJ
MANJU DEVARAJ
85
MANJU DEVARAJ
86
Manju Devaraj
87
OSPF Design
One SPF per area, flooding done per area
Try not to overload the ABRs
Normal areas
Stub areas
Totally stubby (stub no-summary)
Not so stubby areas (NSSA)
OSPF Design
Redundancy
Dual links out of each area using metrics (cost) for traffic
engineering
Too much redundancy
Dual links to backbone in stub areas must be the same
otherwise sub-optimal routing will result
Too much redundancy in the backbone area without good
summarization will affect convergence in the area 0
Not recommended
OSPF Router ID
If the loopback interface exists and has an IP address,
that is used as the router ID in routing protocols stability!
If the loopback interface does not exist, or has no IP
address, the router ID is the highest IP address
configured danger!
Subcommand to manually set the OSPF router ID :
OSPF Clear/Restart
clear ip ospf [pid] redistribution
<metric>
<metric-type (1 or 2)
<tag>
<subnets>
Interface Sub-Commands
103
Inter-area Filtering
Manju Devaraj
104
Manju Devaraj
105
Manju Devaraj
106
Manju Devaraj
107
Manju Devaraj
108
Thank You
Experience the power of Knowledge
Manju Devaraj
109