H3C网管交换机长静态 ARP 表项配置举例

一、 组网需求
• Device B 连接主机,通过接口 GigabitEthernet1/0/1 连接 Device A。接口
GigabitEthernet1/0/1 属于 VLAN 10。
• Device A 的 IP 地址为 192.168.1.1/24,MAC 地址为 00e0-fc01-0000。
为了增加 Device B 和 Device A 通信的安全性,可以在 Device B 上为 Device A 配置一条静态 ARP表项,从而防止攻击报文修改此表项的 IP 地址和 MAC 地址的映射关系。

二、组网图
长静态 ARP 表项配置组网图

三、配置步骤
在 Device B 上进行下列配置。
# 创建 VLAN 10。
system-view
[DeviceB] vlan 10
[DeviceB-vlan10] quit

# 将接口 GigabitEthernet1/0/1 加入到 VLAN 10 中。
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] port access vlan 10
[DeviceB-GigabitEthernet1/0/1] quit

# 创建接口 Vlan-interface10,并配置 IP 地址。
[DeviceB] interface vlan-interface 10
[DeviceB-vlan-interface10] ip address 192.168.1.2 8
[DeviceB-vlan-interface10] quit

# 配置一条长静态 ARP 表项,IP 地址为 192.168.1.1,对应的 MAC 地址为 00e0-fc01-0000,此条ARP 表项对应的出接口为属于 VLAN 10 的接口 GigabitEthernet1/0/1。
[DeviceB] arp static 192.168.1.1 00e0-fc01-0000 10 gigabitethernet 1/0/1

# 查看长静态 ARP 表项信息。
[DeviceB] display arp static
查看长静态 ARP 表项信息

ICP备案号:晋ICP备18007549号-1
站长微信:15534641008