標籤:

數據中心架構下ospf bgp如何選擇及優缺點?


這裡不談傳統數據中心。

按照數據中心規模來看,中小型數據中心可以採用Ethernet Fabric的架構,這個有很多選擇,例如Cisco的N7K+N5K+N2K,N95+N93,Juniper的VCF,Fusion等。這裡都是廠商私有解決方案,這裡路由協議基本沒有太多使用,都是基於網路的虛擬化解決方案。

但是,如果數據中心太大,伺服器太多,我們稱為超大規模數據中心,那麼就要考慮IP Fabric的做法,具體鏈接方式為CLOS方式。在Underlay使用ebgp,在Overlay採用ibgp的方式,封裝數據採用VXLAN,控制協議採用EVPN。

最後,回答一下為什麼使用BGP而不使用OSPF的問題,在大規模部署TOR時,採用EBGP的收斂速度更快,利用iBGP的特性,例如RR,可以方便的的分發TOR的路由,所以BGP是比OSPF更好的選擇


我覺得這個主要看規模,由於ospf會有Link-state flooding,以及每30分鐘的periodic updates,所以當數據中心規模比較大,交換機比較多的情況下,使用ospf對交換機的cpu的開銷會比較大。

所以如果選擇L3到邊的話,規模大的話BGP更加合適。下面貼一個rfc原文,講的比較詳細:

5. Routing Protocol Design

In this section, the motivations for using External BGP (EBGP) as the

single routing protocol for data center networks having a Layer 3

protocol design and Clos topology are reviewed. Then, a practical

approach for designing an EBGP-based network is provided.

5.1. Choosing EBGP as the Routing Protocol

REQ2 would give preference to the selection of a single routing

protocol to reduce complexity and interdependencies. While it is

common to rely on an IGP in this situation, sometimes with either the

addition of EBGP at the device bordering the WAN or Internal BGP

(IBGP) throughout, this document proposes the use of an EBGP-only

design.

Although EBGP is the protocol used for almost all Inter-Domain

Routing in the Internet and has wide support from both vendor and

service provider communities, it is not generally deployed as the

primary routing protocol within the data center for a number of

reasons (some of which are interrelated):

o BGP is perceived as a "WAN-only, protocol-only" and not often

considered for enterprise or data center applications.

o BGP is believed to have a "much slower" routing convergence

compared to IGPs.

o Large-scale BGP deployments typically utilize an IGP for BGP next-

hop resolution as all nodes in the IBGP topology are not directly

connected.

o BGP is perceived to require significant configuration overhead and

does not support neighbor auto-discovery.

This document discusses some of these perceptions, especially as

applicable to the proposed design, and highlights some of the

advantages of using the protocol such as:

o BGP has less complexity in parts of its protocol design --

internal data structures and state machine are simpler as compared

to most link-state IGPs such as OSPF. For example, instead of

implementing adjacency formation, adjacency maintenance and/or

flow-control, BGP simply relies on TCP as the underlying

transport. This fulfills REQ2 and REQ3.

o BGP information flooding overhead is less when compared to link-

state IGPs. Since every BGP router calculates and propagates only

the best-path selected, a network failure is masked as soon as the

BGP speaker finds an alternate path, which exists when highly

symmetric topologies, such as Clos, are coupled with an EBGP-only

design. In contrast, the event propagation scope of a link-state

IGP is an entire area, regardless of the failure type. In this

way, BGP better meets REQ3 and REQ4. It is also worth mentioning

that all widely deployed link-state IGPs feature periodic

refreshes of routing information while BGP does not expire routing

state, although this rarely impacts modern router control planes.

o BGP supports third-party (recursively resolved) next hops. This

allows for manipulating multipath to be non-ECMP-based or

forwarding-based on application-defined paths, through

establishment of a peering session with an application

"controller" that can inject routing information into the system,

satisfying REQ5. OSPF provides similar functionality using

concepts such as "Forwarding Address", but with more difficulty in

implementation and far less control of information propagation

scope.

o Using a well-defined Autonomous System Number (ASN) allocation

scheme and standard AS_PATH loop detection, "BGP path hunting"

(see [JAKMA2008]) can be controlled and complex unwanted paths

will be ignored. See Section 5.2 for an example of a working ASN

allocation scheme. In a link-state IGP, accomplishing the same

goal would require multi-(instance/topology/process) support,

typically not available in all DC devices and quite complex to

configure and troubleshoot. Using a traditional single flooding

domain, which most DC designs utilize, under certain failure

conditions may pick up unwanted lengthy paths, e.g., traversing

multiple Tier 2 devices.

o EBGP configuration that is implemented with minimal routing policy

is easier to troubleshoot for network reachability issues. In

most implementations, it is straightforward to view contents of

the BGP Loc-RIB and compare it to the router"s Routing Information

Base (RIB). Also, in most implementations, an operator can view

every BGP neighbors Adj-RIB-In and Adj-RIB-Out structures, and

therefore incoming and outgoing Network Layer Reachability

Information (NLRI) information can be easily correlated on both

sides of a BGP session. Thus, BGP satisfies REQ3.

原文鏈接:Use of BGP for Routing in Large-Scale Data Centers

另外,現在很多vxlan的組網用MP-BGP EVPN做控制平面,這點另一位答主阿布已經說到了。

現在超大規模數據中心比較流行的就是EBGP到邊來做underlay網路。overlay選擇可以很多,控制平面可以openflow或者MP-BGP EVPN。。。


內部管理用OSPF,外部對接用BGP。這是理論上的,內部如果夠大,也可以劃分多個子域,子域內用OSPF,子域間用BGP。


推薦閱讀:

數據中心運維需要具備哪些知識和能力?
數據中心日常運維工作的內容有什麼?
請問Arista是間怎樣的公司?
什麼是分散式數據中心?
國內做IDC數據中心運營維護/管理前途怎樣?

TAG:數據中心 |