This post will skim over BGP packets and attributes.

BGP Packet Types: Link to heading

There are five types of packets in BGP:

  1. Open
  2. Keepalive
  3. Notification
  4. Update
  5. Refresh

BGP Attributes: Link to heading

There are four categories of attributes with different types in each:

  1. Well-known Mandatory - These attributes must be present in any BGP update.
    1. Origin
    2. AS Path - Loop protection
    3. Next-Hop
  2. Well-known Discretionary - Must be in every BGP implementation but is not required in every BGP update.
    1. Local Prefrence
    2. Atomic Aggregator
  3. Optional Transitive - If present it should be passed long to the next peers.
    1. Aggregator
    2. Community (4 octets)
    3. Extended Community (8 octets)
  4. Optional Non-Transitive - Doesn't have to be updated to peers.
    1. Multi Exit Discriminator (MED)
    2. Originator ID
    3. Cluster List
    4. Multiprotocol Reachable NLRI
    5. Multiprotocol Unreachable NLRI

BGP Route Selection: Link to heading

  1. Highest Local Preference First
  2. Shortest AS Path
  3. Lowest Origin Value
  4. Lowest MED value
  5. Lowest IGP metric as AS exit
  6. Longest uptime of eBGP peer or lowest router ID
  7. Lowest Peeer IP Address