Sunday, 27 October 2019

Interface configuration of OSPF and OSPFv3 IPv6 on Cisco

Interface configuration of OSPF and OSPFv3 IPv6 on Cisco

This section explain the Interface configuration of OSPF and OSPFv3 IPv6 on Cisco Router. In start of article you will learn how OSPF process starts, hand shaking process and different timers which are related to interface configurations.

OSPF Hello and dead intervals

The OSPF Hello and dead intervals can be configured per interface. The OSPF intervals must match, otherwise a neighbor adjacency is not created.
To verify the interface intervals currently configured, use the show ip ospf interface command , as shown in Image 1. The Hello and dead intervals of the Serial 0/0/0 interface are set to the default values: 10 seconds and 40 seconds, respectively.


In following image, an example of using a filtering technique to show the OSPF intervals of the Serial 0/0/0 interface with OSPF enabled on R1 is presented.


In Image, the show ip ospf neighbor command on R1 is used to verify that R1 is adjacent to R2 and R3.

Note in the result that the Dead Time counts down from 40 seconds. By default, this value is updated every 10 seconds when R1 receives a Hello from the neighbor.

 Configuration and Modification of the OSPF Helllo intervals

You may want to change the OSPF timers so that the routers detect network failures in less time. This increases traffic, but sometimes the need for rapid convergence is more important than the additional traffic it generates. Default Hello and dead intervals are based on best practices and should only be altered in exceptional situations.
The OSPF Hello and dead intervals can be modified manually using the following interface configuration mode commands:
ip ospf hello-interval  seconds
ip ospf dead-interval  seconds
Use the no ip ospf hello-interval and no ip ospf dead-interval commands to reset the intervals to the default value.

 Modification Example

In the example in Image 4, the Hello interval is changed to 5 seconds.

 
Immediately after changing the Hello interval, the Cisco IOS automatically modifies the dead interval to a value equivalent to four times the Hello interval.
However, it is always advisable to explicitly modify the timer instead of relying on the automatic IOS function so that the changes are documented in the configuration. Therefore, the dead interval is also set manually in 20 seconds on the Serial 0/0/0 interface of R1.
As shown in the OSPFv2 adjacency message highlighted in Image 4, when the dead time timer on R1 expires, R1 and R2 lose their adjacency. This is because the values ​​were only changed on one side of the serial link between R1 and R2. Remember that the OSPF Hello and dead intervals must match between neighbors.

Verification Example

Use the show ip ospf neighbor command on R1 to verify neighbor adjacencies, as shown in Image 5.

Note that the only neighbor included is router 3.3.3.3 (R3) and that R1 is no longer adjacent to neighbor 2.2.2.2 (R2). The timers set in Serial 0/0/0 do not affect the adjacency of neighbors with R3.
To restore the adjacency between R1 and R2, the hello interval of the Serial 0/0/0 interface of R2 is set to 5 seconds, as shown below. Almost immediately, the IOS displays a message indicating that the adjacency was established with a FULL state.
R2 (config) # interface serial 0/0/0
R2 (config-if) # ip ospf hello-interval 5
R2 (config-if) # 
* Jan 7 17: 41: 49.001:% OSPF-5-ADJCHG: Process 10, Nbr 
1.1.1.1 on Serial0 / 0/0 from LOADING to FULL, Loading Done
R2 (config-if) # end 
R2 #
Now, we verify the interface intervals using the show ip ospf interface command , as shown below.
R2 # show ip ospf interface s0 / 0/0 | include Timer
 Timer intervals configured, Hello 5, Dead 20, Wait 20, 
Retransmit 5
R2 # 
R2 # show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 0 FULL / - 00:00:35 192.168.10.10 Serial0 / 0/1
1.1.1.1 0 FULL / - 00:00:17 172.16.3.1 Serial0 / 0/0
R2 #
Note that the Hello time is 5 seconds and the dead time is automatically set to 20 seconds instead of the default 40 seconds. Remember that OSPF automatically sets the dead interval to four times the Hello interval.

Configuration of IPV6 OSPF hello timers on OSPFv3

As with OSPFv2, the OSPFv3 intervals can also be adjusted.
The OSPFv3 Hello and dead intervals can be modified manually using the following interface configuration mode commands:
ipv6 ospf hello-interval  seconds
ipv6 ospf dead-interval  seconds
Note : Use the no ipv6 ospf hello-interval and no ipv6 ospf dead-interval commands to reset the intervals to the default value.

  IPv6 OSPFv3 Configuration example

See the IPv6 topology of Image 6. Assume that network convergence occurred through OSPFv3.

In the example in Image, the OSPFv3 Hello interval is changed to 5 seconds. Immediately after changing the Hello interval, the Cisco IOS automatically modifies the dead interval to a value equivalent to four times the Hello interval.

OSPFv3 Hello Interval configuration


However, as with OSPFv2, it is always advisable to explicitly modify the timer instead of relying on the automatic function of the IOS so that the modifications are documented in the configuration. Therefore, the dead interval is also set manually in 20 seconds on the Serial 0/0/0 interface of R1.
When the timeout timer on R1 expires, R1 and R2 lose their adjacency (as shown in the OSPFv3 adjacency message highlighted in Image 7) because the values ​​were only altered on one side of the serial link between R1 and R2. Remember that the OSPFv3 Hello and dead intervals must be the same between the neighbors.

OSPFv3 Verification Example

Use the show ipv6 ospf neighbor command on R1 to verify neighbor adjacencies (Image 8). Note that R1 is no longer adjacent to neighbor 2.2.2.2 (R2).
R1#show ipv6 ospf neighbor
To restore the adjacency between R1 and R2, the hello interval of the Serial 0/0/0 interface of R2 is set to 5 seconds, as shown below. Almost immediately, the IOS displays a message indicating that the adjacency was established with a FULL state.
R2 (config) # interface serial 0/0/0 
R2 (config-if) # ipv6 ospf hello-interval 5
R2 (config-if) # 
* Jan 10 15: 07: 28.815:% OSPFv3-5-ADJCHG: Process 10, Nbr
1.1.1.1 on Serial0 / 0/0 from LOADING to FULL, Loading Done
R2 (config-if) # end 
R2 #
Finally, the interface intervals are verified using the show ipv6 ospf interface command .
R2 # show ipv6 ospf interface s0 / 0/0 | include Timer
 Timer intervals configured, Hello 5, Dead 20, Wait 20,
Retransmit 5
R2 # 
R2 # show ipv6 ospf neighbor

OSPFv3 Router with ID (2.2.2.2) (Process ID 10)

Neighbor ID Pri State Dead Time Interface ID Interface
3.3.3.3 0 FULL / - 00:00:38 7 Serial0 / 0/1
1.1.1.1 0 FULL / - 00:00:19 6 Serial0 / 0/0
R2 #
Note that the Hello time is 5 seconds and the dead time is automatically set to 20 seconds instead of the default 40 seconds. Remember that OSPF automatically sets the dead interval to four times the Hello interval.

No comments:

Post a Comment