Chapter 35 - Implementing Switch Port Security Flashcards
What is Port Security?
- Cisco feature
- A security feature used on switches which ensures that only pre determined devices can actually use certain switch ports for data transmission based on their MAC address.
What functons does Port Security perform?
- Sets a limit on how many unique source MAC addresses can come in a single interface.
- Keeps a list and counter of all source MAC addresses entering an interface.
- Monitors newly learned MAC addresses and received frames to determine if they cause any Port Security violations.
- Takes action to discard traffic that violates Port Security dependent on the configured violation mode
How can you define what MAC addresses are allowed on an interface in port-security?
- Statically define a list of MAC addresses that are allowed on an interface
- Dynamically learning the first of a defined amount of MAC addresses and only allowing those to pass in future
- Dynamically learning some MAC addresses and statically defining others
What is a Sticky Secure MAC Address?
- Allows dynamically learned MAC addresses to be added to the running-config of the switch. Each learned MAC address will have a line showing as ‘switchport port-security mac-address sticky <mac>'</mac>
- They will never age out
True or False. Port security runs on trunks and access ports.
True.
True or False. Port security runs on switchports that have dynamically learnt their state via DTP.
False. Access or trunk has to be statically set on the interface. It also must be the Administrative Mode not the Operational Mode.
What command do you use to enable port security on an interface? What other commands add onto this?
- From interface configuration mode
-To enable Port Security:
‘switchport port-security’
- To determine the maximum number of MAC addresses allowed in an interface (default of 1):
‘switchport port-security maximum <number>'</number> - To define how the switchport reacts to a violation (default is shutdown):
‘switchport port-security violation <protect/restrict/shutdown>’ - To define an allowed source MAC on an interface (perform once for each MAC address):
‘switchport port-security mac-address <MAC>'</MAC> - To tell Port Security to save current and future dynamically learned MAC addresses into the running-config:
‘switchport port-security mac-address sticky’
True or False. Interfaces will still perform MAC learning when they have reached their maximum MAC address limit.
False, MAC addresses will not be added to the MAC address table. However, the last MAC that was allowed on the interface will still show up in ‘show switchport port-security int’.
True or False. The switch automatically saves any MAC addresses learned by Port Security that uses sticky mode.
False. You will need manually save the switch config.
True or False. Port security can be implemented on Etherchannels
True. It should be performed on the Etherchannel interface rather than the physical interfaces participating in the Etherchannel.
What command can you use to find information on port-security? What information does it show?
‘show port-security interface <Interface>'</Interface>
This can show:
- Port Security enabled/disabled
- The interface mode that port-security has entered it into
- The violation mode of the interface
- The maximum MAC addresses (including sticky) learned on the interface
- The last source address learned
- The number of security violations that have occurred
You can also use ‘show port-security’ which shows a brief of this information
What does the port-security violation mode do?
- Defines how an interface should react when a violation occurs
What are examples of a port-security violation?
- When the number of MAC addresses entering an interface exceeds that maximum number of MAC addresses allowed to be learned on that interface define by port-security
- Where allowed MAC addresses are defined statically in port-security, any MAC addresses enter an interface that are not defined here will be considered a violation
List whether port-security violation modes discard offending traffic
- Protect - Yes
- Restrict - Yes
- Shutdown - Yes
List whether port-security violation modes send log and SNMP messages
- Protect - No
- Restrict - Yes
- Shutdown - Yes