配置ND本地代理示例
配置ND本地代理功能,实现处于相同的BD、相同的网段,但是BD内配置了用户隔离的设备间的互通。
组网需求
在EVC模型中,BD是一个广播域,BD的成员口收到报文后会在广播域内广播。为了减少广播,网络管理员通常会在没有互通需求的成员口上配置水平分割功能,使得BD内的指定用户之间相互隔离,无法二层互通。
配置思路
采用如下的思路配置ND本地代理功能:
在DeviceB和DeviceC上配置二层转发功能:
- 创建VLAN,并将下行接口加入VLAN。
- 在上行接口上配置二层转发功能,使发往DeviceA的报文带有一层VLAN Tag。
- 在DeviceA上搭建EVC模型:
- 配置广播域BD,用来转发业务。
- 创建二层子接口,并加入BD。
- 在DeviceA上配置ND本地代理功能:
- 创建VBDIF接口,并配置VBDIF接口的IPv6地址。
- 使能ND本地代理功能,实现HostA和HostB之间互通。
操作步骤
- 在DeviceB和DeviceC上配置二层转发功能
# 配置DeviceB。
<HUAWEI> system-view
[~HUAWEI] sysname DeviceB
[*HUAWEI] commit
[~DeviceB] vlan 10
[*DeviceB-vlan10] quit
[*DeviceB] interface gigabitethernet 0/1/1
[*DeviceB-GigabitEthernet0/1/1] portswitch
[*DeviceB-GigabitEthernet0/1/1] port link-type access
[*DeviceB-GigabitEthernet0/1/1] port default vlan 10
[*DeviceB-GigabitEthernet0/1/1] quit
[*DeviceB] interface gigabitethernet 0/1/2
[*DeviceB-GigabitEthernet0/1/2] portswitch
[*DeviceB-GigabitEthernet0/1/2] port link-type trunk
[*DeviceB-GigabitEthernet0/1/2] port trunk allow-pass vlan 10
[*DeviceB-GigabitEthernet0/1/2] commit
[~DeviceB-GigabitEthernet0/1/2] quit
DeviceC的配置与DeviceB类似,这里不再赘述。具体配置过程略,请参考配置文件。
- 在DeviceA上搭建EVC模型
# 创建BD。
<HUAWEI> system-view
[~HUAWEI] sysname DeviceA
[*HUAWEI] commit
[~DeviceA] bridge-domain 10
[*DeviceA-bd10] split-horizon enable
[*DeviceA-bd10] quit
# 创建二层子接口,并加入BD。
[*DeviceA] interface gigabitethernet 0/1/1.1 mode l2
[*DeviceA-GigabitEthernet0/1/1.1] encapsulation dot1q vid 10
[*DeviceA-GigabitEthernet0/1/1.1] rewrite pop single
[*DeviceA-GigabitEthernet0/1/1.1] bridge-domain 10
[*DeviceA-GigabitEthernet0/1/1] quit
[*DeviceA] interface gigabitethernet 0/1/2.1 mode l2
[*DeviceA-GigabitEthernet0/1/2.1] encapsulation dot1q vid 10
[*DeviceA-GigabitEthernet0/1/2.1] rewrite pop single
[*DeviceA-GigabitEthernet0/1/2.1] bridge-domain 10
[*DeviceA-GigabitEthernet0/1/2.1] commit
[~DeviceA-GigabitEthernet0/1/2] quit
- 在DeviceA上配置ND本地代理功能
# 创建VBDIF接口,配置VBDIF接口的IPv6地址。
[~DeviceA] interface Vbdif 10
[*DeviceA-Vbdif10] ipv6 enable
[*DeviceA-Vbdif10] ipv6 address 2001:db8:300:400::4 64
# 使能ND本地代理功能。
[*DeviceA-Vbdif10] ipv6 nd proxy local enable
[*DeviceA-Vbdif10] commit
- 配置Host的IPv6地址
# 配置HostA的IPv6地址为2001:db8:300:400::1/64。
# 配置HostB的IPv6地址为2001:db8:300:400::3/64。
- 检查配置结果
配置完成后,HostA与HostB之间可以互相Ping通。
配置文件
DeviceA的配置文件
# sysname DeviceA # bridge-domain 10 split-horizon enable # interface Vbdif10 ipv6 enable ipv6 address 2001:DB8:300:400::4/64 ipv6 nd proxy local enable # interface GigabitEthernet0/1/1 # interface GigabitEthernet0/1/1.1 mode l2 encapsulation dot1q vid 10 rewrite pop single bridge-domain 10 # interface GigabitEthernet0/1/2 # interface GigabitEthernet0/1/2.1 mode l2 encapsulation dot1q vid 10 rewrite pop single bridge-domain 10 # return
DeviceB的配置文件
# sysname DeviceB # vlan batch 10 # interface GigabitEthernet0/1/1 portswitch port link-type access port default vlan 10 # interface GigabitEthernet0/1/2 portswitch port link-type trunk port trunk allow-pass vlan 10 # return
DeviceC的配置文件
# sysname DeviceC # vlan batch 10 # interface GigabitEthernet0/1/1 portswitch port link-type access port default vlan 10 # interface GigabitEthernet0/1/2 portswitch port link-type trunk port trunk allow-pass vlan 10 # return