当前位置:文档之家› 华为S5700交换机绑定客户端IP、MAC和端口

华为S5700交换机绑定客户端IP、MAC和端口

绑定客户端IP+MAC+端口[Huawei]user-bind static ip-address mac-address 5489-9852-137A interface GigabitEthernet 0/0/2[Huawei]user-bind static mac-address 6489-98CF-1525 interface g0/0/1系统视图下am user-bind mac-addr mac地址ip-addr ip地址interface 接口类型接口序号以太网端口视图下interface 接口类型接口序号am user-bind mac-addr mac地址ip-addr ip地址华为s5700 ip地址+mac地址+端口绑定问:将单位的交换机绑定ip地址,mac地址和端口,实现某台ip为,mac地址为000B-2F37-FE4F 只能通过GigabitEthernet0/0/2这个端口来上网或查看局域网内的共享文件。

答:一般用am user-bind做。

am user-bind ip-address mac-address 000B-2F37-FE4F interface GigabitEthernet0/0/2首先要有思想准备,工作量巨大。

答:用完后可以到所在VLAN或者端口执行:ip source check user-bind enable一、1、系统视图下am user-bind mac-addr mac地址 ip-addr ip地址 interface 接口类型接口序号2、以太网端口视图下interface 接口类型接口序号am user-bind mac-addr mac地址 ip-addr ip地址二、端口绑定端口绑定命令am user-bind interface【命令】am user-bind mac-addr mac-address ip-addr ip-address interfaceinterface-type interface-numberundo am user-bind mac-addr mac-address ip-addr ip-address interfaceinterface-type interface-number【视图】系统视图【参数】mac-address:绑定的MAC 地址值。

ip-address:绑定的IP 地址值。

interface-type:端口类型。

interface-number:端口编号。

【描述】am user-bind interface 命令用来将合法用户的MAC 地址和IP 地址绑定到指定的端口上。

undo am user-bind interface 命令用来取消MAC 地址和IP 地址与指定端口的绑定。

进行绑定操作后,只有合法用户的报文才能通过端口。

说明:对同一个MAC 地址,系统只允许进行一次绑定操作。

【举例】# 将MAC 地址为00e0-fc00-5101,IP 地址为的合法用户与端口Ethernet1/0/1 进行绑定。

<Quidway> system-viewSystem View: return to User View with Ctrl+Z.Quidway S3900 系列以太网交换机命令手册-Release 1510端口安全、端口绑定2-2[Quidway] am user-bind mac-addr 00e0-fc00-5101 ip-addr interface Ethernet1/0/1am user-bind【命令】am user-bind mac-addr mac-address ip-addr ip-addressundo am user-bind mac-addr mac-address ip-addr ip-address【视图】以太网端口视图【参数】mac-address:绑定的MAC 地址值。

ip-address:绑定的IP 地址值。

【描述】am user-bind 命令用来将合法用户的MAC 地址和IP 地址绑定到当前的端口上。

undo am user-bind 命令用来取消MAC 地址和IP 地址与当前端口的绑定。

进行绑定操作后,只有合法用户的报文才能通过端口。

说明:对同一个MAC 地址,系统只允许进行一次绑定操作。

【举例】# 将MAC 地址为00e0-fc00-5102,IP 地址为的合法用户与端口Ethernet1/0/2 进行绑定。

<Quidway> system-viewSystem View: return to User View with Ctrl+Z.[Quidway] interface Ethernet1/0/2[Quidway-Ethernet1/0/2] am user-bind mac-addr 00e0-fc00-5102 ip-addrdisplay am user-bind【命令】display am user-bind [ interface interface-type interface-number | mac-addr |ip-addr ]Quidway S3900 系列以太网交换机命令手册-Release 1510端口安全&端口绑定第2 章端口绑定2-3【视图】任意视图【参数】interface:显示指定端口的绑定信息。

interface-type:端口类型。

interface-number:端口编号。

mac-addr:显示MAC 地址的绑定信息。

ip-addr:显示IP 地址的绑定信息。

【描述】display am user-bind 命令用来显示端口绑定的配置信息。

【举例】# 显示当前系统端口绑定的配置信息。

<Quidway> display am user-bindFollowing User address bind have been configured:Mac IP Port00e0-fc00-5101 Ethernet1/0/100e0-fc00-5102 Ethernet1/0/2Unit 1:Total 2 found, 2 listed.Total: 2 found.以上显示信息表示,设备Unit 1 当前总共有两条端口绑定的配置:MAC 地址00e0-fc00-5101、IP 地址已经与端口Ethernet1/0/1 进行了绑定;MAC 地址00e0-fc00-5102、IP 地址已经与端口Ethernet1/0/2 进行了绑定。

假设IP地址,MAC地址0000-0000-0001IP+MAC+端口绑定流程三层交换机中目前只有S3526系列支持使用AM命令来进行IP地址和端口的绑定。

并且如果S3526系列交换机要采用AM命令来实现绑定功能,则交换机必须是做三层转发(即用户的网关应该在该交换机上)。

采用DHCP-SECURITY来实现1.配置端口的静态MAC地址[SwitchA]mac-address static 0000-0000-0001 interface e0/1 vlan 12.配置IP和MAC对应表[SwitchA]dhcp-security 0000-0000-0001 static3.配置dhcp-server组号(否则不允许执行下一步,此dhcp-server组不用在交换机上创建也可) [SwitchA-Vlan-interface1]dhcp-server 14. 使能三层地址检测[SwitchA-Vlan-interface1]address-check enable采用AM命令来实现1.使能AM功能[SwitchA]am enable2.进入端口视图[SwitchA]vlan 103. 将E0/1加入到vlan10[SwitchA-vlan10]port Ethernet 0/14.创建(进入)vlan10的虚接口[SwitchA]interface Vlan-interface 105.给vlan10的虚接口配置IP地址[SwitchA-Vlan-interface10]ip add6.进入E0/1端口[SwitchA]interface Ethernet 0/17. 该端口只允许起始IP地址为的10个IP地址上网[SwitchA-Ethernet0/1]am ip-pool 10华为交换机怎么绑定IP和MAC【命令】am user-bindam 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-typeinterface-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绑定。

相关主题