Dive into Calico - IP Interconnect Fabrics

| 分类 Network  | 标签 calico 

Calico的底层网络可以是L2网络,也可以是L3网络

Leaf-Spine Network Topology

现代数据中心都由传统的core/aggregation/access的网络架构,转向新的leaf-spine架构。

具体来说,比如用于虚拟化的大二层网络,ToR与spine之间为L2互联: FaricPath/TRILL/IRF等技术为代表,大二层网络不再使用STP消除环路,支持等价多路径转发(ECMP)等。

或者是普通的L3网络,ToR与spine之间L3(现在比较常见)、或者L2互联:

值得一提的是,facebook使用的这种架构:The network is all layer3 – from TOR uplinks to the edge.

IP Interconnect Fabrics

一般来说,有2种方式构建IP互联网络:

(1)基于IGP(The routing infrastructure is based on some form of IGP),比如OSPF协议。因为IGP有很多限制,Calico没有使用IGP,但可以将IGP与BGP结合起来,中间路由的下一跳使用IGP,端点的下一跳使用BGP。

(2)完全基于BGP(routing infrastructure is based entirely on BGP)。 这2种方式都假设ToR为边界router。

BGP-only interconnect fabrics

有2种方式构建BGP-only互联网络:

  • (1)AS per rack model ToR交换机及其下面的所有计算节点构成一个AS. Each of the TOR switches (and their subsidiary compute servers) are a unique Autonomous System (AS).

  • (2)AS per server model

每个计算节点为一个单独的AS,ToR交换机构成中间AS. Each of the compute servers is a unique AS, and the TOR switches make up a transit AS.

在上面2种模型中,ToR与spine之间可以是2层互联,或者3层互联。如果是3层互联,每个spine switch为一个单独的AS,ToR与spine为BGP peer。

The AS Per Rack model(ASPR)

  • (1)using Ethernet as the spine interconnect

ToR与spine之间为2层互联,ToR与ToR之间为eBGP peer,受ToR的数量限制,peer的数量可能会比较多(几百个)。

  • (2)using Routers as the spine interconnect

ToR与spine之间为3层互联,ToR与spine之间互为eBGP peer,不同的是,ToR不需要peer ToR,但spine必须peer所有ToR。

这2种方式中,同一个Rack下面的所有计算节点与ToR在相同的AS,它们之间可以使用BGP全互联(full mesh),也可以在Rack内部署route reflector:可以是ToR本身,或者rack下面的某个计算节点(either hosted on the ToR itself, or as a virtual function hosted on one or more compute servers within the rack)。

ToR作为eBGP router,会将其它ToR的路由分发给相同AS下的所有计算节点,同时将计算节点的路由分发给其它ToR(This means that each compute server will see the ToR as the next hop for all external routes, and the individual compute servers are the next hop for all routes external to the rack)

The AS per Compute Server model(ASPS)

每个计算点为一个单独的AS,也分2种情况:

  • (1)using Ethernet as the spine interconnect

  • (2)using Routers as the spine interconnect

ASPS的逻辑实现与ASPR基本一样。但有2个值得注意的地方:

(1)AS数量会比较多,所有应该使用4字节的 AS numbers。 从这一点来看,ASPR的扩展性会好一点。
(2)没有route reflector,所有的BGP peering都是eBGP。

The Downward Default model

这种方式比较特殊,所有的计算节点使用相同的AS number,所有的ToR也使用相同的AS number。

In this diagram, we are showing that all Calico nodes share the same AS number, as do all ToR switches. However, those ASs are different (A1 is not the same network as A2, even though the both share the same AS number A ).

小结

当Calico工作在3层网络的时候,需要ToR与计算节点,或者ToR与ToR之间开启动BGP peer,对物理网络的侵入性比较大。相比较而言,Overlay network不会依赖于物理网络,这也是Overlay的优势。

Reference


上一篇     下一篇