01 scaling bgp

Upload: chazzy-canja

Post on 01-Mar-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/25/2019 01 Scaling Bgp

    1/65

    BGP Scaling Techniques

    ISP Workshops

    1Last updated 9thDecember 2015

  • 7/25/2019 01 Scaling Bgp

    2/65

    BGP Scaling Techniques

    ! Original BGP specification andimplementation was fine for the Internetof the early 1990s

    "

    But didnt scale

    ! Issues as the Internet grew included:

    " Scaling the iBGP mesh beyond a few peers?

    "

    Implement new policy without causing flapsand route churning?

    " Keep the network stable, scalable, as well assimple?

    2

  • 7/25/2019 01 Scaling Bgp

    3/65

    BGP Scaling Techniques

    ! Current Best Practice Scaling Techniques

    "

    Route Refresh

    " Ciscos Peer-groups

    " Route Reflectors (and Confederations)

    ! Deprecated Scaling Techniques

    " Soft Reconfiguration

    " Route Flap Damping

    3

  • 7/25/2019 01 Scaling Bgp

    4/65

    Dynamic Reconfiguration

    Non-destructive policy changes

    4

  • 7/25/2019 01 Scaling Bgp

    5/65

    Route Refresh

    ! BGP peer reset required after every policychange

    "

    Because the router does not store prefixeswhich are rejected by policy

    ! Hard BGP peer reset:

    " Tears down BGP peering & consumes CPU

    " Severely disrupts connectivity for all networks

    ! Soft BGP peer reset (or Route Refresh):

    "

    BGP peering remains active

    "

    Impacts only those prefixes affected by policy

    change 5

  • 7/25/2019 01 Scaling Bgp

    6/65

    Route Refresh Capability

    ! Facilitates non-disruptive policy changes

    ! No configuration is needed

    " Automatically negotiated at peer establishment

    ! No additional memory is used

    ! Requires peering routers to support route

    refresh capability RFC2918

    ! Tell peer to resend full BGP announcement

    ! Resend full BGP announcement to peer

    6

    clear ip bgp x.x.x.x [soft] in

    clear ip bgp x.x.x.x [soft] out

  • 7/25/2019 01 Scaling Bgp

    7/65

    Dynamic Reconfiguration

    ! Use Route Refresh capability

    "

    Supported on virtually all routers

    " Find out from show ip bgp neighbor

    " Non-disruptive, Good For the Internet

    ! Only hard-reset a BGP peering as a last

    resort

    7

    Consider the impact to beequivalent to a router reboot

  • 7/25/2019 01 Scaling Bgp

    8/65

    Ciscos Soft Reconfiguration

    ! Now deprecated but:

    !

    Router normally stores prefixes which have been

    received from peer after policy application

    " Enabling soft-reconfiguration means router also stores

    prefixes/attributes received prior to any policyapplication

    " Uses more memory to keep prefixes whose attributeshave been changed or have not been accepted

    !

    Only useful now when operator requires to knowwhich prefixes have been sent to a router prior tothe application of any inbound policy

    8

  • 7/25/2019 01 Scaling Bgp

    9/65

    Ciscos Soft Reconfiguration

    9

    BGP in

    process

    BGP

    table

    BGP outprocess

    BGP in

    table

    receivedreceivedand used

    accepted

    discardedpeer

    peer

    normal

    soft

  • 7/25/2019 01 Scaling Bgp

    10/65

    Configuring Soft Reconfiguration

    ! Then when we change the policy, we issue an

    exec command

    !

    Note:

    " When

    soft reconfiguration

    is enabled, there is no

    access to the route refresh capability

    " will also do a soft refresh10

    router bgp 100neighbor 1.1.1.1 remote-as 101neighbor 1.1.1.1 route-map infilter inneighbor 1.1.1.1 soft-reconfiguration inbound! Outbound does not need to be configured !

    clear ip bgp 1.1.1.1 soft [in | out]

    clear ip bgp 1.1.1.1 [in | out]

  • 7/25/2019 01 Scaling Bgp

    11/65

    Ciscos Peer Groups

    11

  • 7/25/2019 01 Scaling Bgp

    12/65

  • 7/25/2019 01 Scaling Bgp

    13/65

    Peer Groups Advantages

    ! Makes configuration easier

    ! Makes configuration less prone to error

    ! Makes configuration more readable

    ! Lower router CPU load

    ! iBGP mesh builds more quickly

    ! Members can have different inbound policy

    ! Can be used for eBGP neighbours too!

    13

  • 7/25/2019 01 Scaling Bgp

    14/65

    Configuring a Peer Group

    router bgp 100

    neighbor ibgp-peerpeer-group

    neighbor ibgp-peerremote-as 100

    neighbor ibgp-peerupdate-source loopback 0

    neighbor ibgp-peersend-community

    neighbor ibgp-peerroute-map outfilter out

    neighbor 1.1.1.1 peer-group ibgp-peer

    neighbor 2.2.2.2 peer-group ibgp-peer

    neighbor 2.2.2.2 route-map infilter in

    neighbor 3.3.3.3 peer-group ibgp-peer

    ! note how 2.2.2.2 has different inbound filter from peer-group !

    14

  • 7/25/2019 01 Scaling Bgp

    15/65

    Configuring a Peer Group

    router bgp 100

    neighbor external-peerpeer-group

    neighbor external-peersend-community

    neighbor external-peerroute-map set-metric out

    neighbor 160.89.1.2 remote-as 200neighbor 160.89.1.2 peer-group external-peer

    neighbor 160.89.1.4 remote-as 300

    neighbor 160.89.1.4 peer-group external-peer

    neighbor 160.89.1.6 remote-as 400

    neighbor 160.89.1.6 peer-group external-peerneighbor 160.89.1.6 filter-list infilter in

    15

  • 7/25/2019 01 Scaling Bgp

    16/65

    Peer Groups

    ! Peer-groups are considered obsolete byCisco:

    "

    Replaced by update-groups (internal coding not configurable)

    ! But are still considered best practice bymany network operators

    ! Cisco introduced peer-templates

    "

    A much enhanced version of peer-groups,

    allowing more complex constructs

    16

  • 7/25/2019 01 Scaling Bgp

    17/65

  • 7/25/2019 01 Scaling Bgp

    18/65

    Ciscos update-groups (2)

    ! The update group itself lists all the peerswhich get the same (identical) update:

    ! And this group has 13 members18

    Router1#sh ip bgp update-group 1BGP version 4 update-group 1, internal, Address Family: IPv4 Unicast

    BGP Update version : 16/0, messages 0

    Topology: global, highest version: 16, tail marker: 16Format state: Current working (OK, last not in list)

    Refresh blocked (not in list, last not in list)Update messages formatted 11, replicated 13, current 0, refresh 0, limit 1000

    Number of NLRIs in the update sent: max 2, min 0

    Minimum time between advertisement runs is 0 seconds

    Has 13 members:

    10.0.15.242 10.0.15.243 10.0.15.244 10.0.15.24510.0.15.246 10.0.15.247 10.0.15.248 10.0.15.249

    10.0.15.250 10.0.15.251 10.0.15.252 10.0.15.25310.0.15.254

  • 7/25/2019 01 Scaling Bgp

    19/65

  • 7/25/2019 01 Scaling Bgp

    20/65

  • 7/25/2019 01 Scaling Bgp

    21/65

  • 7/25/2019 01 Scaling Bgp

    22/65

  • 7/25/2019 01 Scaling Bgp

    23/65

    Route Reflector: Principle

    23

    AS 100

    A

    CB

    Route Reflector

  • 7/25/2019 01 Scaling Bgp

    24/65

    Route Reflector

    ! Reflector receivespath from clients andnon-clients

    ! Selects best path

    !

    If best path is fromclient, reflect to otherclients and non-clients

    !

    If best path is fromnon-client, reflect to

    clients only!

    Non-meshed clients

    ! Described in RFC445624

    AS 100

    A

    B C

    Clients

    Reflectors

  • 7/25/2019 01 Scaling Bgp

    25/65

    Route Reflector Topology

    ! Divide the backbone into multiple clusters

    ! At least one route reflector and few clientsper cluster

    !

    Route reflectors are fully meshed! Clients in a cluster could be fully meshed

    ! Single IGP to carry next hop and localroutes

    25

  • 7/25/2019 01 Scaling Bgp

    26/65

    Route Reflectors:

    Loop Avoidance

    ! Originator_ID attribute

    "

    Carries the RID of the originator of the route inthe local AS (created by the RR)

    ! Cluster_list attribute

    "

    The local cluster-id is added when the updateis sent by the RR

    " Cluster-id is router-id by default (usually the

    address of loopback interface)

    " Do NOT usebgp cluster-id x.x.x.x unlessthe two route reflectors are physically/directlyconnected

    26

  • 7/25/2019 01 Scaling Bgp

    27/65

  • 7/25/2019 01 Scaling Bgp

    28/65

  • 7/25/2019 01 Scaling Bgp

    29/65

  • 7/25/2019 01 Scaling Bgp

    30/65

  • 7/25/2019 01 Scaling Bgp

    31/65

  • 7/25/2019 01 Scaling Bgp

    32/65

  • 7/25/2019 01 Scaling Bgp

    33/65

  • 7/25/2019 01 Scaling Bgp

    34/65

    BGP Scaling Techniques

    ! These 3 techniques should be corerequirements on all ISP networks

    "

    Route Refresh (or Soft Reconfiguration)

    "

    Peer groups

    " Route Reflectors

    34

  • 7/25/2019 01 Scaling Bgp

    35/65

  • 7/25/2019 01 Scaling Bgp

    36/65

    Confederations

    ! Divide the AS into sub-AS

    "

    eBGP between sub-AS, but some iBGPinformation is kept! Preserve NEXT_HOP across the

    sub-AS (IGP carries this information)! Preserve LOCAL_PREF and MED

    ! Usually a single IGP

    ! Described in RFC5065

    36

  • 7/25/2019 01 Scaling Bgp

    37/65

  • 7/25/2019 01 Scaling Bgp

    38/65

  • 7/25/2019 01 Scaling Bgp

    39/65

  • 7/25/2019 01 Scaling Bgp

    40/65

  • 7/25/2019 01 Scaling Bgp

    41/65

  • 7/25/2019 01 Scaling Bgp

    42/65

  • 7/25/2019 01 Scaling Bgp

    43/65

  • 7/25/2019 01 Scaling Bgp

    44/65

  • 7/25/2019 01 Scaling Bgp

    45/65

  • 7/25/2019 01 Scaling Bgp

    46/65

    Confederations: Benefits

    ! Solves iBGP mesh problem

    ! Packet forwarding not affected

    ! Can be used with route reflectors

    ! Policies could be applied to route trafficbetween sub-ASs

    46

  • 7/25/2019 01 Scaling Bgp

    47/65

    Confederations: Caveats

    ! Minimal number of sub-AS

    ! Sub-AS hierarchy

    ! Minimal inter-connectivity between sub-

    ASs

    ! Path diversity

    ! Difficult migration

    " BGP reconfigured into sub-AS

    "

    must be applied across the network

    47

  • 7/25/2019 01 Scaling Bgp

    48/65

  • 7/25/2019 01 Scaling Bgp

    49/65

    Route Flap Damping

    Network Stability for the 1990s

    Network Instability for the 21stCentury!

    49

  • 7/25/2019 01 Scaling Bgp

    50/65

  • 7/25/2019 01 Scaling Bgp

    51/65

  • 7/25/2019 01 Scaling Bgp

    52/65

    Route Flap Damping (continued)

    ! Requirements

    "

    Fast convergence for normal route changes

    " History predicts future behaviour

    " Suppress oscillating routes

    "

    Advertise stable routes

    ! Implementation described in RFC 2439

    52

  • 7/25/2019 01 Scaling Bgp

    53/65

    Operation

    ! Add penalty (1000) for each flap

    "

    Change in attribute gets penalty of 500

    ! Exponentially decay penalty

    " Half life determines decay rate

    ! Penalty above suppress-limit

    " Do not advertise route to BGP peers

    ! Penalty decayed below reuse-limit

    "

    Re-advertise route to BGP peers

    " Penalty reset to zero when it is half of reuse-

    limit53

  • 7/25/2019 01 Scaling Bgp

    54/65

  • 7/25/2019 01 Scaling Bgp

    55/65

  • 7/25/2019 01 Scaling Bgp

    56/65

  • 7/25/2019 01 Scaling Bgp

    57/65

    Operation

    ! Care required when setting parameters

    ! Penalty must be less than reuse-limit atthe maximum suppress time

    ! Maximum suppress time and half life mustallow penalty to be larger than suppresslimit

    57

  • 7/25/2019 01 Scaling Bgp

    58/65

  • 7/25/2019 01 Scaling Bgp

    59/65

  • 7/25/2019 01 Scaling Bgp

    60/65

  • 7/25/2019 01 Scaling Bgp

    61/65

  • 7/25/2019 01 Scaling Bgp

    62/65

    Problem 1:

    ! One path flaps:

    "

    BGP speakers pick next best path, announce toall peers, flap counter incremented

    " Those peers see change in best path, flap

    counter incremented" After a few hops, peers see multiple changes

    simply caused by a single flap "prefix issuppressed

    62

  • 7/25/2019 01 Scaling Bgp

    63/65

  • 7/25/2019 01 Scaling Bgp

    64/65

  • 7/25/2019 01 Scaling Bgp

    65/65