华为实验 ENSP模拟VXLAN EVPN分布式网关

拓扑

华为实验 ENSP模拟VXLAN EVPN分布式网关

文章插图
 
一、Ping网关不通
  1. 首先确认网关有没有ARP , 有不通的话 , 将pc重启 , 或者将物理接口重新undo shutdown 。
  2. PC写了网关 , 如果配置没问题的情况下 , 能到网关地址 , 就算不通 , 正常应该是TIMEOUT超时 。如果Ping回应是destination host unreachable不可达 , 有可能是BUG , 说明网关都找不到 , 重启PC , 或者接入SW 。
二、VXLAN隧道建立问题
  1. EVPN建立不起来 , 通常Underlay网关能起来 , EVPN基本没问题 , 有问题检查Underlay
  2. EVPN建立起来学习不到IRB路由条目 , 查看Vbdif下是否开启arp collect host enable , 这个命令作用是收集主机路由信息 , EVPN会将这些信息以TYPE 2路由传递给对端 。
三、CE L3GW学习到路由 , 跨子网能通 , 同子网不能通这个问题我研究了很久 , 最终是在bd域下加了arp broadcast-suppress enable(ARP广播抑制)与arp l2-proxy gateway-mac (L2网关代答)功能才能通 , 因为配置手册是不用加的 , 然后我针对加与不加抓包进行对比发现:
  1. 不加:192.168.1.1Ping192.168.1.2同网段 , 默认CE1收到BUM报文会找到对应L2 VNI的头端复制隧道列表 , 将广播报文发送到CE2 , CE2收到后发现VNI是发给自己的 , 解封装把BUM报文发个192.168.1.2 , 回报同理 , 后续发包就为单播了 , 但抓包一直发送是ARP广播包 , DMAC:全FFFF , 对面没回复 , 不明白是不是BUG 。
  2. 加ARP抑制 , L2网关代答 , 这2条命令缺一不可 , 少一条都不通 。
因为启用L2网关代答 , DMAC是CE1网关的MAC地址 , 这样才通的 , 但我认为不需要也能通 。
原因有两种情况:
  • 第一:ARP抑制 , 代答都不启用 , 正常第一个包全FFFF , 对端回应单播包 , 后续有MAC地址表就能正常转发 。
  • 第二:仅开启ARP抑制 , 第一个包为全FFFF , 发送至网关 , 网关上有type2路由主机信息(MAC/IP/VTEP IP/VNI ID) , 所以会将广播转单播 , 直接发送到对端VTEP节点上 , 对端VTEP解封装找到自己MAC地址打上VLAN ID送到主机上了 。
配置信息:
sysname CE1#device board 17 board-type CE-MPUBdevice board 1 board-type CE-LPUE#evpn-overlay enable#ip vpn-instance a ipv4-familyroute-distinguisher 1:1vpn-target 11:1 export-extcommunity evpnvpn-target 11:1 import-extcommunity evpn vxlan vni 10#bridge-domain 2 vxlan vni 2 evpnroute-distinguisher 1:1vpn-target 10:1 export-extcommunityvpn-target 11:1 export-extcommunityvpn-target 10:1 import-extcommunity arp broadcast-suppress enable#aaa # authentication-scheme default # authorization-scheme default # accounting-scheme default # domain default # domain default_admin#interface Vbdif2 ip binding vpn-instance a ip address 192.168.1.254 255.255.255.0 arp distribute-gateway enable arp collect host enable#interface MEth0/0/0 undo shutdown #interface GE1/0/0 undo shutdown#interface GE1/0/0.2 mode l2 encapsulation dot1q vid 2 bridge-domain 2#interface GE1/0/1 undo portswitch undo shutdown ip address 12.1.1.1 255.255.255.0#interface GE1/0/2 shutdown#interface GE1/0/3 shutdown#interface GE1/0/4 shutdown#interface GE1/0/5 shutdown#interface GE1/0/6 shutdown#interface GE1/0/7 shutdown#interface GE1/0/8 shutdown#interface GE1/0/9 shutdown#interface LoopBack0 ip address 1.1.1.1 255.255.255.255#interface Nve1 source 1.1.1.1 vni 2 head-end peer-list protocol bgp#interface NULL0#bgp 100 peer 2.2.2.2 as-number 100 peer 2.2.2.2 connect-interface LoopBack0 peer 12.1.1.2 as-number 100 # ipv4-family unicastnetwork 1.1.1.1 255.255.255.255peer 2.2.2.2 enablepeer 12.1.1.2 enable # l2vpn-family evpnpolicy vpn-targetpeer 2.2.2.2 enablepeer 2.2.2.2 advertise irbsysname CE2#device board 17 board-type CE-MPUBdevice board 1 board-type CE-LPUE#evpn-overlay enable#evpn#ip vpn-instance b ipv4-familyroute-distinguisher 2:2vpn-target 11:1 export-extcommunity evpnvpn-target 11:1 import-extcommunity evpn vxlan vni 10#bridge-domain 2 vxlan vni 2 evpnroute-distinguisher 2:3vpn-target 10:1 export-extcommunityvpn-target 11:1 export-extcommunityvpn-target 10:1 import-extcommunity#bridge-domain 3 vxlan vni 3 evpnroute-distinguisher 2:2vpn-target 20:1 export-extcommunityvpn-target 11:1 export-extcommunityvpn-target 20:1 import-extcommunity#aaa # authentication-scheme default # authorization-scheme default # accounting-scheme default # domain default # domain default_admin#interface Vbdif2 ip binding vpn-instance b ip address 192.168.1.254 255.255.255.0 arp distribute-gateway enable arp collect host enable#interface Vbdif3 ip binding vpn-instance b ip address 192.168.2.254 255.255.255.0 arp distribute-gateway enable arp collect host enable#interface MEth0/0/0 undo shutdown#interface GE1/0/0 undo shutdown#interface GE1/0/0.2 mode l2 encapsulation dot1q vid 2 bridge-domain 2#interface GE1/0/0.3 mode l2 encapsulation dot1q vid 3 bridge-domain 3#interface GE1/0/1 undo portswitch undo shutdown ip address 12.1.1.2 255.255.255.0#interface GE1/0/2 shutdown#interface GE1/0/3 shutdown#interface GE1/0/4 shutdown#interface GE1/0/5 shutdown#interface GE1/0/6 shutdown#interface GE1/0/7 shutdown#interface GE1/0/8 shutdown#interface GE1/0/9 shutdown#interface LoopBack0 ip address 2.2.2.2 255.255.255.255#interface Nve1 source 2.2.2.2 vni 2 head-end peer-list protocol bgp vni 3 head-end peer-list protocol bgp#interface NULL0#bgp 100 peer 1.1.1.1 as-number 100 peer 1.1.1.1 connect-interface LoopBack0 peer 12.1.1.1 as-number 100 # ipv4-family unicastnetwork 2.2.2.2 255.255.255.255peer 1.1.1.1 enablepeer 12.1.1.1 enable # l2vpn-family evpnpolicy vpn-targetpeer 1.1.1.1 enablepeer 1.1.1.1 advertise irb#ssh authorization-type default aaa#ssh server cipher aes256_gcm aes128_gcm aes256_ctr aes192_ctr aes128_ctr aes256_cbc aes128_cbc 3des_cbc#ssh server dh-exchange min-len 1024#ssh client cipher aes256_gcm aes128_gcm aes256_ctr aes192_ctr aes128_ctr aes256_cbc aes128_cbc 3des_cbc#user-interface con 0


推荐阅读