Skip to content

OSPF

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 through a network topology stored in a synchronized link-state database. It provides fast convergence, load balancing across equal-cost paths, and hierarchical network design through area-based segmentation that reduces routing overhead and improves scalability in large networks. OSPF supports advanced features including route summarization, authentication, traffic engineering extensions, and integration with MPLS for comprehensive enterprise and service provider routing solutions.

Diagram

Diagram

Classes

routing (iosxe.devices.configuration)

NameTypeConstraintMandatoryDefault Value
ospf_processesList[ospf_processes]No

ospf_processes (iosxe.devices.configuration.routing)

NameTypeConstraintMandatoryDefault Value
idIntegermin: 1, max: 65535No
vrfStringNo
bfd_all_interfacesBooleantrue, falseNo
default_information_originateBooleantrue, falseNo
default_information_originate_alwaysBooleantrue, falseNo
default_metricIntegermin: 1, max: 16777214No
distanceIntegermin: 1, max: 255No
domain_tagIntegermin: 1, max: 4294967295No
mpls_ldp_autoconfigBooleantrue, falseNo
mpls_ldp_syncBooleantrue, falseNo
neighborsList[neighbors]No
networksList[networks]No
priorityIntegermin: 0, max: 127No
router_idStringNo
shutdownBooleantrue, falseNo
summary_addressesList[summary_addresses]No
areasList[areas]No
passive_interface_defaultBooleantrue, falseNo
auto_cost_reference_bandwidthIntegermin: 1, max: 4294967No
passive_interfacesList[passive_interfaces]No

neighbors (iosxe.devices.configuration.routing.ospf_processes)

NameTypeConstraintMandatoryDefault Value
ipIPYes
priorityIntegermin: 0, max: 255No
costIntegermin: 1, max: 65535No

networks (iosxe.devices.configuration.routing.ospf_processes)

NameTypeConstraintMandatoryDefault Value
ipIPYes
wildcardStringNo
areaStringNo

summary_addresses (iosxe.devices.configuration.routing.ospf_processes)

NameTypeConstraintMandatoryDefault Value
ipIPYes
maskIPNo

areas (iosxe.devices.configuration.routing.ospf_processes)

NameTypeConstraintMandatoryDefault Value
idStringYes
authentication_message_digestBooleantrue, falseNo
nssaBooleantrue, falseNo
nssa_default_information_originateBooleantrue, falseNo
nssa_default_information_originate_metricIntegermin: 0, max: 16777214No
nssa_default_information_originate_metric_typeIntegermin: 1, max: 2No
nssa_no_summaryBooleantrue, falseNo
nssa_no_redistributionBooleantrue, falseNo

passive_interfaces (iosxe.devices.configuration.routing.ospf_processes)

NameTypeConstraintMandatoryDefault Value
interface_typeChoiceLoopback, Vlan, GigabitEthernet, TwoGigabitEthernet, FiveGigabitEthernet, TenGigabitEthernet, TwentyFiveGigabitEthernet, FortyGigabitEthernet, HundredGigabitEthernetNo
interface_idStringNo

Examples

iosxe:
devices:
- name: Device1
configuration:
routing:
ospf_processes:
- id: 100
vrf: VRF-PROD
bfd_all_interfaces: true
default_information_originate: true
default_information_originate_always: true
default_metric: 10
distance: 120
domain_tag: 10
auto_cost_reference_bandwidth: 10000
neighbors:
- ip: 192.168.1.2
priority: 10
cost: 100
- ip: 192.168.2.2
priority: 5
cost: 50
networks:
- ip: 192.168.1.0
wildcard: 0.0.0.255
area: "0"
- ip: 10.0.0.0
wildcard: 0.255.255.255
area: "1"
router_id: 192.168.1.1
shutdown: false
summary_addresses:
- ip: 10.0.0.0
mask: 255.0.0.0
- ip: 172.16.0.0
mask: 255.240.0.0
areas:
- id: "1"
authentication_message_digest: true
nssa: true
nssa_default_information_originate: true
nssa_default_information_originate_metric: 100
nssa_default_information_originate_metric_type: 1
nssa_no_summary: true
nssa_no_redistribution: true
passive_interface_default: true
passive_interfaces:
- interface_type: GigabitEthernet
interface_id: "0/0/1"
- interface_type: Vlan
interface_id: "100"
- id: 200
bfd_all_interfaces: false
default_metric: 20
auto_cost_reference_bandwidth: 1000
networks:
- ip: 172.16.0.0
wildcard: 0.0.255.255
area: "0"
router_id: 172.16.1.1
passive_interface_default: false