Lab 05
Lab 05
LAB # 05
PORT SECURITY
OBJECTIVE
Demonstration of Port Security Mechanism on Ethernet Switch of each port and define violation
methods
THEORY
PORT SECURITY
Port security can be used with dynamically learned and static MAC addresses to restrict aport's ingr
ess traffic by limiting the MAC addresses that are allowed to send traffic intothe port. When you
assign secure MAC addresses to a secure port, the port does notforward ingress traffic that has s
ource addresses outside the group of defined addresses. Ifyou limit the number of secure MAC add
resses to one and assign a single secure MACaddress, the device attached to that port has the full b
andwidth of the port.
A security violation occurs in either of these situations:
•When the maximum number of secure MAC addresses is reached on a secure portand the
source MAC address of the ingress traffic is different from any of the identifiedsecure MAC
addresses, port security applies the configured violation mode.
•If traffic with a secure MAC address that is configured or learned on one secure portattempts to
access another secure port in the same VLAN, applies the configured violation mode.
Fig 5.1 Port securit
y restricts por t access by MAC addr
ess
NETWORK SETUP
Computer Communication & Networks (SWE-306) SSUET/QR/114
Fig 5.2 Network setup for applying port security
EXERCISE 5.1
Checking the MAC Address table first, DYNAMIC means that no MAC address has been
configured on ports. Use the privileged EXEC mode to view the MAC Address table
Switch# show mac-address-table
Mac Address Table
-------------------------------------------
It is good practice to check that all ports are up
Switch#sh ip interface brief
--More--
EXERCISE 5.2
Switch(config)# interface range fastEthernet 0/1 - 6
By default, the port security is turned off on all interfaces. In order to turn it on, a port
must be in an access mode. Otherwise the command will be rejected. Check out the
below attempt of enabling it when the port is in a 'dynamic desirable' rather than an
access mode.
How many MAC addresses can be considered secure on a given port (platform
dependent). The default is: 1.
When configuring port security violation modes, note the following information:
• protect—Drops packets with unknown source addresses until you remove a
sufficient number of secure MAC addresses to drop below the maximum value.
• restrict—Drops packets with unknown source addresses until you remove a
sufficient number of secure MAC addresses to drop below the maximum value and
causes the SecurityViolation counter to increment.
• shutdown—Puts the interface into the error-disabled state immediately and sends an
SNMP trap notification
If this command is not performed than port security will not be applied
Switch# show port-security interface fastEthernet 0/5
Port Security : Enabled
Port Status : Secure-up
Violation Mode : Shutdown
Aging Time : 0 mins
Aging Type : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses :1
Total MAC Addresses :1
Configured MAC Addresses :0
Sticky MAC Addresses :1
Last Source Address:Vlan : 00d0.5830.a010
Security Violation Count :0
EXERCISE 5.3
Switch# show port-security interface fastEthernet 0/5
Port Security : Enabled
Port Status : Secure-shutdown
Violation Mode : Shutdown
Aging Time : 0 mins
Aging Type : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses :1
Total MAC Addresses :1
Configured MAC Addresses :0
Sticky MAC Addresses :1
Last Source Address:Vlan : 0001.C971.1829:1
Security Violation Count :1
Check that Last source MAC address and compare it with MAC address in
last exercise
Switch# show ip interface brief
Switch# show interfaces fastEthernet 0/5
FastEthernet0/5 is down, line protocol is down (err-disabled)
Hardware is Lance, address is 0030.a354.e505 (bia 0030.a354.e505)
BW 100000 Kbit, DLY 1000 usec,
Computer Communication & Networks (SWE-306) SSUET/QR/114
reliability 255/255, txload 1/255, rxload 1/255
<OUTPUT OMITTED>
HOME ASSIGNMENTS
Q2: Define inbound ports, outbound ports and well known ports
And closed filtered.