bgp route stability

44
BGP Route Stability Alexander Asimov <[email protected]> Highload Lab

Upload: hll

Post on 19-Jun-2015

549 views

Category:

Technology


3 download

DESCRIPTION

The presentation was delivered at the RIPE 64 Meeting on 16 – 20 April 2012 in Ljubljana by Alexander Asimov, Qrator network engineer at HLL. Alexander Asimov expressed his concerns about BGP Route Stability and it was suggested that RIPE Atlas may be able to address these issues.

TRANSCRIPT

Page 1: BGP Route Stability

BGP Route Stability

Alexander Asimov <[email protected]> Highload Lab

Page 2: BGP Route Stability

Research history

• 2009-2010 – study of BGP convergence

process:

• Imitation testbed (BGPC + PRIME);

• BGP convergence time equations;

• Experiments with BGP timers;

• Since 2010 – BGP policy recovery model;

• Since 2011 – BGP route monitor.

Page 3: BGP Route Stability

Route instability

1. Router misconfiguration;

2. BGP route loops;

3. Link failure.

Page 4: BGP Route Stability

Default route

Default Route

Incomplete route

table

Route loop at last

upstream

No prefix at

loopback interface

Page 5: BGP Route Stability

Default route : Stat

• Prefixes affected 12514

• Vulnerability: could be used for DDoS

amplification on AS (~ TTL)

• Link exhaustion

• Billable bandwidth

Page 6: BGP Route Stability

DDoS amplifier

• Prefixes affected 688

• Vulnerability: exploit makes AS work

like DDoS amplifier.

• DDoS at multiple ASes at the same time

with N-time increase of attack magnitude

Page 7: BGP Route Stability

BGP Route Loops

Built-in defense for static loops

Dynamic loops!

Page 8: BGP Route Stability

BGP dynamic loops

• Route withdraw;

• Changing prepend policy;

• Changing LOCAL_PREF.

Page 9: BGP Route Stability

BGP convergence process

• 𝐸𝑇𝑢𝑝 = 𝜃 𝑑 × 𝐸𝑡𝑤𝑎𝑖𝑡 , where d –

diameter of AS graph;

• 𝐸𝑇𝑑𝑜𝑤𝑛 = 𝜃 𝐷 × 𝐸𝑡𝑤𝑎𝑖𝑡 , where D –

Hamiltonian path of AS graph;

Alternatives paths!

Page 10: BGP Route Stability

Route Withdraw

AS2 AS3

AS1 AS4

AS-X

AS1 AS2 AS3 AS-X

AS2 AS3 AS-X

AS3 AS-X

AS4 AS-X

default

route

100

200

Page 11: BGP Route Stability

Route Withdraw

AS2 AS3

AS1 AS4

100

AS-X

200

AS1 AS2 AS3 AS-X

AS2 AS3 AS-X

AS3 --

AS4 AS-X

W

Loop AS2 – AS3

Packet loss AS1, AS2,AS3

default

route

Page 12: BGP Route Stability

Route Withdraw

AS2 AS3

AS1 AS4

100

AS-X

200

AS1 AS2 AS3 AS-X

AS2 --

AS3 --

AS4 AS-X

W

Loop AS2 – AS3

Packet loss AS1, AS2,AS3

default

route

Page 13: BGP Route Stability

Route Withdraw

AS2 AS3

AS1 AS4

100

AS-X

200

AS1 AS2 AS3 AS-X

AS2 AS1 AS4 AS-X

AS3 --

AS4 AS-X

W

1 minute problem!

~𝜌 𝑐2𝑝 ∗ 30𝑠

default

route A

Page 14: BGP Route Stability

Route Flaps

One route withdraw could cause

unstable dynamic loop.

Multiple flaps could make your net

unreachable.

Page 15: BGP Route Stability

Prepend Policy

AS2

AS1

AS4

AS3

AS-X

200

AS1 AS-X

AS2 AS3 AS-X

AS3 AS-X

AS4 AS1 AS-X

Page 16: BGP Route Stability

Prepend Policy

AS2

AS1

AS4

AS3

AS-X

200

AS1 AS2 AS3 AS-X

AS2 AS3 AS-X

AS3 AS4 AS1 AS-X

AS4 AS1 AS-X

as-path prepend 5

Loop AS1-AS2-AS3-AS4

A

A

Page 17: BGP Route Stability

Prepend Policy

AS2

AS1

AS4

AS3

AS-X

200

A

W

A

AS1 AS2 AS3 AS-X

AS2 AS3 AS4 AS1 AS-X

AS3 AS4 AS1 AS-X

AS4 AS1 AS2 AS3 AS-X

Loop AS1-AS2-AS3-AS4

Page 18: BGP Route Stability

Prepend Policy

AS2

AS1

AS4

AS3

AS-X

200

AS1 AS-X(5)

AS2 AS3 AS4 AS1 AS-X

AS3 AS-X(5)

AS4 AS1 AS2 AS3 AS-X

More then 1 minute problem

A

A

Page 19: BGP Route Stability

Core of the problem

Traffic flow engineering looks

like…

Page 20: BGP Route Stability

Automated traffic flow engineering

• No opportunity for traffic flow

prediction;

• No use of BGP convergence process;

• Could make networks partially

unavailable.

Page 21: BGP Route Stability

Route flaps : Stat

• Prefixes affected 1720

• Vulnerability:

• Packet loss;

• BGP message noise.

Page 22: BGP Route Stability

BGP Route Policy Loops

AS2 AS3

AS1 AS4

200

200

AS-X

200

200

A

A

AS1 --

AS2 --

AS3 AS-X

AS4 AS-X

Page 23: BGP Route Stability

BGP Route Policy Loops

AS2 AS3

AS1 AS4

200

200

200

200 A

A

AS1 --

AS2 AS3 AS-X

AS3 AS4 AS-X

AS4 AS-X

AS-X

Page 24: BGP Route Stability

BGP Route Policy Loops

AS2 AS3

AS1 AS4

200

200

200

200

A

AS1 AS2 AS3 AS5 AS-X

AS2 AS3 AS4 AS5 AS-X

AS3 AS4 AS5 AS-X

AS4 AS5 AS-X

A

AS-X

Page 25: BGP Route Stability

BGP Route Policy Loops

AS2 AS3

AS1 AS4

200

200

200

200

AS1 AS2 AS3 AS4 AS5 AS-X

AS2 AS3 AS4 AS5 AS-X

AS3 AS4 AS5 AS-X

AS4 AS1 AS2 AS3 AS5 AS-X

A

A AS-X

Loop AS1-AS2-AS3-AS4

Page 26: BGP Route Stability

BGP Route Policy Loops

AS2 AS3

AS1 AS4

200

200

200

200

AS1 AS2 AS3 AS4 AS5 AS-X

AS2 AS3 AS4 AS5 AS-X

AS3 AS5 AS-X

AS4 AS5 AS-X

A

A

Again!

AS-X

Page 27: BGP Route Stability

BGP Route Policy Loops : Stat

• Prefixes affected 149

• Vulnerability:

• Packet loss

• BGP message noise

Page 28: BGP Route Stability

Breaking down

1. Route flap

2. Change prepend policy

AS-X AS-X

3. AS_PATH poisoning

AS-X AS2 AS-X

Makes AS2 ignore your route

Page 29: BGP Route Stability

Breaking down

1. Route flap

2. Change prepend policy

AS-X AS-X

3. AS_PATH poisoning

AS-X AS2 AS-X

Makes AS2 ignore your route How not to fall into another loop?

Page 30: BGP Route Stability

One “killer” feature

Autonomous Systems Reverse Map:

1. Traffic flow engineering;

2. AS architecture design;

3. BGP loop prediction.

Page 31: BGP Route Stability

AS Mapping projects

• Physical links discovery No use of route policy;

• Macro map Shows links that are used by somebody, not by your AS;

• Route policy data

Outdated, incomplete.

• Model abstraction too far from reality

Page 32: BGP Route Stability

BGP Policy recovery project: Current state

• Mathematical model for BGP route policy recovery;

• Mathematical model for AS graph;

• New active verification methods;

• Working prototype;

• Negotiations with RIPE ATLAS.

Page 33: BGP Route Stability

They had problems…

AS174 AS3356 AS7018 AS6939 AS701

AS3549 AS209 AS4323 AS1239 AS12389

AS2848 AS3257 AS6461 AS2914 AS8468

AS23148 AS8447 AS20485 AS6830 AS8220

AS8928 AS3303 AS4589 AS42708 AS6453

AS6730 AS31130 AS3491 AS3320 AS8218

AS286 AS702 AS3561 AS20764 AS31323

AS20632 AS4766 AS680 AS29686 AS5089

AS10026 AS12350 AS2516 AS3786 AS12741

AS7575 AS1916 AS2273 AS9498 AS1785

And more then 4k other ASes!

Page 34: BGP Route Stability

Examples

AS174

• increases DDoS 17 times

• Default route: 25 prefixes affected

AS3356-AS3549

• increases DDoS 8 times

• Route flap: 12 prefixes affected

• Default route: 86 prefixes affected

Page 35: BGP Route Stability

Errors grouped by RR

0 20 40 60

RIPE

APNIC

ARIN

Errors in RR %

Errors in ASes %

Page 36: BGP Route Stability

Duration

0,00%

10,00%

20,00%

30,00%

40,00%

50,00%

60,00%

70,00%

80,00%

90,00%

<1h <2h <4h <8h

Flap

Route loop

Default route

DDoS amplifier

Page 37: BGP Route Stability

Trends

0

2000

4000

6000

8000

10000

12000

14000

16000

Found Errors

Fixed Errors

Page 38: BGP Route Stability

Robin Hood Hello.

During our research project we have detected IP address “*.*.*.*" in AS***, which multiplies ICMP packets. 11 times is a mean value.

It is dangerous vulnerability because this IP could be used by attackers to N-times increase DoS attack.

This could be harmful for your own network infrastructure and also break down attacked network.

Could you tell me for what purpose your router was configured by such way?

Hello This is assigned to one of our customers. We cannot see how there equipment is configured. If you believe this is in violation of our Acceptable use policy you can email abuse@***.com to report that.

Page 39: BGP Route Stability

In the core of the Internet

ASX1 ASX2

BGP

2.2.2.0/24

Default

route

4 second loop

=

DDoS*4

Page 40: BGP Route Stability

In the core of the Internet

ASX1 ASX2

BGP

2.2.2.0/24

Default

route

4 second loop

=

DDoS*4

Client ASes

Max = 350*DDoS

> 50 amplifiers

Mean = 10*DDoS

Page 41: BGP Route Stability

In the core of the Internet

ASX1 ASX2

BGP

2.2.2.0/24

Default

route

4 second loop

=

DDoS*4

Client ASes

Max = 350*DDoS

> 50 amplifiers

Mean = 10*DDoS

dst: aplifiers

src: 2.2.2.1

Page 42: BGP Route Stability

In the core of the Internet

ASX1 ASX2

BGP

2.2.2.0/24

Default

route

4 second loop

=

DDoS*4

Client ASes

Max = 350*DDoS

> 50 amplifiers

Mean = 10*DDoS

Result = 40*DDoS

dst: aplifiers

src: 2.2.2.1

Page 43: BGP Route Stability

Results

• The problem in client network is your problem;

• The problem in your upstream network is your problem too;

• Unstable prefix is invisible from origin AS;

• BGP balancing without prediction could make network unavailable;

• We have monitor. Community needs some trusted mechanism for notification.

Page 44: BGP Route Stability

Thank you for listening!

Questions?