Академический Документы
Профессиональный Документы
Культура Документы
Chapter 3:
OSPF Implementation
Cisco Public
Chapter 3 Topics
Establishing OSPF Neighbor Relationships
Building the Link-State Database
Optimizing OSPF Behavior
OSPFv3
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
Establishing
OSPF Neighbor
Relationships
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
Cisco Public
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
OSPF Features
Independent transport: OSPF works on top of IP and uses
protocol number 89.
Efficient use of updates: First sends a full updates with all linkstate information, then only partial updates to all router within the
area.
Metric: Based in cumulative cost which is inversely proportional
to interface bandwidth.
Update destination address: OSPF uses multicast and unicast,
rather than broadcast, for sending messages.
224.0.0.5 All OSPF routers
224.0.0.6 DR/BDR
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
OSPF Features
VLSM support: OSPF is a classless routing protocol.
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
Chapter 3
Cisco Public
Nonbackbone area:
Used to connect end users
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
Cisco Public
10
Cisco Public
11
Cisco Public
12
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
13
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
14
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
15
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
16
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
17
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
18
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
19
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
20
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
21
*show ip ospf
topology-info
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
22
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
23
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
24
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
25
Cisco Public
26
Cisco Public
27
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
28
When you configure the hello interval, the default value of the dead
interval is automatically adjusted to four times the hello interval.
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
29
Cisco Public
30
The PE-CE can have any OSPF network type: point-to-point, broadcast,
or even nonbroadcast multiaccess.
The only difference between a PE-CE design and a regular OSPF
design is that the customer has to agree with the service provider about
the OSPF parameters (area ID, authentication password, and so on);
Usually, these parameters are governed by the service provider.
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
31
Cisco Public
32
Cisco Public
33
You can change OSPF network type by using the interface configuration mode command
ip ospf network network_type.
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
34
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
35
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
36
Cisco Public
37
Cisco Public
38
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
39
Cisco Public
40
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
41
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
42
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
43
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
44
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
45
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
46
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
47
Cisco Public
48
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
49
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
50
ABRs do not forward type 1 and 2 LSAs between areas to improve OSPF scalability.
OSPF advertises these subnets on ABRs by using type 3 summary LSAs.
Summary LSAs are flooded throughout a single area only, but are regenerated by
ABRs.
OSPF does not summarize a network to its classful boundary.
A type 3 LSA is advertised into the backbone area for every subnet that is defined in
the originating area.
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
51
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
52
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
53
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
54
Cisco Public
55
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
56
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
57
Cisco Public
58
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
59
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
60
Cisco Public
61
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
62
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
63
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
64
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
65
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
66
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
67
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
68
The paths with the lowest costs are selected as the best
paths.
OSPF cost is computed automatically for each interface,
using the formula:
Cost = Reference bandwidth / Interface bandwidth
Cisco Public
69
Cisco Public
70
Changing the OSPF reference bandwidth influences the cost of all local interfaces
included in the OSPF.
Commonly, you will need to influence the cost just for a specific interface on the
router.
Using the bandwidth command, you can change how IOS treats a specific interface
by default.
Chapter 3
Cisco Public
71
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
72
For each subnet, the route with the lowest total cost is selected as the best
route.
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
73
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
74
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
75
Optimizing OSPF
Behavior
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
76
Cisco Public
77
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
78
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
79
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
80
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
81
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
82
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
83
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
84
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
85
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
86
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
87
Summarization on ABRs
Without summarization of internal routes, all the prefixes from an area
are passed into the backbone as type 3 interarea routes.
When summarization is enabled, the ABR intercepts this process and
instead injects a single type 3 LSA.
Use the following command in router configuration mode:
area area-id range ip-address mask [advertise | not-advertise] [cost cost]
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
88
Summarization on ASBRs
Summarization of external routes can be done on the ASBR for
type 5 LSAs (redistributed routes) before injecting them into the
OSPF domain.
Without summarization, all the redistributed external prefixes
from external autonomous systems are passed into the OSPF
area.
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
89
Cisco Public
90
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
91
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
92
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
93
Stub area:
This area type does not accept information about routes external to the
autonomous system.
If routers need to route to networks outside the autonomous system, they use a
default route.
Stub areas cannot contain ASBRs (except that the ABRs may also be ASBRs).
Cisco Public
94
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
95
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
96
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
97
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
98
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
99
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
100
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
101
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
102
You can advertise 0.0.0.0/0 into the OSPF domain when the
advertising router already has a default route.
To advertise 0.0.0.0/0 regardless of whether the advertising
router already has a default route, add the keyword always.
Cisco Public
103
Accepts
routes from
other areas
Accepts
external
routes
(O)
(O IA)
(O E1 and O E2)
Standard
Yes
Yes
Backbone
Yes
Yes
Stub
Yes
Yes
(uses default
route)
No
No
(uses default
route)
(uses default
route)
Area Type
Allows ASBR
Cisco
proprietary
Yes
Yes
No
Yes
Yes
No
No
No
No
Yes
Yes
No
Yes
Yes
No
Totally stubby
Yes
No
NSSA
Yes
Yes
Totally stubby
NSSA
No
No
Yes
(uses default
route)
(uses default
route)
(uses default
route)
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
104
OSPFv3
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
105
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
106
Configuring OSPFv3
Cisco Public
107
Configuring OSPFv3
Cisco Public
108
Implementing OSPFv3
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
109
Implementing OSPFv3
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
110
Implementing OSPFv3
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
111
Implementing OSPFv3
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
112
Implementing OSPFv3
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
113
Implementing OSPFv3
OSPFv3 (for IPv6) renames two LSA types and defines two
additional LSA types that do not exist in OSPFv2 (for IPv4).
The two renamed LSA types are as follows:
Interarea prefix LSAs for ABRs (Type 3) (interarea routes).
Interarea router LSAs for ASBRs (Type 4) (location of ASBR).
Intra-area prefix LSAs (Type 9): A router can originate multiple intraarea prefix LSAs for each router or transit network, each with a unique
link-state ID.
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
114
Implementing OSPFv3
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
115
Cisco Public
116
Cisco Public
117
Cisco Public
118
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
119
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
120
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
121
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
122
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
123
OSPFv3 Caveats
OSPFv3 will not peer with routers running the traditional
OSPFv2 protocol.
The OSPFv3 address families feature is supported as of
Cisco IOS Release 15.1(3)S and Cisco IOS Release
15.2(1)T.
Cisco routers running older routers will not form neighbor
relationships.
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
124
Summary
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
125
Summary
OSPF uses a two-layer hierarchical approach dividing networks into a
backbone area (area 0) and nonbackbone areas.
For its operation, OSPF uses five packet types: Hello, DBD, LSR, LSU, and
LSAck.
OSPF neighbors go through several different neighbor states before
adjacency results in Full state.
Cisco Public
126
Summary
OSPF calculates interface costs based on default reference bandwidth
and interface bandwidth.
Using SPF, OSPF determines the total lowest cost paths and selects
them as the best routes.
Intra-area routes are always preferred over interarea routes.
Route summarization improves CPU utilization, reduces LSA flooding,
and reduces routing table sizes.
The area range command is used summarize at the ABR. The
summary-address command is sued to summarize at the ASBR.
Default routes can be used in OSPF to prevent the need for specific
route to each destination network.
Cisco Public
127
Summary
There are several OSPF area types: normal, backbone, stub, totally
stubby, NSSA, and totally stubby NSSA.
Use the area area-id command to define an area as stubby.
Use the area area-id stub command with the no-summary keyword
only on the ABR to define an area as totally stubby.
For stub areas, external routes are not visible in the routing table, but
are accessible via the intra-area default route.
For totally stubby areas, interarea and external routes are not visible in
the routing table, but are accessible via the intra-area default route.
OSPFv3 for IPv6 supports the same basic mechanisms that OSPFv2 for
IPv4, including the use of areas to provide network segmentation and
LSAs to exchange routing updates.
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
128
Summary
OSPFv3 features two new LSA types and has renamed two
traditional LSA types.
OSPFv3 uses link-local addresses to source LSAs.
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
129
Chapter 3
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
130