EVPN通讯示意图
NE1的配置:
[HUAWEI]sysname PE1
[PE1]int ethe 1/0/0
[PE1-Ethernet1/0/0] ip add 10.1.12.1/24
[PE1]int lo 0
[PE1-LoopBack0]ip add 11.1.1.1/32
[PE1]router id 11.1.1.1
[PE1]ospf 1
[PE1-ospf-1]area 0
[PE1-ospf-1-area-0.0.0.0]network 10.1.12.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0]network 11.1.1.1 0.0.0.0
#激添mpls标签
[PE1]mpls lsr-id 11.1.1.1
[PE1]mpls
[PE1-mpls]mpls ldp
[PE1]int ethe 1/0/0
[PE1-Ethernet1/0/0]mpls ldp
#配PE与PE的BGP 关系
[PE1]bgp 100
[PE1-bgp]peer 33.1.1.1 as-number 100
[PE1-bgp]connect-interface LoopBack 0
[PE1-bgp]undo default ipv4-unicast #不需要激活IPv4邻居关系
[PE1-bgp]12vpn-family evpn
[PE1-bgp-af-evpn]peer 33.1.1.1 enable
#EVPN的源地址
[PE1]evpn source-address 11.1.1.1
[PE1]evpn vpn-instance leqi
[PE1-evpn-instance-leqi]route-distinguisher 100:1
[PE1-evpn-instance-leqi]vpn-target 1:1
[PE1]int ethe 1/0/9
[PE1-Ethernet1/0/9]evpn binding vpn-instance leqi
NE2的配置:
[HUAWEI]sysname P
[P]int ethe 1/0/0
[P-Ethernet1/0/0] ip add 10.1.12.2/24
[P]int ethe 1/0/1
[P-LoopBack0]ip add 10.1.23.2/24
[P]int lo 0
[P-LoopBack0]ip add 22.1.1.1/32
[P]router id 22.1.1.1
[P]ospf 1
[P-ospf-1]area 0
[P-ospf-1-area-0.0.0.0]network 10.1.12.0 0.0.0.255
[P-ospf-1-area-0.0.0.0]network 22.1.1.1 0.0.0.0
[P-ospf-1-area-0.0.0.0]network 10.1.23.0 0.0.0.255
#激添mpls标签
[P]mpls lsr-id 22.1.1.1
[P]mpls
[P-mpls]mpls ldp
[P]int ethe 1/0/0
[P-Ethernet1/0/0]mpls
[P-Ethernet1/0/0]mpls ldp
[P]int ethe 1/0/1
[P-Ethernet1/0/1]mpls
[P-Ethernet1/0/1]mpls ldp
NE3的配置:
[HUAWEI]sysname PE3
[PE3]int ethe 1/0/1
[PE3-Ethernet1/0/1] ip add 10.1.23.3/24
[PE3]int lo 0
[PE3-LoopBack0]ip add 33.1.1.1/32
[PE3]router id 33.1.1.1
[PE3]ospf 1
[PE3-ospf-1]area 0
[PE3-ospf-1-area-0.0.0.0]network 10.1.23.0 0.0.0.255
[PE3-ospf-1-area-0.0.0.0]network 33.1.1.1 0.0.0.0
#激添mpls标签
[PE3]mpls lsr-id 33.1.1.1
[PE3]mpls
[PE3-mpls]mpls ldp
[PE3]int ethe 1/0/1
[PE3-Ethernet1/0/1]mpls ldp
#配PE与PE的BGP 关系
[PE3]bgp 100
[PE3-bgp]peer 11.1.1.1 as-number 100
[PE3-bgp]connect-interface LoopBack 0
[PE3-bgp]undo default ipv4-unicast #不需要激活IPv4邻居关系
[PE3-bgp]12vpn-family evpn
[PE3-bgp-af-evpn]peer 11.1.1.1 enable
#EVPN的源地址
[PE3]evpn source-address 33.1.1.1
[PE3]evpn vpn-instance leqi
[PE3-evpn-instance-leqi]route-distinguisher 100:1
[PE3-evpn-instance-leqi]vpn-target 1:1
[PE3]int ethe 1/0/9
[PE3-Ethernet1/0/9]evpn binding vpn-instance leqi