CN notes 前情提要:傳送門
目錄:
• Describe the relationships between ISPs, IXPs, and CDNs.
• What is an AS?
• What kind of relationship does AS have with other parties?
• What is BGP?
• How does an AS determine what rules to import/export?
• What were the original design goals of BGP? What was considered later?
• What are the basics of BGP?
• What is the difference between iBGP and eBGP?
• What is the difference between iBGP and IGP-like protocols (RIP or OSPF)?
• How does a router use the BGP decision process to choose which routes to import?
• What are the 2 main challenges with BGP? Why?
• What is an IXP?
• What are four reasons for IXP's increased popularity?
• Which services do IXPs provide?
• How does a route server work?
Describe the relationships between ISPs, IXPs, and CDNs.
- ISPs (Internet Service Providers) are the “backbone” network over which smaller networks can connect.
- IXPs (Internet Exchange Points) are physical interconnection infrastructures where multiple networks (eg, ISPs and CDNs) can interconnect and exchange traffic locally.
- CDNs are networks created by content providers (such as Shopify/Netflix) to reduce connectivity costs and provide greater control for the content provider on how the content is delivered to the end-users. They may have multiple data centers with hundreds of servers distributed across the world.
What is an AS?
Autonomous System (AS) — a group of routers that operate under the same administrative authority. An ISP (or CDN) can operate as a single AS or multiple. Each AS has its own set of policies/strategies based on their needs and doesn’t need to share this info with other ASes.
What kind of relationship does AS have with other parties?
- Provider-Customer relationship (or transit)
- Peering relationship
What is BGP?
The default routing protocol, called BGP (Border Gateway Protocol). For traffic to go between ASes, BGP (Border Gateway Protocol) is used which is primarily based on incentives (money) — ASes do whatever makes the most sense for them from a financial standpoint.
How does an AS determine what rules to import/export?
- It’s entirely a business decision for both importing and exporting routes.
- 當一個 AS 從多個 AS 接收到多個指向同一目的地的路由通告時,它需要在選擇引入哪一個之前對這些路由進行排序。按照優先順序,導入的路由是
the customer routes
,然後是the peer routes
,最後是the provider routes.
What were the original design goals of BGP? What was considered later?
- Scalability — to manage the complications of this growth while achieving convergence in reasonable timescales and providing loop-free paths.
- Express routing policies — allow ASes to implement policies (which routes to import and export) through route filtering and route ranking. Each ASes routing decisions can be kept confidential, and each AS can implement them independently of one another.
- Allowing cooperation among ASes — Each individual AS can still make local decisions (which routes to import and export) while keeping these decisions confidential from other ASes.
- Security was not originally considered when implementing BGP, requiring security measures to be added later as the Internet grew in size and complexity.
What are the basics of BGP?
A pair of routers, BGP peers, exchange routing info over a semi-permanent TCP port connection (BGP session). This starts with an OPEN message and is followed by the routers sending each other announcements from their own routing tables.
There are two types of BGP messages:
UPDATE
— announcements of new routes/updates to existing routes; withdrawal of previous routes due to a failure or change in routing policyKEEPALIVE
— message exchanged to keep a current session going
BGP routes — main components: reachable IP prefix field, AS-PATH (route passed through from destination), and NEXT-HOP (IP of next-hop router along the path towards the destination). In iBGP the NEXT-HOP is the address of the nearest border router.
What is the difference between iBGP and eBGP?
eBGP
- external BGP; 用於相鄰 AS 的邊界路由器之間的會話iBGP
- internal BGP; 用於同一 AS 的內部路由器之間的會話
What is the difference between iBGP and IGP-like protocols (RIP or OSPF)?
iBGP 不是另一種類似 IGP 的協議(例如,RIP 或 OSPF)。類似 IGP 的協議用於根據 AS 內的特定成本在 AS 的內部路由器之間建立路徑。相比之下,iBGP 僅用於在 AS 內傳播外部路由。
How does a router use the BGP decision process to choose which routes to import?
簡而言之,決策過程就是路由器如何比較路由。它遍歷路由通告中的屬性列表。在最簡單的場景中,在沒有策略的情況下(意味著導入哪條路由並不重要),路由器使用路徑長度的屬性來選擇跳數最少的路由。這種簡單的場景在實踐中很少發生。
路由器通過遍歷屬性列表來比較一對路由,如下圖所示。對於每個屬性,它會選擇具有有助於應用策略的屬性值的路由。如果對於特定屬性,值相同,則轉到下一個屬性。
- LocalPref is at the top and set by the local AS’ administrator based on business relationships/preference of specific AS.
Higher number = higher preference.
Controls which routers are used as exit points (outgoing traffic). - MED (Multi-Exit Discriminator) is another important attribute and is set by the neighboring ASes.
Lower MED value = higher preference.
A neighboring AS with multiple links can tag routes with MED values to indicate which routers are used as entry points (which links are preferred for inbound traffic).
What are the 2 main challenges with BGP? Why?
Scalability and Misconfigurations — 可能的錯誤配置或錯誤會導致更新數量過多,從而導致路由不穩定、路由器處理器和內存過載、中斷和路由器故障。
- ASes can reduce this risk by limiting routing table size with filtering to encourage route aggregation and limiting the number of route changes with flap damping (suppresses route updates for a period of time when a threshold is reached which can be set individually for prefixes according to a specific strategy).
What is an IXP?
Internet Exchange Points (IXPs) — physical infrastructures that provide the means for ASes to interconnect and directly exchange traffic with one another.
What are four reasons for IXP’s increased popularity?
- IXP 是處理大流量的互連樞紐
- 在緩解 DDoS 攻擊方面的重要作用
- 具有大量研究機會的“現實世界”基礎設施
- IXP 是活躍的市場和技術創新中心
Which services do IXPs provide?
How does a route server work?
Route servers help to make peering more manageable. In summary, a Route Server (RS):
- Collects and shares routing information from its peers or participants that connects with (i.e. IXP members that connect to the RS).
- Executes it’s own BGP decision process and also re-advertise the resulting information (I.e. best route selection) to all RS’s peer routers.
A typical routing daemon maintains a Routing Information Base (RIB) which contains all BGP paths that it receives from its peers — the Master RIB. The router server also maintains AS-specific RIBs to keep track of the individual BGP sessions they maintain with each participant AS.
RSes maintain two types of route filters:
- Import filters are applied to ensure that each member AS only advertises routes that it should advertise
- Export filters which are typically triggered by the IXP members themselves to restrict the set of other IXP member ASes that receive their routes.