分享一条华为交换机MAC绑定的命令

目前支持的设备:S3050/3026E/3526E等
*请升级到最新版的VRP版本

【命令】 am user-bind
am user-bind interface { interface-name | interface-type interface-num } { mac-addr mac | ip-addr ip }* | mac-addr mac  interface { interface-name | interface-type interface-num } | ip-addr ip }* | ip-addr ip { interface { interface-name | interface-type interface-num } | mac-addr mac }* }
undo am user-bind { interface { interface-name | interface-type interface-num } { mac-addr mac | ip-addr ip }* | mac-addr mac { interface { interface-name | interface-type interface-num } | ip-addr ip }* | ip-addr ip { interface { interface-name | interface-type interface-num } | mac-addr mac }* }

【视图】
系统视图
【参数】
interface { interface-name | interface-type interface-num }:以太网端口。
mac-addr mac:MAC地址。
ip-addr ip:IP地址。
【描述】
am user-bind用来将端口、IP和MAC地址绑定在一起。
系统支持Port+IP、Port+MAC、Port+IP+MAC、IP+MAC绑定方式:
        Port+IP绑定:将报文的接收端口和源IP地址绑定。指定端口将只允许指定IP地址的报文通过,不允许其它IP地址的报文通过,同时指定IP地址的报文只能从指定端口上通过,不能从其它端口上通过。
        PORT+MAC绑定:将报文的接收端口和源MAC绑定。指定端口将只允许指定MAC地址的报文通过,不允许其它MAC地址的报文通过,同时指定MAC地址的报文只能从指定端口上通过,不能从其它端口上通过。
        PORT+IP+MAC绑定:将报文的接收端口、源IP和源MAC绑定。指定端口将只允许指定IP地址和指定MAC地址的报文通过,不允许其它IP地址和MAC地址的报文通过。指定IP地址的报文只能从指定端口上通过,不能从其它端口上通过。指定MAC地址的报文只能从指定端口上通过,不能从其它端口上通过。
        IP+MAC绑定:将报文的源IP和源MAC绑定。如果报文的源IP地址与指定IP相同,则只有源MAC地址是指定的MAC地址时,该报文才被交换机转发,否则该报文不能被转发。同理,如果报文的MAC地址与指定的MAC地址相同,则只有源IP地址与指定的IP地址相同,该报文才被交换机转发,否则该报文不能被转发。
注:不支持同时对一个端口做“PORT+IP+MAC”和“PORT+IP”绑定。

 
  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值