Presentation is loading. Please wait.

Presentation is loading. Please wait.

Department of Computer and IT Engineering University of Kurdistan

Similar presentations


Presentation on theme: "Department of Computer and IT Engineering University of Kurdistan"— Presentation transcript:

1 Department of Computer and IT Engineering University of Kurdistan
Computer Networks II Border Gateway protocol (BGP) By: Dr. Alireza Abdollahpouri

2 Internet structure: network of networks
local ISP Tier 3 Tier-2 ISP Tier 1 ISP Tier 1 ISP Tier 1 ISP

3 Hierarchical Routing gateway routers
aggregate routers into regions, “autonomous systems” (AS) routers in same AS run same routing protocol “intra-AS” routing protocol routers in different AS can run different intra-AS routing protocol special routers in AS run intra-AS routing protocol with all other routers in AS also responsible for routing to destinations outside AS run inter-AS routing protocol with other gateway routers

4 Internet’s Area Hierarchy
What is an Autonomous System (AS)? A set of routers under a single technical administration, using Intra-AS routing protocols (e.g., RIP, OSPF) and common metrics to route packets within the AS and using an Inter-AS routing protocol to route packets to other AS’s Each AS assigned unique ID

5 Intra-AS and Inter-AS routing
BGP C.b Inter-AS routing between A and B B.a A.a Host2 b A.c c a a b B C a d Intra-AS routing within AS B ( RIP, OSPF, …) c A b Intra-AS routing within AS A ( RIP, OSPF, …) Host1

6 AS Categories Stub: an AS that has only a single connection to one other AS - carries only local traffic. Multi-homed: an AS that has connections to more than one AS, but does not carry transit traffic Transit: an AS that has connections to more than one AS, and carries both transit and local traffic (under certain policy restrictions)

7 AS Categories AS1 AS3 AS1 AS2 AS1 AS3 AS2 Transit Stub AS2 Multi-homed

8 Internet inter-AS routing: BGP
BGP (Border Gateway Protocol): the de facto standard BGP is a Path Vector protocol: similar to Distance Vector protocol each Border Gateway broadcast to neighbors (peers) entire path (i.e., sequence of AS’s) to destination BGP routes to networks (ASs), not individual hosts E.g., Gateway X may send its path to dest. Z: Path (X,Z) = X,Y1,Y2,Y3,…,Z

9 Internet inter-AS routing: BGP
Suppose: gateway X send its path to peer gateway W W may or may not select path offered by X cost, policy (don’t route via competitors AS), loop prevention reasons. If W selects path advertised by X, then: Path (W,Z) = W, Path (X,Z) Note: X can control incoming traffic by controlling its route advertisements to peers: e.g., don’t want to route traffic to Z -> don’t advertise any routes to Z

10 BGP: controlling who routes to you
A B C W X Y provider network customer A,B,C are provider networks X,W,Y are customer (of provider networks) X is dual-homed: attached to two networks X does not want to route from B via X to C .. so X will not advertise to B a route to C

11 BGP operation Q: What does a BGP router do?
Receiving and filtering route advertisements from directly attached neighbor(s). Route selection. To route to destination X, which path (of several advertised) will be taken? Sending route advertisements to neighbors.

12 Initial routing tables in path vector routing

13 Stabilized tables for four autonomous systems

14 BGP messages

15 BGP messages OPEN: opens TCP connection to peer and authenticates sender UPDATE: advertises new path (or withdraws old) KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request (send periodically, every 30 seconds) NOTIFICATION: reports errors in previous msg; also used to close connection

16 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

17 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

18 I-BGP and E-BGP External BGP (E-BGP): BGP runs between different ASs
Internal BGP (I-BGP):  BGP runs between two peers in the same AS R1 E-BGP AS1 R3 R4 AS2 R2 I-BGP

19 AS-Path AS-3 AS-4 AS-5 AS-2 AS-1 Sequence of AS’s a route traverses
Used for loop detection and to apply policy AS-3 AS-4 /16 /16 AS-5 AS-2 /16 /16 AS-2 AS-3 AS-4 AS-1 /16 AS-2 AS-3 /16 AS-2 AS-5

20 BGP Operations (Simplified)
Establish session on TCP port 179 AS1 BGP session Exchange all active routes AS2 While connection is ALIVE exchange route UPDATE messages Exchange incremental updates

21 Example: Multiple AS Paths
9 128.2/16 AS 701 AS 7018 128.2/16 9 701 128.2/16 AS 1239 AS 73

22 Shorter Doesn’t Always Mean Shorter
Path 4 1 is “better” than path 3 2 1 AS 4 AS 3 AS 2 AS 1

23 Questions


Download ppt "Department of Computer and IT Engineering University of Kurdistan"

Similar presentations


Ads by Google