交换机端口安全(mac地址绑定)

  交换机的端口安全,是一种交换机的过滤策略,即为交换机的某个端口绑定一个固定的mac地址,使其他的mac地址访问的时候触发策略,down掉端口或者拒绝服务

以下为拓扑图

  

 

交换机配置

  

  enable   进入特权模式

  conf t     进入全局配置模式

  hostname 修改交换机名

  no ip domain-lookup  去除域名解析

  interface vlan1  进入vlan1

    ip address 192.168.1.1 255.255.255.0  配置vlan1的IP地址(即配置管理地址)

  no shutdown  激活端口

  exit  返回上一级

  interface f0/1  进入接口0/1

  shutdown   关闭端口

  switchport mode access  修改端口模式

  switchport port-security  修改端口为安全模式

  switchport port-security 00E0.B0EA.6035  将主机mac地址与端口绑定,此处的mac地址为PC-主机1的地址

  switchport port-security maximum 1 设置mac地址的最大数量为1

  switchport port-security violation shutdown  设置响应策略,此处为关闭端口

  end  返回至特权模式

  copy running-config startup-config  保存配置

转载于:https://www.cnblogs.com/LilacStrawberry/p/9154388.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值