endir flash:delete flash:vlan.daterase startreload
envlan databasevlan 10 name studentvlan 20 name staffexitconf tint fa0/1 switchport mode trunkint fa0/2switchport access vlan 10int range fa0/3 - 4switchport access vlan 20exitexit
envlan databasevtp servervtp domain applevtp password pearexitshow vtp statusshow vlan
(Erase switch first)envlan databasevtp clientvtp domain applevtp password pearexitshow vtp statusshow vlan(Dont forget to set port data)
conf tinterface FastEthernet0/24switchport mode accessswitchport port-securityswitchport port-security maximum 1switchport port-security mac-address stickyexitinterface range fa0/1 - 12switchport mode accessswitchport port-securityswitchport port-security maximum 1switchport port-security mac-address sticky/H.H.H exit exit
conf terrdisable recovery cause psecure-violationerrdisable recovery interval 300exitrecovery interval is in seconds, default being 300
Switchport port-security violation protect shutdown - (default) - disables the port on vilolation Switchport port-security violation protect - drops packet Switchport port-security violation protect restrict - drops packet and increment violation counter
Show port-security int fa0/1 – shows port security details Show port-security address – shows addresses configured