switchport port-security Switch(config-if)#
switchport port-security violation restrict Switch(config-if)#
switchport port-security mac-address aa.bb.cc.dd.ee.ff To protect the lobby PC, we would set the maximum allowed MAC addresses to 1 and the violation to
restrict
so
the port didn’t get shut down every time someone tried to use the Ethernet cable (which would be constantly). By
using
violation restrict
, the unauthorized frames would just be dropped. But did you notice that I enabled
port-security
and then set a static MAC address? Remember that as soon as you enable
port-security
on a
port, it defaults to
violation shutdown
and a maximum of 1. So all I needed to do was change the violation
mode and add the static MAC address and our business requirement is solidly met!
Lobby PC Always Being Disconnected Becomes a Security Risk At a large Fortune 50 company in San Jose, California, there was a PC in the lobby that held the company
directory. With no se curity guard present in the lobby, the Ethernet cable connecting the PC was free game to all
vendors, contractors, and visitors waiting in the lobby.
Port security to the rescue! When port security was enabled on the port with the
switchport port-security
command, the switch port connecting to the PC was automatically secure d with the defaults of allowing only one
MAC address to associate to the port and violation shutdown. However, the port was always going into err-
shutdown mode whenever anyone tried to use the Ethernet port. When the violation mode was changed to
restrict
and a static MAC address was set for the port with the
switchport port-security mac-
address
command, only the Lobby PC was able to connect and communicate on the network! Problem solved!
Loop Avoidance Redundant links between switches are important to have in place because they help prevent nasty network failures
in the event that one link stops working.
But while it’s true that redundant links can be extremely helpful, they can also cause more problems than they
solve! This is because frames can be flooded down all redundant links simultaneously, creating network loops as
well as other evils. Here’s a list of some of the ugliest problems that can occur:
1. If no loop avoidance schemes are put in place, the switches will flood broadcasts endlessly throughout the
internetwork. This is sometimes referred to as a
broadcast storm. Most of the time, they’re referred to in
very unprintable ways!
Figure 10.7
illustrates how a broadcast can be propagated throughout the network.
Observe how a frame is continually being flooded through the internetwork’s physical network media.
324