Switch(config-if-range)#switchport port-security
^
% Invalid input detected at '^' marker.
原因分析:
dynamic port不能啓用Port Security,只有靜態接入端口或中繼端口才行。需要將模式切換爲access。動態端口是自動識別的,既可以爲access,也可以爲trunk,所以要設爲access模式。
解決方法:
Switch(config-if)#switchport mode access
Switch(config-if)#switchport port-security