32
© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec Wei Yin TAY Consulting Systems Engineer Cisco Systems

Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

Embed Size (px)

Citation preview

Page 1: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2010 Cisco and/or its affiliates. All rights reserved.

Scalable DDoS mitigation using BGP Flowspec  Wei Yin TAY Consulting Systems Engineer Cisco Systems

Page 2: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2

• Goals  of  DDoS  Mi,ga,on    

• Problem  descrip,on    

• Tradi,onal  DDoS  Mi,ga,on    

• Scalable  DDoS  Mi,ga,on  

Page 3: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 3

• Stop  the  a:ack    • Drop  only  the  DDoS  traffic    

• Applica,on  aware  filtering/redirect/mirroring    

• Dynamic  and  adap,ve  technology    

• Simple  to  configure    

• Easy  to  disseminate    

Page 4: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

Cisco Confidential © 2010 Cisco and/or its affiliates. All rights reserved. 4

DDoD Scenario  

Page 5: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 5

Data Center Provider Infra

Website

IP=1.2.3.4

CE Internet

BGP : 1.2.3.0/24

PE

Transit1

Transit2

Page 6: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 6

Data Center Provider Infra

Website

IP=1.2.3.4

CE Internet PE

Transit1

Transit2

DDoS Traffic

BGP : 1.2.3.0/24

Page 7: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 7

Data Center Provider Infra

Website

IP=1.2.3.4

CE Internet PE

Transit1

Transit2

DDoS Traffic

BGP : 1.2.3.0/24

Page 8: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 8

Data Center Provider Infra

Website

IP=1.2.3.4

CE Internet PE

Transit1

Transit2

DDoS Traffic

BGP : 1.2.3.0/24

Page 9: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 9

Data Center Provider Infra

Website

IP=1.2.3.4

CE Internet PE

Transit1

Transit2

DDoS Traffic

DDoS Traffic

BGP : 1.2.3.0/24

Page 10: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

Cisco Confidential © 2010 Cisco and/or its affiliates. All rights reserved. 10

DDoD Mitigation Solutions  

Page 11: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 11

•  Distributed  denial-­‐of-­‐service  (DDoS)  a:acks  target  network  infrastructures  or  computer  services  by  sending  overwhelming  number  of  service  requests  to  the  server  from  many  sources.    

•  Server  resources  are  used  up  in  serving  the  fake  requests  resul,ng  in  denial  or  degrada,on  of  legi,mate  service  requests  to  be  served    

•  Addressing  DDoS  a:acks    Detec&on  –  Detect  incoming  fake  requests    Mi&ga&on    Diversion  –  Send  traffic  to  a  specialized  device  that  removes  the  fake  packets  from  the  traffic  stream  while  retaining    the  legi,mate  packets    Return  –  Send  back  the  clean  traffic  to  the  server  

Page 12: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 12

Data Center Provider Infra

Website

IP=1.2.3.4

CE Internet PE

Transit1

Transit2

DDoS Traffic

DDoS Traffic

It is time to use the blackhole community given by the provider (i.e. 64500:666)

BGP : 1.2.3.0/24

BGP : 1.2.3.4/32 Com. : 64500:666

Page 13: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 13

Data Center Provider Infra

Website

IP=1.2.3.4

CE Internet PE

Transit1

Transit2

DDoS Traffic

DDoS Traffic

It is time to use the blackhole community given by the provider (i.e. 64500:666)

BGP : 1.2.3.0/24

BGP : 1.2.3.4/32 Com. : 64500:666

Page 14: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 14

Data Center Provider Infra

Website

IP=1.2.3.4

CE Internet PE

Transit1

Transit2

DDoS Traffic

DDoS Traffic

It is time to use the blackhole community given by the provider (i.e. 64500:666)

BGP : 1.2.3.0/24

BGP : 1.2.3.4/32 Com. : 64500:666

1.2.3.4/32 Discard

1.2.3.4/32 Discard

Page 15: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 15

Data Center Provider Infra

Website

IP=1.2.3.4

CE Internet PE

Transit1

Transit2

DDoS Traffic

It is time to use the blackhole community given by the provider (i.e. 64500:666)

BGP : 1.2.3.0/24

BGP : 1.2.3.4/32 Com. : 64500:666

1.2.3.4/32 Discard

1.2.3.4/32 Discard

Page 16: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 16

•  Great,  I  have  my  website  back  online  !  No  more  DDoS  traffic  on  my  network  

But  no  more  traffic  at  all  on  my  website….  

 

•  Well,  maybe  it  was  not  the  solu,on  I  was  looking  for….  

Page 17: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 17

•  Iden,fica,on  of  DDoS  traffic:  based  around  a  condi,ons  regarding  MATCH  statements  

Source/Des,na,on  address  

Protocol  

Packet  size  

Etc…  

•  Ac,ons  upon  DDoS  traffic  

Discard  

Logging  

Rate-­‐Limi,ng  

Redirec,on  

Etc…  

•  Doesn’t  this  sound  as  a  great  solu,on?  

Page 18: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 18

•  Good  solu,on  for  Done  with  hardware  accelera,on  for  carrier  grade  routers  

Can  provide  chirurgical  precision  of  match  statements  and  ac,ons  to  impose  

 

•  But…  Customer  need  to  call  my  provider  

Customer  need  the  provider  to  accept  and  run  this  filter  on  each  of  their  backbone/edge  routers  

Customer  need  to  call  the  provider  and  remove  the  rule  aZer!  

 

•  Reality:  It  won’t  happen…  

Page 19: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

Cisco Confidential © 2010 Cisco and/or its affiliates. All rights reserved. 19

Scalable DDoS Mitigation

Page 20: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 20

•  Comparison  with  the  other  solu,ons  Makes  sta,c  PBR  a  dynamic  solu,on!  

Allows  to  propagate  PBR  rules  

Exis,ng  control  plane  communica,on  channel  is  used  

 

•  How?  By  using  your  exis,ng  MP-­‐BGP  infrastructure  

Page 21: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 21

•  Why  using  BGP?  Simple  to  extend  by  adding  a  new  NLRI  with  MP_REACH_NLRI  and  MP_UNREACH_NLRI  

Networkwide  loopfree  point-­‐to-­‐mul,point  path  is  already  setup  

Already  used  for  every  other  kind  of  technology  (IPv4,  IPv6,  VPN,  Mul,cast,  Labels,  etc…)  

Inter-­‐domain  support  

Networking  engineers  and  architects  understand  perfectly  BGP  

•  Capability  to  send  via  a  BGP  Address  Family    

Match  criteria    

Ac,on  criteria    

Page 22: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 22

New NLRI defined (AFI=1, SAFI=133)

Notice from the RFC: “Flow specification components must follow strict type ordering. A given component type may or may not be present in the specification, but if present, it MUST precede any component of higher numeric type value.”

7.  ICMP  Type  

8.  ICMP  Code  

9.  TCP  Flags  

10.  Packet  length  

11. DSCP  

12.  Fragment  

1.  Des,na,on  IP  Address  (1  component)  

2.  Source  IP  Address  (1  component)  

3.  IP  Protocol  (+1  component)  

4.  Port  (+1  component)  

5.  Des,na,on  port  (+1  component)  

6.  Source  Port  (+1  component)  

The MP_REACH_NLRI – RFC 4760

Page 23: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 23

•  Flowspec  Traffic  Ac,ons    

 

 

 

Extended  Community  –  RFC  4360  

•  RFC5575  Flowspec  available  ac,ons  

 

 

Page 24: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 24

Data Center Provider Infra

Website

IP=1.2.3.4

CE Internet PE

Transit1

Transit2

UDP DDoS Traffic

UDP DDoS Traffic

It is time to use the blackhole community given by the provider (i.e. 64500:666)

BGP : 1.2.3.0/24

Page 25: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 25

Data Center Provider Infra

Website

IP=1.2.3.4

CE Internet PE

Transit1

Transit2

UDP DDoS Traffic

UDP DDoS Traffic

BGP : 1.2.3.0/24

IP Destination: 1.2.3.4/32 IP Protocol 17 (UDP) PacketSize <=28 Rate-limit 10M

Page 26: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 26

Data Center Provider Infra

Website

IP=1.2.3.4

CE Internet PE

Transit1

Transit2

UDP DDoS Traffic

BGP : 1.2.3.0/24

IP Destination: 1.2.3.4/32 IP Protocol 17 (UDP) PacketSize <=28 Rate-limit 10M

Page 27: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 27

Data Center Provider Infra

Website

IP=1.2.3.4

CE Internet PE

Transit1

Transit2

UDP DDoS Traffic

BGP : 1.2.3.0/24

IP Destination: 1.2.3.4/32 IP Protocol 17 (UDP) PacketSize <=28 Rate-limit 10M

Legitimate TCP Traffic

Page 28: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 28

•  In  reality  this  architecture  is  not  deployed  Service  Provider  DO  NOT  trust  the  Customer  

It  requires  new  BGP  AFI/SAFI  combina,on  to  be  deployed  between  Customer  and  Service  provider  

Both  these  result  in  Flowspec  not  being  deployed  between  Customer  and  service  provider  

 

•  What  is  done  instead?  

SP  u,lize  a  central  Flowspec  speaker(s)  

Have  it  BGP  meshed  within  the  Service  Provider  routers  

Only  the  central  Flowspec  speaker  is  allowed  to  distribute  Flowspec  rules  

Central  Flowspec  speaker  is  considered  “trusted”  by  the  network    

Central  Flowspec  speaker  is  managed  by  the  service  provider  

Page 29: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 29

Data Center Provider Infra

Website

IP=1.2.3.4

CE Internet PE

Transit1

Transit2

UDP DDoS Traffic

BGP : 1.2.3.0/24

Flowspec

Page 30: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 30

Data Center Provider Infra

Website

IP=1.2.3.4

CE Internet PE

Transit1

Transit2

UDP DDoS Traffic

BGP : 1.2.3.0/24

Legitimate TCP Traffic

Flowspec

Rules inserted by: CLI Customer Portal Workflow etc

Page 31: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

© 2011 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 31

•  Traffic-­‐rate,  traffic-­‐marking  are  useful  for  simple  a:acks,  but….  

•  Traffic-­‐redirect  

Lets  you  redirect  traffic  in  a  VRF  (by  specifying  the  VPN  RT  value)  

Allows  to  change  dynamically  the  path  of  a  flow  without  injec,ng  addi,onal  BGP  routes  

 

•  Great  too  to  clean  DDoS  traffic  with  a  DPI  probe  

Page 32: Scalable DDoS mitigation using BGP Flowspec - APNIC · PDF file© 2010 Cisco and/or its affiliates. All rights reserved. Scalable DDoS mitigation using BGP Flowspec! Wei Yin TAY Consulting

Thank you.