配置VLAN内Proxy ARP示例

配置VLAN内Proxy ARP示例

组网需求

图1所示,Switch的接口10GE1/0/1和10GE1/0/2属于同一个sub-VLAN2。该sub-VLAN属于super-VLAN3。要求:

  • 属于同一VLAN2的两台服务器ServerA和ServerB之间二层隔离。
  • ServerA和ServerB之间通过VLAN内Proxy ARP实现三层互通。

super-VLAN的VLANIF接口的IP地址为10.10.10.1,子网掩码为255.255.255.0。

图1 配置VLAN内Proxy ARP组网图
配置VLAN内Proxy ARP示例

配置思路

VLAN内Proxy ARP的配置思路如下:

  1. 创建和配置super-VLAN和sub-VLAN。
  2. 将接口加入到sub-VLAN中。
  3. 创建super-VLAN的VLANIF接口并配置其IP地址。
  4. 在super-VLAN的VLANIF接口使能VLAN内Proxy ARP功能。

操作步骤

  1. 配置super-VLAN和sub-VLAN 
    # 配置sub-VLAN2。

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch
    [*HUAWEI] commit
    [~Switch] vlan 2
    [*Switch-vlan2] commit
    [~Switch-vlan2] quit
    # 使能10GE1/0/1和10GE1/0/2二层端口隔离功能。

    [~Switch] interface 10ge 1/0/1
    [~Switch-10GE1/0/1] port-isolate enable group 1
    [*Switch-10GE1/0/1] quit
    [*Switch] interface 10ge 1/0/2
    [*Switch-10GE1/0/2] port-isolate enable group 1
    [*Switch-10GE1/0/2] quit
    [*Switch] commit
    # 将10GE1/0/1和10GE1/0/2加入到sub-VLAN2中。

    [~Switch] interface 10ge 1/0/1
    [~Switch-10GE1/0/1] port default vlan 2
    [*Switch-10GE1/0/1] quit
    [*Switch] interface 10ge 1/0/2
    [*Switch-10GE1/0/2] port default vlan 2
    [*Switch-10GE1/0/2] quit
    [*Switch] commit
    # 配置super-VLAN3,并将sub-VLAN2增加到super-VLAN中。

    [~Switch] vlan 3
    [*Switch-vlan3] aggregate-vlan
    [*Switch-vlan3] access-vlan 2
    [*Switch-vlan3] quit
    [*Switch] commit

     

  2. 创建和配置接口VLANIF3 

    # 创建接口VLANIF3。

    [~Switch] interface vlanif 3

    # 配置接口VLANIF3的IP地址。

    [*Switch-Vlanif3] ip address 10.10.10.1 24

     

  3. 在接口VLANIF3启动VLAN内Proxy ARP 
    [*Switch-Vlanif3] arp proxy intra-vlan enable
    [*Switch-Vlanif3] commit
    [~Switch-Vlanif3] quit
    [~Switch] quit

     

  4. 配置服务器 

    # 配置ServerA的IP地址为10.10.10.2/24。

    # 配置ServerB的IP地址为10.10.10.3/24。

     

  5. 验证配置结果 

    # 执行命令display arp,查看所有ARP表项。

    <Switch> display arp
    ARP Entry Types: D - Dynamic, S - Static, I - Interface                                                                             
    EXP: Expire-time
                                                                                                                                        
    IP ADDRESS      MAC ADDRESS    EXP(M) TYPE/VLAN INTERFACE       VPN-INSTANCE                                                        
    ------------------------------------------------------------------------------                                                      
    10.10.10.1      00e0-fc00-0083        I         Vlanif3                                                                             
    10.10.10.3      00e0-fc00-0003   20   D/2       10GE1/0/1                                                                           
    10.10.10.2      00e0-fc00-0002   20   D/2       10GE1/0/2                                                                           
    ------------------------------------------------------------------------------                                                      
    Total:3          Dynamic:2       Static:0    Interface:1

    # ServerA和ServerB可以相互Ping通。

     

配置文件

Switch的配置文件

#
sysname Switch
#
vlan batch 2 to 3 
#
vlan 3
 aggregate-vlan
 access-vlan 2
#
interface Vlanif3
 ip address 10.10.10.1 255.255.255.0
 arp proxy intra-vlan enable
#
interface 10GE1/0/1
 port default vlan 2
 port-isolate enable group 1
#
interface 10GE1/0/2
 port default vlan 2
 port-isolate enable group 1
#
return
阅读剩余
THE END