最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 正文

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

来源:动视网 责编:小OO 时间:2025-09-28 21:04:15
文档

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

  绑定客户端IP+MAC+端口  [Huawei]user-bindstaticip-address192.168.2.2mac-address54-9852-137AinterfaceGigabitEthernet0/0/2[Huawei]user-bindstaticmac-address-98CF-1525interfaceg0/0/1系统视图下amuser-bindmac-addrmac地址ip-addrip地址interface接口类型接口序号以太网端口视图下inter
推荐度:
导读  绑定客户端IP+MAC+端口  [Huawei]user-bindstaticip-address192.168.2.2mac-address54-9852-137AinterfaceGigabitEthernet0/0/2[Huawei]user-bindstaticmac-address-98CF-1525interfaceg0/0/1系统视图下amuser-bindmac-addrmac地址ip-addrip地址interface接口类型接口序号以太网端口视图下inter
    绑定客户端IP+MAC+端口

  

[Huawei]user-bind static ip-address 192.168.2.2 mac-address 54-9852-137A interface GigabitEthernet 0/0/2

[Huawei]user-bind static mac-address -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为172.16.3.113,mac地址为000B-2F37-FE4F只能通过GigabitEthernet0/0/2这个端口来上网或查看局域网内的共享文件。

答:一般用am user-bind做。

am user-bind ip-address 172.16.3.113 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地址

 

二、

端口绑定

2.1 端口绑定命令

2.1.1 am user-bind interface

【命令】

am user-bind mac-addr mac-address ip-addr ip-address interface

interface-type interface-number

undo am user-bind mac-addr mac-address ip-addr ip-address interface

interface-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 地址为10.153.1.1 的合法用户与端口

Ethernet1/0/1 进行绑定。

system-view

System 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 10.153.1.1 interface Ethernet1/0/1

2.1.2 am user-bind

【命令】

am user-bind mac-addr mac-address ip-addr ip-address

undo 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 地址为10.153.1.2 的合法用户与端口Ethernet1/0/2 进行绑定。

system-view

System 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-addr

10.153.1.2

2.1.3 display 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 命令用来显示端口绑定的配置信息。

【举例】

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

display am user-bind

Following User address bind have been configured:

Mac IP Port

00e0-fc00-5101 10.153.1.1 Ethernet1/0/1

00e0-fc00-5102 10.153.1.2 Ethernet1/0/2

Unit 1:Total 2 found, 2 listed.

Total: 2 found.

以上显示信息表示,设备Unit 1 当前总共有两条端口绑定的配置:

   MAC 地址00e0-fc00-5101、IP 地址10.153.1.1 已经与端口Ethernet1/0/1 进行了绑定;

   MAC 地址00e0-fc00-5102、IP 地址10.153.1.2 已经与端口Ethernet1/0/2 进行了绑定。

假设IP地址10.1.1.2,MAC地址0000-0000-0001

IP+MAC+端口绑定流程

三层交换机中目前只有S3526系列支持使用AM命令来进行IP地址和端口的绑定。并且如果S3526系列交换机要采用AM命令来实现绑定功能,则交换机必须是做三层转发(即用户的网关应该在该交换机上)。

采用DHCP-SECURITY来实现

1.配置端口的静态MAC地址

[SwitchA]mac-address static 0000-0000-0001 interface e0/1 vlan 1

2.配置IP和MAC对应表

[SwitchA]dhcp-security 10.1.1.2 0000-0000-0001 static

3.配置dhcp-server组号(否则不允许执行下一步,此dhcp-server组不用在交换机上创建也可)

[SwitchA-Vlan-interface1]dhcp-server 1

4. 使能三层地址检测

[SwitchA-Vlan-interface1]address-check enable

采用AM命令来实现

1.使能AM功能

[SwitchA]am enable

2.进入端口视图

[SwitchA]vlan 10

3. 将E0/1加入到vlan10

[SwitchA-vlan10]port Ethernet 0/1

4.创建(进入)vlan10的虚接口

[SwitchA]interface Vlan-interface 10

5.给vlan10的虚接口配置IP地址

[SwitchA-Vlan-interface10]ip add 10.1.1.1 255.255.255.0

6.进入E0/1端口

[SwitchA]interface Ethernet 0/1

7. 该端口只允许起始IP地址为10.1.1.2的10个IP地址上网

[SwitchA-Ethernet0/1]am ip-pool 10.1.1.2 10

华为交换机怎么绑定IP和MAC

【命令】 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”绑定。 假设IP地址10.1.1.2,MAC地址0000-0000-0001

1、IP+MAC+端口绑定流程

三层交换机中目前只有S3526系列支持使用AM命令来进行IP地址和端口的绑定。并且如果S3526系列交换机要采用AM命令来实现绑定功能,则交换机必须是做三层转发(即用户的网关应该在该交换机上)。

2、采用DHCP-SECURITY来实现

1.配置端口的静态MAC地址

[SwitchA]mac-address static 0000-0000-0001 interface e0/1 vlan 1

2.配置IP和MAC对应表

[SwitchA]dhcp-security 10.1.1.2 0000-0000-0001 static

3.配置dhcp-server组号(否则不允许执行下一步,此dhcp-server组不用在交换机上创建也可)

[SwitchA-Vlan-interface1]dhcp-server 1

4. 使能三层地址检测

[SwitchA-Vlan-interface1]address-check enable

3、采用AM命令来实现

1.使能AM功能

[SwitchA]am enable

2.进入端口视图

[SwitchA]vlan 10

3. 将E0/1加入到vlan10

[SwitchA-vlan10]port Ethernet 0/1

4.创建(进入)vlan10的虚接口

[SwitchA]interface Vlan-interface 10

5.给vlan10的虚接口配置IP地址

[SwitchA-Vlan-interface10]ip add 10.1.1.1 255.255.255.0

6.进入E0/1端口

[SwitchA]interface Ethernet 0/1

7. 该端口只允许起始IP地址为10.1.1.2的10个IP地址上网

[SwitchA-Ethernet0/1]am ip-pool 10.1.1.2 10

文档

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

  绑定客户端IP+MAC+端口  [Huawei]user-bindstaticip-address192.168.2.2mac-address54-9852-137AinterfaceGigabitEthernet0/0/2[Huawei]user-bindstaticmac-address-98CF-1525interfaceg0/0/1系统视图下amuser-bindmac-addrmac地址ip-addrip地址interface接口类型接口序号以太网端口视图下inter
推荐度:
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top