1.广域网核心需要进行全网互通,并且各自学会对等体的环回路由

2. 交换机对PC配置VLAN(vlan无所谓,但需要和dot1封装的vid匹配)但对CE设备需要实现trunk

配置BGP对等体

CE1: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
  peer 10.1.2.2 advertise irb 使能IRB

CE2:bgp 100
 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
  undo policy vpn-target
  peer 10.1.1.1 enable
  peer 10.1.1.1 advertise irb
  peer 10.1.1.1 reflect-client
  peer 10.1.3.3 enable
  peer 10.1.3.3 advertise irb
  peer 10.1.3.3 reflect-client

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
  peer 10.1.2.2 advertise irb

配置BD域和子接口 (CE1和CE3可以完全相同)除接口

bridge-domain 10
 vxlan vni 10
 evpn
  route-distinguisher 100:1
  vpn-target 100:1 export-extcommunity
  vpn-target 100:100 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:100 export-extcommunity
  vpn-target 100:2 import-extcommunity

interface GE1/0/0.10 mode l2
 encapsulation dot1q vid 10
 bridge-domain 10

interface GE1/0/0.20 mode l2
 encapsulation dot1q vid 20
 bridge-domain 20

配置三层VPN实例(和BD域里的100:100交叉生成路由,CE1和CE3相同)

ip vpn-instance 1
 ipv4-family
  route-distinguisher 100:100
  vpn-target 100:100 export-extcommunity
  vpn-target 100:100 export-extcommunity evpn
  vpn-target 100:100 import-extcommunity
  vpn-target 100:100 import-extcommunity evpn
 vxlan vni 50

配制VBD接口,开启VXLAN分布式网关(CE1和CE3相同)

interface Vbdif10
 ip binding vpn-instance 1
 ip address 10.1.10.254 255.255.255.0
 mac-address 0000-005e-0001
 vxlan anycast-gateway enable
 arp collect host enable

interface Vbdif20
 ip binding vpn-instance 1
 ip address 10.1.20.254 255.255.255.0
 mac-address 0000-005e-0002
 vxlan anycast-gateway enable
 arp collect host enable

配置NVE头端列表(CE1和E3完全相同)

interface Nve1
 source 10.1.1.1
 vni 10 head-end peer-list protocol bgp
 vni 20 head-end peer-list protocol bgp

Logo

更多推荐