Table 1-3 lists the OSPFv2/v3 default parameters. You can alter OSPF parameters as necessary. You are not required to alter any of these parameters, but the following parameters must be consistent across all routers in an attached network: ospf hello-interval and ospf dead-interval. If you configure any of these parameters, be sure that the configurations for all routers on your network have compatible values.
Table 1-3 Default OSPFv2/OSPFv3 Parameters
Cisco NX-OS is a modular system and requires a specific license to enable specific features. Table 1-4 covers the NX-OS feature licenses required for OSPFv2/OSPFv3. For more information, visit the Cisco NX-OS Licensing Guide.
Table 1-4 Feature-Based Licenses for Cisco NX-OS OSPFv2 and OSPFv3
OSPFv2 and OSPFv3 have the following configuration limitations:
Cisco NX-OS displays areas in dotted-decimal notation regardless of whether you enter the area in decimal or dotted-decimal notation.
The OSPFv3 router ID and area ID are 32-bit numbers with no relationship to IPv6 addresses.
Tables 1-5 through 1-8 describe the most-used OSPFv2/v3 configuration commands. For a full list of the commands, refer to the Nexus Unicast Routing Configuration Guide links shown in the reference list at the end of this chapter.
Table 1-5 OSPF Global-Level Commands
Table 1-6 OSPF Routing-Level Commands
Table 1-7 OSPF Interface-Level Commands
Table 1-8 OSPF Global-Level Verification and Process Clear Commands
Figure 1-4 shows the network topology for the configuration that follows, which demonstrates how to configure Nexus OSPF for IPv4 and IPv6.
Figure 1-4 OSPF Network Topology
Note
To practice Nexus configuration, you can use the Cisco Virtual Internet Routing Lab (VIRL) from the cisco Modelling Labs (https://developer.cisco.com/modeling-labs/). If you don’t have VIRL in your lab, you can use Cisco dCloud (https://dcloud.cisco.com); search for “VIRL 1.6.65 Sandbox”.
Example 1-1 shows SW9621-1 OSPFv2 feature enabling and router configurations.
Example 1-1 OSPF Instance 21
SW9621-1(config)#
feature ospf
SW9621-1(config)#
router ospf 21
SW9621-1(config-router)#
router-id 1.1.1.1
SW9621-1(config-router)#
area 0.0.0.0 authentication message-digest
SW9621-1(config-router)#
area 0.0.0.5 stu
b
Example 1-2 shows SW9621-1 OSPFv3 feature enabling and router configurations.
Example 1-2 OSPF Instance 21 and 23
SW9621-1(config)#
feature ospfv3
SW9621-1(config)#
router ospfv3 21
SW9621-1(config-router)#
router-id 1.1.1.1
SW9621-1(config)#
router ospfv3 23
SW9621-1(config-router)#
area 0.0.0.5 stub
Note
We didn’t configure the router ID for OSPFv3 23; it is recommended that you configure the router ID
Examples 1-3 and 1-4 show SW9621-1 OSFP interface and authentication configurations.
Example 1-3 OSPF Interface Configurations
SW9621-1(config)#
interface loopback0
SW9621-1(config-if)#
ip address 1.1.1.1/32
SW9621-1(config-if)#
ip router ospf 21 area 0.0.0.0
SW9621-1(config)#
interface Ethernet2/1
SW9621-1(config-if)#
ip address 10.10.10.1/30
SW9621-1(config-if)#
ip ospf authentication message-digest
SW9621-1(config-if)#
ip ospf authentication key-chain mypass
SW9621-1(config-if)#
ip router ospf 21 area 0.0.0.0
SW9621-1(config-if)#
ipv6 address 2201:db1::1/48
SW9621-1(config-if)#
ipv6 router ospf 21 area 0.0.0.0
SW9621-1(config-if)#
no shutdown
SW9621-1(config)#
interface Ethernet2/2
SW9621-1(config-if)#
ip address 10.10.10.5/30
SW9621-1(config-if)#
mtu 9216
SW9621-1(config-if)#
ip ospf authentication message-digest
SW9621-1(config-if)#
ip ospf authentication key-chain mypass
SW9621-1(config-if)#
ip ospf network point-to-point
SW9621-1(config-if)#
ip router ospf 21 area 0.0.0.0
SW9621-1(config-if)#
no shutdown
SW9621-1(config)#
interface Ethernet2/3
SW9621-1(config-if)#
ip address 10.10.10.9/30
SW9621-1(config-if)#
ip ospf hello-interval 25
SW9621-1(config-if)#
ip router ospf 21 area 0.0.0.5
SW9621-1(config-if)#
ipv6 address 2201:db2::1/48
SW9621-1(config-if)#
ipv6 router ospf 23 area 0.0.0.5
SW9621-1(config-if)#
no shutdown
SW9621-1(config-if)#
exit