CS 457 Lecture 18 Global Internet Fall 2011 Solution: Path - - PowerPoint PPT Presentation

cs 457 lecture 18 global internet
SMART_READER_LITE
LIVE PREVIEW

CS 457 Lecture 18 Global Internet Fall 2011 Solution: Path - - PowerPoint PPT Presentation

CS 457 Lecture 18 Global Internet Fall 2011 Solution: Path Vectors 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


slide-1
SLIDE 1

CS 457 – Lecture 18 Global Internet

Fall 2011

slide-2
SLIDE 2

Solution: Path Vectors

  • 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

slide-3
SLIDE 3

Interconnecting BGP Peers

  • BGP uses TCP to connect peers (port 179)
  • Advantages:

– makes BGP much simpler – no need for periodic refresh - routes are valid until withdrawn, or the connection is lost – incremental updates

  • Disadvantages

– congestion control on a routing protocol?

slide-4
SLIDE 4

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 ASs in a manner different than what AS2 has chosen (need source routing for that)

slide-5
SLIDE 5

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)

slide-6
SLIDE 6

AS Categories

AS1 AS2 AS3 AS1 AS2 AS3 AS1 AS2 Stub Multi-homed Transit

slide-7
SLIDE 7

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

slide-8
SLIDE 8

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 those AS’s

  • An AS can favor or disfavor certain AS’s for

traffic transit from itself

– Pick appropriate routes by examining path vectors

slide-9
SLIDE 9

BGP Is NOT Needed If:

  • Single homed

network (stub)

  • AS does not provide

downstream routing

  • AS uses a default

route

slide-10
SLIDE 10

Routing Information Bases (RIB)

  • Routes are stored in RIBs
  • Adj-RIBs-In: routing info that has been

learned from other routers (unprocessed routing info)

  • Loc-RIB: local routing information

selected from Adj-RIBs-In (routes selected locally)

  • Adj-RIBs-Out: info to be advertised to

peers (routes to be advertised)

slide-11
SLIDE 11

BGP Messages

  • Open

– Opens a BGP connection (establishes a TCP connection)

  • Update

– Withdrawn routes – New routes that include path attributes e.g., origin, path

  • Notification

– Used for error notification - TCP connection is closed immediately after notification

  • Keep alive

– Sent periodically to peers to ensure connectivity – sent in place of an update message

slide-12
SLIDE 12

AS_PATH Attribute

slide-13
SLIDE 13

Next Hop Path Attribute

  • NEXT_HOP: IP address of border

router to be used as next hop

  • Usually, next hop is the router sending

the UPDATE message

  • Useful when some routers do not speak

BGP

slide-14
SLIDE 14

Example of NEXT_HOP

A

(BGP)

B

(BGP)

C

(no BGP)

138.39.0.0/16

UPDATE MSG through BGP Traffic to 138.39.0.0/16

AS1 AS2

slide-15
SLIDE 15

LOCAL-PREF Path Attribute

Higher preference wins

  • Provided by a BGP router to all other internal BGP

routers

– denotes degree of preference for each destination

slide-16
SLIDE 16

LOCAL-PREF Example 1

AS1 AS2 Link A Link B

c d a b

You are AS1 with two links A & B to AS2. Suppose AS2 advertises 12/24 on both links. How to force all traffic to AS2’s prefix 12/24 through link A? 12/24 11/24 At a: LP=10 for 12/24:b At c: LP=5 for 12/24:d

slide-17
SLIDE 17

LOCAL-PREF Example 2

AS1 AS2 Link A Link B

c d a b

You are AS1 with two links A & B to AS2. How to load-share AS2-bound traffic between links A & B? 12/24 11/24 a: 12.0/25:b - LP 10 a: 12.128/25:b - LP 5 c: 12.0/25:d - LP 5 c: 12.128/25:d - LP 10

slide-18
SLIDE 18

Multi-exit Discriminator (MED) Path Attribute

  • Used when two AS’s connect to each other in more than one place
  • Metric expresses degree of preference
  • AS2 includes MEDs with prefixes sent to AS1 over links A, B
  • AS1 uses these to select appropriate link when sending to prefix PFX

AS1 AS2 AS3 AS4 Link A Link B

PFX Cost=10 Cost=50

slide-19
SLIDE 19

..MED

Lower cost wins

slide-20
SLIDE 20

MED Example

AS1 AS2 Link A Link B

c d a b

You are AS1 with two links A & B to AS2. How can you make AS2 send north traffic to link A and south traffic to link B? north: 11.0/16 south: 11.1/16 11.0/16:a (MED: 10) 11.0/16:c (MED: 20) 11.1/16:a (MED: 20) 11.1/16:c (MED: 10)

slide-21
SLIDE 21

MED (Continued)

AS1 AS2 AS3 AS4 Link A Link B

AS2 can use MED to instruct AS1 to prefer link A for traffic to AS3, and link B for traffic to AS4. How is this done? advertisement traffic

slide-22
SLIDE 22

MED (Continued)

MED is typically used in provider/subscriber scenarios. It can lead to unfairness if used between ISPs because it may force one ISP to carry more traffic: ISP2 ISP1 SF NY

  • ISP1 ignores MED from ISP2
  • ISP2 obeys MED from ISP1
  • ISP2 ends up carrying traffic most of the way
slide-23
SLIDE 23

Local Pref vs. MED

  • Use Local Pref if you have multiple exit

points to a neighbor and want to tell your routers where to direct traffic

– Intra-AS policy

  • Use MED if you have multiple links with

a neighbor and want to tell neighbor where to send traffic to you

– Inter-AS policy

slide-24
SLIDE 24

Internal v.s. External BGP

R3 R4 R1 R2 BGP

  • BGP can be used by R3 and R4 to learn routes.
  • How do R1 and R2 learn routes?
  • Option 1: Inject routes in IGP
  • only works for small routing tables
  • Option 2: Use I-BGP
slide-25
SLIDE 25

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

slide-26
SLIDE 26

Internal BGP (I-BGP)

R3 R4 R1 R2 E-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
slide-27
SLIDE 27

I-BGP Mesh

I-BGP mesh

slide-28
SLIDE 28

BGP Example

AS1 AS3 R1 R5 R2 R3 R4 R6 AS2 E-BGP I-BGP E-BGP R1 advertises routes within AS1 to R2 R2 advertises routes within AS2 and AS3 to R1 R2 learns AS3 routes from I-BGP with R4 R4 learns AS3 routes from E-BGP with R6 R4 advertises routes within AS2 and AS1 to R6

slide-29
SLIDE 29

What’s Next

  • Read Chapter 1, 2, 3, and 4.1-4.3
  • Next Lecture Topics from Chapter 4.4 - 4.6

– Multicast, MPLS, and Routing Wrap-up

  • Homework

– Due Thursday in lecture

  • Project 2

– Due Friday