Computer Networks Performance Metrics Computer Networks Term B10.
Department of Computer and IT Engineering University of Kurdistan Computer Networks II
description
Transcript of Department of Computer and IT Engineering University of Kurdistan Computer Networks II
![Page 1: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/1.jpg)
Department of Computer and IT EngineeringDepartment of Computer and IT EngineeringUniversity of KurdistanUniversity of Kurdistan
Computer Networks IIBorder Gateway protocol (BGP)
By: Dr. Alireza AbdollahpouriBy: Dr. Alireza Abdollahpouri
![Page 2: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/2.jpg)
Internet structure: network of networks
Tier 1 ISP
Tier 1 ISP
Tier 1 ISP
Tier-2 ISPTier-2 ISP
Tier-2 ISP Tier-2 ISP
Tier-2 ISP
localISPlocal
ISPlocalISP
localISP
localISP Tier 3
ISP
localISP
localISP
localISP
2
![Page 3: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/3.jpg)
Hierarchical Routing 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
gateway routers
3
![Page 4: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/4.jpg)
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
4
![Page 5: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/5.jpg)
Intra-AS and Inter-AS routing
Host2
C
A
B
Intra-AS routingwithin AS A( RIP, OSPF, …)
Intra-AS routingwithin AS B( RIP, OSPF, …)Host
1
ab
ad
bc
ac
b
C.b
A.aB.a
Inter-AS routing
between A and
BA.c
BGP
5
![Page 6: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/6.jpg)
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)
6
![Page 7: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/7.jpg)
AS Categories
AS1
AS3AS2
AS1
AS2
AS3AS1
AS2
Stub
Multi-homed
Transit
7
![Page 8: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/8.jpg)
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
8
![Page 9: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/9.jpg)
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
9
![Page 10: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/10.jpg)
BGP: controlling who routes to you
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
A
B
C
W X
Y
provider network
customer network
10
![Page 11: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/11.jpg)
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.
11
![Page 12: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/12.jpg)
Initial routing tables in path vector routing
12
![Page 13: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/13.jpg)
Stabilized tables for four autonomous systems
13
![Page 14: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/14.jpg)
14
BGP messages
![Page 15: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/15.jpg)
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
15
![Page 16: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/16.jpg)
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
16
![Page 17: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/17.jpg)
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
17
![Page 18: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/18.jpg)
R3 R4R1
R2
E-BGP
I-BGP
AS1 AS2
External BGP (E-BGP): BGP runs between different ASs
Internal BGP (I-BGP): BGP runs between two peers in the same AS
18
I-BGP and E-BGP
![Page 19: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/19.jpg)
AS-Path Sequence of AS’s a route traverses Used for loop detection and to apply policy
120.10.0.0/16130.10.0.0/16
110.10.0.0/16
AS-1
AS-2
AS-3 AS-4
AS-5
120.10.0.0/16 AS-2 AS-3 AS-4130.10.0.0/16 AS-2 AS-3110.10.0.0/16 AS-2 AS-5
19
![Page 20: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/20.jpg)
BGP Operations (Simplified)
Establish session on TCP port 179
Exchange all active routes
Exchange incremental updates
AS1
AS2
While connection is ALIVE exchange
route UPDATE messages
BGP session
20
![Page 21: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/21.jpg)
Example: Multiple AS Paths
AS701
AS73
AS7018
AS1239
AS9
128.2/16
128.2/169 701
128.2/169 7018 1239
21
![Page 22: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/22.jpg)
Shorter Doesn’t Always Mean Shorter
AS 4
AS 3
AS 2
AS 1
Path 4 1 is “better” than path 3 2 1
22
![Page 23: Department of Computer and IT Engineering University of Kurdistan Computer Networks II](https://reader034.fdocuments.in/reader034/viewer/2022051220/56813112550346895d97596a/html5/thumbnails/23.jpg)
23QuestionsQuestions