VxLAN 分布式对称 IRB 实验

一、拓扑

描述:

CE1 上的 VRF A 上开启用户A 的 vlan 10、20网关,CE2 的 VRF A 上开启用户 A 的 vlan 20、30 的网关

要求:

全域互访

二、配置思路:

1、网络侧配置 underlayer 底层互通

1)CE1、2 配置 IGP,让 loo0 互通

2)CE1、2 建立 BGP EVPN 邻居,建立 EVPN 路由传输通道(全局要先开启 evpn-overlay enable)

2、配置 overlayer 上层互通

1)网络侧:

a、配置 BD,配二层 vni 号,在 EVPN 地址族下分配 RD、RT
b、配置 VRF,配三层 vni 号,配置 evpn 地址族下的 RD、RT
c、配 VBDIF 三层网关,关联 VRF
d、配 NVE 接口,为 leaf 之间开通 vxlan 隧道,方法:头端复制,对端列表以 BGP 协议动态生成
e、由于 CE1 和 CE2 都有 BD 20,在两个 leaf 的 vbdif 20上,配置相同的 MAC 地址,开启任播网关功能:vxlan anycast-gateway enable

2)用户侧:

a、配置 VAP 接口,接入租户的二、三层 vlan 网络

3、此时架构完成,在 PC 端测试不通,还需要完成以下几点:

1)要产生 IRB 路由,并通告给对端:

a、产生:在 vbdif 下,收集 arp 主机路由:arp collect host enable

2)IRB 路由接收:

为了让 IRB 路由能够进入到对端的 EVPN 路由表中,需要把三层 VRF 的 ERT 写入到本端的 BD EVPN 的 ERT中,同时补完 IRB 路由(加上三层 vni),方法:两出一进,两个 ERT,一个 IRT

三、详细配置:

CE1:

复制代码
evpn-overlay enable
#
ip vpn-instance A
 ipv4-family
  route-distinguisher 1:1
  vpn-target 1:1 export-extcommunity evpn
  vpn-target 1:1 import-extcommunity evpn
 vxlan vni 1000
#
bridge-domain 10
 vxlan vni 5010
 evpn
  route-distinguisher 5010:1
  vpn-target 5010:1 export-extcommunity
  vpn-target 1:1 export-extcommunity
  vpn-target 5010:1 import-extcommunity
#
bridge-domain 20
 vxlan vni 5020
 evpn
  route-distinguisher 5020:1
  vpn-target 5010:1 export-extcommunity
  vpn-target 1:1 export-extcommunity
  vpn-target 5010:1 import-extcommunity
#
interface Vbdif10
 ip binding vpn-instance A
 ip address 10.1.1.254 255.255.255.0
 arp collect host enable
#
interface Vbdif20
 ip binding vpn-instance A
 ip address 10.2.2.254 255.255.255.0
 mac-address 0001-0001-0001
 vxlan anycast-gateway enable
 arp collect host enable
#
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
#
interface GE1/0/1
 undo portswitch
 undo shutdown
 ip address 10.1.12.1 255.255.255.252
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255
#
interface Nve1
 source 1.1.1.1
 vni 5010 head-end peer-list protocol bgp
 vni 5020 head-end peer-list protocol bgp
#
bgp 12
 router-id 1.1.1.1
 undo default ipv4-unicast
 peer 2.2.2.2 as-number 12
 peer 2.2.2.2 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo peer 2.2.2.2 enable
 #
 l2vpn-family evpn
  policy vpn-target
  peer 2.2.2.2 enable
  peer 2.2.2.2 advertise irb
#
ospf 1 router-id 1.1.1.1
 area 0.0.0.0
  network 1.1.1.1 0.0.0.0
  network 10.1.12.0 0.0.0.3
#

CE2:

复制代码
evpn-overlay enable
#
ip vpn-instance A
 ipv4-family
  route-distinguisher 2:2
  vpn-target 1:1 export-extcommunity evpn
  vpn-target 1:1 import-extcommunity evpn
 vxlan vni 1000
#
bridge-domain 20
 vxlan vni 5020
 evpn
  route-distinguisher 5020:2
  vpn-target 1:1 export-extcommunity
  vpn-target 5010:1 export-extcommunity
  vpn-target 5010:1 import-extcommunity
#
bridge-domain 30
 vxlan vni 5030
 evpn
  route-distinguisher 5030:2
  vpn-target 1:1 export-extcommunity
  vpn-target 5010:1 export-extcommunity
  vpn-target 5010:1 import-extcommunity
#
interface Vbdif20
 ip binding vpn-instance A
 ip address 10.2.2.254 255.255.255.0
 mac-address 0001-0001-0001
 vxlan anycast-gateway enable
 arp collect host enable
#
interface Vbdif30
 ip binding vpn-instance A
 ip address 10.3.3.254 255.255.255.0
 arp collect host enable
#
interface GE1/0/0.20 mode l2
 encapsulation dot1q vid 20
 bridge-domain 20
#
interface GE1/0/0.30 mode l2
 encapsulation dot1q vid 30
 bridge-domain 30
#
interface GE1/0/1
 undo portswitch
 undo shutdown
 ip address 10.1.12.2 255.255.255.252
#
interface LoopBack0
 ip address 2.2.2.2 255.255.255.255
#
interface Nve1
 source 2.2.2.2
 vni 5020 head-end peer-list protocol bgp
 vni 5030 head-end peer-list protocol bgp
#
bgp 12
 router-id 2.2.2.2
 undo default ipv4-unicast
 peer 1.1.1.1 as-number 12
 peer 1.1.1.1 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo peer 1.1.1.1 enable
 #
 l2vpn-family evpn
  policy vpn-target
  peer 1.1.1.1 enable
  peer 1.1.1.1 advertise irb
#
ospf 1 router-id 2.2.2.2
 area 0.0.0.0
  network 2.2.2.2 0.0.0.0
  network 10.1.12.0 0.0.0.255
#

四、验证:

1、查看 bgp evpn 邻居关系是否建立:

2、查看 vxlan 隧道状态:

3、做 ping 通测试

相关推荐
wanhengidc2 小时前
云手机 高振畅玩不踩坑
运维·服务器·安全·web安全·智能手机
有谁看见我的剑了?2 小时前
linux 添加硬盘后系统识别不到硬盘处理
linux·运维·服务器
JoyCong19982 小时前
ToDesk远程屏幕墙技术白皮书:如何重塑全局运维视界
运维·电脑·远程工作
易连EDI—EasyLink2 小时前
易连EDI–EasyLink实现OCR智能数据采集
网络·人工智能·安全·汽车·ocr·edi
偶尔上线经常挺尸3 小时前
《100个“反常识”经验15:Nginx 502排查:从应用到内核》
运维·nginx·性能调优·反向代理·502错误·http排错
@insist1233 小时前
信息安全工程师考点精讲:身份认证核心原理与分类体系(上篇)
大数据·网络·分类·信息安全工程师·软件水平考试
SmartRadio3 小时前
ESP32-S3 双模式切换实现:兼顾手机_路由器连接与WiFi长距离通信
开发语言·网络·智能手机·esp32·长距离wifi
_.Switch4 小时前
东方财富股票数据JS逆向:secids字段和AES加密实战
开发语言·前端·javascript·网络·爬虫·python·ecmascript
思茂信息4 小时前
CST软件如何进行参数化扫描?
运维·开发语言·javascript·windows·ecmascript·软件工程·软件需求
计算机安禾4 小时前
【Linux从入门到精通】第31篇:防火墙漫谈——iptables与firewalld防护指南
linux·运维·php