华为交换机静态ARP与动态ARP结合使用配置示例
首页 > HuaWei > ARP   作者:浙江思唯网络  2016年2月2日 16:56 星期二  字号:   评论:0 条
时间:2016-2-2 16:56   评论:0 条 

华为交换机静态ARP与动态ARP结合使用配置示例

 

1、组网需求

        动态ARP与静态ARP组网示例图.png

                  1 动态ARP与静态ARP组网示例图

如上图1所示,Switch的接口GE1/0/1通过LAN Switch(即LSW)连接主机,接口GE1/0/2连接Server。要求:

GE1/0/1属于VLAN2GE1/0/2属于VLAN3

为了适应网络的快速变化,保证报文的正确转发,在Switch的接口VLANIF2上配置动态ARP的参数。

为了保证Server的安全性,防止其他设备仿冒Server发送非法ARP报文,在Switch的接口GE1/0/2上增加一个静态ARP表项,表项的IP地址为10.2.2.3,对应的MAC地址为00e0-fc01-0000

 

2、配置思路

2.1、创建VLAN,并将接口加入到VLAN中。

2.2、配置用户侧VLANIF接口的动态ARP的参数。

2.3、配置静态ARP表项。

 

3、操作步骤

3.1、创建VLAN,并将接口加入到VLAN中。

# 创建VLAN2VLAN3

<HUAWEI> system-view

[HUAWEI] vlan batch 2 3

 

# 将接口GE1/0/1加入VLAN2中,接口GE1/0/2加入VLAN3中。

[HUAWEI] interface gigabitethernet 1/0/1

[HUAWEI-GigabitEthernet1/0/1] port link-type trunk

[HUAWEI-GigabitEthernet1/0/1] port trunk allow-pass vlan 2

[HUAWEI-GigabitEthernet1/0/1] quit

[HUAWEI] interface gigabitethernet 1/0/2

[HUAWEI-GigabitEthernet1/0/2] port link-type access

[HUAWEI-GigabitEthernet1/0/2] port default vlan 3

[HUAWEI-GigabitEthernet1/0/2] quit

 

3.2、配置VLANIF接口的动态ARP的参数。

# 创建接口VLANIF2

[HUAWEI] interface vlanif 2

 

# 配置接口VLANIF2IP地址。

[HUAWEI-Vlanif2] ip address 2.2.2.2 255.255.255.0

 

# 配置ARP表项老化时间为60秒。

[HUAWEI-Vlanif2] arp expire-time 60

 

# 配置ARP表项老化探测次数为2次。

[HUAWEI-Vlanif2] arp detect-times 2

[HUAWEI-Vlanif2] quit

 

# 创建接口VLANIF3

[HUAWEI] interface vlanif 3

 

# 配置接口VLANIF3IP地址。

[HUAWEI-Vlanif3] ip address 10.2.2.2 255.255.255.0

[HUAWEI-Vlanif3] quit

 

3.4、配置静态ARP表项。

# 配置一条静态ARP表项:IP地址为10.2.2.3,对应的MAC地址为00e0-fc01-0000VLAN编号为3,出接口为GE1/0/2

[HUAWEI] arp static 10.2.2.3 00e0-fc01-0000 vid 3 interface gigabitethernet 1/0/2

[HUAWEI] quit

 

4、检查配置结果

# 执行命令display current-configuration,查看表项老化时间、老化探测次数和ARP映射表信息。

<HUAWEI> display current-configuration | include arp

 arp detect-times 2

 arp expire-time 60

 arp static 10.2.2.3 00e0-fc01-0000 vid 3 interface GigabitEthernet1/0/2

 

5、配置文件

以下仅给出Switch的配置文件。

#

sysname HUAWEI

#

vlan batch 2 to 3

#

interface Vlanif2

 arp detect-times 2

 arp expire-time 60

 ip address 2.2.2.2 255.255.255.0

#

interface Vlanif3

 ip address 10.2.2.2 255.255.255.0

#

interface GigabitEthernet1/0/1

 port link-type trunk                                                           

 port trunk allow-pass vlan 2

#

interface GigabitEthernet1/0/2

 port link-type access                                                        

 port default vlan 3

#

arp static 10.2.2.3 00e0-fc01-0000 vid 3 interface GigabitEthernet1/0/2

#

return

 您阅读这篇文章共花了: 
二维码加载中...
技术交流:欢迎在本文下方留言或加入QQ群:859273036 互相学习。     
本文地址:http://www.023wg.com/arp/160.html
版权声明:若无注明,本文皆为“Swiers思唯网络博客”原创,转载请保留文章出处。

返回顶部    首页   
版权所有:Swiers思唯网络博客    浙江思唯网络