配置IPv6 NFVI分布式网关示例
通过典型的应用场景描述如何配置IPv6 NFVI分布式网关功能。
组网需求
NFVI电信云解决方案是DCI(Data Center Interconnect)+DCN(Data Center Network)的组网方案。其中大量IPv6手机业务流量会进入DCN网络并访问DCN网络内的vUGW与vMSE。经过vUGW与vMSE的处理后,这些手机业务流量再次从DCN网络转发出去,继续访问Internet中的目的设备。同样目的设备发往手机的回应流量亦要经历该过程。为了实现上述功能,并且确保手机业务流量在DCN网络内部可以实现负载均衡,则需要在DCN网络内部部署NFVI分布式网关功能。
如图16-30所示,该组网为NFVI分布式网关的组网示意图。其中DCGW为DCN网络的边界网关,可以和外部网络交换Internet路由。L2GW/L3GW1和L2GW/L3GW2用于接入VNF(Virtualized Network Function)。VNF1和VNF2作为虚拟化网元可以分别部署并实现vUGW和vMSE的功能,并通过IPU(Interface Process Unit)与L2GW/L3GW1和L2GW/L3GW2连接。
DCGW1和DCGW2上部署VXLAN双活网关功能,即DCGW1和DCGW2之间建立Bypass VXLAN隧道,同时DCGW1和DCGW2共同使用一个虚拟的Anycast VTEP地址分别与L2GW/L3GW1和L2GW/L3GW2建立VXLAN隧道。
L2GW/L3GW1和L2GW/L3GW2上部署分布式网关功能并在两台设备间创建VXLAN隧道。
NE20E可以部署为该组网中的DCGW和L2GW/L3GW设备。
本例中interface1、interface2、interface3、interface4、interface5分别代表GigabitEthernet0/1/1、GigabitEthernet0/1/2、GigabitEthernet0/1/3、GigabitEthernet0/1/4、GigabitEthernet0/1/5。
设备 |
接口 |
IP地址 |
---|---|---|
DCGW1 |
GigabitEthernet 0/1/1 |
10.6.1.1/24 |
GigabitEthernet 0/1/2 |
10.6.2.1/24 |
|
LoopBack0 |
9.9.9.9/32 |
|
LoopBack1 |
3.3.3.3/32 |
|
LoopBack2 |
2001:db8:33::33/128 |
|
DCGW2 |
GigabitEthernet 0/1/1 |
10.6.1.2/24 |
GigabitEthernet 0/1/2 |
10.6.3.1/24 |
|
LoopBack0 |
9.9.9.9/32 |
|
LoopBack1 |
4.4.4.4/32 |
|
LoopBack2 |
2001:db8:44::44/128 |
|
L2GW/L3GW1 |
GigabitEthernet 0/1/1 |
10.6.4.1/24 |
GigabitEthernet 0/1/2 |
10.6.2.2/24 |
|
GigabitEthernet0/1/3 |
- |
|
GigabitEthernet0/1/4 |
- |
|
GigabitEthernet0/1/5 |
- |
|
LoopBack1 |
1.1.1.1/32 |
|
L2GW/L3GW2 |
GigabitEthernet 0/1/1 |
10.6.4.2/24 |
GigabitEthernet 0/1/2 |
10.6.3.2/24 |
|
GigabitEthernet0/1/3 |
- |
|
GigabitEthernet0/1/4 |
- |
|
LoopBack1 |
2.2.2.2/32 |
配置思路
采用如下的思路配置:
- 在DCGW和L2GW/L3GW上配置路由协议,保证网络三层互通,本示例采用了OSPF路由协议。
- 在DCGW和L2GW/L3GW上配置EVPN实例并绑定BD。
- 在DCGW和L2GW/L3GW上配置L3VPN实例并绑定VBDIF接口。
- 在DCGW和L2GW/L3GW上配置BGP EVPN功能。
- 在DCGW和L2GW/L3GW上配置VXLAN隧道。
- 在L2GW/L3GW上配置接入VNF的二层子接口以及通往VNF的私网静态路由。
- 在L2GW/L3GW上配置BGP EVPN引入私网静态路由,然后配置L3VPN实例应用路由策略,使这些静态私网路由保持原有下一跳。
- 在DCGW上配置私网静态缺省路由和用于与VNF建立私网BGP邻居的Loopback地址,然后配置L3VPN实例应用路由策略,使DCGW仅能通过BGP EVPN发布私网静态缺省路由和私网Loopback路由。
- 在DCGW上配置与VNF建立私网BGP邻居。
- 在DCGW和L2GW/L3GW上配置负载分担功能。
操作步骤
- 在DCGW和L2GW/L3GW上配置各接口的IP地址及Loopback接口的地址
具体配置过程请参考配置文件。
- 在DCGW和L2GW/L3GW上配置路由协议,保证网络三层互通,本示例采用了OSPF路由协议
具体配置过程请参考配置文件。
- 在DCGW和L2GW/L3GW上配置EVPN实例并绑定BD
# 配置DCGW1。
[~DCGW1] evpn vpn-instance evrf1 bd-mode
[*DCGW1-evpn-instance-evrf1] route-distinguisher 1:1
[*DCGW1-evpn-instance-evrf1] vpn-target 1:1
[*DCGW1-evpn-instance-evrf1] quit
[*DCGW1] evpn vpn-instance evrf2 bd-mode
[*DCGW1-evpn-instance-evrf2] route-distinguisher 2:2
[*DCGW1-evpn-instance-evrf2] vpn-target 2:2
[*DCGW1-evpn-instance-evrf2] quit
[*DCGW1] evpn vpn-instance evrf3 bd-mode
[*DCGW1-evpn-instance-evrf3] route-distinguisher 3:3
[*DCGW1-evpn-instance-evrf3] vpn-target 3:3
[*DCGW1-evpn-instance-evrf3] quit
[*DCGW1] evpn vpn-instance evrf4 bd-mode
[*DCGW1-evpn-instance-evrf4] route-distinguisher 4:4
[*DCGW1-evpn-instance-evrf4] vpn-target 4:4
[*DCGW1-evpn-instance-evrf4] quit
[*DCGW1] bridge-domain 10
[*DCGW1-bd10] vxlan vni 100 split-horizon-mode
[*DCGW1-bd10] evpn binding vpn-instance evrf1
[*DCGW1-bd10] quit
[*DCGW1] bridge-domain 20
[*DCGW1-bd20] vxlan vni 110 split-horizon-mode
[*DCGW1-bd20] evpn binding vpn-instance evrf2
[*DCGW1-bd20] quit
[*DCGW1] bridge-domain 30
[*DCGW1-bd30] vxlan vni 120 split-horizon-mode
[*DCGW1-bd30] evpn binding vpn-instance evrf3
[*DCGW1-bd30] quit
[*DCGW1] bridge-domain 40
[*DCGW1-bd40] vxlan vni 130 split-horizon-mode
[*DCGW1-bd40] evpn binding vpn-instance evrf4
[*DCGW1-bd40] quit
[*DCGW1] commit
DCGW2和L2GW/L3GW上的配置与DCGW1类似,具体配置过程请参考配置文件。
- 在DCGW和L2GW/L3GW上配置L3VPN实例
# 配置DCGW1。
[~DCGW1] ip vpn-instance vpn1
[*DCGW1-vpn-instance-vpn1] vxlan vni 200
[*DCGW1-vpn-instance-vpn1] ipv6-family
[*DCGW1-vpn-instance-vpn1-af-ipv6] route-distinguisher 11:11
[*DCGW1-vpn-instance-vpn1-af-ipv6] vpn-target 11:1 evpn
[*DCGW1-vpn-instance-vpn1-af-ipv6] quit
[*DCGW1-vpn-instance-vpn1] quit
[*DCGW1] interface vbdif10
[*DCGW1-Vbdif10] ip binding vpn-instance vpn1
[*DCGW1-Vbdif10] ipv6 enable
[*DCGW1-Vbdif10] ipv6 address 2001:db8:1::1 64
[*DCGW1-Vbdif10] ipv6 nd generate-rd-table enable
[*DCGW1-Vbdif10] vxlan anycast-gateway enable
[*DCGW1-Vbdif10] mac-address 00e0-fc00-0002
[*DCGW1-Vbdif10] quit
[*DCGW1] interface vbdif20
[*DCGW1-Vbdif20] ip binding vpn-instance vpn1
[*DCGW1-Vbdif20] ipv6 enable
[*DCGW1-Vbdif20] ipv6 address 2001:db8:2::1 64
[*DCGW1-Vbdif20] ipv6 nd generate-rd-table enable
[*DCGW1-Vbdif20] vxlan anycast-gateway enable
[*DCGW1-Vbdif20] mac-address 00e0-fc00-0003
[*DCGW1-Vbdif20] quit
[*DCGW1] interface vbdif30
[*DCGW1-Vbdif30] ip binding vpn-instance vpn1
[*DCGW1-Vbdif30] ipv6 enable
[*DCGW1-Vbdif30] ipv6 address 2001:db8:3::1 64
[*DCGW1-Vbdif30] ipv6 nd generate-rd-table enable
[*DCGW1-Vbdif30] vxlan anycast-gateway enable
[*DCGW1-Vbdif30] mac-address 00e0-fc00-0001
[*DCGW1-Vbdif30] quit
[*DCGW1] interface vbdif40
[*DCGW1-Vbdif40] ip binding vpn-instance vpn1
[*DCGW1-Vbdif40] ipv6 enable
[*DCGW1-Vbdif40] ipv6 address 2001:db8:4::1 64
[*DCGW1-Vbdif40] ipv6 nd generate-rd-table enable
[*DCGW1-Vbdif40] vxlan anycast-gateway enable
[*DCGW1-Vbdif40] mac-address 00e0-fc00-0004
[*DCGW1-Vbdif40] quit
[*DCGW1] commit
DCGW2和L2GW/L3GW上的配置与DCGW1类似,具体配置过程请参考配置文件。
- 在DCGW和L2GW/L3GW上配置BGP EVPN功能
# 配置DCGW1。
[~DCGW1] ip ipv6-prefix uIP index 10 permit 2001:DB8:10::10 128
[*DCGW1] route-policy stopuIP deny node 10
[*DCGW1-route-policy] if-match ipv6 address prefix-list uIP
[*DCGW1-route-policy] quit
[*DCGW1] route-policy stopuIP permit node 20
[*DCGW1-route-policy] quit
[*DCGW1] bgp 100
[*DCGW1-bgp] peer 1.1.1.1 as-number 100
[*DCGW1-bgp] peer 1.1.1.1 connect-interface LoopBack 1
[*DCGW1-bgp] peer 2.2.2.2 as-number 100
[*DCGW1-bgp] peer 2.2.2.2 connect-interface LoopBack 1
[*DCGW1-bgp] peer 4.4.4.4 as-number 100
[*DCGW1-bgp] peer 4.4.4.4 connect-interface LoopBack 1
[*DCGW1-bgp] l2vpn-family evpn
[*DCGW1-bgp-af-evpn] peer 1.1.1.1 enable
[*DCGW1-bgp-af-evpn] peer 1.1.1.1 advertise encap-type vxlan
[*DCGW1-bgp-af-evpn] peer 2.2.2.2 enable
[*DCGW1-bgp-af-evpn] peer 2.2.2.2 advertise encap-type vxlan
[*DCGW1-bgp-af-evpn] peer 4.4.4.4 enable
[*DCGW1-bgp-af-evpn] peer 4.4.4.4 advertise encap-type vxlan
[*DCGW1-bgp-af-evpn] peer 4.4.4.4 route-policy stopuIP export
[*DCGW1-bgp-af-evpn] quit
[*DCGW1-bgp] quit
[*DCGW1] commit
DCGW2上的配置与DCGW1类似,具体配置过程请参考配置文件。
# 配置L2GW/L3GW1。
[~L2GW/L3GW1] bgp 100
[*L2GW/L3GW1-bgp] peer 2.2.2.2 as-number 100
[*L2GW/L3GW1-bgp] peer 2.2.2.2 connect-interface LoopBack 1
[*L2GW/L3GW1-bgp] peer 3.3.3.3 as-number 100
[*L2GW/L3GW1-bgp] peer 3.3.3.3 connect-interface LoopBack 1
[*L2GW/L3GW1-bgp] peer 4.4.4.4 as-number 100
[*L2GW/L3GW1-bgp] peer 4.4.4.4 connect-interface LoopBack 1
[*L2GW/L3GW1-bgp] l2vpn-family evpn
[*L2GW/L3GW1-bgp-af-evpn] peer 2.2.2.2 enable
[*L2GW/L3GW1-bgp-af-evpn] peer 2.2.2.2 advertise nd
[*L2GW/L3GW1-bgp-af-evpn] peer 2.2.2.2 advertise encap-type vxlan
[*L2GW/L3GW1-bgp-af-evpn] peer 3.3.3.3 enable
[*L2GW/L3GW1-bgp-af-evpn] peer 3.3.3.3 advertise encap-type vxlan
[*L2GW/L3GW1-bgp-af-evpn] peer 3.3.3.3 advertise nd
[*L2GW/L3GW1-bgp-af-evpn] peer 4.4.4.4 enable
[*L2GW/L3GW1-bgp-af-evpn] peer 4.4.4.4 advertise encap-type vxlan
[*L2GW/L3GW1-bgp-af-evpn] peer 4.4.4.4 advertise nd
[*L2GW/L3GW1-bgp-af-evpn] quit
[*L2GW/L3GW1-bgp] quit
[*L2GW/L3GW1] commit
L2GW/L3GW2上的配置与L2GW/L3GW1类似,具体配置过程请参考配置文件。
- 在DCGW和L2GW/L3GW上配置VXLAN隧道
# 配置DCGW1。
[~DCGW1] evpn
[*DCGW1-evpn] bypass-vxlan enable
[*DCGW1-evpn] quit
[*DCGW1] interface nve 1
[*DCGW1-Nve1] source 9.9.9.9
[*DCGW1-Nve1] bypass source 3.3.3.3
[*DCGW1-Nve1] mac-address 00e0-fc00-0009
[*DCGW1-Nve1] vni 100 head-end peer-list protocol bgp
[*DCGW1-Nve1] vni 110 head-end peer-list protocol bgp
[*DCGW1-Nve1] vni 120 head-end peer-list protocol bgp
[*DCGW1-Nve1] vni 130 head-end peer-list protocol bgp
[*DCGW1-Nve1] quit
[*DCGW1] commit
DCGW2上的配置与DCGW1类似,具体配置过程请参考配置文件。
# 配置L2GW/L3GW1。
[~L2GW/L3GW1] interface nve 1
[*L2GW/L3GW1-Nve1] source 1.1.1.1
[*L2GW/L3GW1-Nve1] vni 100 head-end peer-list protocol bgp
[*L2GW/L3GW1-Nve1] vni 110 head-end peer-list protocol bgp
[*L2GW/L3GW1-Nve1] vni 120 head-end peer-list protocol bgp
[*L2GW/L3GW1-Nve1] vni 130 head-end peer-list protocol bgp
[*L2GW/L3GW1-Nve1] quit
[*L2GW/L3GW1] commit
L2GW/L3GW2上的配置与L2GW/L3GW1类似,具体配置过程请参考配置文件。
- 在L2GW/L3GW上配置接入VNF的二层子接口以及通往VNF的私网静态路由。
# 配置L2GW/L3GW1。
[~L2GW/L3GW1] interface GigabitEthernet0/1/3.1 mode l2
[*L2GW/L3GW1-GigabitEthernet0/1/3.1] encapsulation dot1q vid 10
[*L2GW/L3GW1-GigabitEthernet0/1/3.1] rewrite pop single
[*L2GW/L3GW1-GigabitEthernet0/1/3.1] bridge-domain 10
[*L2GW/L3GW1-GigabitEthernet0/1/3.1] quit
[*L2GW/L3GW1] interface GigabitEthernet0/1/4.1 mode l2
[*L2GW/L3GW1-GigabitEthernet0/1/4.1] encapsulation dot1q vid 20
[*L2GW/L3GW1-GigabitEthernet0/1/4.1] rewrite pop single
[*L2GW/L3GW1-GigabitEthernet0/1/4.1] bridge-domain 20
[*L2GW/L3GW1-GigabitEthernet0/1/4.1] quit
[*L2GW/L3GW1] interface GigabitEthernet0/1/5.1 mode l2
[*L2GW/L3GW1-GigabitEthernet0/1/5.1] encapsulation dot1q vid 10
[*L2GW/L3GW1-GigabitEthernet0/1/5.1] rewrite pop single
[*L2GW/L3GW1-GigabitEthernet0/1/5.1] bridge-domain 10
[*L2GW/L3GW1-GigabitEthernet0/1/5.1] quit
[*L2GW/L3GW1] ipv6 route-static vpn-instance vpn1 2001:db8:5::5 128 2001:db8:1::2 tag 1000
[*L2GW/L3GW1] ipv6 route-static vpn-instance vpn1 2001:db8:5::5 128 2001:db8:2::2 tag 1000
[*L2GW/L3GW1] ipv6 route-static vpn-instance vpn1 2001:db8:6::6 128 2001:db8:1::3 tag 1000
[*L2GW/L3GW1] commit
L2GW/L3GW2上的配置与L2GW/L3GW1类似,具体配置过程请参考配置文件。
- 在L2GW/L3GW上配置BGP EVPN引入私网静态路由,然后配置L3VPN实例应用路由策略,使这些静态私网路由保持原有下一跳
# 配置L2GW/L3GW1。
[~L2GW/L3GW1] bgp 100
[*L2GW/L3GW1-bgp] ipv6-family vpn-instance vpn1
[*L2GW/L3GW1-bgp-6-vpn1] import-route static
[*L2GW/L3GW1-bgp-6-vpn1] advertise l2vpn evpn import-route-multipath
[*L2GW/L3GW1-bgp-6-vpn1] quit
[*L2GW/L3GW1-bgp] quit
[*L2GW/L3GW1] route-policy sp permit node 10
[*L2GW/L3GW1-route-policy] if-match tag 1000
[*L2GW/L3GW1-route-policy] apply ipv6 gateway-ip origin-nexthop
[*L2GW/L3GW1-route-policy] quit
[*L2GW/L3GW1] route-policy sp deny node 20
[*L2GW/L3GW1-route-policy] quit
[*L2GW/L3GW1] ip vpn-instance vpn1
[*L2GW/L3GW1-vpn-instance-vpn1] ipv6-family
[*L2GW/L3GW1-vpn-instance-vpn1-af-ipv6] export route-policy sp evpn
[*L2GW/L3GW1-vpn-instance-vpn1-af-ipv6] quit
[*L2GW/L3GW1-vpn-instance-vpn1] quit
[*L2GW/L3GW1] commit
L2GW/L3GW2上的配置与L2GW/L3GW1类似,具体配置过程请参考配置文件。
- 在DCGW上配置私网静态缺省路由和用于与VNF建立私网BGP邻居的Loopback地址,然后配置L3VPN实例应用路由策略,使DCGW仅能通过BGP EVPN发布私网静态缺省路由和私网Loopback路由
# 配置DCGW1。
[~DCGW1] ipv6 route-static vpn-instance vpn1 :: 0 NULL0 tag 2000
[*DCGW1] interface LoopBack2
[*DCGW1-LoopBack2] ip binding vpn-instance vpn1
[*DCGW1-LoopBack2] ipv6 enable
[*DCGW1-LoopBack2] ipv6 address 2001:db8:33::33 128
[*DCGW1-LoopBack2] quit
[*DCGW1] bgp 100
[*DCGW1-bgp] ipv6-family vpn-instance vpn1
[*DCGW1-bgp-6-vpn1] advertise l2vpn evpn
[*DCGW1-bgp-6-vpn1] import-route direct
[*DCGW1-bgp-6-vpn1] network :: 0
[*DCGW1-bgp-6-vpn1] quit
[*DCGW1-bgp] quit
[*DCGW1] ip ipv6-prefix lp index 10 permit 2001:db8:33::33 128
[*DCGW1] route-policy dp permit node 10
[*DCGW1-route-policy] if-match tag 2000
[*DCGW1-route-policy] quit
[*DCGW1] route-policy dp permit node 15
[*DCGW1-route-policy] if-match ipv6 address prefix-list lp
[*DCGW1-route-policy] quit
[*DCGW1] route-policy dp deny node 20
[*DCGW1-route-policy] quit
[*DCGW1] ip vpn-instance vpn1
[*DCGW1-vpn-instance-vpn1] ipv6-family
[*DCGW1-vpn-instance-vpn1-af-ipv6] export route-policy dp evpn
[*DCGW1-vpn-instance-vpn1-af-ipv6] quit
[*DCGW1-vpn-instance-vpn1] quit
[*DCGW1] commit
DCGW2上的配置与DCGW1类似,具体配置过程请参考配置文件。
- 在DCGW上配置与VNF建立私网BGP邻居
# 配置DCGW1。
[~DCGW1] route-policy p1 deny node 10
[*DCGW1-route-policy] quit
[*DCGW1] bgp 100
[*DCGW1-bgp] ipv6-family vpn-instance vpn1
[*DCGW1-bgp-6-vpn1] peer 2001:db8:5::5 as-number 100
[*DCGW1-bgp-6-vpn1] peer 2001:db8:5::5 connect-interface LoopBack2
[*DCGW1-bgp-6-vpn1] peer 2001:db8:5::5 route-policy p1 export
[*DCGW1-bgp-6-vpn1] peer 2001:db8:6::6 as-number 100
[*DCGW1-bgp-6-vpn1] peer 2001:db8:6::6 connect-interface LoopBack2
[*DCGW1-bgp-6-vpn1] peer 2001:db8:6::6 route-policy p1 export
[*DCGW1-bgp-6-vpn1] quit
[*DCGW1-bgp] quit
[*DCGW1] commit
# 配置DCGW2。
[~DCGW2] route-policy p1 deny node 10
[*DCGW2-route-policy] quit
[*DCGW2] bgp 100
[*DCGW2-bgp] ipv6-family vpn-instance vpn1
[*DCGW2-bgp-6-vpn1] peer 2001:db8:5::5 as-number 100
[*DCGW2-bgp-6-vpn1] peer 2001:db8:5::5 connect-interface LoopBack2
[*DCGW2-bgp-6-vpn1] peer 2001:db8:5::5 route-policy p1 export
[*DCGW2-bgp-6-vpn1] peer 2001:db8:6::6 as-number 100
[*DCGW2-bgp-6-vpn1] peer 2001:db8:6::6 connect-interface LoopBack2
[*DCGW2-bgp-6-vpn1] peer 2001:db8:6::6 route-policy p1 export
[*DCGW2-bgp-6-vpn1] quit
[*DCGW2-bgp] quit
[*DCGW2] commit
- 在DCGW和L2GW/L3GW上配置负载分担功能
# 配置DCGW1。
[~DCGW1] bgp 100
[*DCGW1-bgp] ipv6-family vpn-instance vpn1
[*DCGW1-bgp-6-vpn1] maximum load-balancing 16
[*DCGW1-bgp-6-vpn1] quit
[*DCGW1-bgp] l2vpn-family evpn
[*DCGW1-bgp-af-evpn] peer 1.1.1.1 capability-advertise add-path both
[*DCGW1-bgp-af-evpn] peer 1.1.1.1 advertise add-path path-number 16
[*DCGW1-bgp-af-evpn] peer 2.2.2.2 capability-advertise add-path both
[*DCGW1-bgp-af-evpn] peer 2.2.2.2 advertise add-path path-number 16
[*DCGW1-bgp-af-evpn] quit
[*DCGW1-bgp] quit
[*DCGW1] commit
DCGW2上的配置与DCGW1类似,具体配置过程请参考配置文件。
# 配置L2GW/L3GW1。
[~L2GW/L3GW1] bgp 100
[*L2GW/L3GW1-bgp] ipv6-family vpn-instance vpn1
[*L2GW/L3GW1-bgp-6-vpn1] maximum load-balancing 16
[*L2GW/L3GW1-bgp-6-vpn1] quit
[*L2GW/L3GW1-bgp] l2vpn-family evpn
[*L2GW/L3GW1-bgp-af-evpn] bestroute add-path path-number 16
[*L2GW/L3GW1-bgp-af-evpn] peer 3.3.3.3 capability-advertise add-path both
[*L2GW/L3GW1-bgp-af-evpn] peer 3.3.3.3 advertise add-path path-number 16
[*L2GW/L3GW1-bgp-af-evpn] peer 4.4.4.4 capability-advertise add-path both
[*L2GW/L3GW1-bgp-af-evpn] peer 4.4.4.4 advertise add-path path-number 16
[*L2GW/L3GW1-bgp-af-evpn] quit
[*L2GW/L3GW1-bgp] quit
[*L2GW/L3GW1] commit
L2GW/L3GW2上的配置与L2GW/L3GW1类似,具体配置过程请参考配置文件。
- 验证配置结果
在DCGW上执行display bgp vpnv6 vpn-instance vpn1 peer命令可以看到DCGW和VNF间的私网邻居关系状态达到Established状态。以DCGW1为例:
[~DCGW1] display bgp vpnv6 vpn-instance vpn1 peer
BGP local router ID : 9.9.9.9 Local AS number : 100 Total number of peers : 2 Peers in established state : 0 VPN-Instance vpn1, Router ID 9.9.9.9: Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 2001:DB8:5::5 4 100 7136 7135 0 0118h05m Established 4 2001:DB8:6::6 4 100 7140 7167 0 01:59:11 Established 0
在DCGW上执行display bgp vpnv6 vpn-instance vpn1 routing-table命令可以看到DCGW是已收到手机路由(本例中将VNF上的手机路由设为2001:DB8:10::10),且手机路由的下一跳为VNF地址。以DCGW1为例:
[~DCGW] display bgp vpnv6 vpn-instance vpn1 routing-table
BGP Local router ID is 9.9.9.9 Status codes: * - valid, > - best, d - damped, x - best external, a - add path, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete RPKI validation codes: V - valid, I - invalid, N - not-found VPN-Instance vpn1, Router ID 9.9.9.9: Total Number of Routes: 19 *> Network : :: PrefixLen : 0 NextHop : :: LocPrf : MED : 0 PrefVal : 32768 Label : Path/Ogn : i * i NextHop : ::FFFF:9.9.9.9 LocPrf : 100 MED : 0 PrefVal : 0 Label : 200/NULL Path/Ogn : i *> Network : 2001:DB8:1:: PrefixLen : 64 NextHop : :: LocPrf : MED : 0 PrefVal : 0 Label : Path/Ogn : ? *> Network : 2001:DB8:1::1 PrefixLen : 128 NextHop : :: LocPrf : MED : 0 PrefVal : 0 Label : Path/Ogn : ? *> Network : 2001:DB8:2:: PrefixLen : 64 NextHop : :: LocPrf : MED : 0 PrefVal : 0 Label : Path/Ogn : ? *> Network : 2001:DB8:2::1 PrefixLen : 128 NextHop : :: LocPrf : MED : 0 PrefVal : 0 Label : Path/Ogn : ? *> Network : 2001:DB8:3:: PrefixLen : 64 NextHop : :: LocPrf : MED : 0 PrefVal : 0 Label : Path/Ogn : ? *> Network : 2001:DB8:3::1 PrefixLen : 128 NextHop : :: LocPrf : MED : 0 PrefVal : 0 Label : Path/Ogn : ? *> Network : 2001:DB8:4:: PrefixLen : 64 NextHop : :: LocPrf : MED : 0 PrefVal : 0 Label : Path/Ogn : ? *> Network : 2001:DB8:4::1 PrefixLen : 128 NextHop : :: LocPrf : MED : 0 PrefVal : 0 Label : Path/Ogn : ? *>i Network : 2001:DB8:5::5 PrefixLen : 128 NextHop : ::FFFF:1.1.1.1 LocPrf : 100 MED : 0 PrefVal : 0 Label : Path/Ogn : ? * i NextHop : ::FFFF:1.1.1.1 LocPrf : 100 MED : 0 PrefVal : 0 Label : Path/Ogn : ? *>i Network : 2001:DB8:6::6 PrefixLen : 128 NextHop : ::FFFF:1.1.1.1 LocPrf : 100 MED : 0 PrefVal : 0 Label : Path/Ogn : ? * i NextHop : ::FFFF:2.2.2.2 LocPrf : 100 MED : 0 PrefVal : 0 Label : Path/Ogn : ? * i NextHop : ::FFFF:2.2.2.2 LocPrf : 100 MED : 0 PrefVal : 0 Label : Path/Ogn : ? *> Network : 2001:DB8:10::10 PrefixLen : 128 NextHop : 2001:DB8:5::5 LocPrf : MED : 0 PrefVal : 0 Label : Path/Ogn : ? *> Network : 2001:DB8:33::33 PrefixLen : 128 NextHop : :: LocPrf : MED : 0 PrefVal : 0 Label : Path/Ogn : ? *>i Network : 2001:DB8:44::44 PrefixLen : 128 NextHop : ::FFFF:9.9.9.9 LocPrf : 100 MED : 0 PrefVal : 0 Label : 200/NULL Path/Ogn : ? *> Network : FE80:: PrefixLen : 10 NextHop : :: LocPrf : MED : 0 PrefVal : 0 Label : Path/Ogn : ?
在DCGW上执行display ipv6 routing-table vpn-instance vpn1命令可以看到DCGW的私网路由表中的手机路由信息,且该路由出接口为VBDIF接口。
[~DCGW] display ipv6 routing-table vpn-instance vpn1
Routing Table : vpn1 Destinations : 15 Routes : 19 Destination : :: PrefixLength : 0 NextHop : :: Preference : 60 Cost : 0 Protocol : Static RelayNextHop : :: TunnelID : 0x0 Interface : NULL0 Flags : DB Destination : 2001:DB8:1:: PrefixLength : 64 NextHop : 2001:DB8:1::1 Preference : 0 Cost : 0 Protocol : Direct RelayNextHop : :: TunnelID : 0x0 Interface : Vbdif10 Flags : D Destination : 2001:DB8:1::1 PrefixLength : 128 NextHop : ::1 Preference : 0 Cost : 0 Protocol : Direct RelayNextHop : :: TunnelID : 0x0 Interface : Vbdif10 Flags : D Destination : 2001:DB8:2:: PrefixLength : 64 NextHop : 2001:DB8:2::1 Preference : 0 Cost : 0 Protocol : Direct RelayNextHop : :: TunnelID : 0x0 Interface : Vbdif20 Flags : D Destination : 2001:DB8:2::1 PrefixLength : 128 NextHop : ::1 Preference : 0 Cost : 0 Protocol : Direct RelayNextHop : :: TunnelID : 0x0 Interface : Vbdif20 Flags : D Destination : 2001:DB8:3:: PrefixLength : 64 NextHop : 2001:DB8:3::1 Preference : 0 Cost : 0 Protocol : Direct RelayNextHop : :: TunnelID : 0x0 Interface : Vbdif30 Flags : D Destination : 2001:DB8:3::1 PrefixLength : 128 NextHop : ::1 Preference : 0 Cost : 0 Protocol : Direct RelayNextHop : :: TunnelID : 0x0 Interface : Vbdif30 Flags : D Destination : 2001:DB8:4:: PrefixLength : 64 NextHop : 2001:DB8:4::1 Preference : 0 Cost : 0 Protocol : Direct RelayNextHop : :: TunnelID : 0x0 Interface : Vbdif40 Flags : D Destination : 2001:DB8:4::1 PrefixLength : 128 NextHop : ::1 Preference : 0 Cost : 0 Protocol : Direct RelayNextHop : :: TunnelID : 0x0 Interface : Vbdif40 Flags : D Destination : 2001:DB8:5::5 PrefixLength : 128 NextHop : 2001:DB8:2::2 Preference : 255 Cost : 0 Protocol : IBGP RelayNextHop : 2001:DB8:2::2 TunnelID : 0x0 Interface : Vbdif20 Flags : RD Destination : 2001:DB8:5::5 PrefixLength : 128 NextHop : 2001:DB8:1::2 Preference : 255 Cost : 0 Protocol : IBGP RelayNextHop : 2001:DB8:1::2 TunnelID : 0x0 Interface : Vbdif10 Flags : RD Destination : 2001:DB8:6::6 PrefixLength : 128 NextHop : 2001:DB8:1::3 Preference : 255 Cost : 0 Protocol : IBGP RelayNextHop : 2001:DB8:1::3 TunnelID : 0x0 Interface : Vbdif10 Flags : RD Destination : 2001:DB8:6::6 PrefixLength : 128 NextHop : 2001:DB8:4::2 Preference : 255 Cost : 0 Protocol : IBGP RelayNextHop : 2001:DB8:4::2 TunnelID : 0x0 Interface : Vbdif40 Flags : RD Destination : 2001:DB8:6::6 PrefixLength : 128 NextHop : 2001:DB8:3::2 Preference : 255 Cost : 0 Protocol : IBGP RelayNextHop : 2001:DB8:3::2 TunnelID : 0x0 Interface : Vbdif30 Flags : RD Destination : 2001:DB8:10::10 PrefixLength : 128 NextHop : 2001:DB8:5::5 Preference : 0 Cost : 0 Protocol : IBGP RelayNextHop : :: TunnelID : 0x0 Interface : Vbdif10 Flags : D Destination : 2001:DB8:10::10 PrefixLength : 128 NextHop : 2001:DB8:5::5 Preference : 0 Cost : 0 Protocol : IBGP RelayNextHop : :: TunnelID : 0x0 Interface : Vbdif20 Flags : D Destination : 2001:DB8:33::33 PrefixLength : 128 NextHop : ::1 Preference : 0 Cost : 0 Protocol : Direct RelayNextHop : :: TunnelID : 0x0 Interface : LoopBack2 Flags : D Destination : 2001:DB8:44::44 PrefixLength : 128 NextHop : ::FFFF:4.4.4.4 Preference : 255 Cost : 0 Protocol : IBGP RelayNextHop : :: TunnelID : 0x0000000027f0000001 Interface : VXLAN Flags : RD Destination : FE80:: PrefixLength : 10 NextHop : :: Preference : 0 Cost : 0 Protocol : Direct RelayNextHop : :: TunnelID : 0x0 Interface : NULL0 Flags : DB
配置文件
DCGW1的配置文件
# sysname DCGW1 # evpn bypass-vxlan enable # evpn vpn-instance evrf1 bd-mode route-distinguisher 1:1 vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity # evpn vpn-instance evrf2 bd-mode route-distinguisher 2:2 vpn-target 2:2 export-extcommunity vpn-target 2:2 import-extcommunity # evpn vpn-instance evrf3 bd-mode route-distinguisher 3:3 vpn-target 3:3 export-extcommunity vpn-target 3:3 import-extcommunity # evpn vpn-instance evrf4 bd-mode route-distinguisher 4:4 vpn-target 4:4 export-extcommunity vpn-target 4:4 import-extcommunity # ip vpn-instance vpn1 ipv6-family route-distinguisher 11:11 apply-label per-instance export route-policy dp evpn vpn-target 11:1 export-extcommunity evpn vpn-target 11:1 import-extcommunity evpn vxlan vni 200 # bridge-domain 10 vxlan vni 100 split-horizon-mode evpn binding vpn-instance evrf1 # bridge-domain 20 vxlan vni 110 split-horizon-mode evpn binding vpn-instance evrf2 # bridge-domain 30 vxlan vni 120 split-horizon-mode evpn binding vpn-instance evrf3 # bridge-domain 40 vxlan vni 130 split-horizon-mode evpn binding vpn-instance evrf4 # interface Vbdif10 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:1::1/64 mac-address 00e0-fc00-0002 ipv6 nd generate-rd-table enable vxlan anycast-gateway enable # interface Vbdif20 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:2::1/64 mac-address 00e0-fc00-0003 ipv6 nd generate-rd-table enable vxlan anycast-gateway enable # interface Vbdif30 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:3::1/64 mac-address 00e0-fc00-0001 ipv6 nd generate-rd-table enable vxlan anycast-gateway enable # interface Vbdif40 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:4::1/64 mac-address 00e0-fc00-0004 ipv6 nd generate-rd-table enable vxlan anycast-gateway enable # interface GigabitEthernet0/1/1 undo shutdown ip address 10.6.1.1 255.255.255.0 # interface GigabitEthernet0/1/2 undo shutdown ip address 10.6.2.1 255.255.255.0 # interface LoopBack0 ip address 9.9.9.9 255.255.255.255 # interface LoopBack1 ip address 3.3.3.3 255.255.255.255 # interface LoopBack2 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:33::33/128 # interface Nve1 source 9.9.9.9 bypass source 3.3.3.3 mac-address 00e0-fc00-0009 vni 100 head-end peer-list protocol bgp vni 110 head-end peer-list protocol bgp vni 120 head-end peer-list protocol bgp vni 130 head-end peer-list protocol bgp # bgp 100 peer 1.1.1.1 as-number 100 peer 1.1.1.1 connect-interface LoopBack1 peer 2.2.2.2 as-number 100 peer 2.2.2.2 connect-interface LoopBack1 peer 4.4.4.4 as-number 100 peer 4.4.4.4 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 1.1.1.1 enable peer 2.2.2.2 enable peer 4.4.4.4 enable # ipv6-family vpn-instance vpn1 network :: 0 import-route direct maximum load-balancing 16 advertise l2vpn evpn peer 2001:db8:5::5 as-number 100 peer 2001:db8:5::5 connect-interface LoopBack2 peer 2001:db8:5::5 route-policy p1 export peer 2001:db8:6::6 as-number 100 peer 2001:db8:6::6 connect-interface LoopBack2 peer 2001:db8:6::6 route-policy p1 export # l2vpn-family evpn undo policy vpn-target peer 1.1.1.1 enable peer 1.1.1.1 capability-advertise add-path both peer 1.1.1.1 advertise add-path path-number 16 peer 1.1.1.1 advertise encap-type vxlan peer 2.2.2.2 enable peer 2.2.2.2 capability-advertise add-path both peer 2.2.2.2 advertise add-path path-number 16 peer 2.2.2.2 advertise encap-type vxlan peer 4.4.4.4 enable peer 4.4.4.4 advertise encap-type vxlan peer 4.4.4.4 route-policy stopuIP export # ospf 1 area 0.0.0.0 network 3.3.3.3 0.0.0.0 network 9.9.9.9 0.0.0.0 network 10.6.1.0 0.0.0.255 network 10.6.2.0 0.0.0.255 # route-policy dp permit node 10 if-match tag 2000 # route-policy dp permit node 15 if-match ipv6 address prefix-list lp # route-policy dp deny node 20 # route-policy p1 deny node 10 # route-policy stopuIP deny node 10 if-match ipv6 address prefix-list uIP # route-policy stopuIP permit node 20 # ip ipv6-prefix lp index 10 permit 2001:db8:33::33 128 ip ipv6-prefix uIP index 10 permit 2001:DB8:10::10 128 # ipv6 route-static vpn-instance vpn1 :: 0 NULL0 tag 2000 # return
DCGW2的配置文件
# sysname DCGW2 # evpn bypass-vxlan enable # evpn vpn-instance evrf1 bd-mode route-distinguisher 1:1 vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity # evpn vpn-instance evrf2 bd-mode route-distinguisher 2:2 vpn-target 2:2 export-extcommunity vpn-target 2:2 import-extcommunity # evpn vpn-instance evrf3 bd-mode route-distinguisher 3:3 vpn-target 3:3 export-extcommunity vpn-target 3:3 import-extcommunity # evpn vpn-instance evrf4 bd-mode route-distinguisher 4:4 vpn-target 4:4 export-extcommunity vpn-target 4:4 import-extcommunity # ip vpn-instance vpn1 ipv6-family route-distinguisher 11:11 apply-label per-instance export route-policy dp evpn vpn-target 11:1 export-extcommunity evpn vpn-target 11:1 import-extcommunity evpn vxlan vni 200 # bridge-domain 10 vxlan vni 100 split-horizon-mode evpn binding vpn-instance evrf1 # bridge-domain 20 vxlan vni 110 split-horizon-mode evpn binding vpn-instance evrf2 # bridge-domain 30 vxlan vni 120 split-horizon-mode evpn binding vpn-instance evrf3 # bridge-domain 40 vxlan vni 130 split-horizon-mode evpn binding vpn-instance evrf4 # interface Vbdif10 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:1::1/64 mac-address 00e0-fc00-0002 ipv6 nd generate-rd-table enable vxlan anycast-gateway enable # interface Vbdif20 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:2::1/64 mac-address 00e0-fc00-0003 ipv6 nd generate-rd-table enable vxlan anycast-gateway enable # interface Vbdif30 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:3::1/64 mac-address 00e0-fc00-0001 ipv6 nd generate-rd-table enable vxlan anycast-gateway enable # interface Vbdif40 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:4::1/64 mac-address 00e0-fc00-0004 ipv6 nd generate-rd-table enable vxlan anycast-gateway enable # interface GigabitEthernet0/1/1 undo shutdown ip address 10.6.1.2 255.255.255.0 # interface GigabitEthernet0/1/2 undo shutdown ip address 10.6.3.1 255.255.255.0 # interface LoopBack0 ip address 9.9.9.9 255.255.255.255 # interface LoopBack1 ip address 4.4.4.4 255.255.255.255 # interface LoopBack2 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:44::44 128 # interface Nve1 source 9.9.9.9 bypass source 4.4.4.4 mac-address 00e0-fc00-0009 vni 100 head-end peer-list protocol bgp vni 110 head-end peer-list protocol bgp vni 120 head-end peer-list protocol bgp vni 130 head-end peer-list protocol bgp # bgp 100 peer 1.1.1.1 as-number 100 peer 1.1.1.1 connect-interface LoopBack1 peer 2.2.2.2 as-number 100 peer 2.2.2.2 connect-interface LoopBack1 peer 3.3.3.3 as-number 100 peer 3.3.3.3 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 1.1.1.1 enable peer 2.2.2.2 enable peer 3.3.3.3 enable # ipv6-family vpn-instance vpn1 network :: 0 import-route direct maximum load-balancing 16 advertise l2vpn evpn peer 2001:db8:5::5 as-number 100 peer 2001:db8:5::5 connect-interface LoopBack2 peer 2001:db8:5::5 route-policy p1 export peer 2001:db8:6::6 as-number 100 peer 2001:db8:6::6 connect-interface LoopBack2 peer 2001:db8:6::6 route-policy p1 export # l2vpn-family evpn undo policy vpn-target peer 1.1.1.1 enable peer 1.1.1.1 capability-advertise add-path both peer 1.1.1.1 advertise add-path path-number 16 peer 1.1.1.1 advertise encap-type vxlan peer 2.2.2.2 enable peer 2.2.2.2 capability-advertise add-path both peer 2.2.2.2 advertise add-path path-number 16 peer 2.2.2.2 advertise encap-type vxlan peer 3.3.3.3 enable peer 3.3.3.3 advertise encap-type vxlan peer 3.3.3.3 route-policy stopuIP export # ospf 1 area 0.0.0.0 network 4.4.4.4 0.0.0.0 network 9.9.9.9 0.0.0.0 network 10.6.1.0 0.0.0.255 network 10.6.3.0 0.0.0.255 # route-policy dp permit node 10 if-match tag 2000 # route-policy dp permit node 15 if-match ipv6 address prefix-list lp # route-policy dp deny node 20 # route-policy p1 deny node 10 # route-policy stopuIP deny node 10 if-match ipv6 address prefix-list uIP # route-policy stopuIP permit node 20 # ip ipv6-prefix lp index 10 permit 2001:db8:44::44 128 ip ipv6-prefix uIP index 10 permit 2001:DB8:10::10 128 # ipv6 route-static vpn-instance vpn1 :: 0 NULL0 tag 2000 # return
L2GW/L3GW1的配置文件
# sysname L2GW/L3GW1 # evpn vpn-instance evrf1 bd-mode route-distinguisher 1:1 vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity # evpn vpn-instance evrf2 bd-mode route-distinguisher 2:2 vpn-target 2:2 export-extcommunity vpn-target 2:2 import-extcommunity # evpn vpn-instance evrf3 bd-mode route-distinguisher 3:3 vpn-target 3:3 export-extcommunity vpn-target 3:3 import-extcommunity # evpn vpn-instance evrf4 bd-mode route-distinguisher 4:4 vpn-target 4:4 export-extcommunity vpn-target 4:4 import-extcommunity # ip vpn-instance vpn1 ipv6-family route-distinguisher 11:11 apply-label per-instance export route-policy sp evpn vpn-target 11:1 export-extcommunity evpn vpn-target 11:1 import-extcommunity evpn vxlan vni 200 # bridge-domain 10 vxlan vni 100 split-horizon-mode evpn binding vpn-instance evrf1 # bridge-domain 20 vxlan vni 110 split-horizon-mode evpn binding vpn-instance evrf2 # bridge-domain 30 vxlan vni 120 split-horizon-mode evpn binding vpn-instance evrf3 # bridge-domain 40 vxlan vni 130 split-horizon-mode evpn binding vpn-instance evrf4 # interface Vbdif10 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:1::1/64 mac-address 00e0-fc00-0002 ipv6 nd collect host enable ipv6 nd generate-rd-table enable vxlan anycast-gateway enable # interface Vbdif20 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:2::1/64 mac-address 00e0-fc00-0003 ipv6 nd collect host enable ipv6 nd generate-rd-table enable vxlan anycast-gateway enable # interface Vbdif30 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:3::1/64 mac-address 00e0-fc00-0001 ipv6 nd collect host enable ipv6 nd generate-rd-table enable vxlan anycast-gateway enable # interface Vbdif40 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:4::1/64 mac-address 00e0-fc00-0004 ipv6 nd collect host enable ipv6 nd generate-rd-table enable vxlan anycast-gateway enable # interface GigabitEthernet0/1/1 undo shutdown ip address 10.6.4.1 255.255.255.0 # interface GigabitEthernet0/1/2 undo shutdown ip address 10.6.2.2 255.255.255.0 # interface GigabitEthernet0/1/3.1 mode l2 encapsulation dot1q vid 10 rewrite pop single bridge-domain 10 # interface GigabitEthernet0/1/4.1 mode l2 encapsulation dot1q vid 20 rewrite pop single bridge-domain 20 # interface GigabitEthernet0/1/5.1 mode l2 encapsulation dot1q vid 10 rewrite pop single bridge-domain 10 # interface LoopBack1 ip address 1.1.1.1 255.255.255.255 # interface Nve1 source 1.1.1.1 vni 100 head-end peer-list protocol bgp vni 110 head-end peer-list protocol bgp vni 120 head-end peer-list protocol bgp vni 130 head-end peer-list protocol bgp # bgp 100 peer 2.2.2.2 as-number 100 peer 2.2.2.2 connect-interface LoopBack1 peer 3.3.3.3 as-number 100 peer 3.3.3.3 connect-interface LoopBack1 peer 4.4.4.4 as-number 100 peer 4.4.4.4 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 2.2.2.2 enable peer 3.3.3.3 enable peer 4.4.4.4 enable # ipv6-family vpn-instance vpn1 import-route static maximum load-balancing 16 advertise l2vpn evpn import-route-multipath # l2vpn-family evpn undo policy vpn-target bestroute add-path path-number 16 peer 2.2.2.2 enable peer 2.2.2.2 advertise nd peer 2.2.2.2 advertise encap-type vxlan peer 3.3.3.3 enable peer 3.3.3.3 advertise nd peer 3.3.3.3 capability-advertise add-path both peer 3.3.3.3 advertise add-path path-number 16 peer 3.3.3.3 advertise encap-type vxlan peer 4.4.4.4 enable peer 4.4.4.4 advertise nd peer 4.4.4.4 capability-advertise add-path both peer 4.4.4.4 advertise add-path path-number 16 peer 4.4.4.4 advertise encap-type vxlan # ospf 1 area 0.0.0.0 network 1.1.1.1 0.0.0.0 network 10.6.2.0 0.0.0.255 network 10.6.4.0 0.0.0.255 # route-policy sp permit node 10 if-match tag 1000 apply ipv6 gateway-ip origin-nexthop # route-policy sp deny node 20 # ipv6 route-static vpn-instance vpn1 2001:db8:5::5 128 2001:db8:1::2 tag 1000 ipv6 route-static vpn-instance vpn1 2001:db8:5::5 128 2001:db8:2::2 tag 1000 ipv6 route-static vpn-instance vpn1 2001:db8:6::6 128 2001:db8:1::3 tag 1000 # return
L2GW/L3GW2的配置文件
# sysname L2GW/L3GW2 # evpn vpn-instance evrf1 bd-mode route-distinguisher 1:1 vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity # evpn vpn-instance evrf2 bd-mode route-distinguisher 2:2 vpn-target 2:2 export-extcommunity vpn-target 2:2 import-extcommunity # evpn vpn-instance evrf3 bd-mode route-distinguisher 3:3 vpn-target 3:3 export-extcommunity vpn-target 3:3 import-extcommunity # evpn vpn-instance evrf4 bd-mode route-distinguisher 4:4 vpn-target 4:4 export-extcommunity vpn-target 4:4 import-extcommunity # ip vpn-instance vpn1 ipv6-family route-distinguisher 11:11 apply-label per-instance export route-policy sp evpn vpn-target 11:1 export-extcommunity evpn vpn-target 11:1 import-extcommunity evpn vxlan vni 200 # bridge-domain 10 vxlan vni 100 split-horizon-mode evpn binding vpn-instance evrf1 # bridge-domain 20 vxlan vni 110 split-horizon-mode evpn binding vpn-instance evrf2 # bridge-domain 30 vxlan vni 120 split-horizon-mode evpn binding vpn-instance evrf3 # bridge-domain 40 vxlan vni 130 split-horizon-mode evpn binding vpn-instance evrf4 # interface Vbdif10 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:1::1/64 mac-address 00e0-fc00-0002 ipv6 nd collect host enable ipv6 nd generate-rd-table enable vxlan anycast-gateway enable # interface Vbdif20 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:2::1/64 mac-address 00e0-fc00-0003 ipv6 nd collect host enable ipv6 nd generate-rd-table enable vxlan anycast-gateway enable # interface Vbdif30 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:3::1/64 mac-address 00e0-fc00-0001 ipv6 nd collect host enable ipv6 nd generate-rd-table enable vxlan anycast-gateway enable # interface Vbdif40 ip binding vpn-instance vpn1 ipv6 enable ipv6 address 2001:db8:4::1/64 mac-address 00e0-fc00-0004 ipv6 nd collect host enable ipv6 nd generate-rd-table enable vxlan anycast-gateway enable # interface GigabitEthernet0/1/1 undo shutdown ip address 10.6.4.2 255.255.255.0 # interface GigabitEthernet0/1/2 undo shutdown ip address 10.6.3.2 255.255.255.0 # interface GigabitEthernet0/1/3.1 mode l2 encapsulation dot1q vid 30 rewrite pop single bridge-domain 30 # interface GigabitEthernet0/1/4.1 mode l2 encapsulation dot1q vid 40 rewrite pop single bridge-domain 40 # interface LoopBack1 ip address 2.2.2.2 255.255.255.255 # interface Nve1 source 2.2.2.2 vni 100 head-end peer-list protocol bgp vni 110 head-end peer-list protocol bgp vni 120 head-end peer-list protocol bgp vni 130 head-end peer-list protocol bgp # bgp 100 peer 1.1.1.1 as-number 100 peer 1.1.1.1 connect-interface LoopBack1 peer 3.3.3.3 as-number 100 peer 3.3.3.3 connect-interface LoopBack1 peer 4.4.4.4 as-number 100 peer 4.4.4.4 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 1.1.1.1 enable peer 3.3.3.3 enable peer 4.4.4.4 enable # ipv6-family vpn-instance vpn1 import-route static maximum load-balancing 16 advertise l2vpn evpn import-route-multipath # l2vpn-family evpn undo policy vpn-target bestroute add-path path-number 16 peer 1.1.1.1 enable peer 1.1.1.1 advertise nd peer 1.1.1.1 advertise encap-type vxlan peer 3.3.3.3 enable peer 3.3.3.3 advertise nd peer 3.3.3.3 capability-advertise add-path both peer 3.3.3.3 advertise add-path path-number 16 peer 3.3.3.3 advertise encap-type vxlan peer 4.4.4.4 enable peer 4.4.4.4 advertise nd peer 4.4.4.4 capability-advertise add-path both peer 4.4.4.4 advertise add-path path-number 16 peer 4.4.4.4 advertise encap-type vxlan # ospf 1 area 0.0.0.0 network 2.2.2.2 0.0.0.0 network 10.6.3.0 0.0.0.255 network 10.6.4.0 0.0.0.255 # route-policy sp permit node 10 if-match tag 1000 apply ipv6 gateway-ip origin-nexthop # route-policy sp deny node 20 # ipv6 route-static vpn-instance vpn1 2001:db8:6::6 128 2001:db8:3::2 tag 1000 ipv6 route-static vpn-instance vpn1 2001:db8:6::6 128 2001:db8:4::2 tag 1000 # return
VNF1的配置文件
请参考对应产品形态设备的配置文件。
VNF2的配置文件
请参考对应产品形态设备的配置文件。