cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
260
Views
0
Helpful
0
Comments
cherifi.m85
Spotlight
Spotlight

Today, I am going to share with you a small lab that illustrates a trick called "Errdisable recovery." Although this trick can be used in several cases, I will limit myself to its use in the context of port security.

As you know, when configuring port security in violation shutdown mode, the administrator must intervene manually to restore the functional state of the interface using the "shutdown" and "no shutdown" commands! : Administrative Down.

Today, I will show you through a small lab how to automatically restore the functional state of the interface in the same situation using the errdisable recovery command. Here is the topology used with a simple configuration. We have a switch and three PCs. The interface connected to PC1 will be configured with port security in shutdown violation mode, and the TEST PC will be used for testing purposes.

cherifim85_0-1741532061227.png

 

cherifim85_1-1741532061228.png

It is important to note that the default maximum number of allowed physical addresses is 01, and shutdown violation is the default violation mode.

cherifim85_2-1741532061230.png

As you can see, auto errdisable recovery is disabled by default for all causes, including port security violations (psecure-violation).

cherifim85_3-1741532061232.png

Before enabling it and reducing the timer interval, it is useful to provide a demonstration as a reminder. We can reach PC2 from PC1.

cherifim85_4-1741532061234.png

The SW switch has correctly registered the physical address of PC1.

cherifim85_5-1741532061235.png

For now, everything is fine.

cherifim85_6-1741532061236.png

We will now replace PC1 with TEST to observe the effect of the configuration made. From the SW console, we can already see a security violation detection, and port G0/0 transitions to Errdisable mode.

cherifim85_7-1741532061239.png

cherifim85_8-1741532061240.png

cherifim85_9-1741532061241.png

You can see that the port status is "Secure-shutdown" and that the Last Source Address: vlan is different!

cherifim85_10-1741532061241.png

Now, the only way to restore the state of the interface is to reconnect PC1 to interface G0/0 by executing the "shutdown" and then "no shutdown" commands (which forces the Administrative Down mode).

cherifim85_11-1741532061244.png

So far, everything was manual. We are now moving on to auto errdisable recovery! First, we need to enable it for the "psecure-violation" case.

cherifim85_12-1741532061244.png

Now we can check it.

cherifim85_13-1741532061246.png

300 seconds is a lot; let’s reduce that interval to 30 seconds.

cherifim85_14-1741532061247.png

Now let’s proceed to the test. SW has detected an intrusion, and port G0/0 has gone into err-disable mode.

cherifim85_15-1741532061250.png

But after 30 seconds, Auto errdisable recovery has restored the functional state of G0/0.

cherifim85_16-1741532061251.png

However, as long as TEST is connected to G0/0, this interface will return to Err-disable state each time, because the switch has registered the physical address of PC1 as the only legitimate one!

cherifim85_17-1741532061254.png

Now, to restore the functional state of G0/0, the administrator only needs to connect PC1 to G0/0 WITHOUT having to manually intervene to force the administrative state to "down" as in the previous case. Everything will happen automatically. Although this technique can be used in different circumstances, I have only presented its application in its simplest form!

Thank you and see you soon!

My GitHub 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: