CCNA 200-301 Chapter 20 - Implementing OSPF
CCNA 200-301 Chapter 20 - Implementing OSPF
Chapter 20
Implementing OSPF
Objectives
• Implementing Single-Area OSPFv2
▫ B. Use the interface loopback number global command, along with an ip address address
mask command, to configure an IP address on a loopback interface (chooses the highest IP
address of all working loopbacks).
▫ C. Rely on an interface IP address (chooses the highest IP address of all working nonloopbacks).
• The router ospf 1 global command puts the users into OSPF configuration
mode and sets the OSPF process-id to 1.
• This process-id just needs to be unique on the local router and be between 1
and 65,535.
• The OSPF network command tells the router to find its local interfaces
that match the first two parameters in the command.
▫ Wildcard 0.0.0.0: Compare all 4 octets. In other words, the numbers must exactly match.
▫ Wildcard 0.0.0.255: Compare the first 3 octets only. Ignore the last octet when comparing the
numbers.
▫ Wildcard 0.0.255.255: Compare the first 2 octets only. Ignore the last 2 octets when
comparing the numbers.
▫ Wildcard 0.255.255.255: Compare the first octet only. Ignore the last 3 octets when
comparing the numbers.
▫ Wildcard 255.255.255.255: Compare nothing—this wildcard mask means that all addresses
will match the network command.
Matching with the OSPF network
Command
Matching with the OSPF network
Command
OSPF Verification Commands
Verifying OSPFv2 Single Area
• Interface: This is the local router’s interface connected to the neighbor. For
example, the first neighbor in the list is reachable through R3’s S0/0/0
interface.
• Address: This is the neighbor’s IP address on that link. Again, for this first
neighbor, the neighbor, which is R1, uses IP address 10.1.13.1.
• State: While many possible states exist, for the details discussed in this
chapter, FULL is the correct and fully working state in this case.
• For the purposes of the CCNA knowledge of the specifics about the output
of this command are not required.
IPv4 Routes Added by OSPF
Router R3 Configuration and the show ip protocols Command
show ip ospf interface brief Command
Configuring the OSPF Router ID
• OSPF speaking routers must have a router-ID (RID) for proper operation.
• A Cisco router uses the following process when the router reloads and
brings up the OSPF process to find the RID:
1. If the router-id rid OSPF subcommand is configured, this value is used as the RID.
2. If any loopback interfaces have an IP address configured, and the interface has an interface
status of up, the router picks the highest numeric IP address among these loopback
interfaces.
3. The router picks the highest numeric IP address from all other interfaces whose interface
status code (first status code) is up. (In other words, an interface in up/down state will be
included by OSPF when choosing its router ID.)
OSPF Router ID Configuration
Examples
Implementing Multiarea OSPF
OSPF Single-Area Configuration
OSPF Single-Area Configuration
OSPF Passive Interfaces
• An OSPF interface configured as passive will do the following:
▫ Adding the passive-interface type number command under router configuration mode.
▫ The show ip ospf interface brief command lists all interfaces on which OSPF is enabled including passive
interfaces.
▫ The show ip ospf interface command lists a single line that mentions that the interface is passive.
OSPF Default Routes
• The most classic case for using a routing protocol to advertise a default
route has to do with an enterprise’s connection to the Internet.
▫ All routers learn specific routes for subnets inside the company; a default route is not needed
when forwarding packets to these destinations.
▫ One router connects to the Internet, and it has a default route that points toward the Internet.
▫ All routers should dynamically learn a default route, used for all traffic going to the Internet,
so that all packets destined to locations in the Internet go to the one router connected to the
Internet.
OSPF Default Routes
• R1 has a static default route with a next-hop address of the ISP router.
• R1 needs a default route, either defined as a static default route, learned from the
ISP with DHCP or learned from the ISP with a routing protocol like eBGP unless the
always parameter is used.
OSPF Default Routes
• The branch routers then place the learned OSPF default route into their routing
tables.
OSPF Default Routes
• R1 uses DHCP to learn its IP address on its Gi0/3 interface from the ISP.
• R1 then creates a static default route with the ISP router’s IP address of 192.0.2.1 as the next-hop
address.
OSPF Metrics (Cost)
• Cisco routers allow three different ways to change the OSPF interface cost:
• When metrics tie for multiple routes to the same subnet, the router can put
multiple equal-cost routes into the routing table. (By default, up to 4.)
▫ On a per-packet basis, where each new packet it forwarded out the next path in round robin.
▫ On a per-destination bases, where packets are forwarded using the same path for each specific
IP destination.