Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dan LI CS Department, Tsinghua University

Similar presentations


Presentation on theme: "Dan LI CS Department, Tsinghua University"— Presentation transcript:

1 Dan LI CS Department, Tsinghua University
Lecture 4 Routing Dan LI CS Department, Tsinghua University Today we’ll talk about routing. 2018/12/4

2 Today’s Lecture Inter-Domain Routing Reading list 2018/12/4

3 Inter-Domain Routing Routing hierarchy Internet structure
External BGP (E-BGP) Internal BGP (I-BGP) 2018/12/4

4 Routing Hierarchies Flat routing doesn’t scale Key observation
Storage  Each node cannot be expected to store routes to every destination (or destination network) Convergence times increase Communication  Total message count increases Key observation Need less information with increasing distance to destination Need lower diameters networks Solution: area hierarchy 2018/12/4

5 Areas Divide network into areas
Areas can have nested sub-areas Hierarchically address nodes in a network Sequentially number top-level areas Sub-areas of area are labeled relative to that area Nodes are numbered relative to the smallest containing area 2018/12/4

6 Area Hierarchy Addressing
1 2 2.2 1.1 2.1 2.2.2 1.2 2.2.1 1.2.1 1.2.2 3 3.2 3.1 2018/12/4

7 Routing Hierarchy Partition Network into “Areas”
Area-Border Router Backbone Areas Lower-level Areas Partition Network into “Areas” Within area Each node has routes to every other node Outside area Each node has routes for other top-level areas only Inter-area packets are routed to nearest appropriate border router Constraint: no path between two sub-areas of an area can exit that area 2018/12/4

8 Path Sub-optimality start end 1 2 2.1 2.2 1.1 1.2 2.2.1 3
1.2.1 start end 3.2.1 3 3 hop red path vs. 2 hop green path 3.2 3.1 2018/12/4 8

9 Inter-Domain Routing Routing hierarchy Internet structure
External BGP (E-BGP) Internal BGP (I-BGP) 2018/12/4

10 Internet’s Area Hierarchy
What is an Autonomous System (AS)? A set of routers under a single technical administration Using an interior gateway protocol (IGP) and common metrics to route packets within the AS Using an exterior gateway protocol (EGP) to route packets to other AS’s Sometimes AS’s use multiple IGPs and metrics, but appear as single AS’s to other AS’s Each AS assigned unique ID AS’s peer exchanges information 2018/12/4

11 AS Numbers (ASNs) ASNs represent units of routing policy
ASNs are 16 bit values 64512 through are “private” Currently over 15,000 in use Genuity: 1 MIT: 3 JANET: 786 UC San Diego: 7377 AT&T: 7018, 6341, 5074, … UUNET: 701, 702, 284, 12199, … Sprint: 1239, 1240, 6211, 6242, … ASNs represent units of routing policy 2018/12/4

12 Example IGP IGP EGP EGP EGP EGP IGP EGP IGP IGP 1 2 2.1 2.2 1.1 1.2
2.2.1 EGP EGP EGP 3 4.2 4.1 IGP EGP 4 IGP 5 3.2 3.1 IGP 5.2 5.1 2018/12/4

13 A Logical View of the Internet
Tier 1 ISP “Default-free” with global reachability info Tier 2 ISP Regional or country-wide Tier 3 ISP Local Tier 3 Tier 2 Tier 2 Customer Provider Tier 1 Tier 1 Tier 2 2018/12/4

14 Transit vs. Peering ISP Y ISP Z Transit ($$ 1/2) Transit ($$$) ISP P
ISP X When a member of one network wants to communicate with a member of another network different mechanisms are required depending on the type of connection between the two networks. Where the networks share a direct connection, communication takes the path directly between the customers of two networks, a process called peering. If a third party network (or networks) is required to support the communication, that network is said to provide transit, ie, the communication crosses but does not terminate in the transit network. In the case of peering both customers use only networks they have paid for to communicate. It is thus common for peering to occur for "free," IE there is no payment by the networks to each other, the networks are considered paid by their customers for carrying the information, the payment to each network reflects that networks costs for serving their own customer. The connection costs between the networks are often shared or paid separately by each network (to an Internet Exchange for example) so there is no basis for further remuneration. Where the communication requires transit to occur, additional payment by the communicating members is often levied. This levy is paid to the transit network(s) since the transit traffic doesn't serve any of the transit network's customers. Transit ($) Transit ($$) Transit ($$) 2018/12/4

15 Customers and Providers
IP traffic customer Customer pays provider for access to the Internet 2018/12/4

16 The “Peering” Relationship
Peers provide transit between their respective customers Peers do not provide transit between peers Peers (often) do not exchange $$$ peer customer provider traffic allowed traffic NOT allowed 2018/12/4

17 Peering Provides Shortcuts
customer provider Peering also allows connectivity between the customers of “Tier 1” providers. 2018/12/4

18 Peering Wars Reduces upstream transit costs
Don’t Peer Reduces upstream transit costs Can increase end-to-end performance May be the only way to connect your customers to some part of the Internet (“Tier 1”) You would rather have customers Peers are usually your competitors Peering relationships may require periodic renegotiation Peering struggles are by far the most contentious issues in the ISP world! Peering agreements are often confidential. 2018/12/4

19 Policy Impact “Valley-free” routing WHY?
Number links as (+1, 0, -1) for provider, peer and customer In any path should only see sequence of +1, followed by at most one 0, followed by sequence of -1 WHY? Consider the economics of the situation 2018/12/4

20 Inter-Domain Routing Routing hierarchy Internet structure
External BGP (E-BGP) Internal BGP (I-BGP) 2018/12/4

21 BGP History Mid-80s: EGP Result: BGP introduced as routing protocol
Reachability protocol (no shortest path) Did not accommodate cycles (tree topology) Evolved when all networks connected to NSF backbone Result: BGP introduced as routing protocol Latest version = BGP 4 BGP-4 supports CIDR Primary objective: connectivity not performance 2018/12/4

22 BGP Basics Use TCP Border Gateway Protocol (BGP), based on Bellman-Ford path vector AS’s exchange reachability information through their BGP routers, only when routes change BGP routing information – a sequence of AS’s indicating the path traversed by a route General operations of a BGP router: Learns multiple paths Picks best path according to its AS policies Install best pick in IP forwarding tables 2018/12/4

23 Two Types of BGP Neighbor Relationships
External Neighbor (E-BGP) in a different Autonomous Systems Internal Neighbor (I-BGP) in the same Autonomous System AS1 I-BGP is routed using Interior Gateway Protocol (IGP) such as OSPF/IS-IS E-BGP I-BGP AS2 2018/12/4

24 E-BGP Choices Link state or distance vector?
No universal metric – policy decisions Problems with distance-vector: Bellman-Ford algorithm may not converge Problems with link state: Metric used by routers not the same – loops LS database too large – entire Internet May expose policies to other AS’s 2018/12/4

25 Solution: Distance Vector with Path
Each routing update carries the entire path Loops are detected as follows: When AS gets route check if AS already in path If yes, reject route If no, add self and (possibly) advertise route further Advantage: Metrics are local - AS chooses path, protocol ensures no loops 2018/12/4

26 Interconnecting BGP Peers
BGP uses TCP to connect peers Advantages: Simplifies BGP No need for periodic refresh - routes are valid until withdrawn, or the connection is lost Incremental updates Disadvantages Congestion control on a routing protocol? Poor interaction during high load 2018/12/4

27 Hop-by-hop Model BGP advertises to neighbors only those routes that it uses Consistent with the hop-by-hop Internet paradigm e.g., AS1 cannot tell AS2 to route to other AS’s in a manner different than what AS2 has chosen (need source routing for that) 2018/12/4

28 Policy with BGP BGP provides capability for enforcing various policies
Policies are not part of BGP: they are provided to BGP as configuration information BGP enforces policies by choosing paths from multiple alternatives and controlling advertisement to other AS’s 2018/12/4

29 Examples of BGP Policies
A multi-homed AS refuses to act as transit Limit path advertisement A multi-homed AS can become transit for some AS’s Only advertise paths to some AS’s An AS can favor or disfavor certain AS’s for traffic transit from itself 2018/12/4

30 BGP Messages Open Keep_alive Notification Announces AS ID
Determines hold timer – interval between keep_alive or update messages, zero interval implies no keep_alive Keep_alive Sent periodically (but before hold timer expires) to peers to ensure connectivity Sent in place of an UPDATE message Notification Used for error notification TCP connection is closed immediately after notification 2018/12/4

31 BGP UPDATE Message List of withdrawn routes
Network layer reachability information List of reachable prefixes Path attributes Origin Path Metrics All prefixes advertised in message have same path attributes 2018/12/4

32 Path Selection Criteria
Information based on path attributes Attributes + external (policy) information Examples: Hop count Policy considerations Preference for AS Presence or absence of certain AS Path origin Link dynamics 2018/12/4

33 LOCAL PREF Local (within an AS) mechanism to provide relative priority among BGP routers R5 R1 AS 200 R2 AS 100 AS 300 The local preference is a Local (within an AS) mechanism to provide relative priority among BGP routers. It is used by a BGP speaker to inform other BGP speakers in its own autonomous system of the originating speaker's degree of preference for an advertised route. R3 Local Pref = 500 Local Pref =800 R4 I-BGP AS 256 2018/12/4

34 LOCAL PREF – Common Uses
Handle routes advertised to multi-homed transit customers Should use direct connection Peering vs. transit Prefer to use peering connection In general, customer > peer > provider Use LOCAL PREF to ensure this 2018/12/4

35 AS_PATH List of traversed AS’s AS 200 AS 100 AS 300 AS 500
/16 /16 AS 300 / / AS 500 2018/12/4

36 Multi-Exit Discriminator (MED)
Hint to external neighbors about the preferred path into an AS Non-transitive attribute (we will see later why) Different AS choose different scales Used when two AS’s connect to each other in more than one place 2018/12/4

37 MED Hint to R1 to use R3 over R4 link
Cannot compare AS40’s values to AS30’s MED = 50 R1 R2 AS 10 AS 40 For exam, in this picture, AS 30 has two connection with R1, so it use MED to differ this two connection. It’s tell R1 to use R3 over R4 link. But as Different AS choose different scales, it cannot compare different AS’s MED. MED = 120 MED = 200 R3 R4 AS 30 2018/12/4

38 MED MED is typically used in provider/subscriber scenarios
It can lead to unfairness if used between ISP because it may force one ISP to carry more traffic ISP1 SF ISP2 NY ISP1 ignores MED from ISP2 ISP2 obeys MED from ISP1 ISP2 ends up carrying traffic most of the way 2018/12/4

39 Decision Process Processing order of attributes:
Select route with highest LOCAL-PREF Select route with shortest AS-PATH Apply MED (if routes learned from same neighbor) 2018/12/4

40 Inter-Domain Routing Routing hierarchy Internet structure
External BGP (E-BGP) Internal BGP (I-BGP) 2018/12/4

41 Internal vs. External BGP
BGP can be used by R3 and R4 to learn routes How do R1 and R2 learn routes? R1 E-BGP AS1 R3 R4 AS2 R2 2018/12/4

42 Internal BGP (I-BGP) Same messages as E-BGP
Different rules about re-advertising prefixes: Prefix learned from E-BGP can be advertised to I-BGP neighbor and vice-versa, but Prefix learned from one I-BGP neighbor cannot be advertised to another I-BGP neighbor Reason: no AS PATH within the same AS and thus danger of looping. 2018/12/4

43 Internal BGP (I-BGP) R3 can tell R1 and R2 prefixes from R4
R3 can tell R4 prefixes from R1 and R2 R3 cannot tell R2 prefixes from R1 R2 can only find these prefixes through a direct connection to R1 Result: I-BGP routers must be fully connected (via TCP)! contrast with E-BGP sessions that map to physical links R1 E-BGP AS1 R3 R4 AS2 R2 I-BGP 2018/12/4

44 I-BGP Peers Must be Fully Meshed
E-BGP update I-BGP updates I-BGP is needed to avoid routing loops within an AS Why not injecting external routes into IGP? Does not scale and causes BGP policy information to be lost So BGP and IGP are separated BGP does not provide “shortest path” routing I-BGP neighbors do not announce routes received via I-BGP to other I-BGP neighbors. 2018/12/4

45 Route Selection Summary
Highest Local Preference Enforce relationships Shortest ASPATH Lowest MED Traffic engineering i-BGP < e-BGP Lowest IGP cost to BGP egress Throw up hands and break ties Lowest router ID 2018/12/4


Download ppt "Dan LI CS Department, Tsinghua University"

Similar presentations


Ads by Google