of 61
8/13/2019 ICND2 Chapter 9
1/61
Any Questions?
8/13/2019 ICND2 Chapter 9
2/61
Chapter 9 OSPF OSPF Protocols and Operation
OSPF Configuration
8/13/2019 ICND2 Chapter 9
3/61
Do I know this?Go through the Quiz-
5 minutes
8/13/2019 ICND2 Chapter 9
4/61
1. Which of the following affects the calculation ofOSPF routes when all possible default valuesare used?
a. Bandwidth
b. Delay
c. Load
d. Reliabilitye. MTU
f. Hop count
8/13/2019 ICND2 Chapter 9
5/61
1. Which of the following affects the calculation ofOSPF routes when all possible default valuesare used?
a. Bandwidth
b. Delay
c. Load
d. Reliabilitye. MTU
f. Hop count
Answer: A
8/13/2019 ICND2 Chapter 9
6/61
2. OSPF runs an algorithm to calculate the
currently best route. Which of the following terms
refer to that algorithm?a. SPF
b. DUAL
c. Feasible successord. Dijkstra
e. Good old common sense
8/13/2019 ICND2 Chapter 9
7/61
2. OSPF runs an algorithm to calculate the
currently best route. Which of the following terms
refer to that algorithm?a. SPF
b. DUAL
c. Feasible successord. Dijkstra
e. Good old common sense
Answer: A & D
8/13/2019 ICND2 Chapter 9
8/61
3. Two OSPF routers connect to the same VLAN usingtheir Fa0/0 interfaces. Which of the following settings onthe interfaces of these two potentially neighboringrouters would prevent the two routers from becomingOSPF neighbors?
a. IP addresses of 10.1.1.1/24 and 10.1.1.254/25,respectively
b. The addition of a secondary IP address on one router'sinterface, but not the other
c. Both router interfaces assigned to area 3
d. One router is configured to use MD5 authentication, andthe other is not configured to use authentication
8/13/2019 ICND2 Chapter 9
9/61
3. Two OSPF routers connect to the same VLAN usingtheir Fa0/0 interfaces. Which of the following settings onthe interfaces of these two potentially neighboringrouters would prevent the two routers from becomingOSPF neighbors?
a. IP addresses of 10.1.1.1/24 and 10.1.1.254/25,respectively
b. The addition of a secondary IP address on one router'sinterface, but not the other
c. Both router interfaces assigned to area 3
d. One router is configured to use MD5 authentication, andthe other is not configured to use authentication
Answer: A &D
8/13/2019 ICND2 Chapter 9
10/61
4. Which of the following OSPF neighborstates is expected when the exchange of
topology information is complete so thatneighboring routers have the same LSDB?
a. Two-way
b. Fullc. Exchange
d. Loading
8/13/2019 ICND2 Chapter 9
11/61
4. Which of the following OSPF neighborstates is expected when the exchange of
topology information is complete so thatneighboring routers have the same LSDB?
a. Two-way
b. Fullc. Exchange
d. Loading
Answer: B
8/13/2019 ICND2 Chapter 9
12/61
5. Which of the following is true about an existing OSPFdesignated router?
a.A newly connected router in the same subnet, with ahigher OSPF priority, preempts the existing DR tobecome the new DR.
b.A newly connected router in the same subnet, with alower OSPF priority, preempts the existing DR tobecome the new DR.
c. The DR may be elected based on the lowest OSPFRouter ID.
d. The DR may be elected based on the highest OSPFRouter ID.
e. The DR attempts to become fully adjacent with everyother neighbor on the subnet.
8/13/2019 ICND2 Chapter 9
13/61
5. Which of the following is true about an existing OSPFdesignated router?
a.A newly connected router in the same subnet, with ahigher OSPF priority, preempts the existing DR tobecome the new DR.
b.A newly connected router in the same subnet, with alower OSPF priority, preempts the existing DR tobecome the new DR.
c. The DR may be elected based on the lowest OSPFRouter ID.
d. The DR may be elected based on the highest OSPFRouter ID.
e. The DR attempts to become fully adjacent with everyother neighbor on the subnet.
Answer: D&E
8/13/2019 ICND2 Chapter 9
14/61
6. Which of the following network commands,following the command router ospf 1, tells thisrouter to start using OSPF on interfaces whoseIP addresses are 10.1.1.1, 10.1.100.1, and10.1.120.1?
a. network 10.0.0.0 255.0.0.0 area 0
b. network 10.0.0.0 0.255.255.255 area 0c. network 10.0.0.1 255.0.0.255 area 0
d. network 10.0.0.1 0.255.255.0 area 0
8/13/2019 ICND2 Chapter 9
15/61
6. Which of the following network commands,following the command router ospf 1, tells thisrouter to start using OSPF on interfaces whoseIP addresses are 10.1.1.1, 10.1.100.1, and10.1.120.1?
a. network 10.0.0.0 255.0.0.0 area 0
b. network 10.0.0.0 0.255.255.255 area 0c. network 10.0.0.1 255.0.0.255 area 0
d. network 10.0.0.1 0.255.255.0 area 0
Answer: B
8/13/2019 ICND2 Chapter 9
16/61
7. Which of the following network commands,following the command router ospf 1, tells thisrouter to start using OSPF on interfaces whose
IP addresses are 10.1.1.1, 10.1.100.1, and10.1.120.1?
a. network 0.0.0.0 255.255.255.255 area 0
b. network 10.0.0.0 0.255.255.0 area 0
c. network 10.1.1.0 0.x.1x.0 area 0d. network 10.1.1.0 255.0.0.0 area 0
e. network 10.0.0.0 255.0.0.0 area 0
8/13/2019 ICND2 Chapter 9
17/61
7. Which of the following network commands,following the command router ospf 1, tells thisrouter to start using OSPF on interfaces whose
IP addresses are 10.1.1.1, 10.1.100.1, and10.1.120.1?
a. network 0.0.0.0 255.255.255.255 area 0
b. network 10.0.0.0 0.255.255.0 area 0
c. network 10.1.1.0 0.x.1x.0 area 0d. network 10.1.1.0 255.0.0.0 area 0
e. network 10.0.0.0 255.0.0.0 area 0
Answer: A
8/13/2019 ICND2 Chapter 9
18/61
8. Which of the following commands list the OSPF
neighbors off interface serial 0/0?
a. show ip ospf neighborb. show ip ospf interface
c. show ip neighbor
d. show ip interfacee. show ip ospf neighbor interface serial 0/0
8/13/2019 ICND2 Chapter 9
19/61
8. Which of the following commands list the OSPF
neighbors off interface serial 0/0?
a. show ip ospf neighborb. show ip ospf interface
c. show ip neighbor
d. show ip interfacee. show ip ospf neighbor interface serial 0/0
Answer: A, B & E
8/13/2019 ICND2 Chapter 9
20/61
9. OSPF routers R1, R2, and R3 attach to the same VLAN. R2 hasbeen configured with the ip ospf authentication message-digestinterface subcommand on the LAN interface connected to thecommon VLAN. The show ip ospf neighbor command lists R1 andR3 as neighbors, in an Init and Full state, respectively. Which of thefollowing are true?
a. R3 must have an ip ospf authentication message-digest interfacesubcommand configured.
b. R3 must have an ip ospf authentication message-digest-keyinterface subcommand configured.
c. R1's failure must be because of having configured an incorrectOSPF authentication type.
d. R1's failure may or may not be related to authentication.
8/13/2019 ICND2 Chapter 9
21/61
9. OSPF routers R1, R2, and R3 attach to the same VLAN. R2 hasbeen configured with the ip ospf authentication message-digestinterface subcommand on the LAN interface connected to thecommon VLAN. The show ip ospf neighbor command lists R1 andR3 as neighbors, in an Init and Full state, respectively. Which of thefollowing are true?
a. R3 must have an ip ospf authentication message-digest interfacesubcommand configured.
b. R3 must have an ip ospf authentication message-digest-keyinterface subcommand configured.
c. R1's failure must be because of having configured an incorrectOSPF authentication type.
d. R1's failure may or may not be related to authentication.
Answer: B & D
8/13/2019 ICND2 Chapter 9
22/61
10.An OSPF router learns about six possible routes toreach subnet 10.1.1.0/24. All six routes have a cost of55, and all six are interarea routes. By default, how many
of these routes are placed in the routing table?a. 1
b. 2
c. 3
d. 4e. 5
f. 6
8/13/2019 ICND2 Chapter 9
23/61
10.An OSPF router learns about six possible routes toreach subnet 10.1.1.0/24. All six routes have a cost of55, and all six are interarea routes. By default, how many
of these routes are placed in the routing table?a. 1
b. 2
c. 3
d. 4e. 5
f. 6
Answer: D
8/13/2019 ICND2 Chapter 9
24/61
Any Questions?
8/13/2019 ICND2 Chapter 9
25/61
OSPF Operation Neighbors
How do I get to be a neighbor
Database Exchange
Only done with neighbors
Route Calculation
Once I have details, use SPF
Pg 347
8/13/2019 ICND2 Chapter 9
26/61
OSPF Neighbor Another router that connects to the same
data link with which the first router can
exchange OSPF information Match OSPF settings on both routers
OSPF Hello lets us find neighbors
Pg 347
8/13/2019 ICND2 Chapter 9
27/61
OSPF Router ID Router ID is used to control OSPF
Uniquely identify each router
32 bit number IP Address
Manual config if you want
Pg 348
8/13/2019 ICND2 Chapter 9
28/61
HELLO Can be neighbors if on the same subnet
Router sends multicast OSPF Hello
Listens for other Router Hellos
Keep sending based on a timer
Hello contains: RID
Area ID
Hello Interval Dead Interval
Router priority
Designated RID
Backup Designated RID
Pg 349
8/13/2019 ICND2 Chapter 9
29/61
Any Questions?
8/13/2019 ICND2 Chapter 9
30/61
Neighbors Getting a HELLO does not mean you become a
neighbor
Subnet mask used on the subnet Subnet number (as derived using the subnet mask
and each router's interface IP address)
Hello interval
Dead interval OSPF area ID
Must pass authentication checks (if used)
Value of the stub area flag
Pg 349
8/13/2019 ICND2 Chapter 9
31/61
Neighbor States
Once a router sees its own ID in HELLO, and meets the
checks, it becomes neighbor States
Down-interface down
Init-sending Hello
2-way-Router sees its ID in hello from next router
Pg 350
8/13/2019 ICND2 Chapter 9
32/61
OSPF Topology Sharing Step 1 Based on the OSPF interface type, the
routers may or may not collectively elect a
Designated Router (DR) and BackupDesignated Router (BDR).
Step 2 For each pair of routers that need to
become fully adjacent, mutually exchange the
contents of their respective LSDBs. Step 3 When completed, the neighbors monitor
for changes and periodically reflood LSAs while
in the Full (fully adjacent) neighbor state.Pg 352
8/13/2019 ICND2 Chapter 9
33/61
Choosing Designated ROUTER OSPF knows two kinds of networks
Broadcast-Like Ethernet or point to multipoint
Needs DR DR is hub of topology sharing. Everyone shares to
DR who sumamrizess and sends out details
Point to point
No DR
All routers share information
Pg 352
8/13/2019 ICND2 Chapter 9
34/61
Designated Router
Pg 353
8/13/2019 ICND2 Chapter 9
35/61
Electing Designated Routers The router sending the Hello with the highest OSPF
priority setting becomes the DR.
If two or more routers tie with the highest priority setting,the router sending the Hello with the highest RID wins.
It's not always the case, but typically the router with thesecond-highest priority becomes the BDR.
A priority setting of 0 means that the router does notparticipate in the election and can never become the DRor BDR.
The range of priority values that allow a router to be acandidate are 1 through 255.
If a new, better candidate comes along after the DR andBDR have been elected, the new candidate does notpreempt the existing DR and BDR.
Pg 354
8/13/2019 ICND2 Chapter 9
36/61
Any Questions?
8/13/2019 ICND2 Chapter 9
37/61
Database Exchange Send a list of LSAs
Not full details
If a router needs more details, then the fullLSA is sent from neighbor
Then they are fully completed
converged
Pg 354
8/13/2019 ICND2 Chapter 9
38/61
Keeping up to date Hellos sent on interval
LSAs updated every 30 minutes
Individual routes, not all of them
If there is a change, LSA is triggered
Pg 355
8/13/2019 ICND2 Chapter 9
39/61
Summary of OSPF states
Pg 355
Neighbor
Stat
Meaning
Down A known neighbor is no longer reachable, often because of an
underlying interface failure.
Init An interim state in which a Hello has been heard from the neighbor, but
that Hello does not list the router's RID as having been seen yet.
Two-way The neighbor has sent a Hello that lists the local router's RID in the list
of seen routers, also implying that neighbor verification checks all
passed.Full Both routers know the exact same LSDB details and are fully adjacent.
8/13/2019 ICND2 Chapter 9
40/61
Routing Tables from OSPF The OSPF database lists all routers and
links
Each router uses Dijkstra SPF algorithm tofind best path to destination networks
Best path is based on OSPF cost
Pg 356
8/13/2019 ICND2 Chapter 9
41/61
Any Questions?
8/13/2019 ICND2 Chapter 9
42/61
OSPF and Large Networks A larger topology database requires more
memory on each router.
Processing the larger-topology databasewith the SPF algorithm requiresprocessing power that grows exponentiallywith the size of the topology database.
A single interface status change (up todown or down to up) forces every router torun SPF again!
Pg 358
8/13/2019 ICND2 Chapter 9
43/61
OSPF Areas Divide larger networks into Areas
Limit how much detail each router needs to
know Routers in different areas just need to know to
send a packet to an area, not the details of
the area
Pg 358
8/13/2019 ICND2 Chapter 9
44/61
OSPF Areas
Pg 359
8/13/2019 ICND2 Chapter 9
45/61
OSPF Terminology
Pg 359
Term DescriptionArea Border Router (ABR) An OSPF router with interfaces connected to the backbone area and
to at least one other area.
Autonomous System
Border Router (ASBR)
An OSPF router that connects to routers that do not use OSPF for
the purpose of exchanging external routes into and out of the
OSPF domain.
Backbone router A router in one area, the backbone area.
Internal router A router in a single nonbackbone area.
Area A set of routers and links that share the same detailed LSDB
information, but not with routers in other areas, for better
efficiency.
Backbone area A special OSPF area to which all other areas must connect. Area 0.External route A route learned from outside the OSPF domain and then advertised
into the OSPF domain.
Intra-area route A route to a subnet inside the same area as the router.
Interarea route A route to a subnet in an area of which the router is not a part.
Autonomous system In OSPF, a reference to a set of routers that use OSPF.
8/13/2019 ICND2 Chapter 9
46/61
Configuring OSPF Enabling OSPF
Router OSPF [process #]
Process number doesnt matter-between 1 and 65,535
Configure Router ID (optional)
Router-id [id value]
Configuring OSPF Areas Network 10.0.0.0 0.255.255.255 area #
Wildcards
Pg 361
8/13/2019 ICND2 Chapter 9
47/61
Wildcards Used in OSPF and Access Lists
0 means that the corresponding octet must
match exactly 255 means that corresponding octet can beanything
10.0.0.0 0.255.255.255
Anything starting with 10.
192.168.10.0 0.0.255.255
Anything starting with 192.168
Pg 361
8/13/2019 ICND2 Chapter 9
48/61
OSPF Configuration Change interval times (optional)
Ip ospf hello-interval time
ip ospf dead-interval time interface
Change Costs or Bandwidth
ip ospf cost value interface subcommand
bandwidth value interface subcommand auto-cost reference-bandwidth value router
subcommand
Pg 361
8/13/2019 ICND2 Chapter 9
49/61
OSPF Configuration OSPF Authentication (Optional)
ip ospf authentication interface
subcommand. area authentication router subcommand.
Configure support for multiple equal-cost
routes using maximum-paths number router
subcommand
Pg 362
8/13/2019 ICND2 Chapter 9
50/61
Any Questions?
8/13/2019 ICND2 Chapter 9
51/61
OSPF In action
interface ethernet 0/0
ip address 10.1.1.1 255.255.255.0
interface serial 0/0
ip address 10.1.4.1 255.255.255.0
interface serial 0/1
ip address 10.1.6.1 255.255.255.0
!
router ospf 1
network 10.0.0.0 0.255.255.255 area 0
Pg 362
8/13/2019 ICND2 Chapter 9
52/61
OSPF With Multiple Areas Must have an area 0
Make good choices
on areas Decide which subnets
are on which areas
Look at area border
routers
Pg 364
8/13/2019 ICND2 Chapter 9
53/61
How to program a subnet into a different
area router ospf 1
network 10.1.1.1 0.0.0.0 area 0
network 10.1.4.1 0.0.0.0 area 1
network 10.1.6.1 0.0.0.0 area 0
Pg 365
8/13/2019 ICND2 Chapter 9
54/61
OSPF Router ID Setting the router ID can affect DR election
1. If the router-id rid OSPF subcommand isconfigured, this value is used as the RID.
2. If any loopback interfaces have an IP addressconfigured and the interface has a line andprotocol status of up/up, the router picks thehighest numeric IP address among the up/up
loopback interfaces. 3. The router picks the highest numeric IPaddress from all other working (up/up)interfaces.
Pg 366
8/13/2019 ICND2 Chapter 9
55/61
Loopback Interfaces Virtual interfaces on a router not tied toa
physical interface
Always up up
Useful for setting an ID that will not be
affected by the state of the physical
interfaces
Pg 367
8/13/2019 ICND2 Chapter 9
56/61
Hello and Dead Timers Can be altered to change amount of traffic
Need to be the same among routers that
should become neighbors
Pg 368
8/13/2019 ICND2 Chapter 9
57/61
OSPF Metric (COST)
1. The cost can be explicitly set using the ip ospf costxinterface subcommand, to a value between 1 and65,535, inclusive.
2. IOS can calculate a value based on the genericformula Ref-BW / Int-BW, where Ref- BW is a referencebandwidth that defaults to 100 Mbps, and Int-BW is theinterface's bandwidth setting.
3. The reference bandwidth can be configured from its
default setting of 100 (100 Mbps) using the router OSPFsubcommand auto-cost reference-bandwidth ref-bw,which in turn affects the calculation of the defaultinterface cost.
Pg 369
8/13/2019 ICND2 Chapter 9
58/61
OSPF Authentication
Without Authentication, routers can
receive false updates
Null No password
Text password
Easy to sniff
MD5 hash
Most secure and should be used if any
Pg 370
8/13/2019 ICND2 Chapter 9
59/61
OSPF Authentication
Pg 372
Type Meaning Command to Enable
Authentication
What the Password Is Configured
With
0 None ip ospf authentication null
1 Clear text ip ospf authentication ip ospf authentication-key key-value
2 MD5 ip ospf authentication
messagedigest
ip ospf message-digest-key key-number
md5 key-value
8/13/2019 ICND2 Chapter 9
60/61
Load Balancing
Ability to share load among paths of equal
cost
Default is 4 Up to 16
Maximum paths # command
Pg 372
8/13/2019 ICND2 Chapter 9
61/61
Any Questions?