Instructor Materials Chapter 8: Single-Area Ospf: CCNA Routing and Switching Scaling Networks
Instructor Materials Chapter 8: Single-Area Ospf: CCNA Routing and Switching Scaling Networks
Instructor Materials Chapter 8: Single-Area Ospf: CCNA Routing and Switching Scaling Networks
Chapter 8: Single-Area
OSPF
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential 1
Chapter 8 - Sections & Objectives
8.1 OSPF Characteristics
Explain how single-area OSPF operates.
8.2 Single-Area OSPFv2
Implement single-area OSPFv2.
8.3 Single-Area OSPFv3
Implement single-area OSPFv3.
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
8.1 OSPF Characteristics
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential 3
OSPF Characteristics
Open Shortest Path First
OSPF
Version 2 (OSPFv2) is available for IPv4 while OSPF version 3 (OSPFv3)
is available for IPv6.
3 Main Components
Data Structures, Routing Protocol Messages, and Algorithm
Achieving Convergence:
Establish Neighbor Adjacencies
Exchange Link-State Advertisements
Build the Topology Table
Execute the SPF Algorithm
OSPF can be implemented in
one of two ways:
Single-Area OSPF
Multi-area OSPF
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
OSPF Characteristics
OSPF Messages
LSP Types:
Type 1: Hello packet
Type 2: Database Description (DBD) packet
Type 3: Link-State Request (LSR) packet
Type 4: Link-State Update (LSU) packet
Type 5: Link-State Acknowledgment (LSAck) packet
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
OSPF Characteristics
OSPF Messages (Cont.)
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
OSPF Characteristics
OSPF Operation
OSPF progresses through several states while attempting to
reach convergence
Down state, Init state, Two-Way state, ExStart state, Exchange
state, Loading state, and Full state
Establishing Adjacencies
When a neighboring OSPF-enabled router receives a Hello
packet with a router ID that is not within its neighbor list, the
receiving router attempts to establish an adjacency with the
initiating router.
OSPF DR and BDR
On multiaccess networks, OSPF elects a DR to be the collection
and distribution point for LSAs sent and received. A BDR is also
elected in case the DR fails.
After the Two-Way state, routers transition to database
synchronization states.
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
8.2 Single-Area OSPFv2
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential 8
Single-Area OSPFv2
OSPF Router ID
Enabling OSPFv2
OSPFv2 is enabled using
the router ospf process-id
global configuration mode
command.
The process-id value
represents a number between
1 and 65,535 and is selected
by the network administrator.
The process-id value is locally
significant, which means that it
does not have to be the same
value on the other OSPF
routers to establish
adjacencies with those
neighbors.
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
Single-Area OSPFv2
OSPF Router ID (Cont.)
Router ID
The router ID is used by the OSPF-enabled router to uniquely
identify the router and participate in the election of the DR
Router ID based on one of three criteria
Explicitly configured using the OSPF router-id rid command
Router chooses the highest IPv4 address of any of configured
loopback interfaces
If no loopback interfaces are configured, then the router chooses
the highest active IPv4 address of any of its physical interfaces
Clearing the OSPF process is the preferred method to reset the
router ID.
Note: The router ID looks like an IPv4 address, but it is not
routable and, therefore, is not included in the routing table, unless
the OSPF routing process chooses an interface (physical or
loopback) that is appropriately defined by a network command.
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
Single-Area OSPFv2
Configure Single-Area OSPFv2
Enabling OSPF
Any interfaces on a router that match the network address in
the network command are enabled to send and receive
OSPF packets.
Wildcard Mask
In a wildcard mask, binary 0 is equal to a match and binary 1
is not a match.
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
Single-Area OSPFv2
Configure Single-Area OSPFv2 (Cont.)
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
Single-Area OSPFv2
OSPF Cost
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
Single-Area OSPFv2
OSPF Cost (Cont.)
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
Single-Area OSPFv2
Verify OSPF
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
Single-Area OSPFv2
Verify OSPF (Cont.)
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
8.3 Single-Area OSPFv3
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential 17
Single-Area OSPFv3
OSPFv2 vs. OSPFv3
OSPFv3
Similar to its IPv4
counterpart, OSPFv3
exchanges routing
information to
populate the IPv6
routing table with
remote prefixes
Packets with a
source or destination
link-local address
cannot be routed
beyond the link from
where the packet
originated.
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
Single-Area OSPFv3
OSPFv2 vs. OSPFv3 (Cont.)
Link-Local Addresses
Link-local addresses are automatically created when an IPv6
global unicast address is assigned to the interface.
Assigning Link-Local Addresses
Link-local addresses can be configured manually using the same
interface command used to create IPv6 global unicast addresses,
but appending the link-local keyword to the ipv6
address command.
Configuring the OSPFv3 Router ID
OSPFv3 requires a 32-bit router ID to be assigned before OSPF
can be enabled on an interface.
The router-id rid command is used to assign a router ID in
OSPFv3.
Clearing the OSPF process is the preferred method to reset the
router ID.
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
Single-Area OSPFv3
Configuring OSPFv3
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
Single-Area OSPFv3
Verify OSPFv3
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
Single-Area OSPFv3
Verify OSPFv3 (Cont.)
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
8.4 Chapter Summary
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential 23
Chapter Summary
Summary
The current version of OSPF for IPv4 is OSPFv2 introduced in RFC 1247 and updated in RFC 2328 by John Moy.
In 1999, OSPFv3 for IPv6 was published in RFC 2740.
OSPF is a link-state routing protocol with a default administrative distance of 110, and is denoted in the routing
table with a route source code of O.
OSPFv2 is enabled with the router ospf process-id global configuration mode command. The process-id value is
locally significant, which means that it does not need to match other OSPFv2 routers to establish adjacencies with
those neighbors.
The network command used with OSPFv2 has the same function as when used with other IGP routing protocols,
but with slightly different syntax. The wildcard-mask value is the inverse of the subnet mask, and the area-id value
should be set to 0.
By default, OSPF Hello packets are sent every 10 seconds on multi-access and point-to-point segments and every
30 seconds on NBMA segments (Frame Relay, X.25, ATM), and are used by OSPF to establish neighbor
adjacencies. The Dead interval is four times the Hello interval, by default.
For routers to become adjacent, their Hello interval, Dead interval, network types, and subnet masks must match.
Use the show ip ospf neighbors command to verify OSPFv2 adjacencies.
OSPF elects a DR to act as collection and distribution point for LSAs sent and received in the multi-access
network. A BDR is elected to assume the role of the DR should the DR fail. All other routers are known as
DROTHERs. All routers send their LSAs to the DR, which then floods the LSA to all other routers in the multi-
access network.
The show ip protocols command is used to verify important OSPFv2 configuration information, including the OSPF
process ID, the router ID, and the networks the router is advertising.
OSPFv3 is enabled on an interface and not under router configuration mode. OSPFv3 needs link-local addresses
to be configured. IPv6 Unicast routing must be enabled for OSPFv3. A 32-bit router-ID is required before an
interface can be enabled for OSPFv3. Similar verification commands used for OSPFv2 are used for OSPFv3.
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›
Presentation_ID © 2017 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›