配置私网接入普通EVPN E-Lan示例
配置私网接入普通EVPN E-Lan实现二层网路互联。
组网需求
如图12-40所示:Site1和Site2内为二层网络,为了实现通过骨干网使不同Site间相互通信,可以在网络中配置EVPN功能。其中各个PE设备上创建EVPN实例用于存储CE或远端PE发来的EVPN路由,RR设备将配置成路由反射器,用于反射EVPN路由。为了更高效的传输流量,将PE1和PE2都配置成多活跃模式,形成负载分担功能。
配置注意事项
在配置过程中,需注意以下事项:
同一EVPN实例的Export VPN-Target列表与其它站点的Import VPN-Target列表有共同的VPN-Target,Import VPN-Target列表与其它站点的Export VPN-Target列表有共同的VPN-Target;
PE上配置的源地址建议为本地Loopback地址。
配置思路
采用如下的思路进行配置:
在骨干网上配置IGP实现各个PE以及RR设备之间的互通。
在骨干网上配置MPLS基本能力和MPLS LDP,建立MPLS LSP。
配置PE上的EVPN实例。
配置PE上的源地址。
配置PE上与CE相连的接口绑定EVPN实例。
配置各个PE与CE接口上的ESI。
配置RR与PE间的BGP EVPN对等体关系,并在RR上指定各个PE为其反射器的客户机。
配置PE1和PE2的冗余模式。
配置CE与PE之间相互通信。
配置PE1和PE2上接入侧接口联动BFD会话,提升接入链路故障时的DF切换速度。
操作步骤
- 按图12-40配置PE和RR的各接口地址,具体配置请参见配置文件
- 在骨干网上配置IGP实现各个PE以及RR设备之间的互通。本例中IGP为OSPF为例进行说明
# 配置PE1。
[~PE1] ospf 1
[*PE1-ospf-1] area 0
[*PE1-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[*PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[*PE1-ospf-1-area-0.0.0.0] commit
[~PE1-ospf-1-area-0.0.0.0] quit
[~PE1-ospf-1] quit
# 配置PE2。
[~PE2] ospf 1
[*PE2-ospf-1] area 0
[*PE2-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
[*PE2-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[*PE2-ospf-1-area-0.0.0.0] commit
[~PE2-ospf-1-area-0.0.0.0] quit
[~PE2-ospf-1] quit
# 配置PE3。
[~PE3] ospf 1
[*PE3-ospf-1] area 0
[*PE3-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
[*PE3-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0
[*PE3-ospf-1-area-0.0.0.0] commit
[~PE3-ospf-1-area-0.0.0.0] quit
[~PE3-ospf-1] quit
# 配置RR。
[~RR] ospf 1
[*RR-ospf-1] area 0
[*RR-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[*RR-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
[*RR-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
[*RR-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[*RR-ospf-1-area-0.0.0.0] commit
[~RR-ospf-1-area-0.0.0.0] quit
[~RR-ospf-1] quit
配置完成后,PE1、PE2、PE3和RR之间应能建立OSPF邻居关系,执行display ospf peer命令可以看到邻居状态为Full。执行display ip routing-table命令可以看到PE和RR之间学习到对方的Loopback1路由。
以PE1的显示为例:
[~PE1] display ospf peer
OSPF Process 1 with Router ID 10.1.1.1 Neighbors Area 0.0.0.0 interface 10.1.1.1 (GE2/0/0)'s neighbors Router ID: 3.3.3.3 Address: 10.1.1.2 State: Full Mode:Nbr is Slave Priority: 1 DR: 10.1.1.1 BDR: 10.1.1.2 MTU: 0 Dead timer due in 35 sec Retrans timer interval: 5 Neighbor is up for 00h00m30s Authentication Sequence: [ 0 ]
[~PE1] display ip routing-table
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route ------------------------------------------------------------------------------ Routing Table : _public_ Destinations : 13 Routes : 13 Destination/Mask Proto Pre Cost Flags NextHop Interface 1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0 2.2.2.2/32 OSPF 10 2 D 10.1.1.2 GigabitEthernet2/0/0 3.3.3.3/32 OSPF 10 1 D 10.1.1.2 GigabitEthernet2/0/0 4.4.4.4/32 OSPF 10 2 D 10.1.1.2 GigabitEthernet2/0/0 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0 10.1.1.0/24 Direct 0 0 D 10.1.1.1 GigabitEthernet2/0/0 10.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet2/0/0 10.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet2/0/0 10.2.1.0/24 OSPF 10 2 D 10.1.1.2 GigabitEthernet2/0/0 10.3.1.0/24 OSPF 10 2 D 10.1.1.2 GigabitEthernet2/0/0 255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 在MPLS骨干网上配置MPLS基本能力和MPLS LDP,建立LDP LSP
# 配置PE1。
[~PE1] mpls lsr-id 1.1.1.1
[*PE1] mpls
[*PE1-mpls] quit
[*PE1] mpls ldp
[*PE1-mpls-ldp] quit
[*PE1] interface gigabitethernet 2/0/0
[*PE1-GigabitEthernet2/0/0] mpls
[*PE1-GigabitEthernet2/0/0] mpls ldp
[*PE1-GigabitEthernet2/0/0] commit
[~PE1-GigabitEthernet2/0/0] quit
# 配置PE2。
[~PE2] mpls lsr-id 2.2.2.2
[*PE2] mpls
[*PE2-mpls] quit
[*PE2] mpls ldp
[*PE2-mpls-ldp] quit
[*PE2] interface gigabitethernet 2/0/0
[*PE2-GigabitEthernet2/0/0] mpls
[*PE2-GigabitEthernet2/0/0] mpls ldp
[*PE2-GigabitEthernet2/0/0] commit
[~PE2-GigabitEthernet2/0/0] quit
# 配置RR。
[~RR] mpls lsr-id 3.3.3.3
[*RR] mpls
[*RR-mpls] quit
[*RR] mpls ldp
[*RR-mpls-ldp] quit
[*RR] interface gigabitethernet 1/0/0
[*RR-GigabitEthernet1/0/0] mpls
[*RR-GigabitEthernet1/0/0] mpls ldp
[*RR-GigabitEthernet1/0/0] quit
[*RR] interface gigabitethernet 2/0/0
[*RR-GigabitEthernet2/0/0] mpls
[*RR-GigabitEthernet2/0/0] mpls ldp
[*RR-GigabitEthernet2/0/0] quit
[*RR] interface gigabitethernet 3/0/0
[*RR-GigabitEthernet3/0/0] mpls
[*RR-GigabitEthernet3/0/0] mpls ldp
[*RR-GigabitEthernet3/0/0] commit
[~RR-GigabitEthernet3/0/0] quit
# 配置PE3。
[~PE3] mpls lsr-id 4.4.4.4
[*PE3] mpls
[*PE3-mpls] quit
[*PE3] mpls ldp
[*PE3-mpls-ldp] quit
[*PE3] interface gigabitethernet 1/0/0
[*PE3-GigabitEthernet1/0/0] mpls
[*PE3-GigabitEthernet1/0/0] mpls ldp
[*PE3-GigabitEthernet1/0/0] commit
[~PE3-GigabitEthernet1/0/0] quit
上述配置完成后,PE1、PE2、PE3和RR之间应能建立LDP会话,执行display mpls ldp session命令可以看到显示结果中Status项为“Operational”。执行display mpls ldp lsp命令,可以看到LDP LSP的建立情况。
以PE1的显示为例:
[~PE1] display mpls ldp session
LDP Session(s) in Public Network Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM) A '*' before a session means the session is being deleted. -------------------------------------------------------------------------- PeerID Status LAM SsnRole SsnAge KASent/Rcv -------------------------------------------------------------------------- 3.3.3.3:0 Operational DU Passive 0000:00:00 5/4 -------------------------------------------------------------------------- TOTAL: 1 Session(s) Found.
[~PE1] display mpls ldp lsp
LDP LSP Information ------------------------------------------------------------------------------- DestAddress/Mask In/OutLabel UpstreamPeer NextHop OutInterface ------------------------------------------------------------------------------- 1.1.1.1/32 3/NULL 3.3.3.3 127.0.0.1 Loop0 *1.1.1.1/32 Liberal/32828 DS/3.3.3.3 2.2.2.2/32 NULL/32829 - 10.1.1.2 GE2/0/0 2.2.2.2/32 32829/32829 3.3.3.3 10.1.1.2 GE2/0/0 3.3.3.3/32 NULL/3 - 10.1.1.2 GE2/0/0 3.3.3.3/32 32828/3 3.3.3.3 10.1.1.2 GE2/0/0 4.4.4.4/32 NULL/32830 - 10.1.1.2 GE2/0/0 4.4.4.4/32 32830/32830 3.3.3.3 10.1.1.2 GE2/0/0 ------------------------------------------------------------------------------- TOTAL: 7 Normal LSP(s) Found. TOTAL: 1 Liberal LSP(s) Found. TOTAL: 0 FRR LSP(s) Found. A '*' before an LSP means the LSP is not established A '*' before a Label means the USCB or DSCB is stale A '*' before a UpstreamPeer means the session is stale A '*' before a DS means the session is stale A '*' before a NextHop means the LSP is FRR LSP An asterisk (*) before an LSP means the LSP is not established An asterisk (*) before a Label means the USCB or DSCB is stale An asterisk (*) before an UpstreamPeer means the session is stale An asterisk (*) before a DS means the session is stale An asterisk (*) before a NextHop means the LSP is FRR LSP
- 配置PE上的EVPN实例
# 配置PE1。
[~PE1] evpn vpn-instance evpna
[*PE1-evpn-instance-evpna] route-distinguisher 100:1
[*PE1-evpn-instance-evpna] vpn-target 1:1
[*PE1-evpn-instance-evpna] quit
[*PE1] commit
# 配置PE2。
[~PE2] evpn vpn-instance evpna
[*PE2-evpn-instance-evpna] route-distinguisher 200:1
[*PE2-evpn-instance-evpna] vpn-target 1:1
[*PE2-evpn-instance-evpna] quit
[*PE2] commit
# 配置PE3。
[~PE3] evpn vpn-instance evpna
[*PE3-evpn-instance-evpna] route-distinguisher 300:1
[*PE3-evpn-instance-evpna] vpn-target 1:1
[*PE3-evpn-instance-evpna] quit
[*PE3] commit
- 配置PE上的源地址。
# 配置PE1。
[~PE1] evpn source-address 1.1.1.1
[*PE1] commit
# 配置PE2。
[~PE2] evpn source-address 2.2.2.2
[*PE2] commit
# 配置PE3。
[~PE3] evpn source-address 4.4.4.4
[*PE3] commit
- 配置PE1和PE2上连接CE的接口的ESI(本例使用动态生成ESI的配置方法,配置静态ESI的方法请参见配置ESI)。
# 配置PE1。
[~PE1] lacp e-trunk priority 1
[*PE1] lacp e-trunk system-id 00E0-FC00-0000
[*PE1] e-trunk 1
[*PE1-e-trunk-1] priority 10
[*PE1-e-trunk-1] peer-address 2.2.2.2 source-address 1.1.1.1
[*PE1-e-trunk-1] quit
[*PE1] interface eth-trunk 10
[*PE1-Eth-Trunk10] mode lacp-static
[*PE1-Eth-Trunk10] e-trunk 1
[*PE1-Eth-Trunk10] quit
[*PE1] commit
# 配置PE2。
[~PE2] lacp e-trunk priority 1
[*PE2] lacp e-trunk system-id 00E0-FC00-0000
[*PE2] e-trunk 1
[*PE2-e-trunk-1] priority 10
[*PE2-e-trunk-1] peer-address 1.1.1.1 source-address 2.2.2.2
[*PE2-e-trunk-1] quit
[*PE2] interface eth-trunk 10
[*PE2-Eth-Trunk10] mode lacp-static
[*PE2-Eth-Trunk10] e-trunk 1
[*PE2-Eth-Trunk10] quit
[*PE2] commit
- 配置PE上与CE相连的接口绑定EVPN实例。
# 配置PE1。
[~PE1] interface eth-trunk 10
[*PE1-Eth-Trunk10] e-trunk mode force-master
[*PE1-Eth-Trunk10] evpn binding vpn-instance evpna
[*PE1-Eth-Trunk10] commit
[~PE1-Eth-Trunk10] quit
[~PE1] interface gigabitethernet 1/0/0
[*PE1-GigabitEthernet1/0/0] eth-trunk 10
[*PE1-GigabitEthernet1/0/0] commit
[~PE1-GigabitEthernet1/0/0] quit
# 配置PE2。
[~PE2] interface eth-trunk 10
[*PE2-Eth-Trunk10] e-trunk mode force-master
[*PE2-Eth-Trunk10] evpn binding vpn-instance evpna
[*PE2-Eth-Trunk10] commit
[~PE2-Eth-Trunk10] quit
[~PE2] interface gigabitethernet 1/0/0
[*PE2-GigabitEthernet1/0/0] eth-trunk 10
[*PE2-GigabitEthernet1/0/0] commit
[~PE2-GigabitEthernet1/0/0] quit
# 配置PE3。
[~PE3] interface gigabitethernet 2/0/0
[*PE3-GigabitEthernet2/0/0] evpn binding vpn-instance evpna
[*PE3-GigabitEthernet2/0/0] commit
[~PE3-GigabitEthernet2/0/0] quit
- 配置RR与PE间的BGP EVPN对等体关系,并在RR上指定各个PE为其反射器的客户机
# 配置PE1。
[~PE1] bgp 100
[*PE1-bgp] peer 3.3.3.3 as-number 100
[*PE1-bgp] peer 3.3.3.3 connect-interface loopback 1
[*PE1-bgp] l2vpn-family evpn
[*PE1-bgp-af-evpn] peer 3.3.3.3 enable
[*PE1-bgp-af-evpn] quit
[*PE1-bgp] quit
[*PE1] commit
# 配置PE2。
[~PE2] bgp 100
[*PE2-bgp] peer 3.3.3.3 as-number 100
[*PE2-bgp] peer 3.3.3.3 connect-interface loopback 1
[*PE2-bgp] l2vpn-family evpn
[*PE2-bgp-af-evpn] peer 3.3.3.3 enable
[*PE2-bgp-af-evpn] quit
[*PE2-bgp] quit
[*PE2] commit
# 配置PE3。
[~PE3] bgp 100
[*PE3-bgp] peer 3.3.3.3 as-number 100
[*PE3-bgp] peer 3.3.3.3 connect-interface loopback 1
[*PE3-bgp] l2vpn-family evpn
[*PE3-bgp-af-evpn] peer 3.3.3.3 enable
[*PE3-bgp-af-evpn] quit
[*PE3-bgp] quit
[*PE3] commit
# 配置RR。
[~RR] bgp 100
[*RR-bgp] peer 1.1.1.1 as-number 100
[*RR-bgp] peer 1.1.1.1 connect-interface loopback 1
[*RR-bgp] peer 2.2.2.2 as-number 100
[*RR-bgp] peer 2.2.2.2 connect-interface loopback 1
[*RR-bgp] peer 4.4.4.4 as-number 100
[*RR-bgp] peer 4.4.4.4 connect-interface loopback 1
[*RR-bgp] l2vpn-family evpn
[*RR-bgp-af-evpn] peer 1.1.1.1 enable
[*RR-bgp-af-evpn] peer 1.1.1.1 reflect-client
[*RR-bgp-af-evpn] peer 2.2.2.2 enable
[*RR-bgp-af-evpn] peer 2.2.2.2 reflect-client
[*RR-bgp-af-evpn] peer 4.4.4.4 enable
[*RR-bgp-af-evpn] peer 4.4.4.4 reflect-client
[*RR-bgp-af-evpn] quit
[*RR-bgp] quit
[*RR] commit
配置完成后,在RR上执行display bgp evpn peer命令,可以看到RR与PE间BGP对等体关系已建立,并达到Established状态。
[~RR] display bgp evpn peer
BGP local router ID : 3.3.3.3 Local AS number : 100 Total number of peers : 3 Peers in established state : 3 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 1.1.1.1 4 100 5 4 0 00:00:26 Established 1 2.2.2.2 4 100 5 4 0 00:00:27 Established 1 4.4.4.4 4 100 8 4 0 00:00:28 Established 4
- 配置CE与PE之间相互通信
# 配置CE1。
[~CE1] interface Eth-Trunk1
[*CE1-Eth-Trunk1] mode lacp-static
[*CE1-Eth-Trunk1] quit
[*CE1] interface gigabitethernet1/0/0
[*CE1-GigabitEthernet1/0/0] eth-trunk 1
[*CE1-GigabitEthernet1/0/0] quit
[*CE1] interface gigabitethernet2/0/0
[*CE1-GigabitEthernet2/0/0] eth-trunk 1
[*CE1-GigabitEthernet2/0/0] commit
[~CE1-GigabitEthernet2/0/0] quit
如果冗余模式配置为单活模式,则CE1的GE1/0/0和GE2/0/0需要加入不同的Eth-Trunk接口。
# 配置CE2。
[~CE2] interface Eth-Trunk1
[*CE2-Eth-Trunk1] quit
[*CE2] interface gigabitethernet1/0/0
[*CE2-GigabitEthernet1/0/0] eth-trunk 1
[*CE2-GigabitEthernet1/0/0] commit
[~CE2-GigabitEthernet1/0/0] quit
- 配置PE1和PE2上接入侧接口联动BFD会话,提升接入链路故障时的DF切换速度。
# 配置PE1。
[~PE1] bfd
[*PE1-bfd] quit
[*PE1] bfd bfd1 bind peer-ip 2.2.2.2 track-interface interface Eth-Trunk10
[*PE1-bfd-session-bfd1] discriminator local 10
[*PE1-bfd-session-bfd1] discriminator remote 20
[*PE1-bfd-session-bfd1] quit
[*PE1] interface eth-trunk 10
[*PE1-Eth-Trunk10] es track bfd bfd1
[*PE1-Eth-Trunk10] quit
[*PE1] commit
# 配置PE2。
[~PE2] bfd
[*PE2-bfd] quit
[*PE2] bfd bfd1 bind peer-ip 1.1.1.1 track-interface interface Eth-Trunk10
[*PE2-bfd-session-bfd1] discriminator local 20
[*PE2-bfd-session-bfd1] discriminator remote 10
[*PE2-bfd-session-bfd1] quit
[*PE2] interface eth-trunk 10
[*PE2-Eth-Trunk10] es track bfd bfd1
[*PE2-Eth-Trunk10] quit
[*PE2] commit
- 检查配置结果
在PE3设备上执行display bgp evpn all routing-table mac-route命令,可以看到去往CE1的MAC/IP地址通告路由。
[~PE3] display bgp evpn all routing-table mac-route
Local AS number : 100 BGP Local router ID is 4.4.4.4 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 Mac Routes: 2 Route Distinguisher: 100:1 Network(EthTagId/MacAddrLen/MacAddr/IpAddrLen/IpAddr) NextHop *>i 1:48:00e0-fc12-3456:0:0.0.0.0 1.1.1.1 Route Distinguisher: 200:1 Network(EthTagId/MacAddrLen/MacAddr/IpAddrLen/IpAddr) NextHop *>i 1:48:00e0-fc12-3456:0:0.0.0.0 2.2.2.2 EVPN-Instance evpna: Number of Mac Routes: 2 Network(EthTagId/MacAddrLen/MacAddr/IpAddrLen/IpAddr) NextHop *>i 1:48:00e0-fc12-3456:0:0.0.0.0 1.1.1.1 * i 2.2.2.2
在PE3设备上执行display bgp evpn all routing-table mac-route mac-route命令,可以看到去往CE1的MAC/IP地址通告路由形成了负载分担。
[~PE3] display bgp evpn all routing-table mac-route 1:48:00e0-fc12-3456:0:0.0.0.0
BGP local router ID : 4.4.4.4 Local AS number : 100 Total routes of Route Distinguisher(100:1): 1 BGP routing table entry information of 1:48:00e0-fc12-3456:0:0.0.0.0: Label information (Received/Applied): 32831/NULL From: 3.3.3.3 (3.3.3.3) Route Duration: 0d00h26m50s Relay IP Nexthop: 10.3.1.1 Relay Tunnel Out-Interface: LDP LSP Original nexthop: 1.1.1.1 Qos information : 0x0 Ext-Community:RT <1 : 1> AS-path Nil, origin incomplete, localpref 100, pref-val 0, valid, internal, best, select, pre 255 Originator: 10.1.1.1 Cluster list: 3.3.3.3 Route Type: 2 (MAC Advertisement Route) Ethernet Tag ID: 1, MAC Address/Len: 00e0-fc12-3456/48, IP Address/Len: 0.0.0.0/0, ESI:0138.ba56.b790.0201.2100 Not advertised to any peer yet Total routes of Route Distinguisher(200:1): 1 BGP routing table entry information of 1:48:00e0-fc12-3456:0:0.0.0.0: Label information (Received/Applied): 32831/NULL From: 3.3.3.3 (3.3.3.3) Route Duration: 0d00h20m28s Relay IP Nexthop: 10.3.1.1 Relay Tunnel Out-Interface: LDP LSP Original nexthop: 2.2.2.2 Qos information : 0x0 Ext-Community:RT <1 : 1> AS-path Nil, origin incomplete, localpref 100, pref-val 0, valid, internal, best, select, pre 255 Originator: 10.2.1.1 Cluster list: 3.3.3.3 Route Type: 2 (MAC Advertisement Route) Ethernet Tag ID: 1, MAC Address/Len: 00e0-fc12-3456/48, IP Address/Len: 0.0.0.0/0, ESI:0138.ba56.b790.0201.2100 Not advertised to any peer yet EVPN-Instance evpna: BGP routing table entry information of 1:48:00e0-fc12-3456:0:0.0.0.0: Remote-Cross route Label information (Received/Applied): 32831/NULL From: 3.3.3.3 (3.3.3.3) Route Duration: 0d00h26m51s Relay Tunnel Out-Interface: LDP LSP Original nexthop: 1.1.1.1 Qos information : 0x0 Ext-Community:RT <1 : 1> AS-path Nil, origin incomplete, localpref 100, pref-val 0, valid, internal, best, select, pre 255 Originator: 10.1.1.1 Cluster list: 3.3.3.3 Route Type: 2 (MAC Advertisement Route) Ethernet Tag ID: 1, MAC Address/Len: 00e0-fc12-3456/48, IP Address/Len: 0.0.0.0/0, ESI:0138.ba56.b790.0201.2100 Not advertised to any peer yet BGP routing table entry information of 1:48:00e0-fc12-3456:0:0.0.0.0: Remote-Cross route Label information (Received/Applied): 32831/NULL From: 3.3.3.3 (3.3.3.3) Route Duration: 0d00h20m29s Relay Tunnel Out-Interface: LDP LSP Original nexthop: 2.2.2.2 Qos information : 0x0 Ext-Community:RT <1 : 1> AS-path Nil, origin incomplete, localpref 100, pref-val 0, valid, internal, select, pre 255, not preferred for router ID Originator: 10.2.1.1 Cluster list: 3.3.3.3 Route Type: 2 (MAC Advertisement Route) Ethernet Tag ID: 1, MAC Address/Len: 00e0-fc12-3456/48, IP Address/Len: 0.0.0.0/0, ESI:0138.ba56.b790.0201.2100 Not advertised to any peer yet
配置文件
PE1的配置文件
# sysname PE1 # lacp e-trunk system-id 00e0-fc00-0000 lacp e-trunk priority 1 # evpn vpn-instance evpna route-distinguisher 100:1 vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity # bfd # mpls lsr-id 1.1.1.1 # mpls # mpls ldp # ipv4-family # e-trunk 1 priority 10 peer-address 2.2.2.2 source-address 1.1.1.1 # interface Eth-Trunk10 mode lacp-static e-trunk 1 e-trunk mode force-master evpn binding vpn-instance evpna es track bfd bfd1 # interface GigabitEthernet1/0/0 undo shutdown eth-trunk 10 # interface GigabitEthernet2/0/0 undo shutdown ip address 10.1.1.1 255.255.255.0 mpls mpls ldp # interface LoopBack1 ip address 1.1.1.1 255.255.255.255 # bfd bfd1 bind peer-ip 2.2.2.2 track-interface interface Eth-Trunk10 discriminator local 10 discriminator remote 20 # bgp 100 peer 3.3.3.3 as-number 100 peer 3.3.3.3 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 3.3.3.3 enable # l2vpn-family evpn peer 3.3.3.3 enable # ospf 1 area 0.0.0.0 network 1.1.1.1 0.0.0.0 network 10.1.1.0 0.0.0.255 # evpn source-address 1.1.1.1 # return
PE2的配置文件
# sysname PE2 # lacp e-trunk system-id 00e0-fc00-0000 lacp e-trunk priority 1 # evpn vpn-instance evpna route-distinguisher 200:1 vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity # bfd # mpls lsr-id 2.2.2.2 # mpls # mpls ldp # ipv4-family # e-trunk 1 priority 10 peer-address 1.1.1.1 source-address 2.2.2.2 # interface Eth-Trunk10 mode lacp-static e-trunk 1 e-trunk mode force-master evpn binding vpn-instance evpna es track bfd bfd1 # interface GigabitEthernet1/0/0 undo shutdown eth-trunk 10 # interface GigabitEthernet2/0/0 undo shutdown ip address 10.2.1.1 255.255.255.0 mpls mpls ldp # interface LoopBack1 ip address 2.2.2.2 255.255.255.255 # bfd bfd1 bind peer-ip 1.1.1.1 track-interface interface Eth-Trunk10 discriminator local 20 discriminator remote 10 # bgp 100 peer 3.3.3.3 as-number 100 peer 3.3.3.3 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 3.3.3.3 enable # l2vpn-family evpn peer 3.3.3.3 enable # ospf 1 area 0.0.0.0 network 2.2.2.2 0.0.0.0 network 10.2.1.0 0.0.0.255 # evpn source-address 2.2.2.2 # return
PE3的配置文件
# sysname PE3 # evpn vpn-instance evpna route-distinguisher 300:1 vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity # mpls lsr-id 4.4.4.4 # mpls # mpls ldp # ipv4-family # interface GigabitEthernet1/0/0 undo shutdown ip address 10.3.1.2 255.255.255.0 mpls mpls ldp # interface GigabitEthernet2/0/0 undo shutdown evpn binding vpn-instance evpna # interface LoopBack1 ip address 4.4.4.4 255.255.255.255 # bgp 100 peer 3.3.3.3 as-number 100 peer 3.3.3.3 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 3.3.3.3 enable # l2vpn-family evpn peer 3.3.3.3 enable # ospf 1 area 0.0.0.0 network 4.4.4.4 0.0.0.0 network 10.3.1.0 0.0.0.255 # evpn source-address 4.4.4.4 # return
RR的配置文件
# sysname RR # mpls lsr-id 3.3.3.3 # mpls # mpls ldp # ipv4-family # interface GigabitEthernet1/0/0 undo shutdown ip address 10.1.1.2 255.255.255.0 mpls mpls ldp # interface GigabitEthernet2/0/0 undo shutdown ip address 10.2.1.2 255.255.255.0 mpls mpls ldp # interface GigabitEthernet3/0/0 undo shutdown ip address 10.3.1.1 255.255.255.0 mpls mpls ldp # interface LoopBack1 ip address 3.3.3.3 255.255.255.255 # 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 # l2vpn-family evpn peer 1.1.1.1 enable peer 1.1.1.1 reflect-client peer 2.2.2.2 enable peer 2.2.2.2 reflect-client peer 4.4.4.4 enable peer 4.4.4.4 reflect-client # ospf 1 area 0.0.0.0 network 3.3.3.3 0.0.0.0 network 10.1.1.0 0.0.0.255 network 10.2.1.0 0.0.0.255 network 10.3.1.0 0.0.0.255 # return
CE1的配置文件
# sysname CE1 # interface Eth-Trunk1 mode lacp-static # interface GigabitEthernet1/0/0 undo shutdown eth-trunk 1 # interface GigabitEthernet2/0/0 undo shutdown eth-trunk 1 # return
CE2的配置文件
# sysname CE2 # interface Eth-Trunk1 # interface GigabitEthernet1/0/0 undo shutdown eth-trunk 1 # return