rpki-based origin validation, routers, & caches · 2013-07-26 · advertised to update-groups:...

121
RPKI-Based Origin Validation, Routers, & Caches RPKIWS / Berlin 2013.07.26 Randy Bush <randy@psg.com> Rob Austein <sra@hactrn.net> Michael Elkins <me@sigpipe.org> Matthias Waehlisch <m.waehlisch@fu-berlin.de> 2013.07.26 Berlin RPKI 1

Upload: others

Post on 08-Jul-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

RPKI-Based Origin Validation, Routers,

& Caches RPKIWS / Berlin

2013.07.26

Randy Bush <[email protected]> Rob Austein <[email protected]>

Michael Elkins <[email protected]> Matthias Waehlisch <[email protected]>

2013.07.26 Berlin RPKI 1

Page 2: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Agenda •  Some Technical Background •  Mis-Origination - YouTube Incident •  The RPKI – Needed Infrastructure •  RPKI-Based Origin Validation •  Use the GUI to make ROAs and

look at the result on a router •  Build your own Relying Party Server •  Discussion

2013.07.26 Berlin RPKI 2

Page 3: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

This is Not New •  1986 – Bellovin & Perlman identify the

vulnerability in DNS and Routing •  1999 - National Academies study called it out •  2000 – S-BGP – X.509 PKI to support Secure

BGP - Kent, Lynn, et al. •  2003 – NANOG S-BGP Workshop •  2006 – RPKI.NET(for ARIN) & APNIC start

work on RPKI. RIPE starts in 2008. •  2009 – RPKI.NET Open Testbed and running

code in test routers 2013.07.26 Berlin RPKI 3

Page 4: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

What is an AS? An ISP or End Site

2013.07.26 Berlin RPKI 4

Verizon AS 701

Sprint AS

1239 IIJ AS

2497 Big ISPs ‘Peering’

Page 5: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

What is an AS? An ISP or End Site

2013.07.26 Berlin RPKI 5

Verizon AS 701

Sprint AS

1239 IIJ AS

2497 Big ISPs ‘Peering’

GoJ AS 234

Amazon AS

16509 Customers buy ‘Transit’

Sakura AS

9370

Page 6: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

An IP Prefix is Announced & Propagated

2013.07.26 Berlin RPKI 6

Verizon AS 701

Sprint AS

1239 IIJ AS

2497 Big ISPs ‘Peering’

GoJ AS 234

Amazon AS

16509 Customers buy ‘Transit’

147.28.0.0/16 Sakura

AS 9370

Page 7: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

From Inside a Router

BGP routing table entry for 147.28.0.0/16 16509 1239 2497 234

2013.07.26 Berlin RPKI 7

The AS-Path

Origin AS

Page 8: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Of Course it’s Uglier J r1.iad#sh ip bgp 147.28.0.0/16 BGP routing table entry for 147.28.0.0/16, version 21440610 Paths: (2 available, best #1, table default) Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254) Origin IGP, metric 841, localpref 100, valid, external, best Community: 3297:100 3927:380 path 67E8FFCC RPKI State valid Refresh Epoch 1 16509 701 2497 234 129.250.10.157 (metric 11) from 198.180.150.253 (198.180.150.253) Origin IGP, metric 95, localpref 100, valid, internal Community: 2914:410 2914:1007 2914:2000 2914:3000 3927:380 path 699A867C RPKI State valid

8 2013.07.26 Berlin RPKI 8

Page 9: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

The YouTube Incident

2013.07.26 Berlin RPKI 9

Pakistan Telekom

PCCW

Pakistan Internet

Poison Pakistan Internal Routing

The Plan

YouTube

Global Internet

Page 10: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

YouTube

The YouTube Incident

2013.07.26 Berlin RPKI 10

Pakistan Telekom

PCCW

Pakistan Internet

Poisoned the Global Internet

What Happened

Oops!

Global Internet

Page 11: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

We Call this Mis-Origination

a Prefix is Originated by an AS Which Does

Not Own It 2013.07.26 Berlin RPKI 11

Page 12: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

I Do Not Call it Hijacking

Because that Assumes

Negative Intent 2013.07.26 Berlin RPKI 12

Page 13: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

And These Accidents Happen Every Day

Usually to Small Folk Sometimes to Large

2013.07.26 Berlin RPKI 13

Page 14: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

So,

What’s the Plan?

2013.07.26 Berlin RPKI 14

Page 15: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Three Pieces •  RPKI – Resource Public Key Infrastructure,

the Certificate Infrastructure to Support the other Pieces (deployed at all RIRs)

•  Origin Validation – Using the RPKI to detect and prevent mis-originations of someone else’s prefixes (in deployment)

•  AS-Path Validation AKA BGPsec – Prevent Path Attacks on BGP (future work)

2013.07.26 Berlin RPKI 15

Page 16: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Why Origin Validation? •  Prevent YouTube accident & Far Worse

•  Prevent 7007 accident, UU/Sprint 2 days!

•  Prevents most accidental announcements

•  Does not prevent malicious path attacks such as the Kapela/Pilosov DefCon attack

•  That requires Path Validation, the third step, a few years away

2013.07.26 Berlin RPKI 16

Page 17: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

We Need to be Able to Authoritatively Prove

Who Owns an IP Prefix And What AS(s) May

Announce It 2013.07.26 Berlin RPKI 17

Page 18: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Prefix Ownership Follows the Allocation

Hierarchy IANA, RIRs, ISPs, …

2013.07.26 Berlin RPKI 18

Page 19: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

X.509-Based IP Resource PKI

2013.07.26 Berlin RPKI 19

Page 20: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI 20

RFCs Have Been Long Published

Page 21: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI 21

Deployed by All RIRs

Page 22: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI 22

ROAs Registered by > 1,000 Operators

Page 23: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

In Live Routers

2013.07.26 Berlin RPKI 23

Page 24: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Public-Key Concepts •  Private key: This key must be known only by its owner.

•  Public key: This key is known to everyone (it is public)

•  Relation between both keys: What one key encrypts, the other one decrypts, and vice versa. That means that if you encrypt something with my public key (which you would know, because it's public :-), I would need my private key to decrypt the message.

2013.07.26 Berlin RPKI 24 24

Page 25: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Key Generation

2013.07.26 Berlin RPKI

Stolen from - http://gdp.globus.org/gt4-tutorial/multiplehtml/ch09s03.html

25 25

Page 26: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

En/DeCryption

2013.07.26 Berlin RPKI 26 26

Page 27: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Digital Signature

2013.07.26 Berlin RPKI 27 27

Page 28: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

RFC 3779 Extension

Describes IP

Resources (Addr & ASN)

X.509 Cert

Owner’s Public Key

X.509 Certificate w/ 3779 Ext CA

SIA – URI for where this Publishes

Signed by

Parent’s Private Key

2013.07.26 Berlin RPKI 28

Page 29: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

98.128.0.0/16

Public Key

98.128.0.0/20

Public Key

98.128.16.0/20

Public Key

98.128.32.0/19

Public Key

98.128.16.0/24

Public Key

98.128.17.0/24

Public Key

Cert/RGnet

Cert/Rob Cert/Randy

Cert/ISC Cert/PSGnet

Cert/ARIN CA

CA CA CA

CA CA

Certificate Hierarchy follows

Allocation Hierarchy

SIA

2013.07.26 Berlin RPKI 29

Page 30: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

That’s Who Owns It but

Who May Route It?

2013.07.26 Berlin RPKI 30

Page 31: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

98.128.0.0/16

Public Key

98.128.0.0/16

AS 42

EE Cert

ROA

Route Origin Authorization (ROA)

98.128.0.0/16 147.28.0.0/16

Public Key

Owning Cert CA

End Entity Cert can not sign certs. can sign other things e.g. ROAs

This is not a Cert It is a signed blob

2013.07.26 Berlin RPKI 31

Page 32: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

0/0

Public Key

98.0.0.0/8

Public Key

98.128.0.0/16

Public Key

PSGnet

ARIN

IANA

98.128.0.0/16-24

AS 3130

ROA

ROA Aggregation Using Max Length 98.128.0.0/16

Public Key

EE Cert

CA

CA

CA

2013.07.26 Berlin RPKI 32 32

Page 33: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

98.128.0.0/16

AS 42

98.128.0.0/16

Public Key

EE Cert

ROA

Multiple ROAs Make Before Break

98.128.0.0/16 147.28.0.0/16

Public Key

Owning Cert CA

2013.07.26 Berlin RPKI

98.128.0.0/16

AS 3130

ROA I Plan to Switch

Providers

98.128.0.0/16

Public Key

EE Cert

33

Page 34: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

RPKI Certificate

Engine

Resource PKI

IP Resource Certs ASN Resource Certs

Route Origin Attestations

Publication Protocol

Up / Down to Parent

Up / Down to Child

GUI

How RPKI is Generated

2013.07.26 Berlin RPKI 34

Page 35: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI

IANA

Resource PKI

Publication Protocol

APNIC

Resource

PKI Publication

Protocol

JPNIC

Resource PKI

Publication Protocol

GUI

GUI

GUI

Please Issue My Cert Up/ Down

Please Issue My Cert Up/ Down

Please Issue My Cert Up/ Down Cert Issuance

Issuing Parties

Cert Issuance

Cert Issuance

35

Trust Anchor

Page 36: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI

Publication Point

Issued ROAs

My Misc Config Options

Public RPKI Keys

ID=Me

Internal CA Data

Keys for Talking to

IR BackEnd

Certs Issued to

DownStreams

Up/Down EE Public Keys

Registry Local Data

Management

RPKI Engine

Contract Out?

Hosted vs Delegated

Resources [OrgID]

My RightsToRoute

Delegations to Custs

Hosted Web GUI

98% of an RIR’s Users 10% of an RIR’s IP Space

Up / Down Protocol

2% of an RIR’s Users 90% of an RIR’s IP Space

Publication Protocol

IR’s Database(s) Internal

Protocol

36

Delegated a la DNS

GUI

36

Page 37: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI

Issuing Parties

IANA

Resource PKI

Publication Protocol

Up Down

APNIC

Resource PKI

Publication Protocol

Up Down

JPNIC

Resource

PKI Publication

Protocol

SIA Pointers

SIA Pointers

GUI

GUI

GUI

37

Trust Anchor

Page 38: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Trust Anchor Locator

2013.07.26 Berlin RPKI 38

rsync://ca0.rpki.net/tal/root.cerMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzPSPpQxa0rxz9sbbvYGrUlpgyBVxSIt+k/WDKbr+VW7CjUoz6cc5KMFANkQWw3D6ER4kCwX4WJkD58AGGbw/WeAe6m3aHcORUVRkr45a4qSrYiG7Wq9RAXtwbhlXofB3zo+O90IlXDaVP2U9bw+QyoJBJuAmZONt0bRgrktv8QhVtKvuYkH5ZIe7DkXJcJzBn6gv09dZsdwZm3xV3soXHEKrz5pY6Sb2xoL1CyPqzGOfVFxl0G5+dmcD/degPKxrEycAzjnHUzN1gus2jg26dtkix7KG/Mn1h/k53j0FdQD+zqPwakgwqjvCOdSdHMRmsikj0EF9WrZIOjZUXV6q6wIDAQAB

A URL and a Public Key that must be able to Decrypt the Certificate that is found at the URL so you know you can trust it

Page 39: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI

IANA

Resource PKI

Publication Protocol

Up Down

APNIC

Resource PKI

Publication Protocol

Up Down

JPNIC

Resource

PKI Publication

Protocol

RCynic Gatherer

BGP Decision Process

Validated Cache

SIA Pointers

SIA Pointers

Trust Anchor

GUI

GUI

GUI

Issuing Parties Relying Parties

route: 147.28.0.0/16!descr: 147.28.0.0/16-16!origin: AS3130!notify: [email protected]!mnt-by: MAINT-RPKI!changed: [email protected] 20110606!source: RPKI!

Pseudo IRR

NOC Tools

39

Page 40: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI

Global RPKI

Asia Cache

NoAm Cache

Euro Cache

in-PoP Cache

in-PoP Cache

in-PoP Cache

in-PoP Cache

in-PoP Cache

in-PoP Cache

in-PoP Cache

in-PoP Cache

in-PoP Cache

Cust Facing

Cust Facing

Cust Facing

Cust Facing

Cust Facing

High Priority

Lower Priority

Possible Large ISP Deployment

40

Caches Feed

Caches

Page 41: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

How Do ROAs Affect BGP Updates?

2013.07.26 Berlin RPKI 41

Page 42: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

In NOC 2013.07.26 Berlin RPKI

IANA

Resource PKI

Publication Protocol

Up Down

APNIC

Resource PKI

Publication Protocol

Up Down

JPNIC

Resource

PKI Publication

Protocol

RCynic Gatherer

RPKI to Rtr

Protocol

Crypto Check

Crypto Stripped

In PoP

BGP Decision Process

Validated Cache

SIA Pointers

SIA Pointers

Trust Anchor

42

GUI

GUI

GUI

Page 43: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI

RPKI Cache

RPKI-Rtr Protocol

Crypto is Stripped

RPKI VRPs

ROAs Become Router VRPs

43

Want to Run on Current Hardware

Page 44: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

IPv4 Prefix 0 8 16 24 31 .-------------------------------------------. | Protocol | PDU | | | Version | Type | reserved = zero | | 0 | 4 | | +-------------------------------------------+ | | | Length=20 | | | +-------------------------------------------+ | | Prefix | Max | | | Flags | Length | Length | zero | | | 0..32 | 0..32 | | +-------------------------------------------+ | | | IPv4 prefix | | | +-------------------------------------------+ | | | Autonomous System Number | | | `-------------------------------------------'

2013.07.26 Berlin RPKI 44

Page 45: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

IPv6 Prefix 0 8 16 24 31 .-------------------------------------------. | Protocol | PDU | | | Version | Type | reserved = zero | | 0 | 6 | | +-------------------------------------------+ | | | Length=40 | | | +-------------------------------------------+ | | Prefix | Max | | | Flags | Length | Length | zero | | | 0..128 | 0..128 | | +-------------------------------------------+ | | +--- ---+ | | +--- IPv6 prefix ---+ | | +--- ---+ | | +-------------------------------------------+ | | | Autonomous System Number | | | `-------------------------------------------'

2013.07.26 Berlin RPKI 45

96 More Bits No Magic

Page 46: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI 46

BGP Updates are compared with

ROA Data loaded from the RPKI

Page 47: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI

BGP Peer

BGP Data

RPKI Cache

RPKI-Rtr Protocol

BGP Updates

RPKI VRPs

Valid

Invalid

NotFound

Marking BGP Updates

47

Mark

Page 48: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Result of Check •  Valid – A matching/covering VRP was

found with a matching AS number

•  Invalid – A covering VRP was found, but the AS number did not match, and there was no other matching one

•  NotFound – No matching or covering VRP was found, same as today

2013.07.26 Berlin RPKI 48

Page 49: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Configure Router to Get ROAs

router bgp 651nn

bgp rpki server tcp 192.168.179.3 port 43779 refresh 60

bgp rpki server tcp 147.28.0.84 port 93920 refresh 60

2013.07.26 Berlin RPKI 49

Page 50: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Valid! r0.sea#show bgp 192.158.248.0/24 BGP routing table entry for 192.158.248.0/24, version 3043542 Paths: (3 available, best #1, table default) 6939 27318 206.81.80.40 (metric 1) from 147.28.7.2 (147.28.7.2) Origin IGP, metric 319, localpref 100, valid, internal, best Community: 3130:391 path 0F6D8B74 RPKI State valid 2914 4459 27318 199.238.113.9 from 199.238.113.9 (129.250.0.19) Origin IGP, metric 43, localpref 100, valid, external Community: 2914:410 2914:1005 2914:3000 3130:380 path 09AF35CC RPKI State valid

2013.07.26 Berlin RPKI 50

Page 51: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Invalid! r0.sea#show bgp 198.180.150.0 BGP routing table entry for 198.180.150.0/24, version 2546236 Paths: (3 available, best #2, table default) Advertised to update-groups: 2 5 6 8 Refresh Epoch 1 1239 3927 144.232.9.61 (metric 11) from 147.28.7.2 (147.28.7.2) Origin IGP, metric 759, localpref 100, valid, internal Community: 3130:370 path 1312CA90 RPKI State invalid

2013.07.26 Berlin RPKI 51

Page 52: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

NotFound r0.sea#show bgp 64.9.224.0 BGP routing table entry for 64.9.224.0/20, version 35201 Paths: (3 available, best #2, table default) Advertised to update-groups: 2 5 6 Refresh Epoch 1 1239 3356 36492 144.232.9.61 (metric 11) from 147.28.7.2 (147.28.7.2) Origin IGP, metric 4, localpref 100, valid, internal Community: 3130:370 path 11861AA4 RPKI State not found

2013.07.26 Berlin RPKI 52

Page 53: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

What are the BGP / VRP1

Matching Rules?

1 Validated ROA Payload 2013.07.26 Berlin RPKI 53

Page 54: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI 54

A Prefix is Covered by a VRP when the VRP prefix length is less than or equal to the Route prefix length

98.128.0.0/16

98.128.0.0/12-16

98.128.0.0/16-24

98.128.0.0/20-24

Covers

Covers

No. It’s Longer

BGP

VRP

VRP

VRP

Page 55: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI 55

Prefix is Matched by a VRP when the Prefix is Covered by that VRP , prefix length is less than or equal to the VRP max-len, and the Route Origin AS is equal to the VRP’s AS

98.128.0.0/16 AS 42

98.128.0.0/12-16 AS 42

98.128.0.0/16-24 AS 666

98.128.0.0/20-24 AS 42

Matched

No. AS Mismatch

No. VRP Longer

BGP

VRP

VRP

VRP

Page 56: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI 56

98.128.0.0/16-24 AS 6

BGP

VRP0

98.128.0.0/16-20 AS 42 VRP1

98.128.0.0/12 AS 42 NotFound, shorter than VRPs

BGP 98.128.0.0/16 AS 42 Valid, Matches VRP1

BGP 98.128.0.0/20 AS 42 Valid, Matches VRP1

BGP 98.128.0.0/24 AS 42 Invalid, longer than VRP with AS 42

BGP 98.128.0.0/24 AS 6 Valid, Matches VRP0

Matching and Validity

Page 57: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

The Operator Tests the Mark

and then Applies Local Policy

2013.07.26 Berlin RPKI 57

Page 58: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Fairly Secure route-map validity-0

match rpki valid

set local-preference 100

route-map validity-1

match rpki not-found

set local-preference 50

! invalid is dropped

2013.07.26 Berlin RPKI 58

Page 59: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Paranoid

route-map validity-0

match rpki valid

set local-preference 110

! everything else dropped

2013.07.26 Berlin RPKI 59

Page 60: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Security Geek

route-map validity-0

match rpki invalid

set local-preference 110

! everything else dropped

2013.07.26 Berlin RPKI 60

Page 61: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

After AS-Path route-map validity-0 match rpki not-found

set metric 100

route-map validity-1

match rpki invalid

set metric 150

route-map validity-2

set metric 50 2013.07.26 Berlin RPKI 61

Page 62: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Set a Community route-map validity-0

match rpki valid

set community 3130:400

route-map validity-1

match rpki invalid

set community 3130:200

route-map validity-2

set community 3130:300 2013.07.26 Berlin RPKI 62

Page 63: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Allocation in Reality

My Infrastructure

Unused Static (non BGP) Cust

BGP Cust

2012.02.27 APRICOT RtgSec 63

/16 Assignment from RIR

Page 64: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

ROA Use

My Aggregate ROA

Customer ROAs

I Generate for ‘Lazy’ Customer My Infrastructure

Unused Static (non BGP) Cust

BGP Cust

2012.02.27 APRICOT RtgSec 64

Page 65: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Covering a Customer

My Infrastructure

Unused Static (non BGP) Cust

BGP Cust

2012.02.27 APRICOT RtgSec 65

I Issue a ROA for the Covering Prefix

I need to do this to protect Static Customers and my Infrastructure

65

Page 66: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Covering a Customer

My Infrastructure

Unused Static (non BGP) Cust

BGP Cust

2012.02.27 APRICOT RtgSec 66

But if I Issue a ROA for the Covering Prefix

Before My Customers have ROAs for These

66

Page 67: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Covering a Customer

My Infrastructure

Unused Static (non BGP) Cust

BGP Cust

2012.02.27 APRICOT RtgSec 67

If I Issue a ROA for the Covering Prefix

Before My Customers issue ROAs for These Their Routing Becomes Invalid!

67

Page 68: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Is a Very Real Problem •  Renater has 29 ROAs for Valid BGP

Announcements •  508 Renater Downstream Prefixes,

which have no ROAs are INVALID!!! •  Orange has 276 ROAs Covering Valid

BGP Announcements •  Orange has 105 Customers whose

Covered Prefixes are INVALID!! 2013.07.26 Berlin RPKI 68

Page 69: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI 69

BGP Data

RPKI-Rtr Protocol

BGP Updates

RPKI VRPs

mark

Valid

Invalid

NotFound

And it is All Monitored

SNMP

syslog

NOC

Page 70: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

But in the End, You Control Your Policy “Announcements with Invalid origins SHOULD NOT be used, but MAY be used to meet special operational needs. In such circumstances, the announcement SHOULD have a lower preference than that given to Valid or NotFound.” -- draft-ietf-sidr-origin-ops

2013.07.26 Berlin RPKI 70

Page 71: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

But if we do not reject Invalid, What is all this

work for?

2013.07.26 Berlin RPKI 71

Page 72: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

RPKI at the Registries •  RIPE seriously deployed with a few

thousand LIRs and thousands of ROAs •  APNIC is operational and moving

forward, moving to RIPE’s GUI •  ARIN is doing their best to make RPKI

deployment very hard •  LACNIC is deployed and has O(100) LIRs •  AFRINIC is deployed with O(25) LIRs

2013.07.26 Berlin RPKI 72

Page 73: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Per-RIR Statistics

2013.07.26 Berlin RPKI 73

Half are Two LIRs

Much Better Than IPv6

Embarrassing

Page 74: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Router Origin Validation •  Cisco IOS – solid in 15.2

•  Cisco IOS/XR – shipped in 4.3.2

•  Juniper – shipped in 12.2

•  AlcaLu – in development 2013.07.26 Berlin RPKI 74

Page 75: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

RPKI Implementations •  RIPE/NCC – CA (partial closed) & RP

(partial open)

•  APNIC – CA only – Closed Source

•  RTRlib/Berlin – RP only – Open Source

•  BBN – RP Only – Open Source

•  RPKI.NET – CA & RP – Open Source 2013.07.26 Berlin RPKI 75

Page 76: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Today - RPKI.NET •  Open Source BSD License

•  CA – Hosted and Delegated Models, GUI

•  RP – RPKI-RTR, NOC Tools, IRR Gen

•  FreeBSD, Ubuntu, Debian, … Packaged (docs still catching up)

2013.07.26 Berlin RPKI 76

Page 77: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Recent Hackathons •  JaNOG January – LIRs bring up Relying

Party. Few Attended, Most Succeeded •  JPNIC 20 Feb – RP only, 3 ISPs were

successful •  APRICOT February - TW, & KR have CAs

in internal test •  Beirut March – 18 ISPs as RPs •  AfNOG June – 17 RPs •  SGNOG June – many ISPs installed RPs •  JaNOG July – 20 ISPs installed RPs

2013.07.26 Berlin RPKI 77

Page 78: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI 78

Page 79: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI

altCA

Resource PKI

Publication Protocol

Up Down

JPNIC

Resource PKI

Publication Protocol

Up Down

IIJ

Resource

PKI Publication

Protocol

RCynic Gatherer

BGP Decision Process

Validated Cache

SIA Pointers

SIA Pointers

Trust Anchor

GUI

GUI

GUI

Issuing Parties Relying Parties

route: 147.28.0.0/16!descr: 147.28.0.0/16-16!origin: AS3130!notify: [email protected]!mnt-by: MAINT-RPKI!changed: [email protected] 20110606!source: RPKI!

Pseudo IRR

NOC Tools

79

Our Focus Today

Page 80: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Today •  Register Our Prefixes in CA

•  Issue ROAs Using CA’s Web Portal

•  Configure Routers to get ROAs from Caches

•  Build RP Caches to Fetch from CAs 2013.07.26 Berlin RPKI

80

Page 81: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Get Copy of This Preso

https://psg.com/130726.pdf

So You Can

Copy and Paste 2013.07.26 Berlin RPKI 81

Page 82: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Lab Overview

2013.07.26 Berlin RPKI 82

RPKI Engine

Repository Mgt

Publication Protocol

RPKI Repo

RCynic Gatherer

RPKI to Rtr Protocol

BGP Decision Process

Cache django

GUI

Page 83: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Lab Environment

2013.07.26 Berlin RPKI 83

Ubuntu/KVM Server in Ashburn

ubu01 ubu02 ubu03 ubu04 ubu05

ubu16

Mac Mini running Ubuntu KVM

CA - ca0.vmini

GUI RP - cache0.vmini

AS65000 RPKI-Rtr Protocol

AS65001

Page 84: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

DynaMIPS on MacMini

Global Internet

2013.07.26 Berlin RPKI Seattle Dallas

98.128.0.0/16!98.128.0.0/24!98.128.1.0/24!…!98.128.31.0/24!

98.128.0.0/16!98.128.0.0/24!98.128.1.0/24!…!98.128.31.0/24!

AS3130 AS4128

AS65000

RPKI Cache

RPKI-Rtr Protocol

AS65001

10.0.0.0/8

202.214.86.148

84

Page 85: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI

altCA

Resource PKI

Publication Protocol

Up Down

JPNIC

Resource PKI

Publication Protocol

Up Down

IIJ

Resource

PKI Publication

Protocol

RCynic Gatherer

BGP Decision Process

Validated Cache

SIA Pointers

SIA Pointers

Trust Anchor

GUI

GUI

GUI

Issuing Parties Relying Parties

route: 147.28.0.0/16!descr: 147.28.0.0/16-16!origin: AS3130!notify: [email protected]!mnt-by: MAINT-RPKI!changed: [email protected] 20110606!source: RPKI!

Pseudo IRR

NOC Tools

85

Our Focus Today

Page 86: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI 86

altCA

Resource PKI

Publication Protocol

Up Down

workshop

Resource

PKI Publication

Protocol

Up Down

SIA Pointers

SIA Pointers

GUI

GUI

Today

not used

Resource PKI

Publication Protocol GUI

Trust Anchor

Page 87: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

IP Address Allocation

98.128.0.0/16 ARIN Experimental Allocation 98.128.0.0/24 Instructors Play 98.128.1.0/24 labuser01 98.128.2.0/24 labuser02 … 98.128.32.0/24 labuser32

2013.07.26 Berlin RPKI 87

Page 88: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

GUI Accounts https://ca0.vmini.rpki.net/ UserID Password labuser01 fnord labuser02 fnord labuser03 fnord … labuser16 fnord

2013.07.26 Berlin RPKI 88

Page 89: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

https://ca0.vmini.rpki.net/

2013.07.26 Berlin RPKI 89

labuserNN

fnord

Page 90: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI 90

The Dashboard

Page 91: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI 91

Create a ROA

Page 92: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

2013.07.26 Berlin RPKI 92

What Will Happen?

Page 93: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Routers •  Use Your Own! (in production

images from C&J)

•  16 DynaMIPS 7200s in Lab

•  7200s in Live Internet

2013.07.26 Berlin RPKI 93

Page 94: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Be Careful ! •  Some Caches Have a LOT of ROAs

•  Do Not Configure DynaMIPS to a Server With RIR TALs Because RIPE Data Has Thousands of ROAs

•  dfw0, 198.180.152.11 Has Full BGP Table if you want to crash DynaMIPS

2013.07.26 Berlin RPKI 94

Page 95: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

7200s in Live Internet $ ssh [email protected]: demo

or$ ssh [email protected]: demo

Sorry, no enable J 2013.07.26 Berlin RPKI 95

Page 96: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

In-Lab Router Accounts

% telnet vmini.rpki.net 20NN user: isplab password: lab-PW enable: lab-PW We Will Assign a Router to You

2013.07.26 Berlin RPKI 96

Page 97: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

BGP Configuration

conf t

router bgp 651nn

bgp rpki server tcp 192.168.179.3 \

port 43779 refresh 60

end

That’s All!! 2013.07.26 Berlin RPKI 97

Page 98: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Cisco Adventure

r0.sea#show ip bgp rpki ? servers Display RPKI cache server information table Display RPKI table entries

2013.07.26 Berlin RPKI 98

Page 99: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Check Server r0.sea#show ip bgp rpki servers

BGP SOVC neighbor is 192.168.179.3/43779 connected to port 43779

Flags 0, Refresh time is 600, Serial number is 1304239609

InQ has 0 messages, OutQ has 0 messages, formatted msg 345

Session IO flags 3, Session flags 4008

Neighbor Statistics:

Nets Processed 624

Connection state is ESTAB, I/O status: 1, unread input bytes: 0

Connection is ECN Disabled

Mininum incoming TTL 0, Outgoing TTL 255

Local host: 199.238.113.10, Local port: 57932

Foreign host: 192.168.179.3, Foreign port: 43779

Connection tableid (VRF): 0 2013.07.26 Berlin RPKI 99

Page 100: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Look at Table router1#show ip bgp rpki table

76 BGP sovc network entries using 6688 bytes of memory

78 BGP sovc record entries using 1560 bytes of memory

Network Maxlen Origin-AS Source Neighbor

98.128.0.0/24 24 3130 0 192.168.179.3/43779

98.128.0.0/16 16 3130 0 192.168.179.3/43779

98.128.6.0/24 24 4128 0 192.168.179.3/43779

98.128.9.0/24 24 3130 0 192.168.179.3/43779

98.128.30.0/24 24 1234 0 192.168.179.3/43779

128.224.1.0/24 24 3130 0 192.168.179.3/43779

129.6.0.0/17 17 49 0 192.168.179.3/43779

129.6.112.0/24 24 10866 0 192.168.179.3/43779

129.6.128.0/17 17 49 0 192.168.179.3/43779

147.28.0.0/16 16 3130 0 192.168.179.3/43779

2013.07.26 Berlin RPKI 100

Page 101: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Look at BGP Table r0.sea#sh ip bgp

Network Next Hop Metric LocPrf Weight Path

* i I198.180.150.0 144.232.9.61 100 0 1239 3927 i

*> I 199.238.113.9 0 2914 3927 i

* I 129.250.11.41 0 2914 3927 i

*> V198.180.152.0 199.238.113.9 0 2914 4128 i

* V 129.250.11.41 0 2914 4128 i

*> N198.180.155.0 199.238.113.9 0 2914 22773 i

* N 129.250.11.41 0 2914 22773 i

*> N198.180.160.0 199.238.113.9 0 2914 23308 13408 5752 i

* N 129.250.11.41 0 2914 23308 13408 5752 i

2013.07.26 Berlin RPKI 101

Page 102: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Mis-Origination Caught R3#sh ip bgp 98.128.NN.0/24

BGP routing table entry for 98.128.0.0/24, version 94

Paths: (2 available, best #2, table default)

Advertised to update-groups:

1

Refresh Epoch 1

65000 3130

10.0.0.1 from 10.0.0.1 (65.38.193.12)

Origin IGP, localpref 100, valid, external

path 6802D4DC RPKI State invalid

Refresh Epoch 1

65001 4128

10.0.1.1 from 10.0.1.1 (65.38.193.13)

Origin IGP, localpref 100, valid, external, best

path 6802D7C8 RPKI State valid

2013.07.26 Berlin RPKI 102

Page 103: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Fat-Finger Detected

2013.07.26 Berlin RPKI 103

Global Internet

98.128.0.0/16!

AS3130 AS4128

AS65000 AS65001

Seattle Dallas

98.128.0.0/16!

98.128.0.0/16

AS 3130

ROA

show ip bgp 98.128.0.0/16

Page 104: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

ROA Controls Validity

2013.07.26 Berlin RPKI 104

Global Internet

98.128.0.0/16!

AS3130 AS4128

AS65000 AS65001

Seattle Dallas

98.128.0.0/16!

98.128.0.0/16

AS 4128

ROA

show ip bgp 98.128.0.0/16

Page 105: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Try Your Own /24

2013.07.26 Berlin RPKI 105

Global Internet

98.128.X.0/24!

AS3130 AS4128

AS65000 AS65001

98.128.X.0/24!

98.128.X.0/24

AS 3130

ROA

show ip bgp 98.128.X.0/24 98.128.0.0/16

AS 4128

ROA show ip bgp 98.128.0.0/16

Page 106: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Install RP Cache SW

On Your Laptop (FreeBSD, Ubuntu, …)

or Remote (Virtual) Ubuntu Server

2013.07.26 Berlin RPKI 106

Page 107: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Borrowing a VM •  Servers in Ashburn, Virginia US

•  Ubuntu 12.04.2 LTS Server

•  ssh [email protected]

•  Password is Gemwamif2

•  You are in sudoers

•  Do not worry, machines are snapshotted 2013.07.26 Berlin RPKI 107

Page 108: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Installing RP Package Copy and Paste from

https://trac.rpki.net/wiki/doc/RPKI/Installation/UbuntuPackages

$ wget -q -O - http://download.rpki.net/APT/apt-gpg-key.asc | sudo apt-key add –

$ sudo wget -q -O /etc/apt/sources.list.d/rpki.list http://download.rpki.net/APT/rpki.ubuntu.list

$ sudo apt-get update

$ sudo apt-get install rpki-rp

2013.07.26 Berlin RPKI 108

Page 109: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Select Trust Anchors •  We are going to use emulated routers on

DynaMIPS, and it is memory limited

•  So we can not feed it all the ROAs in the Global RPKI

•  Edit /etc/rcynic.conf and usetrust-anchor-locator = \

/etc/rpki/trust-anchors/altca.tal

2013.07.26 Berlin RPKI 109

Page 110: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Speed it Up •  We do not want to wait an hour for

ROAs to propagate

•  Make rcynic run frequently

•  $ sudo crontab -e -u rcynic

*/2 * * * * exec /usr/bin/rcynic-cron

2013.07.26 Berlin RPKI 110

Page 111: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Is RPKI-Rtr Running? $ rtr-origin --client tcp localhost 437792013-03-09 23:10:19 rtr-origin/client[17089]: [Startup]2013-03-09 23:10:19 rtr-origin/client[17089]: [Starting raw TCP

connection to localhost:43779]2013-03-09 23:10:19 rtr-origin/client[17089]: [reset_query]2013-03-09 23:10:19 rtr-origin/client[17089]: [cache_response,

nonce 37394]2013-03-09 23:10:19 rtr-origin/client[17089]: + 12322

78.192.0.0/10-10 00:04:00:00:00:00:00:14:01:0A:0A:00:4E:C0:00:00:00:00:30:22

2013-03-09 23:10:19 rtr-origin/client[17089]: + 3320 79.192.0.0/10-10 00:04:00:00:00:00:00:14:01:0A:0A:00:4F:C0:00:00:00:00:0C:F8

2013.07.26 Berlin RPKI 111

Page 112: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Cache Has Web Site!

2013.07.26 Berlin RPKI 112

Page 113: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Configure Router to Use Your Cache

router bgp 651nn bgp rpki server tcp 198.180.150.6n \ port 43779 refresh 60

2013.07.26 Berlin RPKI 113

Page 114: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Check Server r0.sea#show ip bgp rpki servers

BGP SOVC neighbor is 192.168.179.3/43779 connected to port 43779

Flags 0, Refresh time is 600, Serial number is 1304239609

InQ has 0 messages, OutQ has 0 messages, formatted msg 345

Session IO flags 3, Session flags 4008

Neighbor Statistics:

Nets Processed 624

Connection state is ESTAB, I/O status: 1, unread input bytes: 0

Connection is ECN Disabled

Mininum incoming TTL 0, Outgoing TTL 255

Local host: 199.238.113.10, Local port: 57932

Foreign host: 192.168.179.3, Foreign port: 43779

Connection tableid (VRF): 0 2013.07.26 Berlin RPKI 114

Page 115: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Look at ROA/VRF Table router1#show ip bgp rpki table

76 BGP sovc network entries using 6688 bytes of memory

78 BGP sovc record entries using 1560 bytes of memory

Network Maxlen Origin-AS Neighbor

98.128.0.0/24 24 3130 192.168.179.3/43779

98.128.0.0/16 16 3130 192.168.179.3/43779

98.128.6.0/24 24 4128 192.168.179.3/43779

98.128.9.0/24 24 3130 192.168.179.3/43779

98.128.30.0/24 24 1234 192.168.179.3/43779

128.224.1.0/24 24 3130 192.168.179.3/43779

129.6.0.0/17 17 49 192.168.179.3/43779

129.6.112.0/24 24 10866 192.168.179.3/43779

129.6.128.0/17 17 49 192.168.179.3/43779

147.28.0.0/16 16 3130 192.168.179.3/43779

2013.07.26 Berlin RPKI 115

Page 116: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Look at BGP Table r0.sea#sh ip bgp

Network Next Hop Metric LocPrf Weight Path

* i I198.180.150.0 144.232.9.61 100 0 1239 3927 i

*> I 199.238.113.9 0 2914 3927 i

* I 129.250.11.41 0 2914 3927 i

*> V198.180.152.0 199.238.113.9 0 2914 4128 i

* V 129.250.11.41 0 2914 4128 i

*> N198.180.155.0 199.238.113.9 0 2914 22773 i

* N 129.250.11.41 0 2914 22773 i

*> N198.180.160.0 199.238.113.9 0 2914 23308 13408 5752 i

* N 129.250.11.41 0 2914 23308 13408 5752 i

2013.07.26 Berlin RPKI 116

Page 117: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Look at a Prefix R3#show ip bgp 98.128.0.0/24

BGP routing table entry for 98.128.0.0/24, version 360

Paths: (2 available, best #1, table default)

65000 3130

10.0.0.1 from 10.0.0.1 (193.0.24.64)

Origin IGP, localpref 100, valid, external, best

path 680D859C RPKI State valid

65001 4128

10.0.1.1 from 10.0.1.1 (193.0.24.65)

Origin IGP, localpref 100, valid, external

path 680D914C RPKI State invalid

2013.07.26 Berlin RPKI 117

Page 118: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Fun Things to Do •  Look at your neighbors’ prefixes

•  Use the GUI to change the ROA for your prefix, and wait for it to propagate

•  Attack your neighbor’s prefix by configuring your bgp to announce it router bgp 651nn network 98.128.<neighbor>.0 255 255 255.0

2013.07.26 Berlin RPKI 118

Page 119: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Notice it Did Not Work router bgp 651nn network 98.128.<neighbor>.0 255 255 255.0

show ip bgp 98.128.<neighbor>.0

•  It is marked Invalid on your own router! It caught you injecting a bad prefix. To cheat you need to

router bgp 651nn no bgp bestpath prefix-validate local

•  Now ask others to look for your announcement. They should see it as Invalid

2013.07.26 Berlin RPKI 119

Page 120: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Now You Know How to Prevent

YouTube Incident-2 And Stay Out of The Newspapers

2013.07.26 Berlin RPKI 120

Page 121: RPKI-Based Origin Validation, Routers, & Caches · 2013-07-26 · Advertised to update-groups: 1 Refresh Epoch 1 16509 1239 2497 234 144.232.18.81 from 144.232.18.81 (144.228.241.254)

Please Do Try This At Home

2013.07.26 Berlin RPKI 121