EEM – Shutting down unstable links while using HSRP

Hello everyone!

Normally while using HSRP as an FHRP the device will be able to switch between active and standby router based on different situations.

  • The group interface is down.
  • Group priority has been lowered on the interface manually.
  • Group priority has been lowered on the interface by a tracking element.
  • The device stop receiving Hello-Packets from his neighbor.

So far so good… But what happens if the link of one router is so bad that has packetloss but all tracking objects and hello packets always arrive. This will cause a bad quality of the link. This could be slightly fixed by adding a script to our configuration.

Cisco Embedded Event Manager (EEM) offers us a sub-system that checks in real-time the status of some pre-defined parameters.

There are thousands of manners how to deal with it. I will post a small snippet how to check the input errors of an interface.

For this test, I will manipulate the settings of the links by configuring it with half-duplex on both sides to force the input errors to increment.

Allgemein Home Network Programmability Routing & Switching Snippets Switching