Top Banner
BGP Roles Alexander Azimov Qrator Labs
28

A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Oct 01, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

BGP Roles

Alexander Azimov

Qrator Labs

Page 2: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

BGP Policy is made by…

• Local Pref

• Prepends

• RPSL

• RPKI

• Communities

And other XX config options

Ha! Easy! Love flexibility!

Page 3: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

But is it simple?

140 RFC have already been written!

388 RFC drafts

Numerous BCPs…

KISS is not for BGP?

Page 4: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

It could be quite simple…

protocol bgp IAMOPERATOR {

local as MY_AS;

neighbor X.X.X.X as AS_PROVIDER;

}

Page 5: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

The Great Gap

Expectation BGP Configuration

Page 6: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

A Simple Result

A simple route leak!

Internal Session

local as MY_AS; neighbor X.X.X.X as AS_UPSTREAM_X;

local as MY_AS; neighbor Y.Y.Y.Y as AS_UPSTREAM_Y;

Page 7: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Route Leak: stats

0

10000

20000

30000

40000

50000

60000

70000

80000

90000

January Februrary March April May June*

Page 8: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Who is the leaker?

About ~1000 leakers affect… Everybody!

Page 9: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Newcomers

0

10000

20000

30000

40000

50000

60000

2010 2011 2012 2013 2014 2015

Page 10: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Imagine yourself on a highway…

Page 11: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Option 1: Regulation

bgpbusters! Are you afraid of leaks?

Page 12: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Option 2: A new BGP extension

Page 13: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Avoiding Route Leaks

Optional non-transit attribute – Internal Only To Customer Attribute (iOTC):

• Flag is not set – announce in all directions

• Flag is set – announce only to internal and customer links

Page 14: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Preventing Route Leaks

If route was learned from a provider or peer it should not be announced to another provider or peer

Set OTC if neighbor is customer or peer

Internal Session No iOTC change

Filter routes if iOTC is set and neighbor is customer or peer

Page 15: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Detecting Route Leaks

Optional transit attribute – External Only To Customer Attribute (eOTC):

• Attribute is not set – no info

• Attribute is set and equals to neighbor AS – ok

• Otherwise – route leak

Page 16: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Detecting Route Leaks

If eOTC is set and eOTC!=AS2

AS1 AS3 AS2

If route was learned from a customer or peer and eOTC is set and eOTC != neighbor AS then route was leaked

If neighbor is customer or peer eOTC=AS1

No Filters

Page 17: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

What should we do with Route Leak?

Page 18: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Security Considerations: eOTC

Mistake/violation in eOTC flag

It could have significantly impact on route propagation

customer

UPDATE eOTC flag set

provider

Page 19: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Local Preference Values

Preset values:

• From customer (+$) links: 300;

• From peer (0$) links: 200;

• From provider (-$) links: 100;

• Route Leaks (-$$$) links: 0.

Page 20: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Route Leak Mitigation

• iOTC – route leak prevention

• eOTC – route leak detection

BINGO?

Page 21: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Meet The Neighbor Role

4 Roles: customer, provider, peer, internal

Page 22: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Meet The Neighbor Role

OPEN with customer role

OPEN with peer role

Notification Notification

Internal Session No role marker change

3 pairs of non-conflict roles: 1. Peer <---> Peer 2. Customer <---> Provider 3. Internal <---> Internal

Page 23: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Strict Mode

OPEN with no role

OPEN with peer role

Notification

Notification if the role is not set in OPEN from the neighbor

Page 24: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Route Leak Mitigation

• iOTC – route leak prevention

• eOTC – route leak detection

• Roles controlling both attributes

• Roles controlled by neighbors

BINGO!

Page 25: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

A Simple Config

protocol bgp IAMOPERATOR {

local as MY_AS;

neighbor X.X.X.X as AS_PROVIDER;

role client;

}

Page 26: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Benefits

Backward compatibility

• Unknown optional non-transit attributes are just ignored

• Unknown capabilities should be just ignored!

Route leak extinction:

• No mistake leaks

Roles:

• Opportunity to control neighbor configuration

• And a set of other applications

Page 27: A Simple BGP - ENOG · A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role client; } Benefits Backward compatibility •Unknown optional

Future Work

• Roles as AS boundaries

– Keep non-transit attributes between internal BGP sessions

– external > internal in BGP decision process

• Roles as preset Local Preference Values

• Roles in anti-spoofing