OSPF Cisco IOS Commands:
show ip ospf commands:
-
show ip ospf <1-65535>
: Process ID number - Display OSPF information for a specific OSPF process. -
show ip ospf border-routers
: Border and Boundary Router Information - View information about border and boundary routers in the OSPF network. -
show ip ospf database
: Database summary - Obtain a summary of OSPF database information.summary
: Provides a summary of the OSPF database.self-originate
: Shows LSAs that a router has originated itself.
-
show ip ospf events
: OSPF event informationerrors
: Displays OSPF error events.history
: Shows the history of OSPF events.log
: Displays the OSPF event log.
-
show ip ospf flood-list
: Link state flood list - View the link state flood list in OSPF. -
show ip ospf interface
: Interface informationbrief
: Provides a brief summary of OSPF interfaces.<interface-type>
: Allows you to specify a specific interface type for detailed information.
-
show ip ospf max-metric
: Max-metric origination information - Obtain information about max-metric origination in OSPF. -
show ip ospf mpls
: MPLS related information - Display MPLS-related information in the context of OSPF. -
show ip ospf multi-area
: Multi-area interfaces information - View information about multi-area interfaces in OSPF. -
show ip ospf neighbor
: Neighbor list - Retrieve a list of OSPF neighbors. -
show ip ospf nsf
: Non-stop forwarding state information - Display information about non-stop forwarding state in OSPF. -
show ip ospf request-list
: Link state request list - View the link state request list in OSPF. -
show ip ospf retransmission-list
: Link state retransmission list - Obtain information about the link state retransmission list in OSPF. -
show ip ospf rib
: Routing Information Base (RIB)summary
: Gives a summary of the RIB.lsa
: Shows RIB entries for LSAs.prefixes
: Displays RIB entries for prefixes.
-
show ip ospf sham-links
: Sham link information - View information about sham links in OSPF. -
show ip ospf statistics
: OSPF Statistics - Display OSPF statistics.detail
: Detail per area statistics - Provides detailed statistics per OSPF area.multicast
: Multicast Topology - Displays statistics related to multicast topology.topology
: Unicast Topology - Shows statistics for unicast topology.| [output modifiers]
: Output modifiers - Allow you to modify the output of the "show ip ospf statistics" command for better visibility.begin
: Begins displaying output at a specific keyword or line.include
: Includes lines that match a specific keyword or pattern.exclude
: Excludes lines that match a specific keyword or pattern.more
: Displays additional lines.section
: Separates the output into sections.topology
: Allows you to view specific OSPF topology-related information.
-
show ip ospf summary-address
: Summary-address redistribution Information - Obtain information about summary-address redistribution in OSPF. -
show ip ospf timers
: OSPF timers information - View information about OSPF timers. -
show ip ospf topology-info
: Topology Infoarea
: Provides information about the OSPF areas.base
: Displays information about the OSPF base.extern
: Shows details about external OSPF routes.link-state
: Provides information about link-state data.network
: Displays information about OSPF networks.routes
: Shows OSPF routing information.
-
show ip ospf traffic
: Traffic related statistics - Retrieve traffic-related statistics for OSPF. -
show ip ospf virtual-links
: Virtual link information - View information about virtual links in OSPF. -
show ip ospf | [output modifiers]
: Output modifiers - Allow you to modify the output of OSPF show commands for better visibility.begin
: Begins displaying output at a specific keyword or line.include
: Includes lines that match a specific keyword or pattern.exclude
: Excludes lines that match a specific keyword or pattern.more
: Displays additional lines.section
: Separates the output into sections.topology
: Allows you to view specific OSPF topology-related information.
These OSPF show commands and their subcommands enable you to gather detailed information about various aspects of OSPF, including database contents, events, interface details, the routing information base, topology, and the ability to customize the output for better analysis.
Hidden OSPF route command in IOS
show ip ospf route
- The "show ip ospf route" output provides a concise overview of all routes computed by OSPF that will be added to the routing table as OSPF-learned routes.
- It includes information about the area in which the route was calculated, the OSPF cost associated with the route, and whether the route is classified as intra-area, inter-area, or external.
- The output employs a BGP-like notation, where "*" denotes the best route, and ">" signifies that the route has been incorporated into the global Routing Information Base (RIB) on the router.
- Directly connected routes calculated by OSPF are not typically added to the global RIB. Instead, they are maintained as directly connected routes and separate OSPF-learned routes.
- The "show ip ospf route" output is useful for identifying synchronization issues between the global RIB and the OSPF process' calculated routes.
Rx#show ip ospf route
**show ip ospf de (short for delete-list) ** This command shows you the lsas which have been deleted from consideration.
- for more info about hidden commands check out this post https://community.cisco.com/t5/switching/ospf-hidden-commands/td-p/1145824 (opens in a new tab)
Showing DNS name in some ospf show commands
- Activate globaly using
Rx(config)#ip ospf name-lookup
OSPF Router config commands:
router ospf <1-65535>
:-
address-family ipv4 [ipv6]
: Enter Address Family command mode - This command allows you to enter the Address Family configuration mode for IPv4 and IPv6. Possible options:ipv4
: Enter the IPv4 Address Family mode.ipv6
: Enter the IPv6 Address Family mode.
-
adjacency [bfd] [neighbor] [retransmit] [xmit] [xmit-time]
: Control adjacency formation - This command lets you control various aspects of OSPF adjacency formation. Possible options:bfd
: Control BFD-related parameters for adjacency.neighbor
: Configure neighbor-specific parameters.retransmit
: Adjust retransmission parameters.xmit
: Control transmission settings.xmit-time
: Set the xmit-time interval.
-
area <0.0.0.0> [nssa]
: OSPF area parameters - Configure OSPF area parameters for the specific process ID. Possible options:0.0.0.0
: Specify the OSPF area ID.nssa
: Configure the area as a Not-So-Stubby Area (NSSA).
-
auto-cost [reference-bandwidth]
: Calculate OSPF interface cost according to bandwidth - Configure OSPF to automatically calculate the cost of OSPF interfaces. Possible options:reference-bandwidth <1-4294967>
: Set the reference bandwidth for cost calculation.
-
bfd [all-interfaces] [ipv4] [ipv6] [sub-second]
: BFD configuration commands - Configure Bidirectional Forwarding Detection (BFD) parameters. Possible options:all-interfaces
: Configure BFD for all OSPF interfaces.ipv4
: Configure BFD for IPv4.ipv6
: Configure BFD for IPv6.sub-second
: Configure sub-second BFD intervals.
-
capability [strict] [receive] [send]
: Enable specific OSPF feature - Enable specific OSPF capabilities. Possible options:strict
: Enable strict capability negotiation.receive
: Enable capability reception.send
: Enable capability sending.
-
compatible [ospfv2] [ospfv3]
: OSPF compatibility list - Specify OSPF protocol compatibility settings. Possible options:ospfv2
: Set OSPFv2 compatibility.ospfv3
: Set OSPFv3 compatibility.
-
default-information [originate] [originate always] [originate metric <1-16777215>] [originate route-map <WORD>] [originate metric-type <1-2>]
: Control distribution of default information - Control the distribution of default route information. Possible options:originate
: Originate a default route into OSPF.originate always
: Originate a default route even if there is no default route in the routing table.originate metric <1-16777215>
: Set the metric for the originated default route.originate route-map <WORD>
: Apply a route map to control default route origination.originate metric-type <1-2>
: Set the metric type for the originated default route.
-
default-metric [metric]
: Set metric of redistributed routes - Set the metric value for redistributed routes into OSPF. Possible options:metric
: Specify the metric value for redistributed routes.
-
discard-route [route-type]
: Enable or disable discard-route installation - Control the installation of discard routes. Possible options:route-type
: Specify the route type to discard.
-
distance [ospf [intra-area] [inter-area] [external] [intra-area-routing] [inter-area-routing] [external-routing] [external-prefix] [internal]]
: Define an administrative distance - Set administrative distances for OSPF routes. Possible options:ospf
: Set OSPF administrative distances.intra-area
: Set administrative distance for intra-area routes.inter-area
: Set administrative distance for inter-area routes.external
: Set administrative distance for external routes.intra-area-routing
: Set administrative distance for intra-area routing.inter-area-routing
: Set administrative distance for inter-area routing.external-routing
: Set administrative distance for external routing.external-prefix
: Set administrative distance for external prefixes.internal
: Set administrative distance for internal routes.
-
distribute-list <access-list> [gateway] [prefix] [prefix-list] [route-map]
: Filter networks in routing updates - Filter networks in OSPF routing updates. Possible options:access-list
: Specify an access list.gateway
: Filter by gateway.prefix
: Filter by prefix.prefix-list
: Use a prefix list for filtering.route-map
: Apply a route map for filtering.
-
domain-id <id>
: OSPF domain-id - Set the OSPF domain-id. Possible options:id
: Specify the domain-id.
-
domain-tag <tag>
: OSPF domain-tag - Set the OSPF domain-tag. Possible options:tag
: Specify the domain-tag.
-
event-log <prefix> <size>
: OSPF Event Logging - Configure OSPF event logging parameters. Possible options:prefix
: Specify the log file prefix.size
: Set the log file size.
-
exit
: Exit from routing protocol configuration mode - This command is used to exit OSPF router configuration mode. -
help
: Description of the interactive help system - Provides descriptions and help information for OSPF router configuration mode commands. -
ignore <event> [cost] [hello] [opaque-lsa]
: Do not complain about specific event - Configure OSPF to ignore specific events. Possible options:event
: Specify the event to ignore.cost
: Ignore cost-related events.hello
: Ignore hello events.opaque-lsa
: Ignore opaque LSA events.
-
OSPF interface command options:
-
ip ospf <1-65535>
: Process ID - This identifier represents the unique OSPF routing process. Different OSPF processes can run concurrently on a router, each identified by a distinct process ID. -
ip ospf adjacency [stagger-start] [stagger-stop]
: Adjacency staggering - This setting allows you to configure adjacency staggering, a technique used to reduce CPU and memory usage when forming OSPF adjacencies with numerous neighbors. Possible options:stagger-start
: Specify the start time for adjacency staggering.stagger-stop
: Specify the stop time for adjacency staggering.
-
ip ospf authentication [message-digest] [null]
: Enable authentication - OSPF supports authentication to secure routing information. Enabling this option activates authentication for OSPF on the interface. Possible options:message-digest
: Enable message digest authentication.null
: Disable authentication (null authentication).
-
ip ospf authentication-key <0-7> [string]
: Authentication password (key) - Here, you specify the authentication key or password for OSPF on the interface. Possible options:<0-7>
: Specify the key ID.[string]
: Enter the authentication password as a string.
-
ip ospf bfd [disable]
: Enable Bidirectional Forwarding Detection (BFD) on this interface - BFD is a protocol used for rapid link failure detection. Enabling BFD for OSPF on an interface ensures quicker detection of link failures. Possible options:disable
: Disable BFD for the interface.
-
ip ospf cost <1-65535>
: Interface cost - OSPF utilizes a cost metric to determine the preferred routing path. This option lets you set the cost of the interface, influencing path selection. -
ip ospf database-filter [all] [out] [in] [external] [summary] [opaque]
: Filter OSPF Link-State Advertisements (LSA) during synchronization and flooding - This feature allows you to filter specific LSAs during OSPF synchronization and flooding, offering control over which LSAs are propagated through the network. Possible options:all
: Filter all LSAs.out
: Filter LSAs going out.in
: Filter LSAs coming in.external
: Filter external LSAs.summary
: Filter summary LSAs.opaque
: Filter opaque LSAs.
-
ip ospf dead-interval <1-65535>
: Interval after which a neighbor is declared dead - The dead interval represents the time duration after which OSPF routers declare a neighboring router as "dead" if no OSPF hello messages are received from it. -
ip ospf demand-circuit
: OSPF Demand Circuit - This configuration enables OSPF to operate over a demand circuit, where the OSPF neighborship is established only when traffic needs to be sent. -
ip ospf flood-reduction [adaptive]
: OSPF Flood Reduction - This option is employed to control the flooding of LSAs within an OSPF area, reducing unnecessary LSA flooding. Possible options:adaptive
: Enable adaptive flood reduction.
-
ip ospf hello-interval <1-65535>
: Time between HELLO packets - This specifies the time interval at which OSPF routers transmit hello packets to discover and maintain neighborships. -
ip ospf lls [disable]
: Link-local Signaling (LLS) support - LLS is an OSPF feature allowing routers to advertise additional information, such as traffic engineering extensions, in OSPF LSAs. Possible options:disable
: Disable LLS.
-
ip ospf message-digest-key <0-7> [string]
: Message digest authentication password (key) - This command configures the message digest authentication key for OSPF, enhancing security by ensuring that OSPF packets are accepted only from authenticated sources. Possible options:<0-7>
: Specify the key ID.[string]
: Enter the authentication password as a string.
-
ip ospf mtu-ignore
: Ignores the MTU in DBD (Database Description) packets - This option instructs OSPF to disregard Maximum Transmission Unit (MTU) information in DBD packets received from neighbors. -
ip ospf multi-area <1-65535>
: Set the OSPF multi-area ID - OSPF permits routers to be part of multiple areas. This setting configures the router to participate in multiple OSPF areas. -
ip ospf network [broadcast] [point-to-multipoint] [point-to-point] [non-broadcast] [point-to-multipoint non-broadcast]
: Network type - This specifies the type of network on the interface. Possible options:broadcast
: Broadcast network.point-to-multipoint
: Point-to-multipoint network.point-to-point
: Point-to-point network.non-broadcast
: Non-broadcast network.point-to-multipoint non-broadcast
: Point-to-multipoint non-broadcast network.