protocol ospf
protocol ospf Enables Open Shortest Path First Protocol (OSPF), and unhides the related OSPF commands. | ||
Syntax Description | N/A | |
Default | Disabled | |
Configuration Mode | config | |
History | 3.3.3500 | |
Example | switch (config)# protocol ospf | |
Related Commands | ip routing | |
Notes |
router ospf
router ospf [<process-id> [vrf <vrf-name>]] Creates an ospf instance in the specified VRF and enters the ospf configuration mode. The default process ID is 1 | ||
Syntax Description | process-id | OSPF instance ID |
vrf | VRF name (e.g. default) | |
Default | Process ID – 1 | |
Configuration Mode | config | |
History | 3.3.3500 | |
3.6.1002 | Added VRF and process ID parameters and updated Example | |
Example | switch (config)# router ospf 2 vrf myvrf | |
Related Commands | ||
Notes | Only one OSPF instance per VRF is supported. |
router-id
router-id <ip-address> Sets Router ID for the OSPF instance. | ||
Syntax Description | ip-address | The Router ID in IP address format |
Default | The router ID is a 32-bit number assigned to the router running the OSPF protocol. This number uniquely identifies the router within an OSPF link-state database. Router ID can be configured statically. However, if it is not configured, then the default election is as follows:
| |
Configuration Mode | config ospf router | |
History | 3.3.3500 | |
3.7.1100 | Updated default | |
Example | switch (config router ospf)# router-id 10.10.10.10 | |
Related Commands | ||
Notes |
shutdown
shutdown Disables the OSPF instance. | ||
Syntax Description | N/A | |
Default | Enable (no shutdown) | |
Configuration Mode | config ospf router | |
History | 3.3.3500 | |
Example | switch (config router ospf)# shutdown | |
Related Commands | ||
Note |
auto-cost reference-bandwidth
auto-cost reference-bandwidth <ref-bw> [Gbps | Mbps] Configures reference-bandwidth in Gb/s (Default) or Mb/s. | ||
Syntax Description | ref-bw | Range: 1-4294 |
Gbps | Value in Gb/s (default if not specified) | |
Mbps | Value in Mb/s | |
Default | 100Gbps | |
Configuration Mode | config ospf router | |
History | 3.3.3500 | |
Example | switch (config router ospf)# auto-cost reference-bandwidth 10 Gbps | |
Related Commands | ||
Notes |
distance
distance <value> Configures the OSPF route administrative distance. | ||
Syntax Description | value | OSPF administrative distance |
Default | 110 | |
Configuration Mode | config ospf router | |
History | 3.3.3500 | |
Example | switch (config router ospf)# distance 100 | |
Related Commands | ||
Notes |
redistribute
redistribute {bgp | direct | static | ebgp | ibgp} Enables importing routes from other routing protocols as well as any statically configured routers into OSPF. | ||
Syntax Description | direct | Redistributes directly connected routes |
bgp | Redistributes routes from BGP protocol | |
ibgp | Redistributes IBGP routes | |
ebgp | Redistributes EBGP routes | |
static | Redistributes static configured routes | |
Default | Disable (no redistribution) | |
Configuration Mode | config ospf router | |
History | 3.6.3506 | |
Example | switch (config router ospf)# redistribute direct | |
Related Commands | ||
Notes | Routes from multiple protocols can be imported in parallel. |
timers throttle spf
timers throttle spf <spf-delay> <spf-hold> Sets the OSPF throttle SPF timers. | ||
Syntax Description | spf-delay | The interval by which SPF calculations delayed after a topology change reception |
spf-hold | The minimum delay between two consecutive delay calculations | |
Default | spf-delay – 1 millisecond | |
Configuration Mode | config ospf router | |
History | 3.3.3500 | |
Example | switch (config router ospf)# timers throttle spf 100 1000 | |
Related Commands | ||
Notes |
area default-cost
area <area-id> default-cost <cost> Specifies cost for the default summary route sent into an OSPF stub or not-so-stubby area (NSSA). | ||
Syntax Description | area-id | OSPF area ID |
cost | The cost for the default summary route | |
Default | The summary route cost is based on the area border router that generated the summary route | |
Configuration Mode | config ospf router | |
History | 3.3.3500 | |
Example | switch (config router ospf)# area 0 default-cost 100 | |
Related Commands | ||
Notes | Base cost for all calculation is 100GbE |
area range
area <area-id> range <ip-address> <prefix> [not-advertise] Consolidates and summarizes routes at an OSPF area boundary. | ||
Syntax Description | area-id | OSPF area ID |
not-advertise | Suppresses routes that match the specified IP address | |
prefix | Network prefix (in the format of /24, or 255.255.255.0 for example) | |
Default | Disabled | |
Configuration Mode | config ospf router | |
History | 3.3.3500 | |
Example | switch (config router ospf)# area 0 range 10.10.10.10 /24 | |
Related Commands | ||
Notes |
area stub
area <area-id> stub [no-summary] Configures an area as an OSPF stub area (an area is created if non-existent). | ||
Syntax Description | area-id | OSPF area ID |
no-summary | Summary route will not be advertised into the stub area | |
Default | Summary route is advertised | |
Configuration Mode | config ospf router | |
History | 3.3.3500 | |
Example | switch (config router ospf)# area 0 stub | |
Related Commands | ||
Note |
area nssa
area <area-id> nssa [default-information-originate [metric <m-value>] [metric-type <m-type>]] [nosummary] [translate type7 always] Configures an area as an OSPF not-so-stubby (NSSA) area. | ||
Syntax Description | area-id | OSPF area ID |
default-information-originate | A default type7 LSA (Link State Advertisements) is generated into the NSSA area | |
m-type | Metric type for OSPF | |
m-value | Metric value for OSPF | |
no-summary | Summary route will not be advertised into the NSSA area | |
translate type7 always | Type7 LSAs is translated to type5 LSAs (Link State Advertisements) | |
Default | Default m-type – 2 | |
Configuration Mode | config ospf router | |
History | 3.3.3500 | |
Example | switch (config router ospf)# area 0 nssa | |
Related Commands | ||
Notes | An area can be either stub, NSSA or normal. |
no area
no area <area-id> Deletes OSPF area and its related configuration. | ||
Syntax Description | area-id | OSPF area ID |
Default | N/A | |
Configuration Mode | config ospf router | |
History | 3.3.3500 | |
Example | switch (config router ospf)# no area 1 | |
Related Commands | ||
Notes | The command fails if the area is attached to active interfaces |
default-information originate
default-information originate [always] [metric <m-value>] [metric-type <m-type>] Enables default route origination to normal areas. | ||
Syntax Description | always | Default route is always advertised even if the default route is not in the routing table |
metric | Route metric value. Range: 1-65535. | |
metric-type | Metric type. Range: 1-2. | |
Default | m-value – 1 | |
Configuration Mode | config ospf router | |
History | 3.6.8008 | |
Example | switch (config router ospf)# default-information originate always | |
Related Commands | ||
Notes | When default route origination is enabled, the router automatically becomes ASBR and advertises a default route |
summary-address
summary-address <ip-address> <prefix> [not-advertise] Creates aggregate addresses for the OSPF protocol. | ||
Syntax Description | ip-address | The summary IP address. |
not-advertise | Suppresses routes that match the specified ip-address. | |
prefix | Network prefix (in the format of /24 or 255.255.255.0, for example). | |
Default | N/A | |
Configuration Mode | config ospf router | |
History | 3.3.3500 | |
Example | switch (config router ospf)# summary-address 10.10.10.10 /24 | |
Related Commands | ||
Notes | Maximum of 1500 summarized IP addresses can be configured |
ip ospf cost
ip ospf cost <cost> Sets OSPF cost of sending packet of this interface. | ||
Syntax Description | cost | The Interface cost used by the OSPF. Range is 1-65535. |
Default | Reference_BW/Link_BW | |
Configuration Mode | config interface vlan | |
History | 3.3.3500 | |
3.7.1100 | Updated Default | |
Example | switch (config interface vlan 10)# ip ospf cost 100 | |
Related Commands | ||
Notes |
ip ospf dead-interval
ip ospf dead-interval <seconds> Configures the interval during which at least one Hello packet must be received from a neighbor before the router declares that neighbor as down. | ||
Syntax Description | seconds | The dead-interval timer |
Default | 40 seconds | |
Configuration Mode | config interface vlan | |
History | 3.3.3500 | |
Example | switch (config interface vlan 10)# ip ospf dead-interval 10 | |
Related Commands | ||
Notes | The value must be the same for all nodes on the network. |
ip ospf hello-interval
ip ospf hello-interval <seconds> Configures the interval between Hello packets that OSPF sends on the interface. | ||
Syntax Description | seconds | The Hello interval timer |
Default | 10 | |
Configuration Mode | config interface vlan | |
History | 3.3.3500 | |
Example | switch (config interface vlan 10)# ip ospf hello-interval 20 | |
Related Commands | ||
Notes | The value must be the same for all nodes on the network. |
ip ospf priority
ip ospf priority <number> Configures the priority for this OSPF interface. | ||
Syntax Description | number | The Interface priority used by the OSPF protocol |
Default | 1 | |
Configuration Mode | config interface vlan | |
History | 3.3.3500 | |
Example | switch (config interface vlan 10)# ip ospf priority 100 | |
Related Commands | ||
Notes |
|
ip ospf network
ip ospf network <type> Sets the OSPF interface network type. | ||
Syntax Description | type | The network type on this interface.
|
Default | Broadcast for VLAN interfaces | |
Configuration Mode | config interface vlan | |
History | 3.3.3500 | |
Example | switch (config interface vlan 10)# ip ospf network point-to-point | |
Related Commands | ||
Notes |
|
ip ospf retransmit-interval
ip ospf retransmit-interval <seconds> Configures the time between OSPF link-state advertisement (LSA) retransmissions for adjacencies that belongs to the interface. | ||
Syntax Description | seconds | The retransmit interval |
Default | 5 | |
Configuration Mode | config interface vlan | |
History | 3.3.3500 | |
Example | switch (config interface vlan 10)# ip ospf retransmit-interval 10 | |
Related Commands | ||
Notes |
ip ospf passive-interface
ip ospf passive-interface Suppresses flooding of OSPF routing updates on an interface. | ||
Syntax Description | N/A | |
Default | Active interface (no ip ospf passive-interface) | |
Configuration Mode | config interface vlan | |
History | 3.3.3500 | |
Example | switch (config interface vlan 10)# ip ospf passive-interface | |
Related Commands | ||
Notes |
ip ospf transmit-delay
ip ospf transmit-delay <seconds> Sets the estimated time required to send an OSPF link-state update packet. | ||
Syntax Description | seconds | The transmit-delay interval in seconds |
Default | 1 | |
Configuration Mode | config interface vlan | |
History | 3.3.3500 | |
Example | switch (config interface vlan 10)# ip ospf transmit-delay 2 | |
Related Commands | ||
Notes |
ip ospf shutdown
ip ospf shutdown Disables the OSPF instance on the interface. | ||
Syntax Description | N/A | |
Default | Enabled (no shutdown) | |
Configuration Mode | config interface vlan | |
History | 3.3.3500 | |
Example | switch (config interface vlan 10)# ip ospf shutdown | |
Related Commands | ||
Notes |
ip ospf authentication
ip ospf authentication [message-digest] Specifies the authentication type for OSPF. | ||
Syntax Description | message-digest | Specifies that message-digest authentication (MD5) is used |
Default | Disabled | |
Configuration Mode | config interface vlan | |
History | 3.3.3500 | |
Example | switch (config interface vlan 10)# ip ospf authentication | |
Related Commands | ||
Notes |
|
ip ospf authentication-key
ip ospf authentication-key [<auth-type>] <password> To assign a password for simple password authentication for the OSPF. | ||
Syntax Description | auth-type | The authentication type:
|
password | Authentication password (up to 8 alphanumeric string) | |
Default | Unencrypted password | |
Configuration Mode | config interface vlan | |
History | 3.3.3500 | |
Example | switch (config interface vlan 10)# ip ospf authentication-key 0 mycleartextpassword | |
Related Commands | ||
Notes |
|
ip ospf message-digest-key
ip ospf message-digest-key <key-id> md5 [auth-type] <key> Sets the message digest key for MD5 authentication. | ||
Syntax Description | auth-type | The authentication type:
|
key | Authentication password, up to 8 alphanumeric string | |
key-id | Alphanumeric password of up to 16 bytes | |
Default | Unencrypted | |
Configuration Mode | config interface vlan | |
History | 3.3.3500 | |
Example | switch (config interface vlan 10)# ip ospf message-digest-key mykeyid md5 7 mykey | |
Related Commands | ||
Notes | The user cannot delete the last key until authentication is disabled. |
ip ospf area
ip ospf area <area-id> Configures OSPF area of this interface (and creates the area if non-existent). | ||
Syntax Description | area-id | OSPF area ID |
Default | N/A | |
Configuration Mode | config interface vlan | |
History | 3.3.3500 | |
Example | switch (config interface vlan 10)# ip ospf area 0 | |
Related Commands | ||
Notes |
show ip ospf
show ip ospf [<process-id> [vrf <vrf-name>]] Displays general OSPF configuration on specific VRF and status. | ||
Syntax Description | process-id | OSPF instance ID |
vrf | VRF instance | |
Default | Process ID – 1 | |
Configuration Mode | Any command mode | |
History | 3.3.3500 | |
3.6.1002 | Added VRF and process ID parameters and updated Example | |
Example | ||
switch (config)# show ip ospf 2 vrf myvrf Routing Process 2 with ID 2.2.2.2 myvrf Stateful High Availability is not supported Graceful-restart is not supported Supports only single TOS (TOS 0) route Opaque LSA not supported OSPF Admin State is enabled Redistributing External Routes: Disabled Administrative distance 110 Reference Bandwidth is 40 Gbps Initial SPF schedule delay 1 msecs SPF Hold time 5000 msecs Maximum paths to destination 64 Router LSA with maximum metric is not supported Condition: Always Number of external LSAs 0, checksum sum 0 Number of opaque AS LSAs 0, checksum sum 0 Number of areas is 1, 1 normal, 0 stub, 0 nssa Number of active areas is 1, 1 normal, 0 stub, 0 nssa Area (0.0.0.0) (Active) Interfaces in this area: 2 Active Interfaces: 2 Passive Interfaces: 0 SPF Calculation has run 6 times This area is Normal area Number of LSAs: 3, checksum sum 161346 | ||
Related Commands | ||
Notes |
show ip ospf border-routers
show ip ospf border-routers [vrf <vrf-name>] Displays routing table entries to an Area Border Routers. | ||
Syntax Description | vrf | OSPF routing table entries to an Area Border Routers on specific VRF |
Default | VRF – active VRF routing-context | |
Configuration Mode | Any command mode | |
History | 3.3.3500 | |
3.6.1002 | Added VRF parameter and updated Example | |
Example | ||
switch (config)# show ip ospf border-routers vrf myvrf OSPF Process ID 2, vrf myvrf Internal Routing Table Codes: i - Intra-area route, I - Inter-area route i 1.1.1.1 [0] ABR Area: 0.0.0.0, Next Hop: 21.21.21.1 | ||
Related Commands | ||
Notes |
show ip ospf database
show ip ospf database [summary] [<process-id> <area-id> [<link-state-id>]] [adv-router <ip-address> | self-originated] [vrf <vrf-name>] Displays the OSPF database. | ||
Syntax Description | adv-router <ip-address> | Filters per advertise router |
area-id | Filters the command per OSPF area ID | |
link-state-id | The link state ID | |
self-originated | Self Originate | |
summary | Summarizes the output of the OSPF database | |
process-id | Displays OSPF database on specific instance ID | |
vrf | Displays OSPF database on specific VRF | |
Default | Process ID – 1 | |
Configuration Mode | Any command mode | |
History | 3.3.3500 | |
3.6.1002 | Added VRF and process ID parameters and updated Example | |
Example | switch (config)# show ip o | |
Related Commands | ||
switch (config)# show ip ospf database 2 vrf myvrf OSPF Router with ID (2.2.2.2) (Process ID 2 VRF myvrf) Router Link States (Area 0.0.0.0) ----------------------------------------- Link ID ADV Router Age Seq Checksum LinkCount 2.2.2.2 2.2.2.2 1150 0x80000006 0xbd2a 3 1.1.1.1 1.1.1.1 1152 0x80000006 0xf7f5 3 Network Link States (Area 0.0.0.0) ----------------------------------------- Link ID ADV Router Age Seq Checksum 21.21.21.2 2.2.2.2 1150 0x80000003 0xbb26 | ||
Notes |
show ip ospf interface
show ip ospf interface [<process-id>] [vlan <vlan-id> | Ethernet <slot/port | port-channel <number>] [brief] Displays the OSPF related interface configuration. | ||
Syntax Description | brief | Gives a brief summary of the output |
process-id | Displays OSPF interface configuration on specific instance ID | |
vlan <vlan-id> | Displays OSPF interface configuration and status per VLAN interface | |
vrf | Displays OSPF interface configuration on specific VRF | |
Default | Process ID – 1 | |
Configuration Mode | Any command mode | |
History | 3.3.3500 | |
3.6.1002 | Added VRF and process ID parameters and updated Example | |
3.6.4070 | Added Ethernet variable | |
Example | ||
switch (config) # show ip ospf interface 2 vrf myvrf Interface Vlan is 21 Enabled, line protocol is Up IP address 21.21.21.2, Mask 255.255.255.0 [primary] IP address 30.30.30.30, Mask 255.255.255.0 Process ID 2 VRF myvrf, Area 0.0.0.0 OSPF Interface Admin State is enabled State DESIGNATED ROUTER, Network Type BROADCAST, Cost 10 Transmit delay 1 sec, Router Priority 1 DR is 2.2.2.2 Backup Designated Router is 1.1.1.1 Timer intervals (secs): Hello 10, Dead 40, Wait 40, Retransmit 5 No authentication Number of opaque link LSAs: 0, checksum sum 0 switch (config) # show ip ospf interface 2 vrf myvrf brief OSPF Process ID 2 VRF myvrf Total number of interface: 2 Interface Id Area Cost State Neighbors Status Vlan21 0.0.0.0 10 Enabled 1 Up Ethernet1/22 0.0.0.0 1 Enabled 1 Up | ||
Related Commands | ||
Notes |
show ip ospf neighbors
show ip ospf [vrf <vrf-name>] neighbors [vlan <vlan-id> | interface <name>] [<neighbor ip address>] Displays the OSPF related interface neighbor configuration. | ||
Syntax Description | vlan-id | Displays OSPF interface configuration and status per VLAN interface |
neighbor ip address | Filers the output per a specific OSPF neighbor | |
vrf | Displays OSPF interface neighbor configuration on specific VRF | |
Default | VRF – active VRF routing-context | |
Configuration Mode | Any command mode | |
History | 3.3.3500 | |
3.6.1002 | Added VRF parameter and updated Example | |
3.6.4070 | Added support for BFD | |
Example | ||
switch (config) # show ip ospf neighbors vrf myvrf Neighbor 1.1.1.1, interface address 21.21.21.1 In the area 0.0.0.0 via Interface Vlan 21 Neighbor priority is 1, State is FULL DR is 2.2.2.2 Backup Designated Router is 1.1.1.1 Options 2 Dead timer due in 36 Neighbor 1.1.1.1, interface address 22.22.22.1 In the area 0.0.0.0 via 1/22 Neighbor priority is 1, State is FULL No designated router on this network No backup designated router on this network Options 2 Dead timer due in 36 switch (config) # show ip ospf neighbors 1/22 vrf myvrf Neighbor 1.1.1.1, interface address 22.22.22.1 In the area 0.0.0.0 via 1/22 Neighbor priority is 1, State is FULL No designated router on this network No backup designated router on this network Options 2 Dead timer due in 29 | ||
Related Commands | ||
Notes | BFD session state is displayed as: established, failed or not established. When BFD is not defined in the command, it is not displayed in the output. |
show ip ospf request-list
show ip ospf request-list <neighbor-id> {vlan <vlan-id> | ethernet <slot/port> | port-channel <id>} [vrf <vrf-name>] Displays the OSPF list of all link-state advertisements (LSAs) requested by a router. | ||
Syntax Description | neighbor-id | Filers the output per a specific OSPF neighbor |
vlan-id | Filers the output per a specific VLAN ID | |
vrf <vrf-name> | Displays OSPF request-list on specific VRF | |
Default | vrf – active VRF routing-context | |
Configuration Mode | Any command mode | |
History | 3.3.3500 | |
Example | ||
switch (config) # show ip ospf request-list 4.4.4.4 vlan 7 OSPF Router with ID (7.7.7.1) (Process ID 1) Neighbor 4.4.4.4, Interface vlan 7, Address 7.7.7.2 42 LSAs on request-list Type LS-ID ADV-RTR Seq No Age Checksum 1 10.10.10.23 10.10.10.23 0x8000012f 37 0xa7b9 1 10.10.10.24 10.10.10.24 0x8000012f 38 0xbd61 | ||
Related Commands | ||
Notes |
show ip ospf retransmission-list
show ip ospf retransmission-list <neighbor-id> {vlan <vlan-id> | ethernet <slot/port> | port-channel <id>} [vrf <vrf-name>] Displays the OSPF list of all link-state advertisements (LSAs) waiting to be resent to neighbors. | ||
Syntax Description | neighbor-id | Filers the output per a specific OSPF neighbor |
vrf <vrf-name> | Displays OSPF retransmission-list on specific VRF | |
vlan-id | Filers the output per a specific VLAN ID | |
Default | vrf – active VRF routing-context | |
Configuration Mode | Any command mode | |
History | 3.3.3500 | |
Example | ||
switch (config) # show ip ospf retransmission-list 4.4.4.4 vlan 6 OSPF Router with ID (7.7.7.1) (Process ID 1) Neighbor 4.4.4.4, Interface vlan 6, Address 6.6.6.2 Link state retransmission due in 3780 msec, Queue length 207 Type LS-ID ADV-RTR Seq No Age Checksum 3 22.22.22.22 7.7.7.1 0x80000045 0 0xaaf4 3 192.168.23.2 7.7.7.1 0x80000001 353 0x6752 | ||
Related Commands | ||
Notes |
show ip ospf summary-address
show ip ospf summary-address [vrf <vrf-name>] Displays a list of all summary address redistribution information configured on the OSPF. | ||
Syntax Description | vrf <vrf-name> | Display summary address and area range information on specific VRF |
Default | vrf – active VRF routing-context | |
Configuration Mode | Any command mode | |
History | 3.3.3500 | |
Example | ||
switch (config)# show ip ospf summary-address | ||
Related Commands | ||
Notes |