基本配置命令:
switch(config)# f0/0
switch(config-)#switchport mode access /配置此接口为接入接口不能是中继接口/
switch(config-)#switchport port-security /启用端口安全/
switch(config-)#switchport port-security mac-address mac /指定允许向这个接口内发送帧mac地址多次使用此命令可定义多个mac地址/
其它命令:
switch(config-)#switchport port-security macaddress sticky /和上面命令功能样利用粘带学习动态获悉和配置当前已连接主机mac地址/
switch(config-)#switchport port-security maxinum /指定当前接口最多允许多少个mac地址默认为个/
switch(config-)#switchport port-security violation {protect restrict shutdown} /规定在接收到来自规定地址的外某个mac地址帧时应该采取动作默认是关闭该端口/
switch#show port-security f0/0 /查看接口安全状态/
最新评论