你好!
你可以参考我下面的:
interface fa0/2
switchport port-security//开启端口安全
switchport port-security maximum 1 //最大MAC学习数为1
switchport port-security violation protect //开启端口保护
switchport port-security mac-address sticky //开启MAC白名单地址地址粘贴
switchport port-security mac-address sticky 000C.8543.0A81 //粘贴MAC地址