Upload
happy-girl
View
223
Download
0
Embed Size (px)
Citation preview
8/14/2019 chapter-11-ppt-OSPF.ppt
1/84
CCNA2-1 Chapter 11
Chapter 11
Open Shortest Path First
OSPF
8/14/2019 chapter-11-ppt-OSPF.ppt
2/84
CCNA2-2 Chapter 11
Note for Instructors
These presentations are the result of a collaboration amongthe instructors at St. Clair College in Windsor, Ontario.
Thanks must go out to Rick Graziani of Cabrillo College. Hismaterial and additional information was used as a reference
in their creation. If anyone finds any errors or omissions, please let me know
at: [email protected].
8/14/2019 chapter-11-ppt-OSPF.ppt
3/84
8/14/2019 chapter-11-ppt-OSPF.ppt
4/84
CCNA2-4 Chapter 11
Introduction to OSPF
OSPF is a classless, link-state routing protocol that uses theconcept of areas for scalability.
RFC 2328 defines the OSPF metric as an arbitrary valuecalled cost .
Cisco IOS software uses bandwidth to calculate theOSPF cost metric.
8/14/2019 chapter-11-ppt-OSPF.ppt
5/84
CCNA2-5 Chapter 11
Development Timeline
8/14/2019 chapter-11-ppt-OSPF.ppt
6/84
CCNA2-6 Chapter 11
OSPF Message Encapsulation (Ethernet)
8/14/2019 chapter-11-ppt-OSPF.ppt
7/84CCNA2-7 Chapter 11
OSPF Packet Types
8/14/2019 chapter-11-ppt-OSPF.ppt
8/84CCNA2-8 Chapter 11
Hello Protocol
Discover OSPF neighbors and establish neighbor
adjacencies. Advertise parameters on which two routers must agree to
become neighbors. Elect the Designated Router and Backup Designated Router
on multi-access networks such as Ethernet and Frame Relay.
Hello Packet Type 1
8/14/2019 chapter-11-ppt-OSPF.ppt
9/84CCNA2-9 Chapter 11
Hello Protocol: Important Fields
8/14/2019 chapter-11-ppt-OSPF.ppt
10/84CCNA2-10 Chapter 11
Hello Protocol: Neighbour Establishment
Before an OSPF router can flood its link states to other
routers, it determines whether there are any other OSPFneighbors on any of its links by sending Hello packets out allconfigured interfaces.
The information in the OSPF Hello includes the OSPFRouter ID of the router sending the Hello packet.
8/14/2019 chapter-11-ppt-OSPF.ppt
11/84CCNA2-11 Chapter 11
Hello Protocol: Neighbour Establishment
Receiving an OSPF Hello packet on an interface confirms for
a router that there is another OSPF router on this link. OSPF then establishes adjacency with the neighbor. Full adjacency happens after both routers have exchanged
any necessary LSUs and have identical link-state databases.
8/14/2019 chapter-11-ppt-OSPF.ppt
12/84CCNA2-12 Chapter 11
Hello Protocol: Neighbour Establishment
Before two routers can form an OSPF neighbor adjacency,
they must also agree on three values: Hello interval Dead interval Network type
8/14/2019 chapter-11-ppt-OSPF.ppt
13/84CCNA2-13 Chapter 11
Hello Protocol: Hello Interval
The OSPF Hello interval indicates how often an OSPF router
transmits its Hello packets. Every 10 seconds on multi-access and point-to-point
segments. Every 30 seconds on non-broadcast multi-access
(NBMA) segments (Frame Relay, X.25, ATM).
8/14/2019 chapter-11-ppt-OSPF.ppt
14/84CCNA2-14 Chapter 11
Hello Protocol: Dead Interval
The OSPF Dead interval is the period, expressed in seconds,
that the router will wait to receive a Hello packet beforedeclaring the neighbor down. Cisco uses a default of four times the Hello interval.
40 seconds for multi-access and point-to-point links.
120 seconds for NBMA networks.
8/14/2019 chapter-11-ppt-OSPF.ppt
15/84CCNA2-15 Chapter 11
Hello Protocol: Dead Interval
If the Dead Interval expires before the routers receive a Hello
packet, OSPF removes that neighbor from its link-statedatabase. The router floods the link- state information about the down
nei ghbor out all OSPF-enabled interfaces.
Stay tuned for Network Type.
8/14/2019 chapter-11-ppt-OSPF.ppt
16/84
CCNA2-16 Chapter 11
Hello Protocol: Electing a DR and BDR
To reduce the amount of OSPF traffic on multi-access
networks, OSPF elects a Designated Router (DR) andBackup Designated Router (BDR). The DR updates all other OSPF routers when a change
occurs in the multi-access network. The BDR takes over as DR if the current DR fails.
8/14/2019 chapter-11-ppt-OSPF.ppt
17/84
CCNA2-17 Chapter 11
Hello Protocol: Electing a DR and BDR
R1, R2, and R3 are connected through point-to-point links so
there is no DR/BDR election. The DR/BDR election and processes is discussed later. The topology will be changed to a multi-access network.
8/14/2019 chapter-11-ppt-OSPF.ppt
18/84
CCNA2-18 Chapter 11
OSPF LSUs
8/14/2019 chapter-11-ppt-OSPF.ppt
19/84
CCNA2-19 Chapter 11
OSPF Algorithm
OSPF usesDijkstras
Algorithm
1 2 3 4
8/14/2019 chapter-11-ppt-OSPF.ppt
20/84
8/14/2019 chapter-11-ppt-OSPF.ppt
21/84
CCNA2-21 Chapter 11
Authentication
Like other routing protocols, OSPF can be configured for
authentication. Authentication ensures that routers will only accept routing
information from other routers that have been configured withthe same password or authentication information.
8/14/2019 chapter-11-ppt-OSPF.ppt
22/84
CCNA2-22 Chapter 11
OSPF
Basic OSPF Configuration
8/14/2019 chapter-11-ppt-OSPF.ppt
23/84
CCNA2-23 Chapter 11
Topology
Notice that the addressing scheme is discontiguous. OSPF is a classless routing protocol so we will include the
subnet mask as part of our configuration. There are three serial links of various bandwidths and each
router has multiple paths to each remote network.
8/14/2019 chapter-11-ppt-OSPF.ppt
24/84
8/14/2019 chapter-11-ppt-OSPF.ppt
25/84
CCNA2-25 Chapter 11
The network Command
The network command used with OSPF has the same
function as when used with other IGP routing protocols: Any interfaces on a router that match the network address in the network command will be enabled to sendand receive OSPF packets.
This network (or subnet) will be included in OSPF routingupdates .
8/14/2019 chapter-11-ppt-OSPF.ppt
26/84
CCNA2-26 Chapter 11
The network Command
OSPF requires the wildcard mask . The network address, along with the wildcard mask, is
used to specify the interface or range of interfaces thatwill be enabled for OSPF using this network command.
8/14/2019 chapter-11-ppt-OSPF.ppt
27/84
CCNA2-27 Chapter 11
The network Command
The area area-id refers to the OSPF area.
An OSPF area is a group of routers that share link-stateinformation. All OSPF routers in the same area must have the same
link-state information in their link-state databases.
8/14/2019 chapter-11-ppt-OSPF.ppt
28/84
CCNA2-28 Chapter 11
Hierarchical Design
Link-staterouting protocols
such as OSPFand IS-IS usethe concept ofareas .
Multiple areas create a hierarchical design to networks,allowing better route aggregation (summarization) and the
isolation of routing issues within an area.
8/14/2019 chapter-11-ppt-OSPF.ppt
29/84
CCNA2-29 Chapter 11
The network Command
network commands for all three routers, enabling OSPF onall interfaces.
At this point, all routers should be able to ping all networks.
8/14/2019 chapter-11-ppt-OSPF.ppt
30/84
CCNA2-30 Chapter 11
OSPF Router ID
The OSPF Router ID plays an important role in OSPF. Later ,you will see how the Router ID is used in the DR and
BDR process. It is used to uniquely identify each router in the OSPF
routing domain.
8/14/2019 chapter-11-ppt-OSPF.ppt
31/84
CCNA2-31 Chapter 11
OSPF Router ID
Highest Active IP Address: A Router ID is simply an IP address . Cisco routers derive the router ID based on three criteria
and with the following precedence:
1. Use the IP address configured with the OSPFrouter-id command.
2. If the Router ID is not configured, the router chooses the
highest IP address of any of its loopback interfaces.3. If no loopback interfaces are configured, the router
chooses the highest active IP address of any of itsphysical interfaces.
8/14/2019 chapter-11-ppt-OSPF.ppt
32/84
CCNA2-32 Chapter 11
OSPF Router ID: Highest Active IP Address
Because we have not configured Router IDs or loopbackinterfaces on our three routers, the Router ID for each routeris determined by the third criterion in the preceding list.
The highest active IP address on any of the routers
physical interfaces.
172.16.1.17
192.168.10.1192.168.10.5
10.10.10.1
192.168.10.2192.168.10.9
172.16.1.33192.168.10.6
192.168.10.10
8/14/2019 chapter-11-ppt-OSPF.ppt
33/84
CCNA2-33 Chapter 11
OSPF Router ID: Highest Active IP Address
Verifying the Router ID:
8/14/2019 chapter-11-ppt-OSPF.ppt
34/84
CCNA2-34 Chapter 11
OSPF Router ID: Loopback Address
The advantage of using a loopback interface is that, unlikephysical interfaces, it cannot fail .
Virtual interface with a /32 subnet mask. Automatically up and up. Very useful in setting Router IDs as they never go down .
Also useful to configure virtual networks that you can pingand route as if they were attached networks.
8/14/2019 chapter-11-ppt-OSPF.ppt
35/84
CCNA2-35 Chapter 11
OSPF Router ID: Loopback Address
10.1.1.1
10.2.2.2
10.3.3.3
8/14/2019 chapter-11-ppt-OSPF.ppt
36/84
CCNA2-36 Chapter 11
OSPF Router ID: router-id Command
The OSPF router-id command is a fairly recent addition to
Cisco IOS software. The OSPF router-id command was introduced in
Cisco IOS Software Release 12.0(T) and takesprecedence over loopback and physical interface IP
addresses for determining the router ID. Because this command is a recent addition, it is more
common to find loopback addresses used for configuringOSPF Router IDs.
8/14/2019 chapter-11-ppt-OSPF.ppt
37/84
CCNA2-37 Chapter 11
OSPF Router ID
Modifying the Router ID: The router ID can be modified with the IP address from asubsequent OSPF router-id command by reloadingthe router or by using the following command:
Modifying a router ID with a new loopback or physicalinterface IP address may require reloading the router.
8/14/2019 chapter-11-ppt-OSPF.ppt
38/84
CCNA2-38 Chapter 11
OSPF Router ID
Duplicate Router IDs: When two routers have the same router ID in an OSPFdomain, routing might not function properly.
If the router ID is the same on two neighboring routers,
the neighbor establishment might not occur. When duplicate OSPF router IDs occur, Cisco IOSsoftware displays the following message.
8/14/2019 chapter-11-ppt-OSPF.ppt
39/84
CCNA2-39 Chapter 11
OSPF Router ID
Verifying Router IDs Loopback Interfaces:
8/14/2019 chapter-11-ppt-OSPF.ppt
40/84
CCNA2-40 Chapter 11
Verifying OSPF
Theshow ip ospf neighbor
command:The Router ID
of theneighbouring
router.
FULL state means that therouters are fully adjacent and
have identical link-state
databases.
The amount of time remainingthat the router will wait to receive
an OSPF Hello packet.
The neighbor'sIP Address and Interface
used to form the
adjacency.
8/14/2019 chapter-11-ppt-OSPF.ppt
41/84
CCNA2-41 Chapter 11
Verifying OSPF
Two routers may not form an OSPF adjacency if any one ofthe following conditions is present: The subnet masks do not match , causing the routers to
be on separate networks.
OSPF Hello or Dead timers do not match. OSPF network types do not match. There is a missing or incorrect OSPF network command.
Other powerful troubleshooting tools:
8/14/2019 chapter-11-ppt-OSPF.ppt
42/84
CCNA2-42 Chapter 11
Examining The Routing Table
The quickest way to verify OSPF convergence is to look atthe routing table for each router. Loopback interfaces are included. Unlike RIPv2 and EIGRP, OSPF does not automatically
summarize at major network boundaries.
8/14/2019 chapter-11-ppt-OSPF.ppt
43/84
CCNA2-43 Chapter 11
OSPF
The OSPF Metric
8/14/2019 chapter-11-ppt-OSPF.ppt
44/84
CCNA2-44 Chapter 11
OSPF Metric
The OSPF metric is called cost .
From RFC 2328: "A cost is associated with the outputside of each router interface. This cost is configurable bythe system administrator. The lower the cost, the morelikely the interface is to be used to forward data traffic. "
8/14/2019 chapter-11-ppt-OSPF.ppt
45/84
8/14/2019 chapter-11-ppt-OSPF.ppt
46/84
CCNA2-46 Chapter 11
OSPF Accumulates Costs
AccumulatedCost = 65
8/14/2019 chapter-11-ppt-OSPF.ppt
47/84
CCNA2-47 Chapter 11
Default Bandwidth on Serial Interfaces
On Cisco routers, the bandwidth value on many serialinterfaces defaults to T1 (1.544 Mbps) and some may defaultto 128 Kbps .
Never assume that OSPF is using any particular bandwidthvalue to calculate cost. Always check the default value with the show interface
command.
8/14/2019 chapter-11-ppt-OSPF.ppt
48/84
CCNA2-48 Chapter 11
Default Bandwidth on Serial Interfaces
Changing the bandwidth value does not affect the speed ofthe link.
It is this value that is used in calculating the metric.
It is important that the bandwidth value reflect the actualspeed of the link so that the routing table has accuratebest path information.
f f
8/14/2019 chapter-11-ppt-OSPF.ppt
49/84
CCNA2-49 Chapter 11
Default Bandwidth on Serial Interfaces
Both WAN linkshave defaulted to1544 Kbit and have
a cost of 128.
f l d d h l f
8/14/2019 chapter-11-ppt-OSPF.ppt
50/84
CCNA2-50 Chapter 11
Default Bandwidth on Serial Interfaces
R1 believes it has two equal costpaths to network 192.168.10.8/30.
Interface S0/0/1 isactually the better path.
f l d id h S i l f
8/14/2019 chapter-11-ppt-OSPF.ppt
51/84
CCNA2-51 Chapter 11
Default Bandwidth on Serial Interfaces
The calculated OSPF cost of an interface can be verified withthe show ip ospf interface command.
As we have seen, this is NOT the cost of a 64 Kbps link.
M dif i h C f Li k
8/14/2019 chapter-11-ppt-OSPF.ppt
52/84
CCNA2-52 Chapter 11
Modifying the Cost of a Link
8/14/2019 chapter-11-ppt-OSPF.ppt
53/84
8/14/2019 chapter-11-ppt-OSPF.ppt
54/84
M dif i h C f Li k
8/14/2019 chapter-11-ppt-OSPF.ppt
55/84
CCNA2-55 Chapter 11
Modifying the Cost of a LinkUseful In multivendor environments.
Both methods produce the same result.
M dif i th C t f Li k
8/14/2019 chapter-11-ppt-OSPF.ppt
56/84
CCNA2-56 Chapter 11
Modifying the Cost of a Link
Interface Type OSPF CostFast Ethernet and Faster (100Mbps or Greater) 1Ethernet (10 Mbps) 10E1 (Europe) 2048 Kbps 46T1 (North America/Japan) 1544 Kbps 64768 Kbps 130512 Kbps 195
256 Kbps 390128 Kbps 78164 Kbps 156256 Kbps 1785
OSPF
8/14/2019 chapter-11-ppt-OSPF.ppt
57/84
CCNA2-57 Chapter 11
OSPF
OSPF and Multi-access Networks
Ch ll g i M lti N t k
8/14/2019 chapter-11-ppt-OSPF.ppt
58/84
CCNA2-58 Chapter 11
Challenges in Multi-access Networks
Multi-access Broadcast network because a single device iscapable of sending a single frame that has all devices on thenetwork as its destination.
As opposed to the point-to-point links we have been using.
Ch ll g i M lti N t k
8/14/2019 chapter-11-ppt-OSPF.ppt
59/84
CCNA2-59 Chapter 11
Challenges in Multi-access Networks
OSPFdefinesfivenetworktypes:
Point-to-Point Broadcast Multi-access Non-broadcast Multi-access (NBMA)
(Frame Relay - MIT446) Point to Multipoint
Virtual links
Challenges in Multi access Networks
8/14/2019 chapter-11-ppt-OSPF.ppt
60/84
CCNA2-60 Chapter 11
Challenges in Multi-access Networks
Multi-access networks can create two challenges for OSPFregarding the flooding of LSAs:
Creation of multiple adjacencies, one adjacency for everypair of routers.
Extensive flooding of LSAs.
Multiple Adjacencies
8/14/2019 chapter-11-ppt-OSPF.ppt
61/84
CCNA2-61 Chapter 11
Multiple Adjacencies
The creation of an adjacency between every pair of routers ina network would cause the number of adjacencies to growexponentially.
Multiple Adjacencies
8/14/2019 chapter-11-ppt-OSPF.ppt
62/84
CCNA2-62 Chapter 11
Multiple Adjacencies
Link-state routers flood their link-state packets when OSPF isinitialized or when there i s a change in the topology.
This would lead to an excessive number of LSAs.
Solution: Designated Router
8/14/2019 chapter-11-ppt-OSPF.ppt
63/84
CCNA2-63 Chapter 11
Solution: Designated Router
The solution to managingthe number of adjacenciesand the flooding of LSAson a multi-access networkis the Designated Router (DR).
On multi-access networks,OSPF elects a DR to bethe collection anddistribution point for LSAs sent and received.
A Backup Designated Router (BDR) is also elected in casethe DR fails.
All other routers become DROthers .
Solution: Designated Router
8/14/2019 chapter-11-ppt-OSPF.ppt
64/84
CCNA2-64 Chapter 11
Solution: Designated Router
DROthers only form full adjacencies with the DR and BDR inthe network.
Instead of flooding LSAs to all routers in the network,DROthers only send their LSAs to the DR and BDR using the
multicast address 224.0.0.6 .
Solution: Designated Router
8/14/2019 chapter-11-ppt-OSPF.ppt
65/84
CCNA2-65 Chapter 11
Solution: Designated Router
Only the DR and BDR are listening for LSAs on multicastaddress 224.0.0.6.
When R1 sends its LSAs, both receive them.
224.0.0.6
Solution: Designated Router
8/14/2019 chapter-11-ppt-OSPF.ppt
66/84
CCNA2-66 Chapter 11
Solution: Designated Router
The DR then forwards the LSAs from R1 to all other routersusin g the multicast address 224.0.0.5 .
Result: Only one router flooding all LSAs .
224.0.0.5
DR/BDR Election Process
8/14/2019 chapter-11-ppt-OSPF.ppt
67/84
CCNA2-67 Chapter 11
DR/BDR Election Process
DR/BDR elections do not occur in point-to-point networks.
DR/BDR Election Process
8/14/2019 chapter-11-ppt-OSPF.ppt
68/84
CCNA2-68 Chapter 11
DR/BDR Election Process
In this new topology, we have three routers sharing acommon Ethernet multiaccess network, 192.168.1.0/24.
Each router is configured with an IP address on the FastEthernet interface and a loopback address for the router ID .
DR/BDR Election Process
8/14/2019 chapter-11-ppt-OSPF.ppt
69/84
CCNA2-69 Chapter 11
DR/BDR Election Process
How do the DRand BDR getelected?
The followingcriteria areapplied:
1. DR: Router with the highest OSPF interface priority .2. BDR: Router with the second highest OSPF interface
priority .3. If OSPF interface priorities are equal, the highest router
ID is used to break the tie.
DR/BDR Election Process
8/14/2019 chapter-11-ppt-OSPF.ppt
70/84
CCNA2-70 Chapter 11
DR/BDR Election Process
Assuming that the router priority is the default, what is theresult of the election?
DR
BDR
DR/BDR Election Process
8/14/2019 chapter-11-ppt-OSPF.ppt
71/84
CCNA2-71 Chapter 11
DR/BDR Election Process
The show ip ospf neighbor command displays theneighbour adjacencies of each router. Notice that the interface priority has not been changed so the
Router ID (loopback address) will be used .
DR/BDR Election Process
8/14/2019 chapter-11-ppt-OSPF.ppt
72/84
CCNA2-72 Chapter 11
DR/BDR Election Process
DROthers only form full adjacencies with the DR and BDRbut will still form a neighbor adjacency with any DROthersthat join the network.
This means that they will still receive Hello packets so thatthey are aware of all routers in the network.
8/14/2019 chapter-11-ppt-OSPF.ppt
73/84
DR/BDR Election Process
8/14/2019 chapter-11-ppt-OSPF.ppt
74/84
CCNA2-74 Chapter 11
DR/BDR Election Process
Pri = 200
Pri = 100
Pri = 1
DR/BDR Election Process
8/14/2019 chapter-11-ppt-OSPF.ppt
75/84
CCNA2-75 Chapter 11
DR/BDR Election Process
Pri = 200
Pri = 100
Pri = 1
DR
BDR
OSPF
8/14/2019 chapter-11-ppt-OSPF.ppt
76/84
CCNA2-76 Chapter 11
OSPF
More OSPF Configuration
Redistributing an OSPF Default Route
8/14/2019 chapter-11-ppt-OSPF.ppt
77/84
CCNA2-77 Chapter 11
Redistributing an OSPF Default Route
Lets return to the earlier topology, which now includes a newlink to an ISP.
Redistributing an OSPF Default Route
8/14/2019 chapter-11-ppt-OSPF.ppt
78/84
CCNA2-78 Chapter 11
Redistributing an OSPF Default Route
The router connected to the Internet is used to propagate adefault route to other routers in the OSPF routing domain.
This router is sometimes called the edge, entrance, orgateway router.
Redistributing an OSPF Default Route
8/14/2019 chapter-11-ppt-OSPF.ppt
79/84
CCNA2-79 Chapter 11
Redistributing an OSPF Default Route
Like RIP, OSPF requiresthe use of thedefault-information originate command toadvertise the 0.0.0.0/0 static default route to the other routersin the area.
If the default-information originate command is notused, the default quad zero route will not be propagated toother routers in the OSPF area.
Redistributing an OSPF Default Route
8/14/2019 chapter-11-ppt-OSPF.ppt
80/84
CCNA2-80 Chapter 11
Redistributing an OSPF Default Route
8/14/2019 chapter-11-ppt-OSPF.ppt
81/84
Reference Bandwidth
8/14/2019 chapter-11-ppt-OSPF.ppt
82/84
CCNA2-82 Chapter 11
100,000,000 (10 8) is thedefault bandwidthreferenced when theactual bandwidth isconverted into a
cost metric. As you know from previous studies, we now have link speeds
that are much faster than Fast Ethernet speeds, includingGigabit Ethernet and 10GigE.
Using a reference bandwidth of 100,000,000 results ininterfaces with bandwidth values of 100 Mbps and higherhaving the same OSPF cost of 1 .
Reference Bandwidth
8/14/2019 chapter-11-ppt-OSPF.ppt
83/84
CCNA2-83 Chapter 11
To obtain more accurate cost calculations, it might benecessary to adjust the reference bandwidth value.
The reference bandwidth can be modified to accommodatethese faster links by using the OSPF commandauto-cost reference-bandwidth .
When it is used, use it on all routers. The cost calculationswill produce a proper metric.
Bandwidth of 10GigE
8/14/2019 chapter-11-ppt-OSPF.ppt
84/84