Instructor Planning Guide
What activities are associated with this chapter?
Students should complete Chapter 8, “Assessment” after completing Chapter 8.
Quizzes, labs, Packet Tracers and other activities can be used to informally assess student progress.
Sections & Objectives
8.1 OSPF Operation
Explain how single-area OSPF operates.
Explain the features and characteristics of the OSPF routing protocol.
Describe the types of packets used to establish and maintain an OSPF neighbor relationship.
Explain how OSPF achieves convergence.
8.2 Varieties of Spanning Tree Protocols
Implement single-area OSPFv2.
Configure an OSPF router ID.
Configure single-area OSPFv2.
Explain how OSPF uses cost to determine best path.
Verify single-area OSPFv2.
8.3 Implement single-area OSPFv3
Compare the characteristics and operations of OSPFv2 to OSPFv3.
Configure single-area OSPFv3.
Verify single-area OSPFv3.
Chapter 8: Single-Area OSPF
8.1 –OSPF Characteristics
8.1.1 – Open Shortest Path First
126.96.36.199 – Evolution of OSPF
OSPF is a link-state routing protocol
188.8.131.52 – Features of OSPF
OSPF uses the Dijkstra shortest path first (SPF) algorithm to choose the best path.
Administrative distance is used in determining what route gets installed in the routing table when the route is learned from multiple sources.
- The lowest administrative distance is the one added to the routing table.
184.108.40.206 – Components of OSPF
OSPF packet types: hello, database description, link-state request, link-state update, link-state acknowledgment
220.127.116.11 – Link-State Operation
18.104.22.168 – Single-Area and Multiarea OSPF
8.1.2 – OSPF Messages
22.214.171.124 – Encapsulating OSPF Messages
OSPF adds its own Layer 3 header after the IP Layer 3 header.
- The IP header contains the OSPF multicast address of either 126.96.36.199 or 188.8.131.52 and the protocol field of 89 which indicates it is an OSPF packet.
OSPF Packet Header identifies the type of OSPF packet, the router ID, and the area ID
OSPF Packet Type contains the specific OSPF packet type information
- OSPFv3 has similar packet types.
184.108.40.206 – Hello Packet
Hello packets are used to discover neighbors, establish neighbor adjacencies, advertise parameters both routers must agree upon in order to become neighbors, and elect the Designated Router (DR) and Backup Designated Router (BDR) on multi-access networks like Ethernet and Frame Relay (not serial point-to-point links).
- Type field – 1 = hello; 2 = DBD; 3 = LSR; 4 = LSU; 5 – LSAck
- Hello interval – how often a router sends hello packets
- Router priority (default is 1; 0-255 with the higher number influencing the DR/BDR election process)
- Dead interval – how long a router waits to hear from a neighbor router before declaring the router out of service
- DR and BDR fields contain the router ID for the DR and BDR
- List of neighbors is the router ID for all adjacent neighbor routers
220.127.116.11 – Hello Packet Intervals
Hello and dead intervals must be the same interval setting on neighboring routers on the same link
Transmitted to multicast address 18.104.22.168 in IPv4
Transmitted to multicast address FF02::5 in IPv6
Sent every 10 seconds by default on multi-access networks like Ethernet and point-to-point links
Sent every 30 seconds by default on non-broadcast multiple access networks (NBMA) like Frame Relay
Dead intervals by default are 4 times the hello interval
- If the dead interval expires before the router receives a hello packet, OSPF removes that neighbor from its link state data base (LSDB). The router then floods the LSDB with info about the down neighbor.
22.214.171.124 – Link-State Updates
A Link State Update (LSU) contains one or more LSAs; LSAs contain route information for destination networks
Routers initially send Type 2 DBD packets – an abbreviated list of the sending routers LSDB
- Receiving routers check against their own LSDB
Type 3 LSR is used by the receiving router to request more information about an entry in the Database Description (DBD)
Type 4 Link-state Update (LSU) is used to reply to an LSR packet
8.1.3 – OSPF Operation
126.96.36.199 – OSPF Operational States
OSPF progresses through several states while attempting to reach convergence:
- Down – No Hello packets received; router sends Hello packets
- Init – Hello packets are received that contain the sending router’s Router ID
- Two-Way – Used to elect a DR and BDR on an Ethernet link
- ExStart – Negotiate master/slave relationship and DBD packet sequence number; the master initiates the DBD packet exchange
- Exchange – Routers exchange DBD packets; if additional router information is required, then transition to the Loading State, otherwise, transition to the Full State
- Loading – LSRs and LSUs are used to gain additional route information; routes are processed using the shortest path first (SPF) algorithm; transition to the Full State
- Full – Routers have converged databases
188.8.131.52 – Establish Neighbor Adjacencies
- Without a pre-configured router ID (RID) or loopback addresses, R1 has a RID of 172.16.5.1 and R2 has a RID of 172.16.5.2
184.108.40.206 – OSPF DR and BDR
Why have a DR/BDR election?
Reduce the number of LSAs sent – The DR is the only router used to send LSAs for the shared network
Reduce the number of adjacencies over a multi-access network like Ethernet
220.127.116.11 – Synchronizing OSPF Databases
After the Two-Way state, routers need to synchronize their databases and use the other four types of OSPF packets to exchange information.
8.2 – Single-Area OSPFv2
8.2.1 – OSPF Router ID
18.104.22.168 – OSPF Network Topology
Topology used to describe OSPF configuration
22.214.171.124 – Router OSPF Configuration Mode
OSPFv2 configuration uses the router ospf configuration mode
From global configuration mode, type router ospf process-id to enter commands
126.96.36.199 – Router IDs
Router IDs are used to uniquely identify an OSPF router
Router IDs are 32 bits long in both OSPFv2 (IPv4) and OSPFv3 (IPv6)
Used in the election of the DR if a priority number is not configured
Ways a router gets a router ID
1. Configured using the router-id rid OSPF router configuration mode command
2.If a router ID is not configured, the highest configured loopback interface is used
3.If there are no configured loopback interfaces, then the highest active IPv4 address is used (not recommended because if the interface with the highest IPv4 address goes down, the router ID selection process starts over)
188.8.131.52 – Configuring an OSPF Router ID
Use the router-id x.x.x.x command to configure a router ID.
Use the show ip protocols command to verify the router ID.
184.108.40.206 – Modifying a Router ID
Use the clear ip ospf process command after changing the router ID to make the change effective.
220.127.116.11 – Using a Loopback Interface as the Router ID
Older IOS version did not have the router-id OSPF configuration command.
Loopback interfaces were used to provide a stable router ID.
8.2.2 – Configuring Single-Area OSPFv2
18.104.22.168 – Enabling OSPF on Interfaces
Use the network command to specify which interface(s) participate in the OSPFv2 area.
- (config)# router ospf x
- (config-router)# network x.x.x.x wildcard_mask area area-id
22.214.171.124 – Wildcard Mask
To determine the wildcard mask, subtract the normal mask from 255.255.255.255
A wildcard mask bit of 0 – match the bit
A wildcard mask bit of 1 – ignore the bit
A wildcard mask is a series of 0s with the rest 1s (the 0s and 1s are not alternating like an IP address)
126.96.36.199 – The network Command
Two ways to use the network command
- Advertise the particular network, calculating the wildcard mask
- Advertise the IP address on the router interface with a 0.0.0.0 wildcard mask
188.8.131.52 – Passive Interface
An interface configured as a passive interface does not SEND OSPF messages.
Best practice for interfaces that have users attached (security)
Doesn’t waste bandwidth sending messages out OSPF-enabled interfaces that don’t have another router attached.
184.108.40.206 – Configuring Passive Interfaces
- Use the passive-interface command to configure
- Use the show ip protocols to verify
220.127.116.11 – Packet Tracer – Configuring OSPFv2 in a Single-area
8.2.3 – OSPF Cost
18.104.22.168 – OSPF Metric = Cost
OSPF uses the metric of cost to determine the best path used to reach a destination network (Cost = reference bandwidth / interface bandwidth)
Lowest cost is a better path
The interface bandwidth influences the cost assigned
- A lower bandwidth interface has a higher cost
22.214.171.124 – OSPF Accumulates Costs
The “cost” for a destination network is an accumulation of all cost values from source to destination.
The cost metric can be seen in the routing table as the second number within the brackets.
126.96.36.199 – Adjusting the Reference Bandwidth
Changing the OSPF reference bandwidth affects only the OSPF calculation used to determine the metric, not the bandwidth of the interface.
Use the auto-cost reference-bandwidth command to change the OSPF reference bandwidth.
Default reference bandwidth is 100 Mbps.
To adjust to distinguish between 100 Mbps Ethernet and Gigabit Ethernet, use the auto-cost reference-bandwidth 1000 command.
To adjust to distinguish between 100 Mbps Ethernet and Gigabit Ethernet, use the auto-cost reference-bandwidth 10000 command.
If the routers in the topology are adjusted to accommodate Gigabit links, the cost of the serial link is now 647 instead of 64. The total cost from R1 to the R2 LAN is now 648 instead of 65.
If there were FastEthernet links in the topology, OSPF would make better choices.
188.8.131.52 – Default Interface Bandwidth
Bandwidth values defined on an interface do not change the capacity of the interface.
Bandwidth values defined on an interface are used by the EIGRP and OSPF routing protocols to compute the metric.
Serial links default to 1.544 Mbps and that might not be an accurate bandwidth for the transmission rate.
Use the show interfaces command to see the interface bandwidth..
184.108.40.206 – Adjusting the Interface Bandwidth
The bandwidth must be adjusted at each end of the serial links, therefore:
- R2 requires its S0/0/1 interface to be adjusted to 1,024 kb/s.
- R3 requires its serial 0/0/0 to be adjusted to 64 kb/s and its serial 0/0/1 to be adjusted to 1,024 kb/s.
Note: Command only modifies OSPF bandwidth metric. Does not modify the actual link bandwidth.
220.127.116.11 – Manually Setting the OSPF Cost
Instead of manually setting the interface bandwidth, the OSPF cost can be manually configured using the ip ospf cost value interface configuration mode command.
8.2.4 – Verify OSPF
18.104.22.168 – Verify OSPF Neighbors
Use the show ip ospf neighbor to verify the router has formed an adjacency with a directly-connected router.
22.214.171.124 – Verify OSPF Protocol Settings
The show ip protocols command is used to verify the OSPFv2 process ID, router ID, networks being advertised by the router, neighbors that are sending OSPF updates, and the administrative distance (110 by default).
126.96.36.199 – Verify OSPF Process Information
The show ip ospf command is another way to see the OSPFv2 process ID and router ID.
188.8.131.52 – Verify OSPF Interface settings
Use the show ip ospf interface command to see details for every OSPFv2-enabled interface especially to see if the network statements were correctly composed.
Use the show ip ospf interface brief command to see key information about OSPFv2-enabled interfaces on a particular router.
184.108.40.206 – Lab – Configuring Basic Single-Area OSPFv2
8.3 – Single-Area OSPFv3
8.3.1 – OSPFv2 vs. OSPFv3
220.127.116.11 – OSPFv3
OSPFv3 is used to exchange IPv6 prefixes and build an IPv6 routing table.
OSPFv3 builds three OSPF tables – neighbor table, topology table, and routing table.
18.104.22.168 – Similarities Between OSPFv2 to OSPFv3
22.214.171.124 – Differences Between OSPFv2 and OSPFv3
126.96.36.199 – Link-Local Addresses
An IPv6-link-local address enables a device to communicate with other IPv6-enabled devices on the same link and only on that link (subnet).
- Packets with a source or destination link-local address cannot be routed beyond the link from where the packet originated.
IPv6 link-local address are used to exchange OSPFv3 messages
8.3.2 – Configuring OSPFv3
188.8.131.52 – OSPFv3 Network Topology
Be sure to turn on IPv6 routing and assign IPv6 addresses to interfaces before enabling OSPFv3.
Steps to Configure OSPFv3
1.Enable IPv6 unicast routing in global configuration mode – ipv6 unicast-routing
2.(Optional) Configure link-local addresses.
3.Configure a 32-bit router ID in OSPFv3 router configuration mode – router-id rid
4.Configure optional routing specifics such as adjusting the reference bandwidth.
5.(Optional, but optimum) Configure OSPFv3 interface specific settings such as setting the interface bandwidth on serial links.
6.Enable OSPFv3 routing in interface configuration mode – ipv6 ospf area
184.108.40.206 – Link-Local Addresses
Verify IPv6 addresses on interfaces.
Remember that link-local addresses are automatically created when an IPv6 global unicast address is assigned to an interface. However, IPv6 global unicast addresses are not required. Link-local addresses are required for OSPFv3.
Unless configured manually, Cisco routers create a link-local address using FE80::/10 prefix and the EUI-64 process by manipulating the 48-bit Ethernet MAC address.
220.127.116.11 – Assigning Link-Local Addresses
Manually configuring link-local addresses make it easier to manage and verify OSPFv3 configurations.
- Use the ipv6 address link-local interface command to apply.
- Use the show ipv6 interface brief command to verify.
18.104.22.168 – Configuring the OSPFv3 Router ID
Use the ipv6 router ospf process-id global configuration command to enter router configuration mode.
Use the router-id rid command in router configuration mode to assign a router ID and use the show ipv6 protocols command to verify.
22.214.171.124 – Modifying an OSPFv3 Router ID
Use the clear ipv6 ospf process privileged EXEC mode command after changing the router ID to complete the router ID change and force a router to renegotiate neighbor adjacencies using the new router ID.
126.96.36.199 – Enabling OSPFv3 on Interfaces
Use the ipv6 ospf area interface configuration mode command to enable OSPFv3 on a specific interface. Ensure the interface is within an OSPF area.
Use the show ipv6 ospf interfaces brief command to verify.
8.3.3 – Verify OSPFv3
188.8.131.52 – Verifying OSPFv3 Neighbors
Use the show ipv6 ospf neighbor command to verify neighbor connectivity with directly-connected routers.
184.108.40.206 – Verifying OSPFv3 Protocol Settings
Use the show ipv6 protocols command to verify vital OSPFv3 configuration information.
220.127.116.11 – Verify OSPFv3 Interfaces
Use the show ipv6 ospf interface command to display a detailed list for every OSPFv3-enabled interface.
The show ipv6 ospf interface brief command is an easier output to verify which interfaces are being used with OSPFv3.
18.104.22.168 – Verifying the IPv6 Routing Table
Use the show ipv6 route command to see an IPv6 routing table.
Use the show ipv6 route ospf command to see just the OSPFv3 routes.
22.214.171.124 – Packet Tracer – Configuring Basic OSPFv3
126.96.36.199 – Lab – Configuring Basic Single-Area OSPFv3
8.4 – Summary
8.4.1 – Conclusion
188.8.131.52 – Packet Tracer – Skills Integration Challenge
- Explain how single-area OSPF operates.
- Implement single-area OSPFv2.
- Implement single-area OSPFv3.
New Terms and Commands
•Database description packet
•Link-state request packet
•Link-state update packet
|•Link-state acknowledgment packet
•show ip protocols
•clear ip ospf process
•show ip ospf interface
•ip ospf cost
•show ip ospf neighbor
•show ip ospf
•show ip ospf interface
•show ip ospf interface brief
•All OSPF router multicast address
•IPv6 unicast routing
•Source IPv6 address
•Destination IPv6 address
•show ipv6 interface brief
•ipv6 address link-local
•show ipv6 interface brief
•ipv6 router ospf
•show ipv6 protocols
•clear ipv6 protocols
•ipv6 ospf area
•show ipv6 ospf neighbor
•show ipv6 ospf
|•show ipv6 ospf interface
•show ipv6 ospf interface brief
•show ipv6 route
•show ipv6 route ospf