H3C 2126EI交换机, 怎么让IP与MAC绑定。 或是设置非MAC认证计算机不让接入。 最好在WEB管理页上讲讲

如题所述

web页上是不行的命令行把

<S2126-1.10>
%Apr 2 00:03:53:099 2000 S2126-1.10 SHELL/5/LOGIN:- 1 - admin(192.168.5.2) in unit1 login
<S2126-1.10>
<S2126-1.10>sys 进入系统视图
System View: return to User View with Ctrl+Z.

[S2126-1.10]dis mac-address 查看本机mac地址

MAC ADDR VLAN ID STATE PORT INDEX AGING TIME(s)
0001-6cdf-4ca4 1 Config static Ethernet1/0/21

--- 1 mac address(es) found ---

[S2126-1.10]int e1/0/20 进入要绑定的端口

[S2126-1.10-Ethernet1/0/20]mac-add static 0001-6cd1-3322 v 1 将mac地址绑定到此端口下

[S2126-1.10-Ethernet1/0/20]mac-add max-mac-count 0 设置此端口禁止自动学习mac地址

[S2126-1.10-Ethernet1/0/20]dis th 查看此端口下的配置
#
interface Ethernet1/0/20
mac-address max-mac-count 0 查看此配置是否存在,确定配置是否正确。
loopback-detection enable
mac-address static 0001-6cd1-3322 vlan 1
#
return
[S2126-1.10-Ethernet1/0/20]quit 退回到上级视图

[S2126-1.10]dis mac-address 查看mac地址
MAC ADDR VLAN ID STATE PORT INDEX AGING TIME(s)
0001-6cd1-3322 1 Config static Ethernet1/0/20 NOAGED
/////config static-此单词表示此mac地址固定绑定在E1/0/20端口上///
0001-6cdf-4ca4 1 Config static Ethernet1/0/21 NOAGED

--- 2 mac address(es) found ---
[S2126-1.10]quit 退回到上级视图

<S2126-1.10>save 保存配置
The configuration will be written to the device.
Are you sure?[Y/N]y 选择y
Please input the file name(*.cfg)(To leave the existing filename
unchanged press the enter key): 直接回车
Now saving current configuration to the device.
Saving configuration. Please wait...

常用命令
dis cu 查看交换机所以配置
dis mac-address 查看mac地址表
dis ver 查看设备信息
save 保存配置
undo 在原命令前加undo为删除原配置

参考资料:H3C金牌代理商工程师-为你解决!

温馨提示:答案为网友推荐,仅供参考
第1个回答  2010-12-29
IP+MAC
【SwitchA相关配置】

# 指定DHCP Server组1的主备DHCP Server的IP地址分别为1.1.1.1---------------(可以配置一个假的DHCP SERVER)
[SwitchA]dhcp-server 1 ip 1.1.1.1

1. 创建(进入)VLAN10
[SwitchA]vlan 10

2. 将E0/1加入到VLAN10
[SwitchA-vlan10]port Ethernet 0/1

3. 创建(进入)VLAN接口10
[SwitchA]interface Vlan-interface 10

4. 为VLAN接口10配置IP地址
[SwitchA-Vlan-interface10]ip address 10.1.1.1 255.255.255.0

5. 为VLAN接口10配置一个假设的DHCP服务器地址
[QuidwayA-Vlan-interface10] dhcp-server 1

6. 使能VLAN接口10对用户地址合法性检查的DHCP Relay的安全特性
[SwitchA-Vlan-interface10]address-check enable

7. 配置DHCP Relay的安全地址表项
[Quidway] dhcp-security static 10.1.1.11 0005-5D02-F2B3
相似回答