ip ospf

To OSPF related configuration, use the command ip ospf in OSPF Router Configuration Mode. The no form of this command deletes the OSPF related configuration or sets all configured values to default.

ip ospf

ip ospf
{ {authentication } { {simple } { | message-digest } { | sha-1 } { | sha-224 } { | sha-256 } { | sha384 } { | sha-512 } { | null } { | simple} }
{ | authentication-key } { <key (8)> }
{ | bfd } { [disable] }
{ | cost } { <cost (1-65535)> } { [tos } { <value(0-30)>] }
{ | dead-interval } { <seconds (1-65535)> }
{ | demand-circuit }
{ | hello-interval } { <seconds (1 - 65535)> }
{ | key } { <Key-ID (0-255)> } { {start-accept } { <DD-MON-YEAR,HH:MM> } { | start-generate } { <DD-MON-YEAR,HH:MM> } { | stop-accept } { <DD-MON-YEAR,HH:MM> } { | stop-generate } { <DD-MON-YEAR,HH:MM>} }
{ | message-digest-key } { <Key-id (0-255)> } { {md5 } { | sha-1 } { | sha-224 } { | sha-256 } { | sha-384 } { | sha-512} } { <key(16)>} }
{ | network } { {broadcast } { | non-broadcast } { | point-to-multipoint } { | point-to-point} }
{ | priority } { <value (0 - 255)> }
{ | retransmit-interval } { <value (1-3600)> }
{ | transmit-delay } { <value (1-3600)>} }
{ } }

no ip ospf

no ip ospf
{ {authentication }
{ | authentication-key }
{ | cost } { [tos } { <value(0-30)>] }
{ | dead-interval }
{ | demand-circuit }
{ | hello-interval }
{ | message-digest-key } { <Key-id (0-255)> }
{ | network }
{ | priority }
{ | retransmit-interval }
{ | transmit-delay } { } }

Parameters

Parameter Type Description
authentication   Enter to configure the authentication type as simple password authentication mechanism. Note that this command executes only if Message digest Key is configured.
simple   Enter to set the authentication type as message digest authentication mechanism.
message-digest   Enter to set the authentication type as message digest authentication mechanism.
sha-1   Enter to set the authentication type as Secure Hash Algorithm 1 (SHA1) authentication. SHA1 generates Authentication digest of length 20 bytes.
sha-224   Enter to set the authentication type as Secure Hash Algorithm 224 (SHA224) authentication. SHA224 generates Authentication digest of length 28 bytes.
sha-256   Enter to set the authentication type as Secure Hash Algorithm 256 (SHA256) authentication. SHA256 generates Authentication digest of length 32 bytes.
sha-384   Enter to set the authentication type as Secure Hash Algorithm 384 (SHA384) authentication. SHA384 generates Authentication digest of length 48 bytes.
sha-512   Enter to set the authentication type as Secure Hash Algorithm 512 (SHA512) authentication. SHA512 generates Authentication digest of length 64 bytes.
null   Enter to set the no password authentication. This is the default authentication method. This is the default option.
authentication-key   Enter to configure a password to be used by neighboring routers that are using the OSPF simple password authentication. The password created by this command is used as a key that is inserted directly into the OSPF header when the routing protocol packets are originated. 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 exchange OSPF information.
<key (8)> Integer Enter to set the simple password authentication mechanism. The size of the password is 8 bytes. The password string can contain from 1 to 8 uppercase and lowercase alphanumeric characters.
bfd   Enter to enables or disables BFD support on the interface. If this is enabled, OSPF will register with BFD for monitoring the neighbor IP path for the neighbors associated with this OSPF interface.
Note:

BFD disabled for a specific interface using this command will be internally enabled on the execution of bfd all-interface command.

Note:

This command can be configured only if BFD is enabled and OSPF is started on the interface. By using this command, any BFD disabled for a specific interface will be enabled.

disable   Enter to disable BFD support on the interface. When disabled, it will de-register from BFD for the all neighbors associated with this interface and no longer allows registration with BFD for the neighbors associated with this interface.
cost   Enter to specify the cost of sending a packet on an interface. The link-state metric is advertised as the link cost in the router link advertisement. the path cost is calculated using the following formula:

108 / bandwidth

For example when using this formula, the default path costs are calculated:

  • 56-kbps serial link-Default cost is 1785
  • Ethernet-Default cost is 10
<cost> Integer Enter a value for the Type 1 external metrics which is expressed in the same units as OSPF interface cost, that is in terms of the OSPF link state metric. This value ranges from 1 to 65535.
tos   Enter to configure the Type of Service of the route being configured. It can be configured only if the code is compiled with TOS Support.
<tos value(0-30)> Integer Enter a value for Type of Service of the route being configured. This value ranges from 0 to 30. The default value for TOS is 0.
dead-interval   Enter to set the interval (in seconds) at which hello packets must not be seen before neighbors declare the router down. The interval is advertised in router hello packets
<seconds (1-65535)> Integer Enter a value for the interval (in seconds) at which hello packets must not be seen before neighbors declare the router down. This value ranges from 1 to 65535. The default is 40.
demand-circuit   Enter to configure OSPF to treat the interface as an OSPF demand circuit. On point-to-point interfaces, only one end of the demand circuit must be configured. This command allows the underlying data link layer to be closed when the topology is stable. It indicates whether Demand OSPF procedures (hello suppression to FULL neighbors and setting the DoNotAge flag on imported LSAs must be performed on this interface.

On point-to-point interfaces, only one end of the demand circuit must be configured with this command. Periodic hello messages are suppressed and periodic refreshes of link-state advertisements (LSAs) do not flood the demand circuit. This command executes only if OSPF routing process is enabled.

hello-interval   Enter to configure the interval (in seconds) between hello packets sent on the interface. This value is advertised in the hello packets. The smaller the hello interval, the faster topological changes will be detected.
<seconds (1 - 65535)> Integer Enter a value to configure the interval (in seconds) between hello packets sent on the interface. This value ranges from 1 to 65535. This value must be the same for all routers attached to a common network.
key   Enter to configure the time the router starts accepting packets that is created with the configured key id.
<Key-ID (0-255)> Integer Enter a value for the secret key used to create the message digest appended to the OSPF packet. This value ranges from 0 to 255.
start-accept   Enter to configure the time when the router will start accepting packets that have been created with the configured key-id.
Note:
This command executes only if,
  • Authentication key for Simple Password Authentication is removed
  • OSPF Message Digest authentication is enabled and authentication type is specified for the interface
<DD-MON-YEAR,HH:MM>   Enter a value for the time when the router will start accepting packets that have been created with the configured key-id. This value is the sum of configured time and the system time at which the start-accept value is configured and is configured in 24 hours format.
Note:

For example, Tuesday May 26, 2013 at 1:30 PM should be configured as, 26-May-2013,13:30

start-generate   Enter to configure the time when the router will start generating OSPF packets with the configured key id.
Note:
This command executes only if,
  • Authentication key for Simple Password Authentication is removed
  • OSPF Message Digest authentication is enabled and authentication type is specified for the interface
<DD-MON-YEAR,HH:MM>   Enter a value for the time when the router will start generating OSPF packets with the configured key id. This value is the sum of the configured time and the system time at which the start-generate value is configured. Start Generate Time value is configured in 24 hours format. Default value is set as current system time.
Note:

For example, Tuesday May 26, 2013 at 1:30 PM should be configured as, 26-May-2013,13:30

stop-generate   Enter to configure the time when the router will stop generating OSPF packets with the configured key id.
Note:
This command executes only if,
  • Authentication key for Simple Password Authentication is removed
  • OSPF Message Digest authentication is enabled and authentication type is specified for the interface
<DD-MON-YEAR,HH:MM>   Enter a value for the time when the router will stop generating OSPF packets with the configured key id. Stop Generate value is configured in 24 hours format. Default value is set to the current system time.
Note:

For example, Tuesday May 26, 2013 at 1:30 PM should be configured as, 26-May-2013,13:30

stop-accept   Enter to configure the time when the router will stop accepting OSPF packets with specified key id.
Note:
This command executes only if,
  • Authentication key for Simple Password Authentication is removed.
  • OSPF Message Digest authentication is enabled and authentication type is specified for the interface
.
<DD-MON-YEAR,HH:MM>   Enter a value for the time when the router will stop accepting OSPF packets with specified key id. Stop accept value is configured in 24 hours format.
Note:

For example, Tuesday May 26, 2013 at 1:30 PM should be configured as, 26-May-2013,13:30

message-digest-key   Enter to enable OSPF MD5 authentication. One key per interface is used to generate authentication information when sending packets and to authenticate incoming packets.

Message Digest authentication is a cryptographic authentication. A key (password) and key-id are configured on each router. The router uses an algorithm based on the OSPF packet, the key, and the key-id to generate a "message digest" that gets appended to the packet

Usually, one key per interface is used to generate authentication information when sending packets and to authenticate incoming packets. The same key identifier on the neighbor router must have the same key value.

Note:

The authentication type should be the same as set in the ip ospf authentication command.

<Key-id (0-255)> Integer Enter to set the simple password authentication mechanism.
md5   Enter to set the authentication type as message digest authentication mechanism.
sha-1   Enter to set the authentication type as Secure Hash Algorithm 1 (SHA1) authentication. SHA1 generates Authentication digest of length 20 bytes.
sha-224   Enter to set the authentication type as Secure Hash Algorithm 224 (SHA224) authentication. SHA224 generates Authentication digest of length 28 bytes
sha-256   Enter to set the authentication type as Secure Hash Algorithm 256 (SHA256) authentication. SHA256 generates Authentication digest of length 32 bytes.
sha-384   Enter to set the authentication type as Secure Hash Algorithm 384 (SHA384) authentication. SHA384 generates Authentication digest of length 48 bytes
sha-512   Enter to set the authentication type as Secure Hash Algorithm 512 (SHA512) authentication. SHA512 generates Authentication digest of length 64 bytes.
<key(16)> Integer Enter a value to configure the cryptographic key value which is used to create the message digest appended to the OSPF packet. All neighboring routers on the same network must have the same key identifier and key to route OSPF traffic. This is a string with maximum 16 characters.
network   Enter to configure the OSPF network type to a type other than the default for a given media and configures broadcast networks as NBMA networks. Each pair of routers on a broadcast network is assumed to be able to communicate directly. An Ethernet is an example of a broadcast network. A 56Kb serial line is an example of a point-to-point network.
broadcast   Enter to configure the broadcast networks supporting many (more than two) attached routers, together with the capability to address a single physical message to all of the attached routers (broadcast). This is the default option.
non-broadcast   Enter to configure the non broadcast networks supporting many (more than two) routers, but having no broadcast capability Sets the network type to nonbroadcast multi-access (NBMA).
point-to-multipoint   Enter to set the network type to point-to-multipoint and treats the non-broadcast network as a collection of point-to-point links.
point-to-point   Enter to set the network type to point-to-point that joins a single pair of routers
priority   Enter to set the router priority which helps determine the designated router for this network. When two routers attached to a network both attempt to become the designated router, the one with the higher router priority takes precedence. . When two routers attached to a network attempt to become the designated router, the one with the higher router priority takes precedence. If there is a tie, the router with the higher router ID takes precedence.
<value (0 - 255)> Integer Enter a value to specify the priority of the router The number value ranges from 0 to 255. The default value is 1.
retransmit-interval   Enter to configure the time between link-state advertisement (LSA) retransmissions for adjacencies belonging to the OSPF virtual link interface.
<value (1-3600)> Integer Enter a value for the time between link-state advertisement (LSA) retransmissions for adjacencies belonging to the OSPF virtual link interface. This value ranges from 1 to 3600 in seconds with a default of 5. This value is also used while retransmitting database description and link-state request packets.
transmit-delay   Enter to set the estimated time (in seconds) it is required to transmit a link state update packet on the interface. Link-state advertisements (LSAs) in the update packet must have their ages incremented by the amount specified in the seconds argument before transmission.
<value (1-3600)> Integer Enter a value for the time in which the router will stop using this key for packets generation. This value ranges from 1 to 3600 in seconds with a default of 1 second.

Mode

OSPF Router Configuration Mode

Prerequisites

This command executes only if the OSPF routing process is enabled.

Examples

iS5comm(config)# router ospf

is5comm(config-if)# ip ospf authentication message-digest

is5comm(config-if)# ip ospf authentication-key asdf123

iS5comm(config-router)# enable bfd

iS5comm(config-router)# exit

iS5comm(config)# int vlan 55

is5comm(config-if)# ip ospf bfd disable

is5comm(config-if)# ip ospf cost 10

is5comm(config-if)# ip ospf dead-interval 1000

is5comm(config-if)# ip ospf demand-circuit

is5comm(config-if)# ip ospf hello-interval 75

is5comm(config-if)# ip ospf key 20 start-accept 13-May-2014,19:18

is5comm(config-if)# ip ospf key 20 start-generate 13-May-2014,19:18

is5comm(config-if)# ip ospf key 20 stop-generate 13-May-2014,19:18

is5comm(config-if)# ip ospf key 20 stop-accept 13-May-2014,19:18

is5comm(config-if)# ip ospf network broadcast

is5comm(config-if)# ip ospf priority 25

is5comm(config-if)# ip ospf retransmit-interval 300

is5comm(config-if)# ip ospf transmit-delay 50