OSPF (Open Shortest Path First) is a standards-based link-state interior gateway protocol that uses Dijkstra’s shortest path first algorithm to calculate optimal routes within an autonomous system, supporting VRF-aware multi-instance deployments on NX-OS. It provides hierarchical network design through area-based segmentation with configurable area types (stub, NSSA), route summarization, max-metric advertisement for graceful maintenance, and advanced features like BFD integration for fast failure detection. OSPF interface-level configuration controls process association, area membership, cost, network type, priority, authentication, and passive interface behavior across loopback, VLAN, Ethernet, and port-channel interfaces, and Ethernet and port-channel subinterfaces.
OSPF (Open Shortest Path First) is a standards-based link-state interior gateway protocol that uses Dijkstra’s shortest path first algorithm to calculate optimal routes within an autonomous system, supporting VRF-aware multi-instance deployments on NX-OS. It provides hierarchical network design through area-based segmentation with configurable area types (stub, NSSA), route summarization, max-metric advertisement for graceful maintenance, and advanced features like BFD integration for fast failure detection. OSPF interface-level configuration controls process association, area membership, cost, network type, priority, authentication, and passive interface behavior across loopback, VLAN, Ethernet, and port-channel interfaces.
Name Type Constraint Mandatory Default Value configuration Class configuration No
Name Type Constraint Mandatory Default Value configuration Class configuration No
Name Type Constraint Mandatory Default Value configuration Class configuration No
Name Type Constraint Mandatory Default Value configuration Class configuration No
Name Type Constraint Mandatory Default Value configuration Class configuration No
Name Type Constraint Mandatory Default Value routing Class routing No interfaces Class interfaces No
Name Type Constraint Mandatory Default Value subinterfaces List subinterfaces No ospf Class ospf No
Name Type Constraint Mandatory Default Value subinterfaces List subinterfaces No ospf Class ospf No
Name Type Constraint Mandatory Default Value ospf Class ospf No
Name Type Constraint Mandatory Default Value subinterfaces List subinterfaces No ospf Class ospf No
Name Type Constraint Mandatory Default Value ospf Class ospf No
Name Type Constraint Mandatory Default Value ospf_processes List ospf_processes No
Name Type Constraint Mandatory Default Value ospf Class ospf No
Name Type Constraint Mandatory Default Value ospf Class ospf No
Name Type Constraint Mandatory Default Value ospf Class ospf No
Name Type Constraint Mandatory Default Value name String Yes shutdown Boolean true, falseNo auto_ cost_ reference_ bandwidth Integer min: 0, max: 4294967295 No auto_ cost_ reference_ bandwidth_ unit Choice mbps, gbpsNo bfd Boolean true, falseNo capability_ vrf_ lite Choice l3vpn, evpnNo default_metric Integer min: 0, max: 16777214 No passive_ interface_ default Boolean true, falseNo default_ route_ nssa_ abr_ pbit_ clear Boolean true, falseNo discard_ route_ external Boolean true, falseNo discard_ route_ internal Boolean true, falseNo distance Integer min: 1, max: 255 No down_bit_ignore Boolean true, falseNo log_ adjacency_ changes Choice none, brief, detailNo maximum_paths Integer min: 1, max: 64 No name_lookup Boolean true, falseNo name_ lookup_ use_ vrf String No rfc1583compatibility Boolean true, falseNo router_id IP No default_ information_ originate Boolean true, falseNo default_ information_ originate_ always Boolean true, falseNo default_ information_ originate_ route_ map String No graceful_ restart Boolean true, falseNo graceful_ restart_ grace_ period Integer min: 5, max: 1800 No graceful_ restart_ helper_ disable Boolean true, falseNo graceful_ restart_ planned_ only Boolean true, falseNo timers_ throttle_ spf_ start_ time Integer min: 1, max: 600000 No timers_ throttle_ spf_ hold_ time Integer min: 1, max: 600000 No timers_ throttle_ spf_ max_ time Integer min: 1, max: 600000 No timers_ throttle_ lsa_ start_ time Integer min: 0, max: 5000 No timers_ throttle_ lsa_ hold_ time Integer min: 50, max: 30000 No timers_ throttle_ lsa_ max_ time Integer min: 50, max: 30000 No timers_ lsa_ arrival Integer min: 10, max: 600000 No timers_ lsa_ group_ pacing Integer min: 1, max: 1800 No max_ metric_ router_ lsa Class max_ metric_ router_ lsa No areas List areas No redistributions List redistributions No summary_ addresses List summary_ addresses No vrfs List vrfs No
Name Type Constraint Mandatory Default Value name String Yes shutdown Boolean true, falseNo auto_ cost_ reference_ bandwidth Integer min: 0, max: 4294967295 No auto_ cost_ reference_ bandwidth_ unit Choice mbps, gbpsNo bfd Boolean true, falseNo capability_ vrf_ lite Choice l3vpn, evpnNo default_metric Integer min: 0, max: 16777214 No passive_ interface_ default Boolean true, falseNo default_ route_ nssa_ abr_ pbit_ clear Boolean true, falseNo discard_ route_ external Boolean true, falseNo discard_ route_ internal Boolean true, falseNo distance Integer min: 1, max: 255 No down_bit_ignore Boolean true, falseNo log_ adjacency_ changes Choice none, brief, detailNo maximum_paths Integer min: 1, max: 64 No name_lookup Boolean true, falseNo name_ lookup_ use_ vrf String No rfc1583compatibility Boolean true, falseNo router_id IP No max_ metric_ router_ lsa Class max_ metric_ router_ lsa No areas List areas No redistributions List redistributions No vrfs List vrfs No
Name Type Constraint Mandatory Default Value name String Yes shutdown Boolean true, falseNo auto_ cost_ reference_ bandwidth Integer min: 0, max: 4294967295 No auto_ cost_ reference_ bandwidth_ unit Choice mbps, gbpsNo bfd Boolean true, falseNo capability_ vrf_ lite Choice unspecified, l3vpn, evpnNo default_metric Integer min: 0, max: 16777214 No passive_ interface_ default Boolean true, falseNo default_ route_ nssa_ abr_ pbit_ clear Boolean true, falseNo discard_ route_ external Boolean true, falseNo discard_ route_ internal Boolean true, falseNo distance Integer min: 1, max: 255 No down_bit_ignore Boolean true, falseNo log_ adjacency_ changes Choice none, brief, detailNo maximum_paths Integer min: 1, max: 64 No name_lookup Boolean true, falseNo name_ lookup_ use_ vrf String No rfc1583compatibility Boolean true, falseNo router_id String No max_ metric_ router_ lsa Class max_ metric_ router_ lsa No areas List areas No redistributions List redistributions No vrfs List vrfs No
Name Type Constraint Mandatory Default Value process String Yes advertise_ secondaries Boolean true, falseNo advertise_ subnet Boolean true, falseNo area Any IP or Integer[min: 0, max: 4294967295] No bfd Boolean true, falseNo cost Integer min: 0, max: 65535 No dead_interval Integer min: 0, max: 65535 No hello_interval Integer min: 0, max: 65535 No mtu_ignore Boolean true, falseNo network Choice point-to-point, broadcastNo prefix_ attributes_ n_ flag_ clear Choice unspecified, clearNo passive_ interface Boolean true, falseNo priority Integer min: 0, max: 255 No retransmit_ interval Integer min: 1, max: 65535 No transmit_delay Integer min: 1, max: 450 No authentication_ key String No message_ digest_ key_ id Integer min: 0, max: 255 No authentication_ key_ secure_ mode Boolean true, falseNo authentication_ key_ chain String No message_ digest_ key String No message_ digest_ key_ secure_ mode Boolean true, falseNo authentication Choice simple, md5, noneNo
Name Type Constraint Mandatory Default Value process String Yes advertise_ secondaries Boolean true, falseNo advertise_ subnet Boolean true, falseNo area String No bfd Boolean true, falseNo cost Integer min: 0, max: 65535 No dead_interval Integer min: 0, max: 65535 No hello_interval Integer min: 0, max: 65535 No mtu_ignore Boolean true, falseNo network Choice unspecified, p2p, bcastNo prefix_ attribute_ n_ flag Choice unspecified, clearNo passive_ interface Boolean true, falseNo priority Integer min: 0, max: 255 No retransmit_ interval Integer min: 1, max: 65535 No transmit_delay Integer min: 1, max: 450 No authentication_ key String No message_ digest_ key_ id Integer min: 0, max: 255 No authentication_ key_ secure_ mode Boolean true, falseNo authentication_ key_ chain String No message_ digest_ key String No message_ digest_ key_ secure_ mode Boolean true, falseNo authentication Choice unspecified, simple, md5, noneNo
Name Type Constraint Mandatory Default Value on_ startup_ wait_ for_ bgp String No external_lsa Boolean true, falseNo external_ lsa_ max_ metric Integer min: 0, max: 16777215 No include_stub Boolean true, falseNo summary_lsa Boolean true, falseNo summary_ lsa_ max_ metric Integer min: 0, max: 16777215 No on_startup Boolean true, falseNo on_ startup_ timeout Integer min: 0, max: 4294967295 No
Name Type Constraint Mandatory Default Value id Any IP or Integer[min: 0, max: 4294967295] Yes authentication Choice simple, message-digestNo default_cost Integer min: 0, max: 16777215 No nssa_ no_ redistribution Boolean true, falseNo no_summary Boolean true, falseNo nssa_ translate_ type7 Choice always, candidate, neverNo segment_ routing_ mpls Boolean true, falseNo nssa_ translate_ type7_ suppress_ fa Boolean true, falseNo type Choice regular, stub, nssaNo ranges List ranges No
Name Type Constraint Mandatory Default Value id Any IP or Integer[min: 0, max: 4294967295] Yes authentication Choice simple, message-digestNo default_cost Integer min: 0, max: 16777215 No nssa_ no_ redistribution Boolean true, falseNo no_summary Boolean true, falseNo nssa_ translate_ type7 Choice always, candidate, neverNo segment_ routing_ mpls Boolean true, falseNo nssa_ translate_ type7_ suppress_ fa Boolean true, falseNo type Choice regular, stub, nssaNo
Name Type Constraint Mandatory Default Value id String Yes authentication Choice unspecified, simple, md5, noneNo default_cost Integer min: 0, max: 16777215 No nssa_ no_ redistribution Boolean true, falseNo no_summary Boolean true, falseNo nssa_ translate_ type7 Choice always, candidate, neverNo segment_ routing_ mpls Boolean true, falseNo nssa_ translate_ type7_ suppress_ fa Boolean true, falseNo type Choice regular, stub, nssaNo
Name Type Constraint Mandatory Default Value protocol Choice static, direct, bgp, isis, ospf, ospfv3, eigrp, host, rip, amt, lisp, hmm, am, dhcpv6, icmpv6Yes protocol_ instance String No asn Any String or Integer[min: 0, max: 4294967295] No route_map String No
Name Type Constraint Mandatory Default Value protocol Choice static, direct, bgp, isis, ospf, ospfv3, eigrp, host, rip, amt, lisp, hmm, am, dhcpv6, icmpv6Yes protocol_ instance String No asn String No route_map String No
Name Type Constraint Mandatory Default Value prefix IP Yes not_advertise Boolean true, falseNo tag Integer min: 0, max: 4294967295 No
Name Type Constraint Mandatory Default Value vrf String Yes shutdown Boolean true, falseNo auto_ cost_ reference_ bandwidth Integer min: 0, max: 4294967295 No auto_ cost_ reference_ bandwidth_ unit Choice mbps, gbpsNo bfd Boolean true, falseNo capability_ vrf_ lite Choice l3vpn, evpnNo default_metric Integer min: 0, max: 16777214 No passive_ interface_ default Boolean true, falseNo default_ route_ nssa_ abr_ pbit_ clear Boolean true, falseNo discard_ route_ external Boolean true, falseNo discard_ route_ internal Boolean true, falseNo distance Integer min: 1, max: 255 No down_bit_ignore Boolean true, falseNo log_ adjacency_ changes Choice none, brief, detailNo maximum_paths Integer min: 1, max: 64 No name_lookup Boolean true, falseNo name_ lookup_ use_ vrf String No rfc1583compatibility Boolean true, falseNo router_id IP No default_ information_ originate Boolean true, falseNo default_ information_ originate_ always Boolean true, falseNo default_ information_ originate_ route_ map String No graceful_ restart Boolean true, falseNo graceful_ restart_ grace_ period Integer min: 5, max: 1800 No graceful_ restart_ helper_ disable Boolean true, falseNo graceful_ restart_ planned_ only Boolean true, falseNo timers_ throttle_ spf_ start_ time Integer min: 1, max: 600000 No timers_ throttle_ spf_ hold_ time Integer min: 1, max: 600000 No timers_ throttle_ spf_ max_ time Integer min: 1, max: 600000 No timers_ throttle_ lsa_ start_ time Integer min: 0, max: 5000 No timers_ throttle_ lsa_ hold_ time Integer min: 50, max: 30000 No timers_ throttle_ lsa_ max_ time Integer min: 50, max: 30000 No timers_ lsa_ arrival Integer min: 10, max: 600000 No timers_ lsa_ group_ pacing Integer min: 1, max: 1800 No max_ metric_ router_ lsa Class max_ metric_ router_ lsa No areas List areas No redistributions List redistributions No summary_ addresses List summary_ addresses No
Name Type Constraint Mandatory Default Value vrf String Yes shutdown Boolean true, falseNo auto_ cost_ reference_ bandwidth Integer min: 0, max: 4294967295 No auto_ cost_ reference_ bandwidth_ unit Choice mbps, gbpsNo bfd Boolean true, falseNo capability_ vrf_ lite Choice l3vpn, evpnNo default_metric Integer min: 0, max: 16777214 No passive_ interface_ default Boolean true, falseNo default_ route_ nssa_ abr_ pbit_ clear Boolean true, falseNo discard_ route_ external Boolean true, falseNo discard_ route_ internal Boolean true, falseNo distance Integer min: 1, max: 255 No down_bit_ignore Boolean true, falseNo log_ adjacency_ changes Choice none, brief, detailNo maximum_paths Integer min: 1, max: 64 No name_lookup Boolean true, falseNo name_ lookup_ use_ vrf String No rfc1583compatibility Boolean true, falseNo router_id IP No max_ metric_ router_ lsa Class max_ metric_ router_ lsa No areas List areas No redistributions List redistributions No
Name Type Constraint Mandatory Default Value vrf String Yes shutdown Boolean true, falseNo auto_ cost_ reference_ bandwidth Integer min: 0, max: 4294967295 No auto_ cost_ reference_ bandwidth_ unit Choice mbps, gbpsNo bfd Boolean true, falseNo capability_ vrf_ lite Choice unspecified, l3vpn, evpnNo default_metric Integer min: 0, max: 16777214 No passive_ interface_ default Boolean true, falseNo default_ route_ nssa_ abr_ pbit_ clear Boolean true, falseNo discard_ route_ external Boolean true, falseNo discard_ route_ internal Boolean true, falseNo distance Integer min: 1, max: 255 No down_bit_ignore Boolean true, falseNo log_ adjacency_ changes Choice none, brief, detailNo maximum_paths Integer min: 1, max: 64 No name_lookup Boolean true, falseNo name_ lookup_ use_ vrf String No rfc1583compatibility Boolean true, falseNo router_id String No max_ metric_ router_ lsa Class max_ metric_ router_ lsa No areas List areas No redistributions List redistributions No
Name Type Constraint Mandatory Default Value prefix IP Yes not_advertise Boolean true, falseNo cost Integer min: 0, max: 16777215 No
Example 1: Basic OSPF underlay for spine-leaf fabric with loopback and P2P links
Example 2: OSPF with BFD, tuned timers, and passive interfaces
log_adjacency_changes : detail
Example 3: Multi-area OSPF with stub area and max-metric for maintenance
log_adjacency_changes : brief
rfc1583compatibility : false
Example 4: OSPF in a VRF with passive-interface default and interface overrides
passive_interface_default : true
auto_cost_reference_bandwidth : 100
auto_cost_reference_bandwidth_unit : gbps
Example 5: OSPF with route redistribution
route_map : STATIC_TO_OSPF
route_map : DIRECT_TO_OSPF
Example 6: OSPF in VRF with redistributions
route_map : DIRECT_TO_OSPF
route_map : BGP_TO_OSPF_VRF
Example 7: OSPF with SPF/LSA throttling, graceful restart, default route origination, and summarization
default_information_originate : true
default_information_originate_always : true
default_information_originate_route_map : DEFAULT_TO_OSPF
graceful_restart_planned_only : true
graceful_restart_grace_period : 120
timers_throttle_spf_start_time : 50
timers_throttle_spf_hold_time : 100
timers_throttle_spf_max_time : 5000
timers_throttle_lsa_start_time : 50
timers_throttle_lsa_hold_time : 100
timers_throttle_lsa_max_time : 5000
timers_lsa_group_pacing : 20
Example 8: Point-to-point fabric uplink with OSPF key chain authentication
- name : OSPF-UNDERLAY-AUTH
authentication_key_chain : OSPF-UNDERLAY-AUTH
Example 1: Basic OSPF underlay for spine-leaf fabric with loopback and P2P links
Example 2: OSPF with BFD, tuned timers, and passive interfaces
log_adjacency_changes : detail
Example 3: Multi-area OSPF with stub area and max-metric for maintenance
log_adjacency_changes : brief
rfc1583compatibility : false
Example 4: OSPF in a VRF with passive-interface default and interface overrides
passive_interface_default : true
auto_cost_reference_bandwidth : 100
auto_cost_reference_bandwidth_unit : gbps
passive_interface : disabled
Example 5: OSPF with route redistribution
route_map : STATIC_TO_OSPF
route_map : DIRECT_TO_OSPF
Example 6: OSPF in VRF with redistributions
route_map : DIRECT_TO_OSPF
route_map : BGP_TO_OSPF_VRF