You are on page 1of 2

Lab 09: Basic Switch Configuration:

Switch>enable
Switch#

Switch#show running-config

Switch#show startup-config

Switch(config)#hostname ALSwitch
ALSwitch(config)#exit

ALSwitch#show running-config

ALSwitch(config)#line con 0
ALSwitch(config-line)#password cisco
ALSwitch(config-line)#login
(Optional)
ALSwitch(config-line)#line vty 0 15
ALSwitch(config-line)#password cisco
ALSwitch(config-line)#login
(Optional)
ALSwitch(config-line)#exit

ALSwitch(config)#enable password cisco


ALSwitch(config)#enable secret class

ALSwitch(config)#interface VLAN 1
ALSwitch(config-if)#ip address 192.168.1.2 255.255.255.0
ALSwitch(config-if)#exit

ALSwitch(config)#ip default-gateway 192.168.1.1


ALSwitch(config)#exit

ALSwitch#show interface VLAN 1

ALSwitch(config)#interface VLAN 1
ALSwitch(config-if)#no shutdown
ALSwitch(config-if)#exit

ALSwitch#copy running-config startup-config

ALSwitch#show startup-config

LAB 10: Port Security:


Configure Switch as in lab 9

Set the ip addresses of hosts and ping to switch

Then check mac-address-table

ALSwitch# Configure terminal

ALSwitch(config)# interface Fastethernet 0/4

Usama(config-if)#switchport mode access


ALSwitch(config-if)# switchport port-security

ALSwitch(config-if)# switchport port-security maximum 1

ALSwitch(config-if)# switchport port-security violation shutdown


ALSwitch(config-if)#switchport port-security mac-address 000000000
ALSwitch(config-if)# switchport port-security mac-address sticky
ALSwitch(config-if)#exit
ALSwitch# show port-security address
ALSwitch#show mac-address-table
Note: If dynamic address of PC1 is not being shown in mac address table then ping again switch from
PC1

Switch#show port-security int fa0/1

IF PORT SECURITY AT THE END DOES NOT SHOW STATIC AND MAC
ADDRESS DOES NOT SHOW PING PC0 TO PC 1 THEN AGAIN CHECK IT
SHOWS.
DO these 2 times until port security has static

LAB 11: ADD MOCE MAC ADDRESSES

ALSwitch(config)#mac-address-table static 00e0.2917.1884 interface


fastethernet 0/4 vlan 1
ALSwitch#show mac-address-table
ALSwitch(config)#interface fastethernet 0/4
ALSwitch(config-if)#no switchport port-security
ALSwitch(config-if)#no switchport port-security mac-address sticky
ALSwitch(config-if)#no switchport port-security mac-address 0008.744d.8ee2
ALSwitch(config-if)#shutdown
ALSwitch(config-if)#no shutdown

ALSwitch(config)#interface fastethernet 0/8


ALSwitch(config-if)#switchport mode access
ALSwitch(config-if)#switchport port-security
ALSwitch(config-if)#switchport port-security mac-address sticky
ALSwitch(config-if)#switchport port-security maximum 1

ALSwitch#clear mac-address-table

You might also like