Hello everyone
Have you encountered problems related to convergence commands in the new HCIE R&S lab? Today I'm going to talk about my answer to this problem.
Topic
Describe the functions, application scenarios, and similarities of the three ospf ldp-sync; vrrp vrid xx preempt-mode timer delay; stub-router on-startup commands.
Ospf ldp-sync
Because the convergence speed of LDP depends on the convergence of OSPF routing, that is, the convergence speed of LDP is slower than that of OSPF. Therefore, the use of MPLS LDP in the network of active and standby links has the following problems:
1. When the primary link fails, both OSPF routing and LSP are switched to the backup link (usually implemented through IDP FRR). When the primary link recovers from the failure, OSPF will switch back to the primary link before LDP, thus causing LSP traffic to be lost.
2. When OSPF on the primary link is operating normally, but the LDP session between the nodes on the primary link fails, the OSPF routing still uses the primary link, and the LSP of the primary link is deleted. At the same time, because there is no OSPF priority route on the backup link, therefore, the LSP cannot be established on the backup link, and the LSP traffic is lost. At this time, you can execute ospf ldp-sync to enable the linkage function of LDP and OSPF (LDP-IGP synchronization) to solve the above-mentioned traffic loss problem.
The basic principle of LDP and IGP synchronization is: Postpone the switchback of the route by inhibiting the establishment of neighbor relationships between IGPs until LDP completes convergence. That is, before the establishment of the LSP of the primary link, the backup link is reserved and the traffic continues to be forwarded from the backup link until the LSP of the primary link is successfully established, and then the backup link is deleted.
Vrrp vrid xx preempt-mode timer delay
Configure this command on the VRRP member devices to set the preemption delay of the VRRP master device. Delay for a period of time before seizing the master device to improve the reliability of the network. If this command is not configured, the following problems may occur when the network is unstable:
If the master device (AR1) flaps, the VRRP status is switched from the master device to the backup device, and the original backup device (AR2) becomes the master device, and traffic is switched to the new master device.
After the original master device (AR1) recovers from the flapping, AR1 switches to the master device from the backup device. After the switchover, AR1 sends gratuitous ARP packets to redirect traffic back to AR1.
If frequent flapping occurs, the VRRP status of the master device (AR1) is repeatedly switched. As a result, a large number of packets are lost during the switchover. To prevent VRRP status switching caused by frequent VRRP flapping, run the vrrp vrid xx preempt-mode timer delay command to set the preemption delay of the master device. That is, after the master device recovers from a fault, the master device cannot switch itself to the master device within a specified period of time. The specified period of time is a time used for stable network recovery.
Stub-router on-startup
The stub-router command increases the link metric (65535) in the LSA generated by the device to instruct other OSPF devices not to use the stub router to forward data. However, because the metric is not infinite, other routers can still have a route to the stub router. In the Router LSA generated by the Stub router, the metric of all links is set to a large value.
If only the stub-router command is configured and the on-startup parameter is not selected, it means that the router always remains a stub device, that is, the cost value of all routing entries from this router is 65535. If the stub-router on-startup command is configured, it means that the router remains as a stub device only during restart or active/standby switchover. The hold time is determined by the interval parameter. After the active/standby switchover, the router will be restored to a normal device.
This command can be used to cooperate with BGP to solve the problem of routing black holes appearing in a short time due to the faster convergence of OSPF than BGP when the device restarts abnormally or the active/standby switchover occurs. This command enables the device to maintain the stub-router role for a period of time after restarting, that is, during this period, the LSA metric value generated by the device is 65535, so that the OSPF device will not preferentially use the route generated by the stub device Entries go to forward routing. Wait for the BGP convergence to complete, and then restore it to a normal device to avoid service interruption caused by routing black holes.
What the three commands have in common
1. The three commands are used to ensure data forwarding after network convergence, improving network stability and reliability.
2. The three commands are used to smooth the active/standby switchover, reduce network flapping, and minimize service interruption.



