Presentation is loading. Please wait.

Presentation is loading. Please wait.

Border Gateway Protocol Autonomous Systems and Interdomain Routing (Exterior Gateway Protocol EGP)

Similar presentations


Presentation on theme: "Border Gateway Protocol Autonomous Systems and Interdomain Routing (Exterior Gateway Protocol EGP)"— Presentation transcript:

1 Border Gateway Protocol Autonomous Systems and Interdomain Routing (Exterior Gateway Protocol EGP)

2 2 Internet Infrastructure

3 3 Autonomous Systems An autonomous system (AS) is a region of the Internet that is administered by a single entity and that has a unified routing policy Each autonomous system is assigned an Autonomous System Number (ASN). Each ASN is 16bits (32 but coming soon) are assigned by Regional Internet Registries are for private use and never appear on the Internet 0 and are reserved Example ASNs UofT’s campus network (AS239) Sprint (AS1239, AS1240, AS 6211, …) Interdomain routing is concerned with determining paths between autonomous systems (interdomain routing) Routing protocols for interdomain routing are called exterior gateway protocols (EGP)

4 4 Interdomain and Intradomain Routing Routing protocols for intradomain routing are called interior gateway protocols (IGP) Objective: shortest path, only operate within an AS Routing protocols for interdomain routing are called exterior gateway protocols (EGP) Objective: satisfy policy of the Ass, only operates between ASs

5 Number of Autonomous Systems 5

6 6 EGP and IGP Interior Gateway Protocol (IGP) Routing is done based on metrics Routing domain is one autonomous system Exterior Gateway Protocol (EGP) Routing is done based on policies Routing domain is the entire Internet

7 7 EGP Interdomain routing is based on connectivity between autonomous systems Interdomain routing can ignore many details of router interconnection

8 8 Multiple Routing Protocols Multiple routing protocols can run on the same router Each routing protocol updates the routing table

9 9 Autonomous Systems Terminology local traffic: traffic with source and destination in AS transit traffic: traffic that passes through the AS Stub AS: has connection to only one AS, only carries local traffic Multihomed Stub AS: has connection to >1 AS, but does not carry transit traffic Transit AS: has connection to >1 AS and carries transit traffic

10 10 Stub and Transit Networks Settings: AS 1 is a multi-homed stub network AS 3 and AS 4 are transit networks AS 2 and AS 5 are stub networks

11 11 Selective Transit Example: AS 3 carries traffic between AS 1 and AS 4 and between AS 2 and AS 4 But AS 3 does not carry traffic between AS 1 and AS 2 The example shows a routing policy.

12 12 Customer/Provider and Peers A stub network typically obtains access to the Internet through a transit network. A Transit network that is a provider may be a customer for another network Customer pays provider for service

13 13 Customer/Provider and Peers Transit networks can have a peer relationship Peers provide transit between their respective customers Peers do not provide transit between peers Peers normally do not pay each other for service

14 14 Border Gate Protocol (BGP) Border Gateway Protocol is the interdomain routing protocol for the Internet for routing between autonomous systems Currently in version 4 (1995) Network administrators can specify routing policies BGP is a path vector protocol (Like distance vector, but routing messages in BGP contain complete routes) Uses TCP to transmit routing messages

15 BGP and Autonomous Systems Each AS designates a border router to speak on its behalf Two border routers become BGP peers

16 16 Border Gate Protocol (BGP) An autonomous system uses BGP to advertise its network address(es) to other AS’s BGP helps an AS to: 1.Learn about reachable networks from neighboring AS’s 2.Distribute the information about reachable networks to routers inside the AS 3.Select a route if there are multiple routes to reach the same network

17 General Principle Although it is desirable for routers to exchange routing information, it is impractical for all routers in an arbitrarily large internet to participate in a single routing update protocol. Routers must be divided into groups

18 Key C/C’s of BGP Provides inter-autonomous system communication Propagates reachability information Follows next-hop paradigm Provides support for policies Sends path information Permits incremental updates Allows route aggregation Allows authentication Uses reliable transport (i.e., TCP) – Unusual: most routing update protocols use connectionless transport (e.g., UDP) Sends keepalive messages so other end knows connection is valid (even if no new routing information is needed)

19 BGP Message Types Each advertised route is specified as a network prefix with attribute values

20 BGP Message Header Marker is an agreed upon value (synchronization pattern) between two peers. Usually all one’s, but can be used for authentication. Used to synchronize the two ends. Length gives total message length in octets Type contains one of the message types shown in previous slide

21 BGP Open Message

22 Opening a connection After TCP Connection is established, peers send an OPEN msg to declare the AS number and other attributes. Hold Time indicates the max. elapsed time between two msgs that a receiver should wait. If nothing received from a peer prior to timeout, peer considered to be down. Reset with every msg reception. KeepAlive msgs sent every 1/3 hold time value if no other msg sent. An OPEN msg is Acked with a KeepAlive msg. A unique BGP Identifier is used for all communications from this peer. It is one of the BGP router IP addresses. Parm.Len indicates the length in octets of optional parameters. If none, it is zero octets. Each Opt. Parameter is preceded by 2 octets specifying the type of parameter and the length of the parameter.

23

24 BGP Update Message Note that any field labeled “variable”, can be omitted if there is no information for a parameter

25 Advertise New and Delete Old After Open msgs, peers use UPDATE to send path information to peers. Withdraw Length field (2 octets) specifies number of Destinations being deleted. Path Attr Length specifies the Path attributes that are associated with a new Destination being advertised.

26 Path Attributes If advertised destinations have different attributes, they are sent in separate Update msgs. All Destinations in an Update msg have similar path attributes. Each attribute consists of a triple: ( type, length, value )

27 BGP Path Attributes

28 BGP Attribute Type Codes

29 Ipv4 Addresses in BGP msgs The LEN field identifies the number of octets in the IPv4 address covered by mask The LEN field is a binary number representing the value of the mask E.G., Mask value of 8 or less will only have one address octet, will have 3.

30

31 BGP Notification Msg Once BGP detects a problem (error) it shuts down the connection to the peer. Data field includes any diagnosis information that is related to the error. Not all NOTIFICATION messages include a value in the Data field.

32 Error Codes

33 Error Sub Codes

34 BGP Message Examples

35 Flow between Multiple ASes For net N1 in AS1 to send traffic to net N16 in AS16: AS16 must originate and announce N16 to AS8. AS8 must accept N16 from AS16. AS8 must announce N16 to AS1 or AS34. AS1 must accept N16 from AS8 or AS34. For two-way packet flow, similar policies must exist for N1. AS1 N1 AS34 AS8 AS16 N16

36 36 BGP interactions The networks that are advertised are network IP addresses with a prefix, E.g., /16 Prefixes reachable from AS 1 Prefixes reachable from AS 3

37 37 BGP interactions BGP is executed between two routers BGP session BGP peers or BGP speakers Procedure: 1.Establishes TCP connection (port 175) to BGP peer 2.Exchange all BGP routes 3.As long as connection is alive: Periodically send incremental updates Note: Not all autonomous systems need to run BGP. On many stub networks, the route to the provider can be statically configured

38 38 BGP interactions BGP peers advertise reachability of IP networks A advertises a path to a network (e.g., /8) to B only if it is willing to forward traffic going to that network Path-Vector: A advertises the complete path AS A, …., AS X  this avoids loops

39 39 BGP Sessions External BGP session (eBGP): Peers are in different AS’es Internal BGP session (iBGP) Peers are in the same AS, but each peer connects to a different peer in another AS Note that iBGP sessions use routes constructed by an intradomain routing protocol to exchange messages!

40 40 iBGP sessions All iBGP peers in the same AS are fully meshed Peer announces routes received via eBGP to iBGP peers

41 41 Route Reflectors Full mesh of iBGP routers is difficult to maintain Router Reflectors (RR) present an alternative All iBGP routers peer with the RR RR acts as a server Other iBGP routers become clients

42 42 Content of Advertisements A BGP router route advertisement is sent in a BGP UPDATE message A route is announced as a Network Prefix and Attributes Attributes specify details about a route: Mandatory attributes: ORIGIN AS_PATH NEXT_HOP many other attributes

43 43 ORIGIN attribute Originating domain sends a route with ORIGIN attribute /24, ORIGIN {1}

44 44 AS-PATH attributes Each AS that propagates a route prepends its own AS number AS-PATH collects a path to reach the network prefix Path information prevents routing loops from occurring Path information also provides information on the length of a path (By default, a shorter route is preferred) Note: BGP aggregates routes according to CIDR rules /24, AS-PATH {2,1} /24, AS-PATH {3,1} /24, AS-PATH {4,2,1} /24, AS-PATH {1}

45 45 NEXT-HOP attributes Each router that sends a route advertisement, includes its own IP address of the forwarding port in a NEXT-HOP attribute The attribute provides information for the routing table of the receiving router /24, NEXT-HOP { } /24, NEXT-HOP { }

46 46 Connecting NEXT-HOP with IGP information /24, NEXT-HOP { } Dest.Next hop / At R1: Dest.Next hop / Routing table BGP info Dest.Next hop / / Routing table

47 47 Route Selection An AS may get more than one route to an address Needs to select a route Route Selection Criteria (in order of preference) Highest Local Preference Shortest AS-Path Lowest MED (multi-exit discriminator) (  called “metric” in BGP) Prefer iBGP over eBGP routes Lowest IGP cost to leave AS (“hot potato”) Lowest router ID (  used as tie breaker) 5

48 48 Local Preference Local to an AS – Non Transitive (Default is 100) Used to influence path selection – determines best outbound path If there are multiple exit points from the AS, the local preference attribute is used to select the exit point for a specific route Path with highest local preference wins Local Preference is used only for iBGP sessions Local pref = 10 Local pref = 50 Local pref = 100 Local pref = 80 AS 5

49 49 Hot Potato Routing Router R3 in AS A receives two advertisements to X Which route should it pick? Hot Potato Rule: Select the iBGP peer that has the shortest IGP route Analogy: Get the packet out of one’s own AS as quickly as possible, i.e., on the shortest path

50 50 Hot Potato Routing Finding the cheapest IGP route: Compare the cost of the two paths R3  R1 R3  R2 according to the IGP protocol Here: R1 has the shortest path Add a routing table entry for destination X

51 51 Hot Potato Routing can backfire! AS1 would serve its customer (source) better by not picking the shortest (lowest cost) route to AS 2

52 52 Processing in BGP BGP updates arrive Based on attributes Best entry is entered in IP routing table BGP updates depart

53 53 Importing and Exporting Routes An AS may not accept all routes that are advertised An AS may not advertise certain routes Route policies determine which routes are filtered If an AS wants to have less inbound traffic it should adapt its export rules If an AS wants to control its outbound traffic, it adapts its import rules

54 54 Routing Policies Since AS 5 is a stub network, it should not advertise routes to networks other than networks in AS 5 When AS 3 learns about the path {AS1, AS4}, it should not advertise the route {AS3, AS1, AS4} to AS 2. Customer Provider

55 55 Traffic Often Follows ASPATH In many cases, packets are routed according to the AS-PATH However, in some cases this is not true (Here: AS 2 filters routes with a long prefix) Traffic Flow

56 56 Short AS-PATH does not mean that route is short From AS 6’s perspective Path {AS2, AS1} is short Path {AS5, AS4, AS3, AS1} is long But the number of traversed routers is larger when using the shorter AS-PATH (IGP routing in AS2 has longer route)

57 57 BGP Issues BGP is a simple protocol but it is very difficult to configure BGP has severe stability issue due to policies  BGP is known to not converge. Path vectors are used to avoid cycles.


Download ppt "Border Gateway Protocol Autonomous Systems and Interdomain Routing (Exterior Gateway Protocol EGP)"

Similar presentations


Ads by Google