Task 1:
For reference information on configuring hostnames, please refer to:
Lab 1 Configuration and Verification Task 1
Lab 3 Configuration and Verification Task 1
Task 2:
For reference information on configuring verifying VLANs, please refer to:
Lab 1 Configuration and Verification Task 3
Lab 2 Configuration and Verification Task 3
Task 3:
For reference information on configuring IP interfaces, please refer to:
Lab 3 Configuration and Verification Task 5
| NOTE: VLAN 1 is the default Management interface on Cisco switches. When configuring another interface with an IP address, it is good practice to shutdown interface VLAN1 and issue a no shutdown command on the new Management interface you are configuring. |
Task 4:
Sw1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Sw1(config)#interface fastethernet0/2
Sw1(config-if)#switchport port-security
Sw1(config-if)#switchport port-security violation shutdown
Sw1(config-if)#switchport port-security mac-address sticky
Sw1(config-if)#end
Sw1#
Sw1#copy startup-config running-config
Destination filename [running-config]?
2167 bytes copied in 2.092 secs (1036 bytes/sec)
Sw1#
Sw1#show port-security
Secure Port MaxSecureAddr CurrentAddr SecurityViolation Security Action
(Count) (Count) (Count)
——————————————————————————-
Fa0/2 1 1 0 Shutdown
——————————————————————————-
Total Addresses in System : 1
Max Addresses limit in System : 1024
Sw1#
Sw1#
Sw1#show running-config interface fastethernet 0/2
Building configuration…
Current configuration : 254 bytes
!
interface FastEthernet0/2
switchport port-security
switchport port-security mac-address sticky
switchport port-security mac-address sticky 0004.c058.5fc0
end
| NOTE: When configuring port security, by default the learned MAC addresses are flushed when the switch in reloaded. To prevent this and ensure that the switch preserves MAC addresses that are dynamically learned via port security, you need to configure sticky learning. This configuration, in conjunction with the copy run start command, saves the learned MAC addresses to NVRAM. This means that when the switch is rebooted, the MAC address learned is not lost. The switch adds the switchport port-security mac-address sticky <mac-address> command dynamically under the interface for every sticky dynamically learned MAC address. So if 100 MAC addresses are learned this way, the switch would add 100 of these statements after the switchport port-security mac-address sticky command that you issued under the interface. Be very careful and this can create a very large configuration file in the real world!
|