How the Internet works? The Border Gateway Protocol (BGP) Edwin - - PowerPoint PPT Presentation

how the internet works the border gateway protocol bgp
SMART_READER_LITE
LIVE PREVIEW

How the Internet works? The Border Gateway Protocol (BGP) Edwin - - PowerPoint PPT Presentation

Chair of Network Architectures and Services - Prof. Carle Department of Computer Science Technical University of Munich How the Internet works? The Border Gateway Protocol (BGP) Edwin Cordeiro iLab2 Lecture SS 2017 Technical University of


slide-1
SLIDE 1

Chair of Network Architectures and Services - Prof. Carle Department of Computer Science Technical University of Munich

How the Internet works? The Border Gateway Protocol (BGP)

Edwin Cordeiro iLab2 Lecture SS 2017

Technical University of Munich (TUM) Department of Informatics Chair of Network Architectures and Services

slide-2
SLIDE 2

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 2

Outline Routing and Forwarding RIB and FIB Path Vector Protocols Border Gateway Protocol (BGP) Business Considerations and Policy routing BGP Table Considerations Internet Exchange Points (IXP)

slide-3
SLIDE 3

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 3

Routing ≠ Forwarding

Routing:

  • The process of determining the best path for specific types of packets (usually: all

packets with the same destination) through the network

  • (Traditionally) performed jointly by the routers of a network by exchanging messages
  • Analogy: Read street map, plan journey

Forwarding:

  • The process where a router relays a packet to a neighbouring router. Selection of

the neighbouring router depends on the previous routing protocol calculations

  • Performed by one router on one packet
  • Analogy: Read a street sign and determine if we should take the next exit

In practice, this distinction is often ignored

  • “If router A routes packet X, then …”
  • Actually, it doesn‘t – it forwards X.
slide-4
SLIDE 4

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 4

Routing Information Base (RIB) ≠ Forwarding Information Base (RIB)

slide-5
SLIDE 5

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 5

Path Vector Protocols

  • For each destination, advertise entire path (= sequence of node

identifiers) to neighbours

  • Cost calculation can be done by looking at path
  • Count number of hops on the path
  • Avoid paths containing some specific nodes
  • Cheapest or most reliable route can be chosen
  • Easy loop detection: Does my node ID already appear in the path?

Notice: Distance Vector Protocols (choose cheapest path based on link “cost”) and Link State Protocols (choose based on knowledge of all links of the network) will not be covered here

slide-6
SLIDE 6

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 6

Hierarchical Routing Aggregate routers into regions called
 “autonomous systems” (short: AS; plural: ASes)

  • One AS is usually a network under central control
  • i.e. one ISP / big company

Routers in same AS run a routing protocol

  • = “intra-AS” routing protocol (also called “intradomain”)

ASes are connected: via gateway routers

  • Direct link to [gateway] router in another AS


= “inter-AS” routing protocol (also called “interdomain”)

  • Warning: Non-gateway routers need to know about inter-AS routing as

well!

slide-7
SLIDE 7

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 7

3b 1d 3a 1c 2a AS3 AS1

AS2

1a 2c 2b 1b 3c

Inter-AS Routing Suppose router in AS1 receives datagram destined

  • utside of AS1:
  • Router should forward

packet to gateway router

  • …but to which one?

AS1 must:

1.

learn which destinations are reachable through AS2, which through AS3

2.

propagate this reachability info to all routers in AS1 (i.e., not just the gateway routers) Job of inter-AS routing!

slide-8
SLIDE 8

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 8

Example: Choosing among multiple ASes Now suppose AS1 learns from inter-AS protocol that subnet x is reachable from AS3 and from AS2. To configure forwarding table, router 1d must determine towards which gateway it should forward packets for destination x.

  • “Do we like AS2 or AS3 better?”
  • This decision is job of inter-AS routing protocol

3b 1d 3a 1c 2a AS3 AS1

AS2

1a 2c 2b 1b 3c

x

… …

slide-9
SLIDE 9

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 9

Internet inter-AS routing: BGP Border Gateway Protocol (BGP): De facto standard for inter-AS routing BGP provides each AS a means to:

  • Advertise the existence of an IP prefix to other AS: “This subnet is

here”

  • Obtain subnet reachability information from neighbouring AS.
  • Determine “good” routes to subnets based on reachability information

and policy.

  • Propagate reachability information to all AS-internal routers.
slide-10
SLIDE 10

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 10

BGP basics Pairs of routers (BGP peers) exchange routing info over semi-permanent TCP connections: BGP sessions When AS2 advertises an IP prefix to AS1:

  • AS2 promises it will forward IP packets towards that prefix
  • AS2 can aggregate prefixes in its advertisement, for example:
  • 10.11.12.0/24, 10.11.13.0/24, 10.11.14.0/23 into 10.11.12.0/22
  • 2001:db8::/33, 2001:db8:8000::/33 into 2001:db8::/32
slide-11
SLIDE 11

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 11

How does BGP work?

BGP is a path vector protocol BGP messages exchanged using TCP BGP Message types:

  • OPEN: set up new BGP session, after TCP

handshake

  • NOTIFICATION: an error occurred in

previous message → tear down BGP session, close TCP connection

  • KEEPALIVE: “null” data to prevent TCP

timeout/auto-close; also used to acknowledge OPEN message

  • UPDATE:
  • Announcement: inform peer about new /

changed route to some target

  • Withdrawal: inform peer about non-reachability
  • f a target
slide-12
SLIDE 12

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 12

BGP updates Update (Announcement) message consists of

  • Destinations (one or more IP prefix)
  • AS Path (=Path vector)
  • Next hop (=IP address of our router connecting to other AS)

…but update messages also contain a lot of further attributes:

  • Local Preference: used to prefer one gateway over another
  • Only communicated intra-AS
  • Origin: route learned via { intra-AS | inter-AS | other }
  • Multi-Exit Discriminator, Community, …

It means BGP is not a pure path vector protocol, as it adds possibilities to the path vector idea.

slide-13
SLIDE 13

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 13

eBGP and iBGP External BGP (eBGP): between routers in different ASes Internal BGP (iBGP): between routers in same AS Remember: In spite of intra-AS routing protocol, all routers need to know about external destinations (default iBGP route or full tables)

  • No different protocols - just slightly different configurations!

3b 1d 3a 1c 2a AS3 AS1

AS2

1a 2c 2b 1b 3c

eBGP session iBGP session

3b 1d 3a 1c 2a AS3 AS1

AS2

1a 2c 2b 1b 3c x

slide-14
SLIDE 14

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 14

Distributing reachability info Using eBGP session between 3a and 1c, AS3 sends reachability info about prefix x to AS1.

  • 1c can then use iBGP to distribute new prefix info to all routers in AS1
  • 1b can then re-advertise new reachability info to AS2 over 1b-to-2a

eBGP session When router learns of new prefix x, it creates a new entry for the prefix in its forwarding table.

3b 1d 3a 1c 2a AS3 AS1

AS2

1a 2c 2b 1b 3c

eBGP session iBGP session

x

slide-15
SLIDE 15

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 15

Path attributes & BGP routes Advertised prefix includes [many] BGP attributes

  • prefix + attributes = “route”

Most important attributes:

  • AS-PATH: contains ASes through which prefix advertisement has

passed: e.g., AS 67, AS 17, AS 7018

  • NEXT-HOP: indicates specific internal-AS router to next-hop AS (may

be multiple links from current AS to next-hop-AS) When gateway router receives route advertisement, it uses an import policy to accept/decline the route

  • More on this later
slide-16
SLIDE 16

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 16

AS Numbers How do we express a BGP path? ASes identified by AS Numbers (short: ASN)
 Examples:

  • Leibnitz-Rechenzentrum = AS12816
  • Deutsche Telekom = AS3320
  • TUM-I8-AS = AS56357
  • AT&T = AS7018, AS7132, AS2685, AS2686, AS2687

ASN assignment: similar to IP address space

  • ASN space administered IANA
  • Local registrars, e.g., RIPE NCC in Europe

➔ AS PATH specified by ASNs.
 The AS PATH does not contain IP addresses!

slide-17
SLIDE 17

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 17

BGP update: Very simple example

Type: Announcement

  • new route
  • existing route has changed

Destination prefix: 198.51.100.0/24

slide-18
SLIDE 18

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 17

BGP update: Very simple example

Type: Announcement

  • new route
  • existing route has changed

Destination prefix: 198.51.100.0/24 AS Path:
 64496 3320 4711 815 64511

slide-19
SLIDE 19

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 17

BGP update: Very simple example

Type: Announcement

  • new route
  • existing route has changed

Destination prefix: 198.51.100.0/24 AS Path:
 64496 3320 4711 815 64511 Originator: The AS that “owns” 198.51.100.0/24

slide-20
SLIDE 20

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 17

BGP update: Very simple example

Type: Announcement

  • new route
  • existing route has changed

Destination prefix: 198.51.100.0/24 AS Path:
 64496 3320 4711 815 64511 Next Hop: 203.0.113.96

  • The router that connects the current AS to AS64496

Originator: The AS that “owns” 198.51.100.0/24

slide-21
SLIDE 21

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 17

BGP update: Very simple example

Type: Announcement

  • new route
  • existing route has changed

Destination prefix: 198.51.100.0/24 AS Path:
 64496 3320 4711 815 64511 Next Hop: 203.0.113.96

  • The router that connects the current AS to AS64496

Originator: The AS that “owns” 198.51.100.0/24

How the update travelled

slide-22
SLIDE 22

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 17

BGP update: Very simple example

Type: Announcement

  • new route
  • existing route has changed

Destination prefix: 198.51.100.0/24 AS Path:
 64496 3320 4711 815 64511 Next Hop: 203.0.113.96

  • The router that connects the current AS to AS64496

Originator: The AS that “owns” 198.51.100.0/24

How the update travelled How the IP packets will be forwarded

(if this route gets chosen)

slide-23
SLIDE 23

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 18

BGP route selection Router may learn about more than 1 route to some prefix
 ⇒ Router must select the best one among these Elimination rules (simplified):

  • 1. Longest prefix match
  • 2. Local preference value attribute: policy decision
  • 3. Shortest AS-PATH
  • 4. Closest NEXT-HOP router: hot potato routing
  • 5. Additional criteria

It is possible to create Policies that may override the default behaviour, for instance to desconsider the longest prefix match, in other to use a cheaper link option.

slide-24
SLIDE 24

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 19

Hot-potato routing

Interaction between Inter-AS and Intra-AS routing

  • If traffic is destined for other AS, get rid of it ASAP using Intra-AS routing to find

shortest path to gateway Multiple transit points ⇒ asymmetrical routing

  • Asymmetrical paths are common on the Internet

Host A Host B Atlantic

  • cean

AS 7018 AS 3320

slide-25
SLIDE 25

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 20

iBGP scalability problem Every router in AS should know external routes

  • Not only local neighbours, but also neighbours connected at other

routers

  • Many/all routers in AS have to run BGP sessions

Need to select best inter-AS routes

  • Routers need to exchange routing information via iBGP
  • O(n) BGP routers ⇒ O(n²) iBGP sessions

This does not scale!

slide-26
SLIDE 26

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 21

Solution: BGP Route Reflectors (RR) Idea:

  • One special router = Route Reflector (RR)
  • Every eBGP router sends routes learned from eBGP


via iBGP to RR

  • RR collects routes, may do policing
  • RR distributes routes to all other BGP routers in AS via iBGP

Result: O(n) BGP routers, O(n) BGP sessions ☺

1d 1c AS1 1a 1b

eBGP session iBGP session

slide-27
SLIDE 27

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 22

Terminology: Transit AS, stub AS, multi-homed AS

Transit AS:
 Relays traffic between other Ases (Only about 15% of all ASes are Transit ASes.)

slide-28
SLIDE 28

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 22

Terminology: Transit AS, stub AS, multi-homed AS

Stub AS: Buys transit from only

  • ne other AS, but does not offer

transit for other ASes Transit AS:
 Relays traffic between other Ases (Only about 15% of all ASes are Transit ASes.)

slide-29
SLIDE 29

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 22

Terminology: Transit AS, stub AS, multi-homed AS

Stub AS: Buys transit from only

  • ne other AS, but does not offer

transit for other ASes Multi-homed AS: Buys transit from ≥ 2 other ASes, but does not offer transit for other ASes Transit AS:
 Relays traffic between other Ases (Only about 15% of all ASes are Transit ASes.)

slide-30
SLIDE 30

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 23

Business relationships Internet = network of networks (ASes)

  • Many thousands of ASes using BGP for routing between ASes

Differences in economical power/importance

  • Some ASes huge, intercontinental (AT&T, Cable&Wireless)
  • Some ASes small, local (e.g., München: M-Net, SpaceNet)

Small ASes customers of larger ASes: Transit traffic

  • Smaller AS pays for connecting link and for data (buys transit)
  • Business relationship: customer - provider
slide-31
SLIDE 31

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 24

Business relationships Equally sized Cases

  • Usually share cost for connecting links
  • Business relationship = peering (no payments for traffic between those

ASes) Peering

  • Usually “equal-size” AS, but could be between big CDN and small ISP
  • ≠ peers of a BGP connection (also may be customer or provider)
  • ≠ peer-to-peer network
slide-32
SLIDE 32

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 25

Business and policy routing Basic principle #1 (Routing)

  • Prefer routes that are more cost-efficient

If you have the choice, then…

  • …routes via a customer…
  • …are better than routes via a peer, which…
  • …are better than routes via a provider.
slide-33
SLIDE 33

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 26

Business and policy routing Basic principle #2 (Route announcement)

  • Announce routes that produce income if used by others
  • Others = customers
  • Announce routes that reduce costs
  • Route using peering
  • Do not announce routes that incur financial loss
  • … as long as alternative paths exist
  • … be aware you may have bigger convergence time in case of

failures

  • … announcing with lower priority could be an reasonable alternative
slide-34
SLIDE 34

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 27

Business and policy routing A tells C all routes it uses to reach other ASes

  • The more traffic comes from C, the more money A makes

A C provider customer

slide-35
SLIDE 35

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 28

Business and policy routing

A and B tell C all routes they use to reach other ASes

  • The more traffic flows from C to A, the more money A makes
  • The more traffic flows from C to B, the more money B makes
  • C will pick the one with the cheaper offer / better quality / …

A C provider customer B provider customer

slide-36
SLIDE 36

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 29

Business and policy routing

C tells A its own prefixes; C tells B its own prefixes

  • C wants to be reachable from outside
  • C does not tell A routes learned from/via B
  • C does not tell B routes learned from/via A
  • C does not want to pay money for traffic …↔A ↔C ↔B ↔…

A C provider customer B provider customer

slide-37
SLIDE 37

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 30

Business and policy routing: Prefix Announcements

C tells A its own prefixes C tells B its own prefixes

  • …but announces more specific prefix for one of the neighbours. Why?

A C expensive provider customer B cheap provider customer

slide-38
SLIDE 38

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 30

Business and policy routing: Prefix Announcements

C tells A its own prefixes C tells B its own prefixes

  • …but announces more specific prefix for one of the neighbours. Why?
  • Result: Route available for both peers, but longer prefix means more

attractive path is preferred

  • Technique may be used for load balancing

A C expensive provider customer B cheap provider customer

slide-39
SLIDE 39

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 31

Prefix Announcements Announce the aggregated prefix for all peers:

  • If connection to one peer is lost, connection to Internet is maintained
  • Example:
  • 2001:db8::/32 is announced for all peers

Announce more specific prefix for the preferred peer:

  • This peer will be preferred when receiving traffic
  • Example:
  • Announce for the cheaper peer more specific prefix:
  • 2001:db8:0000::/33 and 2001:db8:8000::/33
  • Announce for the other peers the aggregated prefix:
  • 2001:db8::/32
slide-40
SLIDE 40

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 32

Prefix Announcements - Load Balancing

Announce the aggregated prefix for all peers:

  • If connection to one peer is lost, connection to Internet is maintained

Consider the IPs in your network are equally distributed in the available address

  • space. Announce specific prefixes in the desired proportion:
  • Example:
  • You want 1/4 from AS A and 3/4 from AS B
slide-41
SLIDE 41

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 32

Prefix Announcements - Load Balancing

Announce the aggregated prefix for all peers:

  • If connection to one peer is lost, connection to Internet is maintained

Consider the IPs in your network are equally distributed in the available address

  • space. Announce specific prefixes in the desired proportion:
  • Example:
  • You want 1/4 from AS A and 3/4 from AS B
  • Announce for AS A:
slide-42
SLIDE 42

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 32

Prefix Announcements - Load Balancing

Announce the aggregated prefix for all peers:

  • If connection to one peer is lost, connection to Internet is maintained

Consider the IPs in your network are equally distributed in the available address

  • space. Announce specific prefixes in the desired proportion:
  • Example:
  • You want 1/4 from AS A and 3/4 from AS B
  • Announce for AS A:
  • 2001:db8:0000::/34 and 2001:db8::/32
slide-43
SLIDE 43

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 32

Prefix Announcements - Load Balancing

Announce the aggregated prefix for all peers:

  • If connection to one peer is lost, connection to Internet is maintained

Consider the IPs in your network are equally distributed in the available address

  • space. Announce specific prefixes in the desired proportion:
  • Example:
  • You want 1/4 from AS A and 3/4 from AS B
  • Announce for AS A:
  • 2001:db8:0000::/34 and 2001:db8::/32
  • Announce for AS B:
slide-44
SLIDE 44

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 32

Prefix Announcements - Load Balancing

Announce the aggregated prefix for all peers:

  • If connection to one peer is lost, connection to Internet is maintained

Consider the IPs in your network are equally distributed in the available address

  • space. Announce specific prefixes in the desired proportion:
  • Example:
  • You want 1/4 from AS A and 3/4 from AS B
  • Announce for AS A:
  • 2001:db8:0000::/34 and 2001:db8::/32
  • Announce for AS B:
  • 2001:db8:4000::/34, 2001:db8:8000:/33 and 2001:db8::/32
slide-45
SLIDE 45

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 32

Prefix Announcements - Load Balancing

Announce the aggregated prefix for all peers:

  • If connection to one peer is lost, connection to Internet is maintained

Consider the IPs in your network are equally distributed in the available address

  • space. Announce specific prefixes in the desired proportion:
  • Example:
  • You want 1/4 from AS A and 3/4 from AS B
  • Announce for AS A:
  • 2001:db8:0000::/34 and 2001:db8::/32
  • Announce for AS B:
  • 2001:db8:4000::/34, 2001:db8:8000:/33 and 2001:db8::/32

This division may be used for other reasons, for example, business customers are announced for the expensive provider and residential customers in the cheap provider.

slide-46
SLIDE 46

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 32

Prefix Announcements - Load Balancing

Announce the aggregated prefix for all peers:

  • If connection to one peer is lost, connection to Internet is maintained

Consider the IPs in your network are equally distributed in the available address

  • space. Announce specific prefixes in the desired proportion:
  • Example:
  • You want 1/4 from AS A and 3/4 from AS B
  • Announce for AS A:
  • 2001:db8:0000::/34 and 2001:db8::/32
  • Announce for AS B:
  • 2001:db8:4000::/34, 2001:db8:8000:/33 and 2001:db8::/32

This division may be used for other reasons, for example, business customers are announced for the expensive provider and residential customers in the cheap provider. Announcement of unnecessary prefixes is bad for the whole Internet, think before using this solution.

slide-47
SLIDE 47

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 33

Business and policy routing: AS path prepending

C tells A its own prefixes C may tell B its own prefixes

  • …but inserts “C” multiple times into AS path. Why?

A C cheap provider customer B expensive provider customer

slide-48
SLIDE 48

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 33

Business and policy routing: AS path prepending

C tells A its own prefixes C may tell B its own prefixes

  • …but inserts “C” multiple times into AS path. Why?
  • Result: Route available, but longer path = less attractive
  • Technique is called AS path prepending

A C cheap provider customer B expensive provider customer

slide-49
SLIDE 49

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 34

AS path prepending The same ASN subsequently within an AS path does not constitute a loop Recall the elimination rule for selecting from multiple path alternatives

  • “Prefer the shortest AS path” is rule 3
  • Only ignored if Local Pref value is set

➔ AS path prepending makes a route less attractive – will then only be used when there is no alternative

  • Can be used, e.g., for a slow or expensive backup link

How many times to repeat the AS number?

  • Usually just 1 or 2 repetitions
  • More than ≈5 is useless
slide-50
SLIDE 50

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 35

Business and policy routing

What should C announce to A?

A C provider customer D provider customer

slide-51
SLIDE 51

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 35

Business and policy routing

What should C announce to A?

❑ C tells A about its own prefixes

A C provider customer D provider customer

slide-52
SLIDE 52

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 35

Business and policy routing

What should C announce to A?

❑ C tells A about its own prefixes ❑ C tells A about its route to D’s prefixes:


loses money to A, but gains money from D

A C provider customer D provider customer

slide-53
SLIDE 53

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 36

Business and policy routing

What should C announce to E?

C D provider customer E peering

slide-54
SLIDE 54

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 36

Business and policy routing

What should C announce to E?

❑ C tells peering partner E about its own prefixes


and route to D:
 no cost on link to E, but gains money from D

C D provider customer E peering

slide-55
SLIDE 55

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 37

Business and policy routing

Which route to p should C select?

C B customer E peering p provider

slide-56
SLIDE 56

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 37

Business and policy routing

Which route to p should C select?

❑ B tells C about route to prefix p (lose money) ❑ E tells C about route to prefix p (± 0) ❑ C prefers route via E

C B customer E peering p provider

slide-57
SLIDE 57

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 38 ❑ What should C announce here?

F C peering E peering provider D customer

Business and policy routing

slide-58
SLIDE 58

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 38 ❑ What should C announce here?

▪ C announces to F and E: its own prefixes and D’s routes

F C peering E peering provider D customer

Business and policy routing

slide-59
SLIDE 59

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 38 ❑ What should C announce here?

▪ C announces to F and E: its own prefixes and D’s routes ▪ C does not announce to E: routes going via F

  • Otherwise: E could send traffic towards F but wouldn’t pay

anything, F wouldn’t pay either, and C’s network gets loaded with additional traffic

F C peering E peering provider D customer

Business and policy routing

slide-60
SLIDE 60

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 38 ❑ What should C announce here?

▪ C announces to F and E: its own prefixes and D’s routes ▪ C does not announce to E: routes going via F

  • Otherwise: E could send traffic towards F but wouldn’t pay

anything, F wouldn’t pay either, and C’s network gets loaded with additional traffic ▪ C does not announce to F: routes going via E

  • Same reason

F C peering E peering provider D customer

Business and policy routing

slide-61
SLIDE 61

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 39

Policy routing: Valley-free routing (idealised!)

Results: Packets always travel…

  • 1. upstream: sequence of C→P links (possibly length = 0)
  • 2. then possibly across one peering link
  • 3. then downstream: sequence of P→C links (possibly length = 0)

customer peering provider customer provider provider customer provider customer

slide-62
SLIDE 62

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 40

Tier-1, Tier-2, Tier-3 etc.

Tier-1/DFZ = only peerings, no providers Tier-2 = only peerings and one or more Tier-1 providers Tier-3 = at least one Tier-2 as a provider Tier-n = at least one Tier-(n-1) provider

  • defined recursively
  • n≥4: Rare in Western Europe, North America, East Asia

“Tier-1.5” = almost a Tier-1 but pays money for some links

  • Example: Deutsche Telekom used to pay money to Sprint, but is now Tier-1
  • Marketing purposes: Tier-1 sounds better

DFZ: Default Free Zone, ASes here can’t use a default route to reach a desired

  • destination. Tier-3 and smaller with only one provider or a preferred provider may

use a default route (send all my traffic to this provider), instead of learning the full BGP table

slide-63
SLIDE 63

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 41

BGP Table Size IPv4: ≥ 700,000 IPv6: ≥ 40,000 (Source: https://bgp.potaroo.net/index-bgp.html on May 2017)

Source: http://www.cidr-report.org/as2.0/ on May 2017

slide-64
SLIDE 64

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 42

Siblings

Not everything is provider/customer or peering Sibling = mutual transit agreement

  • Provide connectivity to the rest of the Internet for each other
  • ≈ very extensive peering

Examples

  • Two small ASes close to each other that cannot afford additional Internet

services

  • Merging two companies
  • Merging two ASes into one = difficult,
  • Keeping two ASes and exchaning everything for free = easier

Example: AT&T has five different AS numbers (7018, 7132, 2685, 2686, 2687)

slide-65
SLIDE 65

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 43

Where to peer

(Here: Peering = having a BGP relationship)

  • A. Private peering

❑ The obvious solution: “Let’s have a cable from your server room to our

server room”

  • B. At public peering locations (Internet Exchange Point, IX, IXP)

❑ “A room full of switches that many providers connect to” ❑ Configure VLAN connections in switch, instead of having to put in O(n²)

separate wires

❑ Examples:

❑ DE-CIX, Frankfurt (purportedly largest in world, peak of 5.6 Tbps) ❑ AMS-IX, Amsterdam (peak of 5.5 Tbps) ❑ LINX, London ❑ MSK-IX, Moscow ❑ IX-BR, São Paulo

slide-66
SLIDE 66

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 44

Summary | How the Internet works?

Source: https://www.matraex.com/wp-content/uploads/2016/02/complex-network-of-website-hosting.png

Default Free Zone

slide-67
SLIDE 67

Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 45

Questions?