Documente Academic
Documente Profesional
Documente Cultură
4-1
Copyright 2005 Juniper Networks, Inc.
www.juniper.net
OSPF Review
Link-state protocol
HelloType 1
Database descriptionType 2
Link-state requestType 3
Link-state updateType 4
Link-state acknowledgementType 5
Hierarchical Design
Backbone
(Area 0 or 0.0.0.0)
Area 1
Area 2
Area 3
Version
Type
number
# of LSAs
2008 Juniper Networks, Inc. All rights reserved.
Packet
length
Router ID
20
LSA Header
Area ID
Checksum
Authentication
type
Authentication
Variable
LSA Data
20
LSA Header
Variable
Data
Variable
LSA Data
LSA Types
Link-state advertisement types:
Router LSAsType 1
Network LSAsType 2
Summary LSAsTypes 3 and 4
AS external LSAsType 5
Group membership LSAsType 6
NSSA LSAsType 7
External attributes LSAsType 8
Opaque LSAsTypes 9, 10, and 11
LSA Header
20 bytes of information that identify the LSA uniquely
and consist of:
(2-byte) LS age
(1-byte) Options
(1-byte) LS type
(4-byte) Link-state ID
(4-byte) Advertising router
(4-byte) LS sequence number
(2-byte) LS checksum
(2-byte) Length
Link ID
Link Data
Point-to-point
(Type 1)
Neighbors
router ID
Local routers
interface IP address
Transit
(Type 2)
DRs
interface IP address
Local routers
interface IP address
Stub
(Type 3)
Network number
Subnet mask
Virtual link
(Type 4)
Neighbors
router ID
Local routers
interface IP address
Opt
0x2
Cksum Len
0xd45b 60
ago
0x2
0xfa6
60
ago
192.168.16.1
.1
10.222.28.0/24
10.222.4.0/24
192.168.36.1
.2
10
11
12
192.168.16.1
.1
192.168.20.1
10.222.28.0/24
10.222.4.0/24
192.168.36.1
.2
192.168.40.1
.1
10.222.1.0/24
Area 1
13
14
Cksum Len
0x8530 28
ago
0x49f9
28
ago
0x87c6
28
15
192.168.16.1
.1
10.222.28.0/24
10.222.4.0/24
192.168.36.1
.2
10.222.44.0/24
192.168.20.1
192.168.40.1
.1
10.222.1.0/24
Area 1
192.168.32.1
Area ?
16
17
Cksum Len
0x3b07 28
ago
0x79d3
28
18
Build a NetworkType 4
Area 0
192.168.24.1
192.168.16.1
.1
10.222.28.0/24
10.222.4.0/24
192.168.36.1
.2
10.222.44.0/24
192.168.20.1
192.168.40.1
.1
10.222.1.0/24
Area 1
192.168.32.1
Area ?
19
20
Opt
0x2
Cksum Len
0x3812 36
ago
0x2
0x1713
36
ago
0x2
0xcc54
36
ago
0x2
0x8693
36
ago
21
Build a NetworkType 5
Area 0
192.168.24.1
192.168.16.1
.1
192.168.17.0/24
10.222.28.0/24
10.222.4.0/24
192.168.36.1
.2
192.168.37.0/24
10.222.44.0/24
192.168.20.1
192.168.40.1
192.168.41.0/24
.1
10.222.1.0/24
192.168.32.1
192.168.33.0/24
Area 1
Area ?
22
When multiple ABRs exist, the ABR with the highest RID
performs the translation
23
24
Build a NetworkType 7
Area 0
192.168.24.1
192.168.16.1
.1
192.168.17.0/24
10.222.28.0/24
10.222.4.0/24
192.168.36.1
.2
192.168.37.0/24
10.222.44.0/24
192.168.20.1
192.168.40.1
192.168.41.0/24
.1
10.222.1.0/24
192.168.33.0/24
Area 1
192.168.32.1
Area 2
NSSA
25
26
Area 0
LSA 2
Area 1
LSA 3
Area 1
LSA 1
Area 1
LSA 2
Backbone
(0.0.0.0)
Area 2
LSA 3
Area 2
LSA 1
External
Routes
Injected
Area 0
LSA 5
Area 3
LSA 3
Area 3
LSA 5
Area 3
LSA 4
Area 3
LSA 1
Area 2
LSA 2
Area 3
LSA 2
Area 0
LSA 3
Area 0
LSA 4
Area 0
LSA 3
Area 0
LSA 4
Area 0
LSA 4
Area 0
LSA 3
Area 2
LSA 3
Area 3
LSA 3
Area 3
LSA 4
Area 1
LSA 3
Area 3
LSA 3
Area 3
LSA 4
Area 1
LSA 3
Area 2
LSA 3
Area 0 Area 3
LSA 5 LSA 5
Area 1
2008 Juniper Networks, Inc. All rights reserved.
Area 0 Area 3
LSA 5 LSA 5
Area 2
External
Routes
Injected
Area 0 Area 3
LSA 5 LSA 5
Area 3
27
Seq
0x80000004
0x80000005
0x80000002
0x80000002
0x80000001
0x80000001
Age
177
305
412
631
412
240
Opt
0x2
0x2
0x2
0x2
0x2
0x2
Cksum Len
0xd45b 60
0xda47 60
0xfafa 28
0xbb1f 28
0x87c6 28
0x3b07 28
Seq
0x80000007
0x80000002
0x80000001
0x80000001
0x80000002
0x80000001
0x80000001
Age
39
415
418
238
631
238
574
Opt
0x2
0x2
0x2
0x2
0x2
0x2
0x2
Cksum Len
0xcc62 60
0xd7d9 48
0x6a75 32
0xe96b 28
0xb19f 28
0xdb78 28
0xa5ab 28
Seq
0x80000001
0x80000001
0x80000001
0x80000001
Age
631
420
590
576
Opt
0x2
0x2
0x2
0x2
Cksum Len
0x3812 36
0x8693 36
0x1713 36
0xce53 36
28
Shortest-Path-First Algorithm
Based on the Dijkstra algorithm
Link-state database
Candidate database
Tree database
29
SPF Example (1 of 6)
Link-state
RTR-A
(A, A, 0)
(A, B, 1)
(A, C, 2)
RTR-B
1
(B, A, 3)
(B, D, 3)
RTR-C
(C, A, 4)
(C, D, 4)
(D, B, 1)
RTR-D
(D, C, 2)
30
SPF Example (2 of 6)
Link-state
Candidate
Tree
(A, A, 0)
LS Entry
Cost to Root
(A, B, 1)
(A, A, 0)
(A, A, 0) - 0
(A, C, 2)
(B, A, 3)
(B, D, 3)
(C, A, 4)
RTR-A
(C, D, 4)
(D, B, 1)
(D, C, 2)
31
SPF Example (3 of 6)
Link-state
Candidate
Tree
(A, A, 0)
LS Entry
Cost to Root
(A, B, 1)
(A, A, 0)
(A, C, 2)
(A, B, 1)
(B, A, 3)
(A, C, 2)
(A, A, 0) - 0
(A, B, 1) - 1
(B, D, 3)
RTR-A
(C, A, 4)
(C, D, 4)
(D, B, 1)
(D, C, 2)
RTR-B
32
SPF Example (4 of 6)
Link-state
Candidate
Tree
(A, A, 0)
LS Entry
Cost to Root
(A, B, 1)
(A, A, 0)
(A, C, 2)
(A, B, 1)
(B, A, 3)
(A, C, 2)
(B, D, 3)
(B, A, 3)
(C, A, 4)
(B, D, 3)
(A, A, 0) - 0
(A, B, 1) - 1
(A, C, 2) - 2
RTR-A
(C, D, 4)
(D, B, 1)
(D, C, 2)
RTR-B
RTR-C
33
SPF Example (5 of 6)
Link-state
Candidate
Tree
(A, A, 0)
LS Entry
Cost to Root
(A, B, 1)
(A, A, 0)
(A, C, 2)
(A, B, 1)
(B, A, 3)
(A, C, 2)
(B, D, 3)
(B, A, 3)
(C, A, 4)
(B, D, 3)
(C, D, 4)
(C, A, 4)
(D, B, 1)
(C, D, 4)
(A, A, 0) - 0
(A, B, 1) - 1
(A, C, 2) - 2
(B, D, 3) - 4
RTR-A
(D, C, 2)
RTR-B
RTR-C
RTR-D
2008 Juniper Networks, Inc. All rights reserved.
34
SPF Example (6 of 6)
Link-state
Candidate
Tree
(A, A, 0)
LS Entry
Cost to Root
(A, B, 1)
(A, A, 0)
(A, C, 2)
(A, B, 1)
(B, A, 3)
(A, C, 2)
(B, D, 3)
(B, A, 3)
(C, A, 4)
(B, D, 3)
(C, D, 4)
(C, A, 4)
(D, B, 1)
(C, D, 4)
(D, C, 2)
(D, B, 1)
(D, C, 2)
(A, A, 0) - 0
(A, B, 1) - 1
(A, C, 2) - 2
(B, D, 3) - 4
RTR-A
RTR-B
RTR-C
RTR-D
2008 Juniper Networks, Inc. All rights reserved.
35
36
OSPF Router ID
Each OSPF router selects a 32-bit value to use as its
router ID
Populated within the LSAs sent out by each router
Uniquely identifies the router within the network
Used by the link-state database to run SPF
37
38
Graceful Restart (1 of 2)
A restarting router can ask its neighbors to not alter
their database
Restarting router must continue to forward packets
The network topology must be stable
The neighbors must support this functionality
39
Graceful Restart (2 of 2)
Enabled globally within [edit routing-options]
routing-options {
graceful-restart;
}
Len
36
40
41
OSPF Cost
Cost, or metric, of an interface indicates the overhead
required to send packets out a particular interface
Default OSPF cost for all links is 108/bandwidth (bps)
Links with a bandwidth 100 Mbps have a cost of 1
Cost calculation results in a value <1, so it is rounded up
42
Reference Bandwidth
You can change the 108 value in the cost calculation
Automatically alters the cost of interfaces
Allows for a consistent change across all interfaces
43
15
10
San Jose
20
Montreal
25
30
Amsterdam
44
45
46
47
Verifying Authentication
Authentication information available with the show
ospf interface detail command
Type of authentication is displayed
Key ID values shown if appropriate
State
fe-0/0/2.0
DR
Area
0.0.0.0
DR ID
192.168.36.1
BDR ID
192.168.24.1
Nbrs
Auth type MD5, Active key id 4, Start time 2003 Apr 14 11:05:00 UTC
fe-0/0/3.0
DRother
0.0.0.0
0.0.0.0
0.0.0.0
48
Virtual Links
Virtual links can connect remote OSPF areas together
Used for an area not physically connected to the backbone
Used for a discontiguous backbone
Virtual Link
Area 0
Area 1
Area 2
49
DR ID
0.0.0.0
BDR ID
0.0.0.0
Nbrs
1
50
Overload Settings
Used for transit traffic only if no other path is available
Sets metric to 65,535 in router LSA on all transit links
Flooding of changed LSA causes SPF calculations in network
Opt
0x2
Cksum Len
0x540b 60
51
52
53