Tuesday, September 2, 2008

Interdomain Internet Routing

Wide area network architecture is a collection of interconnected Autonomous Systems (ASes). BGP is used as the protocol for communicating routes and route policies between these ASes. IGPs are used to route packets (even BGP packets) through an AS, and typically use either link-state or distance-vector protocols. The goals for BGP were the following: scalability, policy enforcement, and cooperating with other ASes despite being competitors. BGP links are either transit links or peer links. A transit link is a link over which a provider carries paid-for traffic from a customer. A peering link is one over which two ASes mutually benefit from carrying traffic over, usually to allow customers from both ends reach each other. Neither AS pays the other because the traffic carrying is roughly symmetric.

An AS wants to make as much money as possible and provide the best service to its customers. Therefore, an AS's best interest routing policy boils down to the following:

Route Export Policy (who: what routes exported to them)
Customer: provider routes, customer routes, peer routes, and some internal routes
Peer: customer routes and some internal routes
Provider: customer routes and some internal routes

Import policy is based on the following preferences, in order of priority. Local preference means that a route coming from a customer > peer > provider. If two routes to the same destination are both say, routes through peers, then we choose the smallest AS path length. If those match, we choose the smallest multi-exit descriminator. Otherwise we choose eBGP learned paths over internet BGP learned paths, and following that are shortest internal path and finally router ID, if all else is equal. MEDs are useful to prevent the free-loading problem between ASs, which is also responsible for asymmetric traffic paths.

Some interesting background information here is the difference between link-state routing and distance vector routing in IGP protocols. Link-state routing is where each switch in the network constructs its own image of the topology of the network and makes routing decisions based of it that image. Distance-vector routing involves using the Bellman-Ford algorithm, and so at each time step exchanges "best path" information between neighbors.

This was an educational "paper", and having read the next one already I can see it serves as excellent background reading. The organization could have been better by juxtaposing the export and import policy sections, instead of having an interlude of the design of BGP between the two. The paper also lacks much discussion on the topic of failover and scalability, rather just mentioning a few issues here and there.

A question I have is, if the AS Path that's received contains duplicate entries, why can't the route importer detect this and eliminate the duplicate AS entries in order to know the true AS hop length? Are there honor codes among ASes that prevent them from cheating the system? Another interesting discussion topic would be about the security flaws of BGP. What damage could a malicious AS do to earn more money without being detected? What are the legal ramifications of this?

No comments: