Wednesday 6 March 2019

BGP Series 16: BGP Attributes: AS_PATH and MED

BGP Attributes: AS_PATH and MED:

.

  • AS_PATH Attribute:

    • It is a BGP attribute

    • Shortest length of AS_PATH is preferred when weight and local preference is same

    • It can be used to influence both inbound and outbound traffic

    • With AS_PATH prepending, we can make the AS_PATH longer for a path that is less preferred. Ideally, the local AS is prepended

    • Example:

      • In below example, we own AS-1 and both our routers ‘a’ and ‘b’ are advertising net-X to downstream neighbor...But, we want the downstream neighbor to choose ‘b’ .

      • Since I can’t change Weight in router ‘c’ which is not owned by me and I cant use local-pref since it is in a different AS

Thursday 28 February 2019

BGP Series 15: BGP Attributes: Weight and Local Preference

BGP Attributes: Weight and Local Preference:

.

  • Usually if we want to modify some attributes for best path selection, we will mosify one of these: WEIGHT, LOC_PREF, AS_PATH

  • Influencing BGP Weight:

    • It is not actually an attribute since it is not part of a bgp packet

    • It was previously Cisco proprietary (now used by others like Arista as well) and configured locally on a router

    • It is locally significant to the router and is not advertised to any other BGP neighbor as part of BGP Update

    • It can be used to influence the choice of outbound routes

    • It is set on inbound routes (.ie. for updates coming into the router, a weight is set)

Tuesday 19 February 2019

BGP Series 14: BGP Path Attributes and BGP Best Path Algorithm

BGP Path Attributes and BGP Best Path Algorithm:

.

  • BGP uses different path attributes to calculate the best path to a certain destination

  • But, they can also be used for a variety of things other than best path calculation such as AS_PATH attribute for loop-detection, …

  • Each path-attribute describes something about the path

  • The most common bgp path attributes are:

Wednesday 13 February 2019

BGP Series 13: BGP Filtering- Part 2

BGP Filtering- Part2:

  • Filter-List Example:

    • Consider the AS-path for a route of Network-X to be 100 200 400 6678
    • One thing to consider is no matter how big the AS_PATH, the beginning should have the ‘^’ symbol and end of every AS_PATH must have the ‘$’ sign

img

    • This is the simplest AS_PATH regex, but

Wednesday 6 February 2019

BGP Series 12: BGP Filtering- Part1

BGP Filtering- Part1:

  • Filtering can be done for inbound (filtering before installing them in bgp table) or outbound routes (before advertising it to our neighbors)

  • After filtering is applied, BGP neighborships MUST be reset or cleared for the filter to take effect

  • To reset a bgp neighborship, cli command is:

    • ‘Clear ip bgp *’ → clears or all neighbors
    • ‘Clear ip bgp ’ → clears neighborship only for that particular neighbor
  • But, resetting the bgp neighborship for implementing a filter is destructive esp.