|
This chapter describes the function and displays the syntax for Open Shortest Path First (OSPF) commands. For more information about defaults and usage guidelines, see the corresponding chapter of the Network Protocols Command Reference, Part 1.
To enable authentication for an OSPF area, use the area authentication router configuration command. To remove an area's authentication specification or a specified area from the configuration, use the no form of this command.
area area-id authentication [message-digest]area-id | Identifier of the area for which authentication is to be enabled. The identifier can be specified as either a decimal value or an IP address. |
message-digest | (Optional) Enables MD5 authentication on the area specified by area-id. |
To specify a cost for the default summary route sent into a stub area, use the area default-cost router configuration command. To remove the assigned default route cost, use the no form of this command.
area area-id default-cost costarea-id | Identifier for the stub area. The identifier can be specified as either a decimal value or as an IP address. |
cost | Cost for the default summary route used for a stub area. The acceptable value is a 24-bit number. |
To configure an area as a not so stubby area (NSSA), use the area nssa router configuration command. To remove the nssa distinction from the area, use the no form of this command.
area area-id nssa [no-redistribution] [default-information-originate]area-id | Identifier of the area for which authentication is to be enabled. The identifier can be specified as either a decimal value or an IP address. |
no-redistribution | (Optional) Used when the router is a NSSA ABR and you want the redistribute command to import routes only into the normal areas, but not into the NSSA area. |
default-information- originate | (Optional) Used to generate a Type 7 default into the NSSA area. This argument only takes effect on NSSA ABR. |
To consolidate and summarize routes at an area boundary, use the area range router configuration command. To disable this function, use the no form of this command.
area area-id range address maskarea-id | Identifier of the area about which routes are to be summarized. It can be specified as either a decimal value or as an IP address. |
address | IP address. |
mask | IP mask. |
To define an area as a stub area, use the area stub router configuration command. To disable this function, use the no form of this command.
area area-id stub [no-summary]area-id | Identifier for the stub area; either a decimal value or an IP address. |
no-summary | (Optional) Prevents an ABR from sending summary link advertisements into the stub area. |
To define an OSPF virtual link, use the area virtual-link router configuration command with the optional parameters. To remove a virtual link, use the no form of this command.
area area-id virtual-link router-id [hello-interval seconds] [retransmit-interval seconds]area-id | Area ID assigned to the transit area for the virtual link. This can be either a decimal value or a valid IP address. There is no default. |
router-id | Router ID associated with the virtual link neighbor. The router ID appears in the show ip ospf display. It is internally derived by each router from the router's interface IP addresses. This value must be entered in the format of an IP address. There is no default. |
hello-interval seconds | (Optional) Time in seconds between the hello packets that the Cisco IOS software sends on an interface. Unsigned integer value to be advertised in the software's hello packets. The value must be the same for all routers and access servers attached to a common network. The default is 10 seconds. |
retransmit-interval seconds | (Optional) Time in seconds between link state advertisement retransmissions for adjacencies belonging to the interface. Expected round-trip delay between any two routers on the attached network. The value must be greater than the expected round-trip delay. The default is 5 seconds. |
transmit-delay seconds | (Optional) Estimated time in seconds it takes to transmit a link state update packet on the interface. Integer value that must be greater than zero. Link state advertisements in the update packet have their age incremented by this amount before transmission. The default value is 1 second. |
dead-interval seconds | (Optional) Time in seconds that a software's hello packets are not seen before its neighbors declare the router down. Unsigned integer value. The default is four times the hello interval, or 40 seconds. As with the hello interval, this value must be the same for all routers and access servers attached to a common network. |
authentication-key key | (Optional) Password to be used by neighboring routers. Any continuous string of characters that you can enter from the keyboard up to 8 bytes long. This string acts as a key that will allow the authentication procedure to generate or verify the authentication field in the OSPF header. This key is inserted directly into the OSPF header when originating routing protocol packets. A separate password can be assigned to each network on a per-interface basis. All neighboring routers on the same network must have the same password to be able to route OSPF traffic. The password is encrypted in the configuration file if the service password-encryption command is enabled. There is no default value. |
message-digest-key keyid md5 key | (Optional) Key identifier and password to be used by neighboring routers and this router for MD5 authentication. The keyid is a number in the range 1 to 255. The key is an alphanumeric string of up to 16 characters. All neighboring routers on the same network must have the same key identifier and key to be able to route OSPF traffic. There is no default value. |
To generate a default route into an OSPF routing domain, use the default-information originate router configuration command. To disable this feature, use the no form of this command.
default-information originate [always] [metric metric-value] [metric-type type-value]originate | Causes the Cisco IOS software to generate a default external route into an OSPF domain if the software already has a default route and you want to propagate to other routers. |
always | (Optional) Always advertises the default route regardless of whether the software has a default route. |
metric metric-value | (Optional) Metric used for generating the default route. If you omit a value and do not specify a value using the default-metric router configuration command, the default metric value is 10. The value used is specific to the protocol. |
metric-type type-value | (Optional) External link type associated with the default route advertised into the OSPF routing domain. It can be one of the following values:
1--Type 1 external route 2--Type 2 external route The default is Type 2 external route. |
level-1 | Level 1 routes are redistributed into other IP routing protocols independently. It specifies if IS-IS advertises network 0.0.0.0 into the Level 1 area. |
level-1-2 | Both Level 1 and Level 2 routes are redistributed into other IP routing protocols. It specifies if IS-IS advertises network 0.0.0.0 into both levels in a single command. |
level-2 | Level 2 routes are redistributed into other IP routing protocols independently. It specifies if IS-IS advertises network 0.0.0.0 into the Level 2 subdomain. |
route-map map-name | (Optional) Routing process will generate the default route if the route map is satisfied. |
To set default metric values for the OSPF routing protocol, use this form of the default-metric router configuration command. To return to the default state, use the no form of this command.
default-metric numbernumber | Default metric value appropriate for the specified routing protocol. |
To assign a password to be used by neighboring routers that are using OSPF's simple password authentication, use the ip ospf authentication-key interface configuration command. To remove a previously assigned OSPF password, use the no form of this command.
ip ospf authentication-key passwordpassword | Any continuous string of characters that can be entered from the keyboard up to 8 bytes in length. |
To explicitly specify the cost of sending a packet on an interface, use the ip ospf cost interface configuration command. To reset the path cost to the default value, use the no form of this command.
ip ospf cost costcost | Unsigned integer value expressed as the link state metric. It can be a value in the range 1 to 65535. |
To set how long hello packets must not have been seen before its neighbors declare the router down, use the ip ospf dead-interval interface configuration command. To return to the default time, use the no form of this command.
ip ospf dead-interval secondsseconds | Unsigned integer that specifies the interval in seconds; the value must be the same for all nodes on the network. |
To configure OSPF to treat the interface as an OSPF demand circuit, use the ip ospf demand-circuit interface configuration command. To remove the demand circuit designation from the interface, use the no form of this command.
ip ospf demand-circuitTo specify the interval between hello packets that the Cisco IOS software sends on the interface, use the ip ospf hello-interval interface configuration command. To return to the default time, use the no form of this command.
ip ospf hello-interval secondsseconds | Unsigned integer that specifies the interval in seconds. The value must be the same for all nodes on a specific network. |
To enable OSPF MD5 authentication, use the ip ospf message-digest-key interface configuration command. To remove an old MD5 key, use the no form of this command.
ip ospf message-digest-key keyid md5 keykeyid | An identifier in the range 1 to 255. |
key | Alphanumeric password of up to 16 bytes. |
To configure OSPF to look up Domain Name System (DNS) names for use in all OSPF show EXEC command displays, use the ip ospf name-lookup global configuration command. To disable this feature, use the no form of this command.
ip ospf name-lookupTo configure the OSPF network type to a type other than the default for a given media, use the ip ospf network interface configuration command. To return to the default value, use the no form of this command.
ip ospf network {broadcast | non-broadcast | point-to-multipoint}broadcast | Sets the network type to broadcast. |
non-broadcast | Sets the network type to nonbroadcast. |
point-to-multipoint | Sets the network type to point-to-multipoint. |
To set the router priority, which helps determine the designated router for this network, use the ip ospf priority interface configuration command. To return to the default value, use the no form of this command.
ip ospf priority numbernumber | 8-bit unsigned integer that specifies the priority. The range is from 0 to 255. |
To specify the time between link state advertisement retransmissions for adjacencies belonging to the interface, use the ip ospf retransmit-interval interface configuration command. To return to the default value, use the no form of this command.
ip ospf retransmit-interval secondsseconds | Time in seconds between retransmissions. It must be greater than the expected round-trip delay between any two routers on the attached network. The range is 1 to 65535 seconds. The default is 5 seconds. |
To set the estimated time it takes to transmit a link state update packet on the interface, use the ip ospf transmit-delay interface configuration command. To return to the default value, use the no form of this command.
ip ospf transmit-delay secondsseconds | Time in seconds that it takes to transmit a link state update. The range is 1 to 65535 seconds. The default is 1 second. |
To configure OSPF routers interconnecting to nonbroadcast networks, use this form of the neighbor router configuration command. To remove a configuration, use the no form of this command.
neighbor ip-address [priority number] [poll-interval seconds]ip-address | Interface IP address of the neighbor. |
priority number | (Optional) 8-bit number indicating the router priority value of the nonbroadcast neighbor associated with the IP address specified. The default is 0. |
poll-interval seconds | (Optional) Unsigned integer value reflecting the poll interval. RFC 1247 recommends that this value be much larger than the hello interval. The default is 2 minutes (120 seconds). |
To define the interfaces on which OSPF runs and to define the area ID for those interfaces, use the network area router configuration command. To disable OSPF routing for interfaces defined with the address wildcard-mask pair, use the no form of this command.
network address wildcard-mask area area-idaddress | IP address. |
wildcard-mask | IP-address-type mask that includes "don't care" bits. |
area-id | Area that is to be associated with the OSPF address range. It can be specified as either a decimal value or as an IP address. If you intend to associate areas with IP subnets, you can specify a subnet address as the area-id. |
To control how OSPF calculates default metrics for the interface, use the ospf auto-cost router configuration command. To assign cost based only on the interface type, use the no form of this command.
ospf auto-cost reference-bandwidth ref-bwref-bw | Rate in megabits per second (bandwidth). The range is 1 to 4294967; the default is 100. |
To configure the router to send a syslog message when the state of an OSPF neighbor changes, use the ospf log-adj-changes router configuration command. To turn off this feature, use the no form of this command.
ospf log-adj-changesTo configure an OSPF routing process, use the router ospf global configuration command. To terminate an OSPF routing process, use the no form of this command.
router ospf process-idprocess-id | Internally used identification parameter for an OSPF routing process. It is locally assigned and can be any positive integer. A unique value is assigned for each OSPF routing process. |
To display general information about OSPF routing processes, use the show ip ospf EXEC command.
show ip ospf [process-id]process-id | (Optional) Process ID. If this argument is included, only information for the specified routing process is included. |
To display the internal OSPF routing table entries to an area border router (ABR) and autonomous system boundary router (ASBR), use the show ip ospf border-routers privileged EXEC command.
show ip ospf border-routersUse the show ip ospf database EXEC command to display lists of information related to the OSPF database for a specific router. The various forms of this command deliver information about different OSPF link state advertisements.
show ip ospf [process-id area-id] databaseprocess-id | (Optional) Internally used identification parameter. It is locally assigned and can be any positive integer number. The number used here is the number assigned administratively when enabling the OSPF routing process. |
area-id | (Optional) Area number associated with the OSPF address range defined in the network router configuration command used to define the particular area. |
link-state-id | (Optional) Identifies the portion of the Internet environment that is being described by the advertisement. The value entered depends on the advertisement's LS type. It must be entered in the form of an IP address.
When the link state advertisement is describing a network, the link-state-id can take one of two forms: · The network's IP address (as in type 3 summary link advertisements and in autonomous system external link advertisements). · A derived address obtained from the link state ID. (Note that masking a network links advertisement's link state ID with the network's subnet mask yields the network's IP address.) When the link state advertisement is describing a router, the link state ID is always the described router's OSPF router ID. When an autonomous system external advertisement (LS Type = 5) is describing a default route, its link state ID is set to Default Destination (0.0.0.0). |
To display OSPF-related interface information, use the show ip ospf interface EXEC command.
show ip ospf interface [type number]type | (Optional) Interface type. |
number | (Optional) Interface number. |
To display OSPF-neighbor information on a per-interface basis, use the show ip ospf neighbor EXEC command.
show ip ospf neighbor [type number] [neighbor-id] [detail]type | (Optional) Interface type. |
number | (Optional) Interface number. |
neighbor-id | (Optional) Neighbor ID. |
detail | (Optional) Displays all neighbors given in detail (list all neighbors). |
To display parameters about and the current state of OSPF virtual links, use the show ip ospf virtual-links EXEC command.
show ip ospf virtual-linksUse the summary-address router configuration command to create aggregate addresses for OSPF. The no summary-address command restores the default.
summary-address address mask {level-1 | level-1-2 | level-2} prefix mask [not-advertise]address | Summary address designated for a range of addresses. |
mask | IP subnet mask used for the summary route. |
level-1 | Only routes redistributed into Level 1 are summarized with the configured address/mask value. This keyword applies to IS-IS only. |
level-1-2 | The summary router is injected into both a Level 1 area and a Level 2 subdomain. This keyword applies to IS-IS only. |
level-2 | Routes learned by Level 1 routing will be summarized into the Level 2 backbone with the configured address/mask value. This keyword applies to IS-IS only. |
prefix | IP route prefix for the destination. |
mask | IP subnet mask used for the summary route. |
not-advertise | (Optional) Used to suppress routes that match the prefix/mask pair. This keyword applies to OSPF only. |
tag tag | (Optional) Tag value that can be used as a "match" value for controlling redistribution via route maps. This keyword applies to OSPF only. |
To configure the delay time between when OSPF receives a topology change and when it starts a shortest path first (SPF) calculation, and the hold time between two consecutive SPF calculations, use the timers spf router configuration command. To return to the default timer values, use the no form of this command.
timers spf spf-delay spf-holdtimespf-delay | Delay time, in seconds, between when OSPF receives a topology change and when it starts a SPF. calculation. It can be an integer from 0 to 65535. The default time is 5 seconds. A value of 0 means that there is no delay; that is, the SPF calculation is started immediately. |
spf-holdtime | Minimum time, in seconds, between two consecutive SPF calculations. It can be an integer from 0 to 65535. The default time is 10 seconds. A value of 0 means that there is no delay; that is, two consecutive SPF calculations can be done one immediately after the other. |
|