Vswitch Port Security: vswitch port security allows only a specific mac address to send frames to the vswitch interface by configuring the switch interface. If the switch receives a frame from the mac address, the frames from the device are discarded.
Basic configuration command:
Switch (config) # int f0/0 switch (config-if) # switchport mode access/configure this interface as an access interface, not a relay interface/switch (config-if) # switchport port-security/enable port security/switch (config-if) # switchport port-security mac-address mac/specifies the mac address that allows frames to be sent to this interface. Use this command multiple times to define multiple mac addresses/
Other commands:
Switch (config-if) # switchport port-security macaddress sticky
. Use the adhesive tape learning to dynamically learn and configure the mac address of the currently connected host/
Switch (config-if) # switchport port-security maxinum
/Specify the maximum number of mac addresses allowed by the current interface. The default value is one/
Switch (config-if) # switchport port-security violation {protect restrict shutdown}
/Specifies the action to be taken when receiving a frame from a mac address outside the specified address. The default value is to close this port/
Switch # show port-security int f0/0/View Interface security status/