华为设备上配置EVPN over vxlan实验
本实验是在GNS3环境进行的。在实验中EVPN做为控制面负责通知各PE建立VXLAN隧道。VXLAN做为转发平面负责转发二层流量。拓扑很简单有一台P设备兼做路由反射器P设备下联了三台PE。每台PE下接了一台VPC用于测试联通性。PE1--vpc1|P-------PE2--vpc2|PE3--vpc3三台vpc配置了同一网段的地址。实验结果是三台vpc可以互相ping通基础的配置这里面就忽略了主要是接口地址配置的ISIS配置。保证环回地址互通。P设备的环回地址为9.9.9.9。另外三台PE的环回地址为1.1.1.12.2.2.23.3.3.3P设备关键配置如下bgp 100 peer 2.2.2.2 as-number 100 peer 2.2.2.2 connect-interface LoopBack0 peer 1.1.1.1 as-number 100 peer 1.1.1.1 connect-interface LoopBack0 peer 3.3.3.3 as-number 100 peer 3.3.3.3 connect-interface LoopBack0 # l2vpn-family evpn peer 2.2.2.2 enable peer 2.2.2.2 advertise irb peer 2.2.2.2 reflect-client peer 2.2.2.2 advertise encap-type vxlan peer 1.1.1.1 enable peer 1.1.1.1 advertise irb peer 1.1.1.1 reflect-client peer 1.1.1.1 advertise encap-type vxlan peer 3.3.3.3 enable peer 3.3.3.3 advertise irb peer 3.3.3.3 reflect-client peer 3.3.3.3 advertise encap-type vxlan主要是跟三台PE建立evpn邻居注意要加下encap-type vxlan 表明EVPN使用vxlan做为转发平面。PE设备的BGP的重点配置如下bgp 100 peer 9.9.9.9 as-number 100 # ipv4-family unicast undo peer 9.9.9.9 enable # l2vpn-family evpn peer 9.9.9.9 enable peer 9.9.9.9 advertise irb peer 9.9.9.9 advertise encap-type vxlan9.9.9.9是路由反射器的环回地址。这里面只列也了PE1的配置另外两台基本一样。PE上再配置evpn实例和bd二层域注意要启用bd模式。这里二层域统一使用vxlan的vni为1000evpn vpn-instance vpn1 bd-mode route-distinguisher 1.1.1.1:100 vpn-target 1.1.1.1:100 export-extcommunity vpn-target 1.1.1.1:100 import-extcommunity # bridge-domain 10 vxlan vni 1000 split-horizon-mode evpn binding vpn-instance vpn1 interface Ethernet1/0/9.10 mode l2 encapsulation untag bridge-domain 10这里注意在bd下配置vxlan要配置水平分割split-horizon-mod。这样从vxlan隧道学习到的mac不会发给其它隧道避免环路产生。但这也要求每台PE都要跟其它PE建立VXLAN隧道即要求全互联模式。下联端口是Ethernet1/0/9由于是直接接vpc的不需要配置VLAN所以使用了untag模式。最后配置nve接口使得各pe之前可通过bgp evpn的通知建立VXLAN隧道interface Nve1 source 1.1.1.1 vni 1000 head-end peer-list protocol bgp其它两台PE的配置基本一样只是要把source更改为自己的环回地址。配置完成之后查看vxlan隧道disp vxlan tun会发现每台PE都跟另外两台PE建立了vxlan隧道了而且下联的vpc二层互联彼此都能互相ping通华三的VSI就相当于华为的BD,华为需要通过NVE发现对端VTEP华三不需要华三的VSI-IF接口就是三层接口1、华三设备配置1配置ISIS使环回地址互通2配置BGP使能l2vpn evpn邻居3配置VSI关键配置如下l2vpn enablevsi vpnavxlan 1000evpn encapsulation vxlanroute-distinguisher 100:1000vpn-target 100:1000 export-extcommunityvpn-target 100:1000 import-extcommunityinterface GigabitEthernet1/0/2port link-mode routecombo enable fiberxconnect vsi vpnabgp 100peer 9.9.9.9 as-number 100peer 9.9.9.9 connect-interface LoopBack0#address-family l2vpn evpnundo policy vpn-targetpeer 9.9.9.9 enable