华为运营商级路由器配置示例 | EVdPdNd VPLS over SRv6 BE
Posted COCOgsta
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了华为运营商级路由器配置示例 | EVdPdNd VPLS over SRv6 BE相关的知识,希望对你有一定的参考价值。
组网需求
如图1所示:PE1、P和PE2属于同一自治系统,要求它们之间通过IS-IS协议达到IPv6网络互连。然后在PE1和PE2之间通过建立双向SRv6 BE承载EVPN E-LAN业务。
图1 配置EVPN VPLS over SRv6 BE组网图
配置思路
- 使能PE1、P和PE2各接口的IPv6转发能力,配置各接口的IPv6地址。
- 在PE1、P和PE2上使能IS-IS,配置Level级别,指定网络实体。
- 在PE设备上配置BD模式的EVPN实例,并将相应的BD绑定到接入侧子接口。
- 在PE设备之间建立BGP EVPN对等体关系。
- 在PE设备上配置SRv6 BE。
操作步骤
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 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 loopback1
[*PE1-LoopBack1] isis ipv6 enable 1
[*PE1-LoopBack1] commit
[~PE1-LoopBack1] quit
# 配置P。
[~P] isis 1
[*P-isis-1] is-level level-1
[*P-isis-1] cost-style wide
[*P-isis-1] network-entity 10.0000.0000.0002.00
[*P-isis-1] ipv6 enable topology ipv6
[*P-isis-1] quit
[*P] interface gigabitethernet 1/0/0
[*P-GigabitEthernet1/0/0] isis ipv6 enable 1
[*P-GigabitEthernet1/0/0] quit
[*P] interface gigabitethernet 2/0/0
[*P-GigabitEthernet2/0/0] isis ipv6 enable 1
[*P-GigabitEthernet2/0/0] quit
[*P] interface loopback1
[*P-LoopBack1] isis ipv6 enable 1
[*P-LoopBack1] commit
[~P-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.0003.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 loopback1
[*PE2-LoopBack1] isis ipv6 enable 1
[*PE2-LoopBack1] commit
[~PE2-LoopBack1] quit
配置完成后,可按如下指导检查IS-IS是否配置成功。
# 显示IS-IS邻居信息。以PE1为例。
[~PE1] display isis peer
Peer information for ISIS(1)
System Id Interface Circuit Id State HoldTime Type PRI
--------------------------------------------------------------------------------
0000.0000.0002* GE1/0/0 0000.0000.0002.01 Up 8s L1 64
Total Peer(s): 1
# 显示IS-IS路由表信息。以PE1为例。
[~PE1] display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-1 Forwarding Table
--------------------------------
IPV6 Dest. ExitInterface NextHop Cost Flags
--------------------------------------------------------------------------------
2001:DB8:1::1/128 GE1/0/0 Direct 10 D/-/L/-
2001:DB8:2::2/128 GE1/0/0 FE80::3A5D:67FF:FE31:307 10 A/-/-/-
2001:DB8:3::3/128 GE1/0/0 FE80::3A5D:67FF:FE31:307 20 A/-/-/-
2001:DB8:10::/64 GE1/0/0 Direct 20 D/-/L/-
2001:DB8:20::/64 GE1/0/0 FE80::3A5D:67FF:FE31:307 20 A/-/-/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set, LP-Local Prefix-Sid
Protect Type: L-Link Protect, N-Node Protect
3.在PE设备上配置BD模式的EVPN实例,并将相应的BD绑定到接入侧子接口
# 配置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 100
[*PE1-bd100] evpn binding vpn-instance evrf1
[*PE1-bd100] quit
[*PE1] interface gigabitethernet 2/0/0.1 mode l2
[*PE1-GigabitEthernet 2/0/0.1] encapsulation dot1q vid 1
[*PE1-GigabitEthernet 2/0/0.1] rewrite pop single
[*PE1-GigabitEthernet 2/0/0.1] bridge-domain 100
[*PE1-GigabitEthernet 2/0/0.1] quit
[*PE1] commit
# 配置PE2。
[~PE2] evpn source-address 3.3.3.3
[*PE2] evpn vpn-instance evrf1 bd-mode
[*PE2-evpn-instance-evrf1] route-distinguisher 200:1
[*PE2-evpn-instance-evrf1] vpn-target 1:1
[*PE2-evpn-instance-evrf1] quit
[*PE2] bridge-domain 100
[*PE2-bd100] evpn binding vpn-instance evrf1
[*PE2-bd100] quit
[*PE2] interface gigabitethernet 2/0/0.1 mode l2
[*PE2-GigabitEthernet 2/0/0.1] encapsulation dot1q vid 1
[*PE2-GigabitEthernet 2/0/0.1] rewrite pop single
[*PE2-GigabitEthernet 2/0/0.1] bridge-domain 100
[*PE2-GigabitEthernet 2/0/0.1] quit
[*PE2] 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] 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] quit
[*PE1-bgp] quit
[*PE1] commit
# 配置PE2。
[~PE2] bgp 100
[*PE2-bgp] router-id 3.3.3.3
[*PE2-bgp] peer 2001:DB8:1::1 as-number 100
[*PE2-bgp] peer 2001:DB8:1::1 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] quit
[*PE2-bgp] quit
[*PE2] commit
配置完成后,在PE设备上执行display bgp evpn peer命令,可以看到PE之间的BGP EVPN对等体关系已建立,并达到Established状态。
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 ipv6-prefix 2001:DB8:11:: 64
[*PE1-segment-routing-ipv6-locator] quit
[*PE1-segment-routing-ipv6] locator PE1_ARG 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
[*PE1-isis-1] segment-routing ipv6 locator PE1_ARG auto-sid-disable
[*PE1-isis-1] quit
[*PE1] evpn vpn-instance evrf1 bd-mode
[*PE1-evpn-instance-evrf1] segment-routing ipv6 locator PE1_ARG unicast-locator PE1
[*PE1-evpn-instance-evrf1] segment-routing ipv6 best-effort
[*PE1-evpn-instance-evrf1] quit
[*PE1] commit
# 配置PE2。
[~PE2] segment-routing ipv6
[*PE2-segment-routing-ipv6] encapsulation source-address 2001:DB8:3::3
[*PE2-segment-routing-ipv6] locator PE2 ipv6-prefix 2001:DB8:21:: 64
[*PE2-segment-routing-ipv6-locator] quit
[*PE2-segment-routing-ipv6] locator PE2_ARG 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
[*PE2-isis-1] segment-routing ipv6 locator PE2_ARG auto-sid-disable
[*PE2-isis-1] quit
[*PE2] evpn vpn-instance evrf1 bd-mode
[*PE2-evpn-instance-evrf1] segment-routing ipv6 locator PE2_ARG unicast-locator PE2
[*PE2-evpn-instance-evrf1] segment-routing ipv6 best-effort
[*PE2-evpn-instance-evrf1] quit
[*PE2] commit
6.检查配置结果
在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/118 FuncType : End.DT2M
Bridge-domain ID: 100
LocatorName : PE1_ARG LocatorID: 5
Total SID(s): 1
[~PE1] display segment-routing ipv6 local-sid end-dt2u forwarding
My Local-SID End.DT2U Forwarding Table
--------------------------------------
SID : 2001:DB8:11::3D/128 FuncType : End.DT2U
Bridge-domain ID: 100
LocatorName : PE1 LocatorID: 4
Total SID(s): 1
在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 Inclusive Multicast Routes: 2
Route Distinguisher: 100:1
Network(EthTagId/IpAddrLen/OriginalIp) NextHop
*> 0:32:1.1.1.1 127.0.0.1
*>i 0:32:3.3.3.3 2001:DB8:3::3
EVPN-Instance evrf1:
Number of Inclusive Multicast Routes: 2
Network(EthTagId/IpAddrLen/OriginalIp) NextHop
*> 0:32:1.1.1.1 127.0.0.1
*>i 0:32:3.3.3.3 2001:DB8:3::3
以上是关于华为运营商级路由器配置示例 | EVdPdNd VPLS over SRv6 BE的主要内容,如果未能解决你的问题,请参考以下文章
华为运营商级路由器配置示例 | EVdPdNd VPWS over SRv6 BE
华为运营商级路由器配置示例 | EVdPdNd VPLS over SRv6 TE Policy(静态配置)
华为运营商级路由器配置示例 | EVdPdNd VPWS over SRv6 BE(CE双归双活)
华为运营商级路由器配置示例 | EVdPdNd VPWS over SRv6 BE(CE双归单活)
华为运营商级路由器配置示例 | EVdPdNd L3VdPdNdv4 over SRv6 TE Policy网络切片(静态配置)