VxLAN数据中心L2互连(hand-off方式)

news2024/10/6 23:18:10

用Arista的veos做了个DCI(hand-off)实验。模拟了VxLAN数据中心hand-off方式做L2互通。
在此分享。

实现思路

分别在DC1、DC2内配置BGP EVPN协议创建VXLAN隧道,实现各数据中心内部VM之间的通信,DC1-BL和DC2-BL通过二层接口方式接入DCI-VTEP1和DCI-VTEP2,DCI-VTEP1和DCI-VTEP2之间配置EVPN协议创建VXLAN隧道,实现数据中心之间的通信。DC1-BL和DC2-BL将收到的数据中心侧的VXLAN报文进行解封装,然后发送到DCI-VTEP,DCI-VTEP将收到的VLAN报文重新封装成VXLAN报文后发送给对端DCI-VTEP,实现VXLAN隧道对跨数据中心的报文端到端的承载,保证跨数据中心VM之间的通信。
在这里插入图片描述

拓扑图

在这里插入图片描述

实验拓扑里直接在DCI-VTEP之间做L3互连,省略了WAN。
实验完成后,使DC1中的主机VPC6、VPC34和DC2中的主机VPC35、VPC7在一个大二层内。

配置步骤

1.配置各节点IP地址。
2.配置路由实现各节点之间的互通。
3.在DC1和DC2内分别创建EBGP邻居,配置BGP EVPN协议创建VXLAN隧道。
4.在DCI-VTEP之间配置BGP EVPN协议创建VXLAN隧道。
5.在DC-BL与DCI-VTEP通过二层接口方式互连。

数据准备

IP

DC1设备接口IP对端设备接口IP
DC1-Spine1eth110.1.2.1/30DC1-Leaf1eth110.1.2.2/30
DC1-Spine1eth210.1.3.1/30DC1-Leaf2eth110.1.3.2/30
DC1-Spine1eth310.1.4.1/30DC1-BL1eth110.1.4.2/30
DC1-Spine1eth410.1.5.1/30DC1-BL2eth110.1.5.2/30
DC1-Spine2eth110.2.2.1/30DC1-Leaf1eth210.2.2.2/30
DC1-Spine2eth210.2.3.1/30DC1-Leaf2eth210.2.3.2/30
DC1-Spine2eth310.2.4.1/30DC1-BL1eth210.2.4.2/30
DC1-Spine2eth410.2.5.1/30DC1-BL2eth210.2.5.2/30
DC1-BL1eth4172.16.0.1/30DC1-BL2eth4172.16.0.2/30
DC1-Spine1Lo010.0.0.1/32DC1-Spine2Lo010.0.0.2/32
DC1-Leaf1Lo010.0.0.3/32DC1-Leaf2Lo010.0.0.4/32
DC1-BL1Lo010.0.0.5/32DC1-BL2Lo010.0.0.6/32
DC1-BL1/2Lo11.1.1.1/32 BL1&2Lo1相同
VPC6eth0192.168.100.6VPC34eth0192.168.100.34
DCI设备接口IP对端设备接口IP
DCI-VTEP1Po2172.17.0.0/31DCI-VTEP2Po2172.17.0.1/31
DCI-VTEP1Lo010.0.0.26/32DCI-VTEP2Lo010.0.0.50/32
DC2设备接口IP对端设备接口IP
DC2-Spine1eth120.1.1.1/30DC2-BL1eth120.1.1.2/30
DC2-Spine1eth220.1.2.1/30DC2-BL2eth120.1.2.2/30
DC2-Spine1eth320.1.3.1/30DC2-Leaf1eth120.1.3.2/30
DC2-Spine1eth420.1.4.1/30DC2-Leaf2eth120.1.4.2/30
DC2-Spine2eth120.2.1.1/30DC2-BL1eth220.2.1.2/30
DC2-Spine2eth220.2.2.1/30DC2-BL2eth220.2.2.2/30
DC2-Spine2eth320.2.3.1/30DC2-Leaf1eth220.2.3.2/30
DC2-Spine2eth420.2.4.1/30DC2-Leaf2eth220.2.4.2/30
DC2-BL1eth4192.168.2.1/30DC1-BL2eth4192.168.2.2/30
DC2-Spine1Lo010.0.0.51/32DC2-Spine2Lo010.0.0.52/32
DC2-Leaf1Lo010.0.0.53/32DC2-Leaf2Lo010.0.0.54/32
DC2-BL1Lo010.0.0.28/32DC1-BL2Lo010.0.0.29/32
DC2-BL1/2Lo12.2.2.2/32 BL1&2Lo1相同
VPC35eth0192.168.100.35VPC7eth0192.168.100.7

AS

设备AS设备AS
DC1-Spine1100DC1-Spine299
DC1-Leaf1101DC1-Leaf2102
DC1-BL1103DC1-BL2104
DCI-VTEP160026DCI-VTEP265050
DC2-Spine165051DC2-Spine265052
DC2-Leaf165053DC2-Leaf265054
DC2-BL165028DC2-BL265029

详细配置

Spine
以DC1-Spine1为例:
service routing protocols model multi-agent
spanning-tree mode none
interface Ethernet1
mtu 9200
no switchport
ip address 10.1.2.1/30
interface Ethernet2
mtu 9200
switchport access vlan 1800
no switchport
ip address 10.1.3.1/30
interface Ethernet3
mtu 9200
no switchport
ip address 10.1.4.1/30
interface Ethernet4
mtu 9200
no switchport
ip address 10.1.5.1/30
interface Loopback0
ip address 10.0.0.1/32
ip routing
router bgp 100
router-id 10.0.0.1
no bgp default ipv4-unicast
maximum-paths 128
neighbor overlay peer group
neighbor overlay update-source Loopback0
neighbor overlay ebgp-multihop
neighbor overlay send-community extended
neighbor overlay maximum-routes 0
neighbor underlay peer group
neighbor underlay maximum-routes 0
neighbor 10.0.0.3 peer group overlay
neighbor 10.0.0.3 remote-as 101
neighbor 10.0.0.4 peer group overlay
neighbor 10.0.0.4 remote-as 102
neighbor 10.0.0.5 peer group overlay
neighbor 10.0.0.5 remote-as 103
neighbor 10.0.0.6 peer group overlay
neighbor 10.0.0.6 remote-as 103
neighbor 10.1.2.2 peer group underlay
neighbor 10.1.2.2 remote-as 101
neighbor 10.1.3.2 peer group underlay
neighbor 10.1.3.2 remote-as 102
neighbor 10.1.4.2 peer group underlay
neighbor 10.1.4.2 remote-as 103
neighbor 10.1.5.2 peer group underlay
neighbor 10.1.5.2 remote-as 103
address-family evpn
neighbor overlay activate
address-family ipv4
neighbor underlay activate
network 10.0.0.1/32

Leaf
以DC1-Leaf1为例:
service routing protocols model multi-agent
spanning-tree mode none
vlan 2-4000
interface Ethernet1
mtu 9200
no switchport
ip address 10.1.2.2/30
interface Ethernet2
mtu 9200
no switchport
ip address 10.2.2.2/30
interface Ethernet3
mtu 9200
switchport access vlan 100
interface Loopback0
ip address 10.0.0.3/32
interface Vxlan1
vxlan source-interface Loopback0
vxlan udp-port 4789
vxlan vlan 100,200 vni 10100,10200
ip routing
router bgp 101
router-id 10.0.0.3
no bgp default ipv4-unicast
maximum-paths 128
neighbor overlay peer group
neighbor overlay update-source Loopback0
neighbor overlay ebgp-multihop
neighbor overlay send-community extended
neighbor overlay maximum-routes 0
neighbor underlay peer group
neighbor underlay maximum-routes 0
neighbor 10.0.0.1 peer group overlay
neighbor 10.0.0.1 remote-as 100
neighbor 10.0.0.2 peer group overlay
neighbor 10.0.0.2 remote-as 99
neighbor 10.1.2.1 peer group underlay
neighbor 10.1.2.1 remote-as 100
neighbor 10.2.2.1 peer group underlay
neighbor 10.2.2.1 remote-as 99
vlan-aware-bundle vlans-1
rd 1:101
route-target both 1:1
redistribute learned
vlan 100,200
address-family evpn
neighbor overlay activate
address-family ipv4
neighbor underlay activate
network 10.0.0.3/32

Border-Leaf
以DC1-BL1为例:
service routing protocols model multi-agent
hostname DC1-BL1
spanning-tree mode mstp #BL开启生成树
no spanning-tree vlan-id 4094
vlan 100,200
vlan 4094
name mlag
trunk group mlagpeer
interface Port-Channel1 #互连DCI-VTEP1
mtu 9200
switchport mode trunk
mlag 1 #BL1、BL2相同
interface Ethernet1
mtu 9200
no switchport
ip address 10.1.4.2/30
interface Ethernet2
mtu 9200
no switchport
ip address 10.2.4.2/30
interface Ethernet3
channel-group 1 mode active
interface Ethernet4
mtu 9200
switchport mode trunk
switchport trunk group mlagpeer
interface Loopback0
ip address 10.0.0.5/32
interface Loopback1
ip address 1.1.1.1/32 #BL1、BL2相同
interface Management1
interface Vlan4094
ip address 172.16.0.1/30 #peer-link 互连IP
interface Vxlan1
vxlan source-interface Loopback1 #BL1、BL2 VTEP源IP相同
vxlan udp-port 4789
vxlan vlan 100,200 vni 10100,10200
ip routing
mlag configuration
domain-id mlag-domain
local-interface Vlan4094
peer-address 172.16.0.2
peer-link Ethernet4
dual-primary detection delay 5 action errdisable all-interfaces
router bgp 103
router-id 10.0.0.5
no bgp default ipv4-unicast
maximum-paths 128
neighbor overlay peer group
neighbor overlay update-source Loopback0
neighbor overlay ebgp-multihop
neighbor overlay send-community extended
neighbor overlay maximum-routes 0
neighbor underlay peer group
neighbor underlay maximum-routes 0
neighbor 10.0.0.1 peer group overlay
neighbor 10.0.0.1 remote-as 100
neighbor 10.0.0.2 peer group overlay
neighbor 10.0.0.2 remote-as 99
neighbor 10.1.4.1 peer group underlay
neighbor 10.1.4.1 remote-as 100
neighbor 10.2.4.1 peer group underlay
neighbor 10.2.4.1 remote-as 99
neighbor 172.16.0.2 remote-as 104 #BL1与BL2 BGP 通过peer-link建邻居,作为上联BGP冗余
vlan-aware-bundle vlans-1
rd 1:103
route-target both 1:1
redistribute learned
vlan 100,200
address-family evpn
neighbor overlay activate
address-family ipv4
neighbor underlay activate
neighbor 172.16.0.2 activate
network 1.1.1.1/32
network 10.0.0.5/32

DCI-VTEP
以DCI-VTEP1为例:
service routing protocols model multi-agent
spanning-tree mode none
vlan 100,200
interface Port-Channel1 #DCI-VTEP 互连DC-BL
mtu 9200
switchport trunk allowed vlan 100
switchport mode trunk
interface Port-Channel2 #DCI-VTEP 间互连
mtu 9200
no switchport
ip address 172.17.0.0/31
interface Ethernet1
no switchport
channel-group 1 mode active
!
interface Ethernet2
channel-group 1 mode active
!
interface Ethernet3
channel-group 2 mode active
!
interface Ethernet4
channel-group 2 mode active
interface Loopback0
ip address 10.0.0.26/32
interface Vxlan1
vxlan source-interface Loopback0
vxlan udp-port 4789
vxlan vlan 100,200 vni 10100,10200
ip routing
router bgp 65026
no bgp default ipv4-unicast
neighbor over-ebgp peer group
neighbor 10.0.0.50 remote-as 65050
neighbor 10.0.0.50 update-source Loopback0
neighbor 10.0.0.50 ebgp-multihop
neighbor 10.0.0.50 send-community extended
neighbor 10.0.0.50 maximum-routes 0
neighbor 172.17.0.1 remote-as 65050
neighbor 172.17.0.1 maximum-routes 0
vlan-aware-bundle vlans-1
rd 26:1
route-target both 1:1
redistribute learned
vlan 100,200
address-family evpn
neighbor 10.0.0.50 activate
address-family ipv4
neighbor 172.17.0.1 activate
network 10.0.0.26/32

状态检查

DC内部bgp ipv4、evpn地址族建立
在这里插入图片描述
DC内VTEP
在这里插入图片描述
DC-Leaf1 mac-table,本地MAC 6806,其余MAC从Vx1学到
在这里插入图片描述
DCI-VTEP mac-table,DC1 的两个MAC 6806、6822从Po1学到(不带vxlan 封装),DC2两个MAC 6807、6823从Vx1学到(vxlan封装)
在这里插入图片描述
从VM vpc6 ping其它主机,可以通。
在这里插入图片描述

适用场景

当DC和WAN是不同的提供商时,可以用这种比较简单的解决方案。
但是由于两个DC属于不同EVPN-VXLAN域,所以 不能支持TYPE2 Mac mobility、ARP suppression。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/418144.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

spring事务(注解 @Transactional )失效场景

目录标题1. 代理不生效1.1 将注解标注在接口方法上1.2 被final、static关键字修饰的类或方法1.3 类方法内部调用示例解决方案:新加一个Service方法1.4 (类本身) 未被spring管理2. 框架或底层不支持的功能2.1 非public修饰的方法2.2 多线程调用举例1举例22.3 数据库本…

C. Uncle Bogdan and Country Happiness(dfs + 回溯)

Problem - C - Codeforces 波格丹叔叔在弗林特船长的团队里待了很长一段时间,有时会怀念他的家乡。今天他告诉你他的国家是如何引入幸福指数的。有n个城市和n -1条连接城市的无方向道路。任何城市的公民都可以通过这些道路到达任何其他城市。城市编号从1到n&#xf…

【软考:软件设计师】 4 计算机组成与体系结构(三)计算机安全 | 加密技术

欢迎来到爱书不爱输的程序猿的博客, 本博客致力于知识分享,与更多的人进行学习交流 本文收录于软考中级:软件设计师系列专栏,本专栏服务于软考中级的软件设计师考试,包括不限于知识点讲解与真题讲解两大部分,并且提供电子教材与电子版真题,关注私聊即可 …

服务(第二篇)LAMP

一、编译安装apache ①关闭防火墙,将安装Apache所需软件包传到/opt目录下 systemctl stop firewalld.service setenforce 0 [rootxxx opt]# ls apr-1.6.2.tar.gz apr-util-1.6.0.tar.gz httpd-2.4.29.tar.bz2 ②安装环境依赖包 yum -y install gcc gcc-c mak…

专业排名全美top6|建筑学硕士学历CSC获批顺利赴美

E老师人文社科背景,二本院校任教,硕士毕业,没有英文文章,且申请周期只有一个月。据此我们提出,以赶上CSC申报为前提,尽量申请美国综合或者专业排名靠前的学校。最终我们助E老师获得美国专业排名TOP6的弗吉尼…

六个阶段形成CRM销售漏斗,优点有哪些

CRM销售漏斗是反映机会状态以及销售效率的重要的销售管理模型。对企业来说,CRM销售漏斗是一个必不可少的工具。通过销售漏斗,企业可以跟踪和分析客户旅程的每个阶段,并制定相应的销售战略。下面来说说,什么是CRM销售漏斗&#xff…

高频PCB电路设计常见的66个问题

随着电子技术快速发展,以及无线通信技术在各领域的广泛应用,高频、高速、高密度已逐步成为现代电子产品的显著发展趋势之一。信号传输高频化和高速数字化,迫使PCB走向微小孔与埋/盲孔化、导线精细化、介质层均匀薄型化,高频高速高…

Redis消息队列实现异步秒杀

Redis秒杀优化 改进秒杀业务,提高并发性能 需求: 1.新增秒杀优惠券的同时,将优惠券的信息保存到redis中 2.基于Lua脚本,判断秒杀库存,一人一单,决定用户是否抢购成功 3.如果抢购成功,将优惠…

Android系统启动流程--init进程的启动流程

这可能是个系列文章,用来总结和梳理Android系统的启动过程,以加深对Android系统相对全面的感知和理解(基于Android11)。 1.启动电源,设备上电 引导芯片代码从预定义的地方(固化在ROM,全称Read …

hive 入门 一般用于正式环境 修改元数据(二)

安装配置可参考 https://blog.csdn.net/weixin_43205308/article/details/130020674 1、如果启动过derby,最小初始化过 在安装路径下删除 derby.log metastore_db rm -rf derby.log metastore_db此处省略安装mysql数据库 2、配置MySQL 登录mysql mysql -uroot …

EightCap易汇:外汇投资入门需要了解哪些必要知识?

外汇市场是国际投资市场,日内交易量巨大,盈利机会极多。外汇是一种含有杠杆的投资产品,杠杆带来了高收益,也会带来高风险,对于外汇新手来说存在一定难度。新手投资者要如何交易,才能抓住外汇市场的盈利机会…

C++标准库 -- 关联容器 (Primer C++ 第五版 · 阅读笔记)

C标准库 -- 关联容器(Primer C 第五版 阅读笔记)第11章 关联容器------(持续更新)11.1、使用关联容器11.2、关联容器概述11.3、关联容器操作11.4、无序容器第11章 关联容器------(持续更新) 关联容器和顺序容器有着根本的不同:关联容器中的元素是按关键字来保存和…

助力AI语音开发者的社区-语音之家

语音之家简介 语音之家成立于2021年4月,是一家助力AI语音开发者的社区,我们希望通过知识传播、在线学习、资源分享、各类活动等方式提供全生命周期的服务,帮助全球的AI语音开发者获得成长,洞见AI语音技术领域的发展。目前&#x…

TiDB实战篇-TiDB Lightning 导入数据

简介 使用TiDB Lightning 导入数据。 原理 TiKV进入导入模式 它是使用物理导入的模式,将SQL文件直接导入到TiKV中,它是一种初始化的导入,也就是说目标的数据库和表都是不能够存在的(注意事项,在这种方式导入的时候T…

论文笔记 U-Net: Convolutional Networks for Biomedical Image Segmentation

摘要:人们普遍认为,深度网络的成功训练需要数千个带注释的训练样本。在本文中,我们提出了一种网络和训练策略,该策略依赖于大量使用数据增强来更有效地使用可用的注释样本。该体系结构包括用于捕获上下文的收缩路径和用于实现精确…

计算机组件介绍

1. CPU 1.1 主频 1.2 CPU缓存 注:越高越好 2. Memory 注:只有内存是主存(因为CPU只能和内存打交道),硬盘这种就是外存(因为硬盘太慢了,跟不上cpu的运行速度) 3. I/O 注:输…

Segment Anything论文翻译,SAM模型,SAM论文,SAM论文翻译;一个用于图像分割的新任务、模型和数据集;SA-1B数据集

【论文翻译】- Segment Anything / Model / SAM论文 论文链接: https://arxiv.org/pdf/2304.02643.pdfhttps://ai.facebook.com/research/publications/segment-anything/ 代码连接:https://github.com/facebookresearch/segment-anything 论文翻译&…

微软 AI 作图上线完全免费,“奖励自己”可提升速度

ChatGPT 的横空出世应该已经让大家意识到了 AI 的恐怖。 称不上啥都能干,但给东西它真学,学得还比你快。 最近一段时间 AI 在作图领域又一次人气暴涨。 什么小姐姐写真、突破时间线的历史古图、甚至是抽象的表情包都可能源于 AI 之手。 看着手痒想玩玩…

滴滴滴,请看MYSQL事务的四大特征(ACID)的实现原理:晓其原理而通其实现。

一.什么是事务的四特征 原子性(Atomicity,或称不可分割性)一致性(Consistency)隔离性(Isolation)持久性(Durability) 接下来,我们将对四大特性的具体概念以及…

本地快速搭建Kubernetes单机版实验环境(含问题解决方案)

Kubernetes是一个容器编排系统,用于自动化应用程序部署、扩展和管理。本指南将介绍Kubernetes的基础知识,包括基本概念、安装部署和基础用法。 一、什么是Kubernetes? Kubernetes是Google开发的开源项目,是一个容器编排系统&…