中兴交换机ZXR10-2950如何做mac地址和ip绑定端口?

中兴交换机ZXR10-2950如何做mac地址和ip绑定端口?

比如这里有一台主机,ip地址为:192.168.5.100 255.255.255.255  mac地址为:fc.3f.db.8c.ad.03  我要绑定到交换机的1口

方法一:

命令1是:

config ingress-acl hybrid number 301   //这里的number范围是{300~399}
rule 1 permit ip 192.168.5.100 255.255.255.255 any fc.3f.db.8c.ad.03 ff.ff.ff.ff.ff.ff any
rule 2 deny ip any any

如何关闭?
clear ingress-acl hybrid number 301  

 

命令2是:

set port 1 acl mode port 

set port 1 acl 301 enable

如何关闭?
set port 1 acl 301 disable
set port 1 disable

注意:绿色部分是需要输入的命令

蓝色部分是如果命令输入错误后怎么删除

验证:

2950(cfg)#show acl con num   310
  Acl No.     : 310
  Acl Name    :  
  Acl Type    : hybrid
  Rule Number : 2
  -----------------------------------------------------------------
  RuleId                     : 1
  TimeRange State            : active
  Filter                     : permit ip 192.168.5.100 255.255.255.255 any fc.3f.db.8c.ad.03 ff.ff.ff.ff.ff.ff any

  RuleId                     : 2
  TimeRange State            : active
  Filter                     : deny ip any any

方法二:
2950(cfg)#set port 1 security enable
2950(cfg)#set mac learning port 1 enable   
上述2条命令功能一样,当learning先配,再配security可以执行,但先配security再配learning则会报错,不让执行。如果已经先配了learning enable,再配置security成功,想将learning disable也会报错,必须先将security disable,


2950(cfg)#set mac add permanent fc.3f.db.8c.ad.03 port 1 vlan 100
2950(cfg)#set mac delete permanent ?
  <cr>      删除永久MAC地址,这里是整个表清除。这是缺点
  
 
2950(cfg)#set port 1 security disable
2950(cfg)#set mac learning port 1 disable
 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

阿成学长_Cain

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值