当前位置:网站首页>calico官网网络拓扑实现:基于eNSP与VMVare
calico官网网络拓扑实现:基于eNSP与VMVare
2022-04-22 19:46:00 【CylonChau】
Calico官网提供了两种网络设计模式:
AS per rack: 每个rack(机架)组成一个AS,每个rack的TOR交换机与核心交换机组成一个ASAS per server: 每个node做为一个AS,TOR交换机组成一个transit AS

每个TOR分为四个交换机,每个node与每个交换机都有连接。通过颜色区分每一个平面。
在Kubernetes平台中,使用calico brid生成的路由条目与endpoint相关,会对路由分配网段,这样可以减少路由条目数量,但不会改变路由数量级。当集群规模过大,endpoints与对应的路由条目也会随之增加,此时就需要可以处理一定量级路由的网络设备。无论使用那种网络模式,始终都会有一个网络设备上要存放calico网络拓扑中的所有路由。所以在使用calico网络时,需要确定网络处理能力,此时使用单独node或master代替bgp反射器不是很恰当了。
实验:完成基于AS per rack的网络设计
实验完成:
- 每一个rack分配一个AS号,node与TOR之间是ibgp,TOR之间是ebgp
- node只与TOR建立BGP连接关系,TOR与rack上的所有node建立BGP连接
- 所有TOR之间以
node-to-node mesh方式建立BGP连接
实验目标:将Node的BGP压力转移到了TOR之上。随着rack的增加,还可以使用Spine承担TOR的压力
联通vmvare与eNSP
选择"其他设备" 并添加"Cloud"到eNSP, 并设置对应接口

完成TOR拓扑

这里AR1 AR2 为TOR Cloud的对端为vmvare adpter,连接的是多个虚拟机,因为使用交换机相连,从概念上完成了一个简易的AS per rack。
配置交换机
system-view
sysname SW1
vlan batch 10 20 30
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20 30
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20 30
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20 30
配置TOR及OSPF
system-view
sysname R1
interface GigabitEthernet0/0/0
ip address 10.0.0.253 24
dis this
quit
interface l0
ip address 1.1.1.1 32
quit
ospf router-id 1.1.1.1
area 0
network 1.1.1.1 0.0.0.0
network 10.0.0.253 0.0.0.0
dis this
system-view
sysname R2
interface GigabitEthernet0/0/0
ip address 10.0.0.254 24
dis this
quit
interface l0
ip address 2.2.2.2 32
quit
ospf router-id 2.2.2.2
area 0
network 2.2.2.2 0.0.0.0
network 10.0.0.254 0.0.0.0
dis this
配置TOR间的EBGP
bgp 64512
router-id 10.0.0.253
peer 10.0.0.254 as-number 63400
bgp 63400
router-id 10.0.0.254
peer 10.0.0.253 as-number 64512
配置node与tor的bgp实体
bgp 64512
router-id 10.0.0.253
peer 10.0.0.5 as-number 64512
peer 10.0.0.5 reflect-client
dis ip interface brief
bgp 63400
router-id 10.0.0.254
peer 10.0.0.6 as-number 63400
peer 10.0.0.6 reflect-client
dis ip interface brief
配置calico与TOR间BGP关系
配置calico bgp rr需要用到 BGPConfiguration BGPPeer Node 对应的资源清单的配置
配置全局asNumber
apiVersion: projectcalico.org/v3
kind: BGPConfiguration
metadata:
name: default
spec:
logSeverityScreen: Info
nodeToNodeMeshEnabled: false
asNumber: 64512
配置bgp peer
注意bgp对等体作用域范围,也可以理解为使用
node specific: 生效与特定节点
globe: 全局配置,使用该配置时不能配置node和nodeSelector字段,这个配置将集群中所有的节点都建立bgp关系
node-to-node mesh:全互联模式
apiVersion: projectcalico.org/v3
kind: BGPPeer
metadata:
name: default-64512
spec:
node: master01 # 指定bgppeer生效范围,默认为全局模式
peerIP: 10.0.0.253 # bgp对等体的IP
asNumber: 64512
---
apiVersion: projectcalico.org/v3
kind: BGPPeer
metadata:
name: default-63400
spec:
node: node02
peerIP: 10.0.0.254
asNumber: 63400
此时可以看到node与tor间形成了对应的bgp rr
[root@node02 ~]# calicoctl node status
Calico process is running.
IPv4 BGP status
+--------------+---------------+-------+----------+-------------+
| PEER ADDRESS | PEER TYPE | STATE | SINCE | INFO |
+--------------+---------------+-------+----------+-------------+
| 10.0.0.254 | node specific | up | 14:34:30 | Established |
+--------------+---------------+-------+----------+-------------+
[root@master01 ~]# calicoctl node status
Calico process is running.
IPv4 BGP status
+--------------+---------------+-------+----------+-------------+
| PEER ADDRESS | PEER TYPE | STATE | SINCE | INFO |
+--------------+---------------+-------+----------+-------------+
| 10.0.0.253 | node specific | up | 01:29:08 | Established |
+--------------+---------------+-------+----------+-------------
对应的tor中也学习到相应的pod间的路由条目,而TOR只与自己建立bgp rr的node的路由进行学习,其他Node的Pod间路由,由tor之间的EBGP进行学习到的。
[R1]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 11 Routes : 11
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
2.2.2.2/32 OSPF 10 1 D 10.0.0.254 GigabitEthernet0/0/0
10.0.0.0/24 Direct 0 0 D 10.0.0.253 GigabitEthernet0/0/0
10.0.0.253/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
10.0.0.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
10.244.140.64/26 EBGP 255 0 D 10.0.0.6 GigabitEthernet0/0/0
10.244.241.64/26 IBGP 255 0 RD 10.0.0.5 GigabitEthernet0/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
对应的文件
版权声明
本文为[CylonChau]所创,转载请带上原文链接,感谢
https://blog.csdn.net/sinat_24092079/article/details/120676423
边栏推荐
- NAVICAT 中,如何执行存储过程?
- dotnet 通过 WMI 获取设备厂商
- How can I apply for new shares? Is it safe to apply for new shares?
- The SQL statement obtains each day, week, month and year according to the start and end date
- 关于log4j2的重新加载,以及不同级别日志输出到不同日志文件
- EXCEL 多个相似表格合并计算(合并计算工具)
- MYSQL,组合的唯一索引中,处理NULL值的问题
- 番禺海事处扎实推进水上从业人员安全宣教培训百日行动
- 骗子用AI语音获利近1.8亿,受害者:听不出来是机器人啊
- Learning Android 7 from scratch -- sharing data across programs
猜你喜欢

数据中心碳中和之路,新华三如何全栈赋能?
![[2022 fresh students see] can an inexperienced college graduate change his career to do software testing?](/img/62/3726b18cd949c30a717845b519d22c.png)
[2022 fresh students see] can an inexperienced college graduate change his career to do software testing?

软件测试入行必看,一文800字教你Allure 测试报告环境搭建

Speak through object prototype. toString. call()

Learning Android 7 from scratch -- sharing data across programs

DNS资源记录详解&权威|递归解析区别(超细致)

【自动化测试基础知识】自动化测试的基本概念及常用框架

. net learning notes (III) -- ubiquitous features

一百多天,0基础自学转行软件测试,从月薪3000到15k,我整理的超全学习指南

Royalscope quickly locates the fault node in the can network and arranges the quality of the CAN bus
随机推荐
sqlserver中查询是否有死锁存在
嵌入式Web项目(一)——Web服务器的引入
Speak through object prototype. toString. call()
一百多天,0基础自学转行软件测试,从月薪3000到15k,我整理的超全学习指南
【AI视野·今日Robot 机器人论文速览 第三十三期】Thu, 21 Apr 2022
DNS资源记录详解&权威|递归解析区别(超细致)
【自动化测试基础知识】自动化测试的基本概念及常用框架
开源免费,最好用的3大系统9大防火墙软件安利给你们
The origin explanation and use example of image pre training model
How about CITIC Securities? Is it safe for qiniu school to open an account?
Recursive data query of tree structure in a table in SQL Server
Golang本地缓存选型对比及原理总结
Royalscope quickly locates the fault node in the can network and arranges the quality of the CAN bus
Software testing industry must see, a text of 800 words to teach you how to build the allure test report environment
uniapp商品分类选项卡
软件测试入行必看,一文800字教你Allure 测试报告环境搭建
光刻机巨头ASML爆料:芯片太缺,都开始拆洗衣机了!
Influxdb deletes a piece of data according to time
这就是深度学习如此强大的原因
启牛商学院理财app下载是不是真的,在启牛开户安全吗