CE1和AR2和CE3 三层互联 彼此环回口可通信
划分VLAN对CE交换机进行trunk接口
evpn-overlay enable 开启evpn功能并在BGP中指邻居
CE1:bgp 100
peer 10.1.3.3 as-number 100
peer 10.1.3.3 connect-interface LoopBack0
l2vpn-family evpn
policy vpn-target
peer 10.1.3.3 enable
CE3:bgp 100
peer 10.1.1.1 as-number 100
peer 10.1.1.1 connect-interface LoopBack0
l2vpn-family evpn
policy vpn-target
peer 10.1.1.1 enable
CE1:bridge-domain 10 配置BD域并配置RT和RD值
vxlan vni 10
evpn
route-distinguisher 100:1
vpn-target 100:1 export-extcommunity
vpn-target 100:1 import-extcommunity
bridge-domain 20
vxlan vni 20
evpn
route-distinguisher 100:2
vpn-target 100:2 export-extcommunity
vpn-target 100:2 import-extcommunity
CE3:bridge-domain 10
vxlan vni 10
evpn
route-distinguisher 100:1
vpn-target 100:1 export-extcommunity
vpn-target 100:1 import-extcommunity
bridge-domain 20
vxlan vni 20
evpn
route-distinguisher 100:2
vpn-target 100:2 export-extcommunity
vpn-target 100:2 import-extcommunity
CE1:interface GE1/0/0.10 mode l2 在接口上进行封装并绑定BD域
encapsulation dot1q vid 10
bridge-domain 10
interface GE1/0/0.20 mode l2
encapsulation dot1q vid 20
bridge-domain 20
CE3:interface GE1/0/1.10 mode l2
encapsulation dot1q vid 30
bridge-domain 10
interface GE1/0/1.20 mode l2
encapsulation dot1q vid 40
bridge-domain 20
CE1:interface Nve1 配置NVE并使用BGP的方式指邻居
source 10.1.1.1
vni 10 head-end peer-list protocol bgp
vni 20 head-end peer-list protocol bgp
CE3:interface Nve1
source 10.1.3.3
vni 10 head-end peer-list protocol bgp
vni 20 head-end peer-list protocol bgp
使用集中式网关进行不同VXLAN互访
在原有配置基础
CE1:bgp 100 只值RR
peer 10.1.2.2 as-number 100
peer 10.1.2.2 connect-interface LoopBack0
l2vpn-family evpn
policy vpn-target
peer 10.1.2.2 enable
CE3:bgp 100
peer 10.1.2.2 as-number 100
peer 10.1.2.2 connect-interface LoopBack0
l2vpn-family evpn
policy vpn-target
peer 10.1.2.2 enable
CE2:bridge-domain 10
vxlan vni 10
evpn
route-distinguisher 100:1
vpn-target 100:1 export-extcommunity
vpn-target 100:1 import-extcommunity
bridge-domain 20
vxlan vni 20
evpn
route-distinguisher 100:2
vpn-target 100:2 export-extcommunity
vpn-target 100:2 import-extcommunity
interface Vbdif10
ip address 10.1.10.254 255.255.255.0
#
interface Vbdif20
ip address 10.1.20.254 255.255.255.0
interface Nve1
source 10.1.2.2
vni 10 head-end peer-list protocol bgp
vni 20 head-end peer-list protocol bgp
bgp 100 配置RR
peer 10.1.1.1 as-number 100
peer 10.1.1.1 connect-interface LoopBack0
peer 10.1.3.3 as-number 100
peer 10.1.3.3 connect-interface LoopBack0
l2vpn-family evpn
policy vpn-target
peer 10.1.1.1 enable
peer 10.1.1.1 reflect-client
peer 10.1.3.3 enable
peer 10.1.3.3 reflect-client
到对面就会变成20的vni