华为运营商级路由器配置示例 | EVdPdNd VPLS over SRv6 BE(CE双归接入)
作者:互联网
组网需求
如图1所示,CE2和CE3同时双归接入到PE2和PE3。要求CE1发往CE2的流量采用负载分担方式进行传输,而CE1发往CE3的流量采用非负载分担方式进行传输。
为了实现上述需求,可以基于ESI粒度设置冗余模式,即,配置CE2接入PE的冗余模式为多活跃模式,配置CE3接入PE的冗余模式设置为单活跃模式。
图1 配置EVPN VPLS over SRv6 BE(CE双归接入)组网图
配置思路
- 使能PE各接口的IPv6转发能力,配置各接口的IPv6地址。
- 在各PE上使能IS-IS,配置Level级别,指定网络实体。
- 在PE设备上配置BD模式的EVPN实例
- 在PE设备之间建立BGP EVPN对等体关系。
- 在PE设备上配置SRv6 BE。
- 在PE设备上配置将相应的BD绑定到接入侧子接口。
- 在PE上配置基于ESI粒度设置冗余模式。
- 配置CE接入PE。
操作步骤
1.使能各接口的IPv6转发能力,配置IPv6地址
<HUAWEI> system-view
[~HUAWEI] sysname PE1
[*HUAWEI] commit
[~PE1] interface gigabitethernet 1/0/0
[~PE1-GigabitEthernet1/0/0] ipv6 enable
[*PE1-GigabitEthernet1/0/0] ipv6 address 2001:DB8:10::1 64
[*PE1-GigabitEthernet1/0/0] quit
[*PE1] interface gigabitethernet 2/0/0
[*PE1-GigabitEthernet2/0/0] ipv6 enable
[*PE1-GigabitEthernet2/0/0] ipv6 address 2001:DB8:20::1 64
[*PE1-GigabitEthernet2/0/0] quit
[*PE1] interface LoopBack 1
[*PE1-LoopBack1] ip address 1.1.1.1 32
[*PE1-LoopBack1] ipv6 enable
[*PE1-LoopBack1] ipv6 address 2001:DB8:1::1 128
[*PE1-LoopBack1] quit
[*PE1] commit
由于需要为EVPN源地址准备IPv4地址,因此这里Loopback接口还需配置IPv4地址。这里以PE1为例,其他设备的配置过程相同,详情可参考配置文件。
2.配置IS-IS
# 配置PE1。
[~PE1] isis 1
[*PE1-isis-1] is-level level-1
[*PE1-isis-1] cost-style wide
[*PE1-isis-1] network-entity 10.0000.0000.0001.00
[*PE1-isis-1] ipv6 enable topology ipv6
[*PE1-isis-1] quit
[*PE1] interface gigabitethernet 1/0/0
[*PE1-GigabitEthernet1/0/0] isis ipv6 enable 1
[*PE1-GigabitEthernet1/0/0] quit
[*PE1] interface gigabitethernet 2/0/0
[*PE1-GigabitEthernet2/0/0] isis ipv6 enable 1
[*PE1-GigabitEthernet2/0/0] quit
[*PE1] interface loopback1
[*PE1-LoopBack1] isis ipv6 enable 1
[*PE1-LoopBack1] commit
[~PE1-LoopBack1] quit
# 配置PE2。
[~PE2] isis 1
[*PE2-isis-1] is-level level-1
[*PE2-isis-1] cost-style wide
[*PE2-isis-1] network-entity 10.0000.0000.0002.00
[*PE2-isis-1] ipv6 enable topology ipv6
[*PE2-isis-1] quit
[*PE2] interface gigabitethernet 1/0/0
[*PE2-GigabitEthernet1/0/0] isis ipv6 enable 1
[*PE2-GigabitEthernet1/0/0] quit
[*PE2] interface gigabitethernet 2/0/0
[*PE2-GigabitEthernet2/0/0] isis ipv6 enable 1
[*PE2-GigabitEthernet2/0/0] quit
[*PE2] interface loopback1
[*PE2-LoopBack1] isis ipv6 enable 1
[*PE2-LoopBack1] commit
[~PE2-LoopBack1] quit
# 配置PE3。
[~PE3] isis 1
[*PE3-isis-1] is-level level-1
[*PE3-isis-1] cost-style wide
[*PE3-isis-1] network-entity 10.0000.0000.0003.00
[*PE3-isis-1] ipv6 enable topology ipv6
[*PE3-isis-1] quit
[*PE3] interface gigabitethernet 1/0/0
[*PE3-GigabitEthernet1/0/0] isis ipv6 enable 1
[*PE3-GigabitEthernet1/0/0] quit
[*PE3] interface gigabitethernet 2/0/0
[*PE3-GigabitEthernet2/0/0] isis ipv6 enable 1
[*PE3-GigabitEthernet2/0/0] quit
[*PE3] interface loopback1
[*PE3-LoopBack1] isis ipv6 enable 1
[*PE3-LoopBack1] commit
[~PE3-LoopBack1] quit
配置完成后,可以执行display isis peer和display isis route命令检查IS-IS是否配置成功。以PE1为例:
[~PE1] display isis peer
Peer information for ISIS(1)
System Id Interface Circuit Id State HoldTime Type PRI
--------------------------------------------------------------------------------
0000.0000.0003* GE2/0/0 0000.0000.0003.02 Up 8s L1 64
0000.0000.0002* GE1/0/0 0000.0000.0002.02 Up 6s L1 64
Total Peer(s): 2
3.在PE设备上配置BD模式的EVPN实例
# 配置PE1。
[~PE1] evpn source-address 1.1.1.1
[*PE1] evpn vpn-instance evrf1 bd-mode
[*PE1-evpn-instance-evrf1] route-distinguisher 100:1
[*PE1-evpn-instance-evrf1] vpn-target 1:1
[*PE1-evpn-instance-evrf1] quit
[*PE1] bridge-domain 10
[*PE1-bd10] evpn binding vpn-instance evrf1
[*PE1-bd10] quit
[*PE1] evpn vpn-instance evrf2 bd-mode
[*PE1-evpn-instance-evrf2] route-distinguisher 200:1
[*PE1-evpn-instance-evrf2] vpn-target 2:2
[*PE1-evpn-instance-evrf2] quit
[*PE1] bridge-domain 20
[*PE1-bd20] evpn binding vpn-instance evrf2
[*PE1-bd20] quit
[*PE1] commit
4.在PE设备之间建立BGP EVPN对等体关系
# 配置PE1。
[~PE1] bgp 100
[*PE1-bgp] router-id 1.1.1.1
[*PE1-bgp] peer 2001:DB8:3::3 as-number 100
[*PE1-bgp] peer 2001:DB8:3::3 connect-interface loopback 1
[*PE1-bgp] peer 2001:DB8:2::2 as-number 100
[*PE1-bgp] peer 2001:DB8:2::2 connect-interface loopback 1
[*PE1-bgp] l2vpn-family evpn
[*PE1-bgp-af-evpn] peer 2001:DB8:3::3 enable
[*PE1-bgp-af-evpn] peer 2001:DB8:3::3 advertise encap-type srv6
[*PE1-bgp-af-evpn] peer 2001:DB8:2::2 enable
[*PE1-bgp-af-evpn] peer 2001:DB8:2::2 advertise encap-type srv6
[*PE1-bgp-af-evpn] quit
[*PE1-bgp] quit
[*PE1] commit
# 配置PE2。
[~PE2] bgp 100
[*PE2-bgp] router-id 2.2.2.2
[*PE2-bgp] peer 2001:DB8:1::1 as-number 100
[*PE2-bgp] peer 2001:DB8:1::1 connect-interface loopback 1
[*PE2-bgp] peer 2001:DB8:3::3 as-number 100
[*PE2-bgp] peer 2001:DB8:3::3 connect-interface loopback 1
[*PE2-bgp] l2vpn-family evpn
[*PE2-bgp-af-evpn] peer 2001:DB8:1::1 enable
[*PE2-bgp-af-evpn] peer 2001:DB8:1::1 advertise encap-type srv6
[*PE2-bgp-af-evpn] peer 2001:DB8:3::3 enable
[*PE2-bgp-af-evpn] peer 2001:DB8:3::3 advertise encap-type srv6
[*PE2-bgp-af-evpn] quit
[*PE2-bgp] quit
[*PE2] commit
# 配置PE3。
[~PE3] bgp 100
[*PE3-bgp] router-id 3.3.3.3
[*PE3-bgp] peer 2001:DB8:1::1 as-number 100
[*PE3-bgp] peer 2001:DB8:1::1 connect-interface loopback 1
[*PE3-bgp] peer 2001:DB8:3::3 as-number 100
[*PE3-bgp] peer 2001:DB8:2::2 connect-interface loopback 1
[*PE3-bgp] l2vpn-family evpn
[*PE3-bgp-af-evpn] peer 2001:DB8:1::1 enable
[*PE3-bgp-af-evpn] peer 2001:DB8:1::1 advertise encap-type srv6
[*PE3-bgp-af-evpn] peer 2001:DB8:2::2 enable
[*PE3-bgp-af-evpn] peer 2001:DB8:2::2 advertise encap-type srv6
[*PE3-bgp-af-evpn] quit
[*PE3-bgp] quit
[*PE3] commit
配置完成后,在PE设备上执行display bgp evpn peer命令,可以看到PE之间的BGP EVPN对等体关系已建立,并达到Established状态。
以PE1的显示为例:
[~PE1] display bgp evpn peer
BGP local router ID : 1.1.1.1
Local AS number : 100
Total number of peers : 2 Peers in established state : 2
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
2001:DB8:2::2 4 100 120 125 0 01:05:04 Established 6
2001:DB8:3::3 4 100 27 27 0 00:12:15 Established 5
5.在PE设备之间建立SRv6 BE
# 配置PE1。
[~PE1] segment-routing ipv6
[*PE1-segment-routing-ipv6] encapsulation source-address 2001:DB8:1::1
[*PE1-segment-routing-ipv6] locator PE1_UNICAST ipv6-prefix 2001:DB8:11:: 64
[*PE1-segment-routing-ipv6-locator] quit
[*PE1-segment-routing-ipv6] locator PE1_BUM ipv6-prefix 2001:DB8:12:: 64 args 10
[*PE1-segment-routing-ipv6-locator] quit
[*PE1-segment-routing-ipv6] quit
[*PE1] isis 1
[*PE1-isis-1] segment-routing ipv6 locator PE1_UNICAST
[*PE1-isis-1] segment-routing ipv6 locator PE1_BUM auto-sid-disable
[*PE1-isis-1] quit
[*PE1] evpn vpn-instance evrf1 bd-mode
[*PE1-evpn-instance-evrf1] segment-routing ipv6 locator PE1_BUM unicast-locator PE1_UNICAST
[*PE1-evpn-instance-evrf1] segment-routing ipv6 best-effort
[*PE1-evpn-instance-evrf1] quit
[*PE1] evpn vpn-instance evrf2 bd-mode
[*PE1-evpn-instance-evrf2] segment-routing ipv6 locator PE1_BUM unicast-locator PE1_UNICAST
[*PE1-evpn-instance-evrf2] segment-routing ipv6 best-effort
[*PE1-evpn-instance-evrf2] quit
[*PE1] commit
# 配置PE2。
[~PE2] segment-routing ipv6
[*PE2-segment-routing-ipv6] encapsulation source-address 2001:DB8:2::2
[*PE2-segment-routing-ipv6] locator PE2_UNICAST ipv6-prefix 2001:DB8:21:: 64
[*PE2-segment-routing-ipv6-locator] quit
[*PE2-segment-routing-ipv6] locator PE2_BUM ipv6-prefix 2001:DB8:22:: 64 args 10
[*PE2-segment-routing-ipv6-locator] quit
[*PE2-segment-routing-ipv6] quit
[*PE2] isis 1
[*PE2-isis-1] segment-routing ipv6 locator PE2_UNICAST
[*PE2-isis-1] segment-routing ipv6 locator PE2_BUM auto-sid-disable
[*PE2-isis-1] quit
[*PE2] evpn vpn-instance evrf1 bd-mode
[*PE2-evpn-instance-evrf1] segment-routing ipv6 locator PE2_BUM unicast-locator PE2_UNICAST
[*PE2-evpn-instance-evrf1] segment-routing ipv6 best-effort
[*PE2-evpn-instance-evrf1] quit
[*PE2] evpn vpn-instance evrf2 bd-mode
[*PE2-evpn-instance-evrf2] segment-routing ipv6 locator PE2_BUM unicast-locator PE2_UNICAST
[*PE2-evpn-instance-evrf2] segment-routing ipv6 best-effort
[*PE2-evpn-instance-evrf2] quit
[*PE2] commit
# 配置PE3。
[~PE3] segment-routing ipv6
[*PE3-segment-routing-ipv6] encapsulation source-address 2001:DB8:3::3
[*PE3-segment-routing-ipv6] locator PE3_UNICAST ipv6-prefix 2001:DB8:31:: 64
[*PE3-segment-routing-ipv6-locator] quit
[*PE3-segment-routing-ipv6] locator PE3_BUM ipv6-prefix 2001:DB8:32:: 64 args 10
[*PE3-segment-routing-ipv6-locator] quit
[*PE3-segment-routing-ipv6] quit
[*PE3] isis 1
[*PE3-isis-1] segment-routing ipv6 locator PE3_UNICAST
[*PE3-isis-1] segment-routing ipv6 locator PE3_BUM auto-sid-disable
[*PE3-isis-1] quit
[*PE3] evpn vpn-instance evrf1 bd-mode
[*PE3-evpn-instance-evrf1] segment-routing ipv6 locator PE3_BUM unicast-locator PE3_UNICAST
[*PE3-evpn-instance-evrf1] segment-routing ipv6 best-effort
[*PE3-evpn-instance-evrf1] quit
[*PE3] evpn vpn-instance evrf2 bd-mode
[*PE3-evpn-instance-evrf2] segment-routing ipv6 locator PE3_BUM unicast-locator PE3_UNICAST
[*PE3-evpn-instance-evrf2] segment-routing ipv6 best-effort
[*PE3-evpn-instance-evrf2] quit
[*PE3] commit
在PE上通过命令display segment-routing ipv6 local-sid { end-dt2u | end-dt2ul | end-dt2m } forwarding,查看SRv6 BE的Local SID表信息。以PE1为例:
[~PE1] display segment-routing ipv6 local-sid end-dt2m forwarding
My Local-SID End.DT2M Forwarding Table
--------------------------------------
SID : 2001:DB8:12::400:0:7800/118 FuncType : End.DT2M
Bridge-domain ID: 10
LocatorName : PE1_BUM LocatorID: 2
SID : 2001:DB8:12::400:0:7C00/118 FuncType : End.DT2M
Bridge-domain ID: 20
LocatorName : PE1_BUM LocatorID: 2
Total SID(s): 2
[~PE1] display segment-routing ipv6 local-sid end-dt2u forwarding
My Local-SID End.DT2U Forwarding Table
--------------------------------------
SID : 2001:DB8:11::1:0:20/128 FuncType : End.DT2U
Bridge-domain ID: 10
LocatorName : PE1_UNICAST LocatorID: 1
SID : 2001:DB8:11::1:0:22/128 FuncType : End.DT2U
Bridge-domain ID: 20
LocatorName : PE1_UNICAST LocatorID: 1
Total SID(s): 2
6.在PE设备上配置相应的BD绑定到接入侧子接口
# 配置PE1。
[~PE1] interface gigabitethernet 3/0/0.1 mode l2
[*PE1-GigabitEthernet3/0/0.1] encapsulation dot1q vid 10
[*PE1-GigabitEthernet3/0/0.1] rewrite pop single
[*PE1-GigabitEthernet3/0/0.1] bridge-domain 10
[*PE1-GigabitEthernet3/0/0.1] quit
[*PE1] interface gigabitethernet 3/0/0.2 mode l2
[*PE1-GigabitEthernet3/0/0.2] encapsulation dot1q vid 20
[*PE1-GigabitEthernet3/0/0.2] rewrite pop single
[*PE1-GigabitEthernet3/0/0.2] bridge-domain 20
[*PE1-GigabitEthernet3/0/0.2] quit
[*PE1] commit
# 配置PE2。
[~PE2] e-trunk 1
[*PE2-e-trunk-1] priority 10
[*PE2-e-trunk-1] peer-ipv6 2001:DB8:3::3 source-ipv6 2001:DB8:2::2
[*PE2-e-trunk-1] security-key cipher 00E0FC000000
[*PE2-e-trunk-1] quit
[*PE2] e-trunk 2
[*PE2-e-trunk-2] priority 10
[*PE2-e-trunk-2] peer-ipv6 2001:DB8:3::3 source-ipv6 2001:DB8:2::2
[*PE2-e-trunk-1] security-key cipher 00E0FC000011
[*PE2-e-trunk-2] quit
[*PE2] interface eth-trunk 10
[*PE2-Eth-Trunk10] e-trunk 1
[*PE2-Eth-Trunk10] quit
[*PE2] interface eth-trunk 10.1 mode l2
[*PE2-Eth-Trunk10.1] encapsulation dot1q vid 10
[*PE2-Eth-Trunk10.1] rewrite pop single
[*PE2-Eth-Trunk10.1] bridge-domain 10
[*PE2-Eth-Trunk10.1] quit
[*PE2] interface eth-trunk 20
[*PE2-Eth-Trunk20] mode lacp-static
[*PE2-Eth-Trunk20] e-trunk 2
[*PE2-Eth-Trunk20] quit
[*PE2] interface eth-trunk 20.1 mode l2
[*PE2-Eth-Trunk20.1] encapsulation dot1q vid 20
[*PE2-Eth-Trunk20.1] rewrite pop single
[*PE2-Eth-Trunk20.1] bridge-domain 20
[*PE2-Eth-Trunk20.1] quit
[*PE2] interface gigabitethernet 3/0/0
[*PE2-GigabitEthernet3/0/0] eth-trunk 10
[*PE2-GigabitEthernet3/0/0] quit
[*PE2] interface gigabitethernet 4/0/0
[*PE2-GigabitEthernet4/0/0] eth-trunk 20
[*PE2-GigabitEthernet4/0/0] quit
[*PE2] commit
# 配置PE3。
[~PE3] e-trunk 1
[*PE3-e-trunk-1] priority 10
[*PE3-e-trunk-1] peer-ipv6 2001:DB8:2::2 source-ipv6 2001:DB8:3::3
[*PE3-e-trunk-1] security-key cipher 00E0FC000000
[*PE3-e-trunk-1] quit
[*PE3] e-trunk 2
[*PE3-e-trunk-2] priority 10
[*PE3-e-trunk-2] peer-ipv6 2001:DB8:2::2 source-ipv6 2001:DB8:3::3
[*PE3-e-trunk-1] security-key cipher 00E0FC000011
[*PE3-e-trunk-2] quit
[*PE3] interface eth-trunk 10
[*PE3-Eth-Trunk10] e-trunk 1
[*PE3-Eth-Trunk10] quit
[*PE3] interface eth-trunk 10.1 mode l2
[*PE3-Eth-Trunk10.1] encapsulation dot1q vid 10
[*PE3-Eth-Trunk10.1] rewrite pop single
[*PE3-Eth-Trunk10.1] bridge-domain 10
[*PE3-Eth-Trunk10.1] quit
[*PE3] interface eth-trunk 20
[*PE3-Eth-Trunk20] mode lacp-static
[*PE3-Eth-Trunk20] e-trunk 2
[*PE3-Eth-Trunk20] quit
[*PE3] interface eth-trunk 20.1 mode l2
[*PE3-Eth-Trunk20.1] encapsulation dot1q vid 20
[*PE3-Eth-Trunk20.1] rewrite pop single
[*PE3-Eth-Trunk20.1] bridge-domain 20
[*PE3-Eth-Trunk20.1] quit
[*PE3] interface gigabitethernet 3/0/0
[*PE3-GigabitEthernet3/0/0] eth-trunk 10
[*PE3-GigabitEthernet3/0/0] quit
[*PE3] interface gigabitethernet 4/0/0
[*PE3-GigabitEthernet4/0/0] eth-trunk 20
[*PE3-GigabitEthernet4/0/0] quit
[*PE3] commit
7.在PE2和PE3上配置基于ESI粒度设置冗余模式
# 配置PE2。
[~PE2] evpn
[*PE2-evpn] esi 0001.0002.0003.0004.0005
[*PE2-evpn-esi-0001.0002.0003.0004.0005] evpn redundancy-mode all-active
[*PE2-evpn-esi-0001.0002.0003.0004.0005] quit
[*PE2-evpn] esi 0005.0004.0003.0002.0001
[*PE2-evpn-esi-0005.0004.0003.0002.0001] evpn redundancy-mode single-active
[*PE2-evpn-esi-0005.0004.0003.0002.0001] quit
[*PE2-evpn] quit
[*PE2] interface Eth-Trunk 10
[*PE2-Eth-Trunk10] esi 0001.0002.0003.0004.0005
[*PE2-Eth-Trunk10] e-trunk mode force-master
[*PE2-Eth-Trunk10] quit
[*PE2] interface Eth-Trunk 20
[*PE2-Eth-Trunk20] esi 0005.0004.0003.0002.0001
[*PE2-Eth-Trunk20] e-trunk mode auto
[*PE2-Eth-Trunk20] quit
[*PE2] commit
# 配置PE3。
[~PE3] evpn
[*PE3-evpn] esi 0001.0002.0003.0004.0005
[*PE3-evpn-esi-0001.0002.0003.0004.0005] evpn redundancy-mode all-active
[*PE3-evpn-esi-0001.0002.0003.0004.0005] quit
[*PE3-evpn] esi 0005.0004.0003.0002.0001
[*PE3-evpn-esi-0005.0004.0003.0002.0001] evpn redundancy-mode single-active
[*PE3-evpn-esi-0005.0004.0003.0002.0001] quit
[*PE3-evpn] quit
[*PE3] interface Eth-Trunk 10
[*PE3-Eth-Trunk10] esi 0001.0002.0003.0004.0005
[*PE3-Eth-Trunk10] e-trunk mode force-master
[*PE3-Eth-Trunk10] quit
[*PE3] interface Eth-Trunk 20
[*PE3-Eth-Trunk20] esi 0005.0004.0003.0002.0001
[*PE3-Eth-Trunk20] e-trunk mode auto
[*PE3-Eth-Trunk20] quit
[*PE3] commit
8.配置CE接入PE。
# 配置CE1。
[~CE1] interface gigabitethernet 1/0/0
[~CE1-GigabitEthernet1/0/0] undo shutdown
[*CE1-GigabitEthernet1/0/0] quit
[*CE1] interface gigabitethernet 1/0/0.1
[*CE1-GigabitEthernet1/0/0.1] vlan-type dot1q 10
[*CE1-GigabitEthernet1/0/0.1] ip address 10.1.1.1 255.255.255.0
[*CE1-GigabitEthernet1/0/0.1] quit
[*CE1] interface gigabitethernet 1/0/0.2
[*CE1-GigabitEthernet1/0/0.2] vlan-type dot1q 20
[*CE1-GigabitEthernet1/0/0.2] ip address 10.2.1.1 255.255.255.0
[*CE1-GigabitEthernet1/0/0.2] quit
[*CE1] commit
# 配置CE2。
[~CE2] interface Eth-Trunk10
[*CE2-Eth-Trunk10] quit
[*CE2] interface Eth-Trunk10.1
[*CE2-Eth-Trunk10.1] vlan-type dot1q 10
[*CE2-Eth-Trunk10.1] ip address 10.1.1.2 255.255.255.0
[*CE2-Eth-Trunk10.1] quit
[*CE2] interface gigabitethernet 1/0/0
[*CE2-GigabitEthernet1/0/0] undo shutdown
[*CE2-GigabitEthernet1/0/0] eth-trunk 10
[*CE2-GigabitEthernet1/0/0] quit
[*CE2] interface gigabitethernet 2/0/0
[*CE2-GigabitEthernet2/0/0] undo shutdown
[*CE2-GigabitEthernet2/0/0] eth-trunk 10
[*CE2-GigabitEthernet2/0/0] quit
[*CE2] commit
# 配置CE3。
[~CE3] interface Eth-Trunk20
[*CE3-Eth-Trunk20] quit
[*CE3] interface Eth-Trunk20.1
[*CE3-Eth-Trunk20.1] vlan-type dot1q 20
[*CE3-Eth-Trunk20.1] ip address 10.2.1.2 255.255.255.0
[*CE3-Eth-Trunk20.1] quit
[*CE3] interface gigabitethernet 1/0/0
[*CE3-GigabitEthernet1/0/0] undo shutdown
[*CE3-GigabitEthernet1/0/0] eth-trunk 20
[*CE3-GigabitEthernet1/0/0] quit
[*CE3] interface gigabitethernet 2/0/0
[*CE3-GigabitEthernet2/0/0] undo shutdown
[*CE3-GigabitEthernet2/0/0] eth-trunk 20
[*CE3-GigabitEthernet2/0/0] quit
[*CE3] commit
配置完成后,Eth-Trunk应该Up。在PE2和PE3上执行display eth-trunk命令查看Eth-Trunk的状态。
PE2上的显示:
[~PE2] display eth-trunk 10
Eth-Trunk10's state information is:
WorkingMode: NORMAL Hash arithmetic: According to flow
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 32
Operate status: up Number Of Up Ports In Trunk: 1
--------------------------------------------------------------------------------
PortName Status Weight
GigabitEthernet3/0/0 Up 1
[~PE2] display eth-trunk 20
Eth-Trunk20's state information is:
WorkingMode: NORMAL Hash arithmetic: According to flow
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 32
Operate status: down Number Of Up Ports In Trunk: 0
--------------------------------------------------------------------------------
PortName Status Weight
GigabitEthernet4/0/0 Down 1
PE3上的显示:
[~PE3] display eth-trunk 10
Eth-Trunk10's state information is:
WorkingMode: NORMAL Hash arithmetic: According to flow
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 32
Operate status: up Number Of Up Ports In Trunk: 1
--------------------------------------------------------------------------------
PortName Status Weight
GigabitEthernet4/0/0 Up 1
[~PE3] display eth-trunk 20
Eth-Trunk20's state information is:
WorkingMode: NORMAL Hash arithmetic: According to flow
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 32
Operate status: up Number Of Up Ports In Trunk: 1
--------------------------------------------------------------------------------
PortName Status Weight
GigabitEthernet3/0/0 Up 1
从显示信息可以看出,对于Eth-Trunk 10,PE2和PE3是双主状态;对于Eth-Trunk 20,PE2处于备状态,PE3处于主状态。
9.检查配置结果
在PE上通过配置命令display bgp evpn all routing-table,可以看到远端发来的EVPN路由。以PE1为例:
[~PE1] display bgp evpn all routing-table
Local AS number : 100
BGP Local router ID is 1.1.1.1
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
EVPN address family:
Number of A-D Routes: 7
Route Distinguisher: 100:1
Network(ESI/EthTagId) NextHop
*>i 0001.0002.0003.0004.0005:0 2001:DB8:2::2
* i 2001:DB8:3::3
Route Distinguisher: 200:1
Network(ESI/EthTagId) NextHop
*>i 0005.0004.0003.0002.0001:0 2001:DB8:2::2
* i 2001:DB8:3::3
Route Distinguisher: 2.2.2.2:0
Network(ESI/EthTagId) NextHop
*>i 0001.0002.0003.0004.0005:4294967295 2001:DB8:2::2
Route Distinguisher: 3.3.3.3:0
Network(ESI/EthTagId) NextHop
*>i 0001.0002.0003.0004.0005:4294967295 2001:DB8:3::3
*>i 0005.0004.0003.0002.0001:4294967295 2001:DB8:3::3
EVPN-Instance evrf1:
Number of A-D Routes: 4
Network(ESI/EthTagId) NextHop
*>i 0001.0002.0003.0004.0005:0 2001:DB8:2::2
* i 2001:DB8:3::3
*>i 0001.0002.0003.0004.0005:4294967295 2001:DB8:2::2
* i 2001:DB8:3::3
EVPN-Instance evrf2:
Number of A-D Routes: 3
Network(ESI/EthTagId) NextHop
*>i 0005.0004.0003.0002.0001:0 2001:DB8:3::3
i 2001:DB8:2::2
*>i 0005.0004.0003.0002.0001:4294967295 2001:DB8:3::3
EVPN address family:
Number of Mac Routes: 3
Route Distinguisher: 100:1
Network(EthTagId/MacAddrLen/MacAddr/IpAddrLen/IpAddr) NextHop
*>i 0:48:38c2-6721-0300:0:0.0.0.0 2001:DB8:2::2
* i 2001:DB8:3::3
Route Distinguisher: 200:1
Network(EthTagId/MacAddrLen/MacAddr/IpAddrLen/IpAddr) NextHop
*> 0:48:38c2-6721-0300:0:0.0.0.0 0.0.0.0
EVPN-Instance evrf1:
Number of Mac Routes: 3
Network(EthTagId/MacAddrLen/MacAddr/IpAddrLen/IpAddr) NextHop
*> 0:48:38c2-6721-0300:0:0.0.0.0 0.0.0.0
* i 2001:DB8:2::2
* i 2001:DB8:3::3
EVPN-Instance evrf2:
Number of Mac Routes: 1
Network(EthTagId/MacAddrLen/MacAddr/IpAddrLen/IpAddr) NextHop
*> 0:48:38c2-6721-0300:0:0.0.0.0 0.0.0.0
EVPN address family:
Number of Inclusive Multicast Routes: 6
Route Distinguisher: 100:1
Network(EthTagId/IpAddrLen/OriginalIp) NextHop
*> 0:32:1.1.1.1 127.0.0.1
*>i 0:32:2.2.2.2 2001:DB8:2::2
*>i 0:32:3.3.3.3 2001:DB8:3::3
Route Distinguisher: 200:1
Network(EthTagId/IpAddrLen/OriginalIp) NextHop
*> 0:32:1.1.1.1 127.0.0.1
*>i 0:32:2.2.2.2 2001:DB8:2::2
*>i 0:32:3.3.3.3 2001:DB8:3::3
EVPN-Instance evrf1:
Number of Inclusive Multicast Routes: 3
Network(EthTagId/IpAddrLen/OriginalIp) NextHop
*> 0:32:1.1.1.1 127.0.0.1
*>i 0:32:2.2.2.2 2001:DB8:2::2
*>i 0:32:3.3.3.3 2001:DB8:3::3
EVPN-Instance evrf2:
Number of Inclusive Multicast Routes: 3
Network(EthTagId/IpAddrLen/OriginalIp) NextHop
*> 0:32:1.1.1.1 127.0.0.1
*>i 0:32:2.2.2.2 2001:DB8:2::2
*>i 0:32:3.3.3.3 2001:DB8:3::3
在PE1上通过配置命令display bgp evpn all routing-table ad-route,可以看到远端发来的EVPN路由的详细信息。
查看ESI 0001.0002.0003.0004.0005的路由。从ESI Label字段可知,ESI 0001.0002.0003.0004.0005形成了双归双活。
[~PE1] display bgp evpn all routing-table ad-route 0001.0002.0003.0004.0005:4294967295
BGP local router ID : 1.1.1.1
Local AS number : 100
Total routes of Route Distinguisher(2.2.2.2:0): 1
BGP routing table entry information of 0001.0002.0003.0004.0005:4294967295:
From: 2001:DB8:2::2 (2.2.2.2)
Route Duration: 0d00h31m39s
Relay IP Nexthop: FE80::3AC2:67FF:FE31:307
Relay IP Out-Interface:GigabitEthernet1/0/0
Relay Tunnel Out-Interface:
Original nexthop: 2001:DB8:2::2
Qos information : 0x0
Ext-Community: RT <1 : 1>, ESI Label<0 : 0 : 48066>
Prefix-sid: ::1
AS-path Nil, origin incomplete, localpref 100, pref-val 0, valid, internal, best, select, pre 255, IGP cost 10
Route Type: 1 (Ethernet Auto-Discovery (A-D) route)
ESI: 0001.0002.0003.0004.0005, Ethernet Tag ID: 4294967295
Not advertised to any peer yet
Total routes of Route Distinguisher(3.3.3.3:0): 1
BGP routing table entry information of 0001.0002.0003.0004.0005:4294967295:
From: 2001:DB8:3::3 (3.3.3.3)
Route Duration: 0d00h30m23s
Relay IP Nexthop: FE80::3AC2:67FF:FE41:305
Relay IP Out-Interface:GigabitEthernet2/0/0
Relay Tunnel Out-Interface:
Original nexthop: 2001:DB8:3::3
Qos information : 0x0
Ext-Community: RT <1 : 1>, ESI Label<0 : 0 : 48066>
Prefix-sid: ::1
AS-path Nil, origin incomplete, localpref 100, pref-val 0, valid, internal, best, select, pre 255, IGP cost 10
Route Type: 1 (Ethernet Auto-Discovery (A-D) route)
ESI: 0001.0002.0003.0004.0005, Ethernet Tag ID: 4294967295
Not advertised to any peer yet
EVPN-Instance evrf1:
Number of A-D Routes: 2
BGP routing table entry information of 0001.0002.0003.0004.0005:4294967295:
Route Distinguisher: 2.2.2.2:0
Remote-Cross route
From: 2001:DB8:2::2 (2.2.2.2)
Route Duration: 0d00h31m53s
Relay IP Nexthop: FE80::3AC2:67FF:FE31:307
Relay IP Out-Interface:GigabitEthernet1/0/0
Relay Tunnel Out-Interface:
Original nexthop: 2001:DB8:2::2
Qos information : 0x0
Ext-Community: RT <1 : 1>, ESI Label<0 : 0 : 48066>
Prefix-sid: ::1
AS-path Nil, origin incomplete, localpref 100, pref-val 0, valid, internal, best, select, pre 255, IGP cost 10
Route Type: 1 (Ethernet Auto-Discovery (A-D) route)
ESI: 0001.0002.0003.0004.0005, Ethernet Tag ID: 4294967295
Not advertised to any peer yet
BGP routing table entry information of 0001.0002.0003.0004.0005:4294967295:
Route Distinguisher: 3.3.3.3:0
Remote-Cross route
From: 2001:DB8:3::3 (3.3.3.3)
Route Duration: 0d00h30m38s
Relay IP Nexthop: FE80::3AC2:67FF:FE41:305
Relay IP Out-Interface:GigabitEthernet2/0/0
Relay Tunnel Out-Interface:
Original nexthop: 2001:DB8:3::3
Qos information : 0x0
Ext-Community: RT <1 : 1>, ESI Label<0 : 0 : 48066>
Prefix-sid: ::1
AS-path Nil, origin incomplete, localpref 100, pref-val 0, valid, internal, pre 255, IGP cost 10, not preferred for router ID
Route Type: 1 (Ethernet Auto-Discovery (A-D) route)
ESI: 0001.0002.0003.0004.0005, Ethernet Tag ID: 4294967295
Not advertised to any peer yet
查看ESI 0005.0004.0003.0002.0001的路由。从ESI Label字段可知,ESI 0005.0004.0003.0002.0001形成了双归单活。
[~PE1] display bgp evpn all routing-table ad-route 0005.0004.0003.0002.0001:4294967295
BGP local router ID : 1.1.1.1
Local AS number : 100
Total routes of Route Distinguisher(3.3.3.3:0): 1
BGP routing table entry information of 0005.0004.0003.0002.0001:4294967295:
From: 2001:DB8:3::3 (3.3.3.3)
Route Duration: 0d00h33m11s
Relay IP Nexthop: FE80::3AC2:67FF:FE41:305
Relay IP Out-Interface:GigabitEthernet2/0/0
Relay Tunnel Out-Interface:
Original nexthop: 2001:DB8:3::3
Qos information : 0x0
Ext-Community: RT <2 : 2>, ESI Label<1 : 0 : 48067>
Prefix-sid: ::2
AS-path Nil, origin incomplete, localpref 100, pref-val 0, valid, internal, best, select, pre 255, IGP cost 10
Route Type: 1 (Ethernet Auto-Discovery (A-D) route)
ESI: 0005.0004.0003.0002.0001, Ethernet Tag ID: 4294967295
Not advertised to any peer yet
EVPN-Instance evrf2:
Number of A-D Routes: 1
BGP routing table entry information of 0005.0004.0003.0002.0001:4294967295:
Route Distinguisher: 3.3.3.3:0
Remote-Cross route
From: 2001:DB8:3::3 (3.3.3.3)
Route Duration: 0d00h33m11s
Relay IP Nexthop: FE80::3AC2:67FF:FE41:305
Relay IP Out-Interface:GigabitEthernet2/0/0
Relay Tunnel Out-Interface:
Original nexthop: 2001:DB8:3::3
Qos information : 0x0
Ext-Community: RT <2 : 2>, ESI Label<1 : 0 : 48067>
Prefix-sid: ::2
AS-path Nil, origin incomplete, localpref 100, pref-val 0, valid, internal, best, select, pre 255, IGP cost 10
Route Type: 1 (Ethernet Auto-Discovery (A-D) route)
ESI: 0005.0004.0003.0002.0001, Ethernet Tag ID: 4294967295
Not advertised to any peer yet
CE1能够相互Ping通CE2和CE3,例如:
[~CE1] ping 10.1.1.2
PING 10.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=224 ms
Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=10 ms
Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=10 ms
Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=9 ms
Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=10 ms
--- 10.1.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 9/52/224 ms
[~CE1] ping 10.2.1.2
PING 10.2.1.2: 56 data bytes, press CTRL_C to break
Reply from 10.2.1.2: bytes=56 Sequence=1 ttl=255 time=12 ms
Reply from 10.2.1.2: bytes=56 Sequence=2 ttl=255 time=10 ms
Reply from 10.2.1.2: bytes=56 Sequence=3 ttl=255 time=7 ms
Reply from 10.2.1.2: bytes=56 Sequence=4 ttl=255 time=11 ms
Reply from 10.2.1.2: bytes=56 Sequence=5 ttl=255 time=7 ms
--- 10.2.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 7/9/12 ms
标签:quit,EVdPdNd,示例,over,PE1,PE2,PE3,DB8,2001 来源: https://blog.csdn.net/guolianggsta/article/details/122829491