Wednesday, June 29, 2016

BGP

11:04 PM

What is BGP?

In a much simpler explanation BGP is the routing protocol of the Internet, it is the largest routing protocol, this protocol is run at the service provider-level, it has to find all of the route that the internet has and carry them into different areas around the world.
What is an Autonomous System?
In BGP’s context it is a set of routers and networks under the control of a single administrative authority.
  • Allows separation of administrative domains
  • IGPs run within an AS
  • IGPs route between nodes
BGP
  • EGPs route between autonomous systems
  • BGP routes among autonomous systems
as_bgp
  • An Autonomous System is:
  • 16 bits
  • Assigned by Regional Internet Registries just like IP addresses
  • Public AS numbers: 1 – 64511
  • Private AS number: 64512 – 65534
  • Reserved: 0 and 65535
BGP Routes amount autonomous system this means that BGPs route from AS to AS the destination is represented by prefixes, BGP can carry not only IPv4 but also other address types. Other address types that BGP recognize are “Address-Family” this is called multi-protocol BGP or ( MP-BGP).
The difference between IGPs and BGP: Two different perspectives:
IGP_BGP
  • IGPS Intra-area protocol
  • BGP Inter-area Protocol
Trusted and Untrusted Peering   
  • IGP assumes its peers are trusted
    • All under the same administrative domain
    • Therefore route exchange viewed holistically
  • BGP assumes its peers are untrusted
    • Under separate administrative domains
    • Route information exchanged very carefully
    • Each external peering viewed separately
    • Incomming and outgoing route advertisement are viewed separately BGP_ot
    • A BGP session might:
      • Carry advertisements only in one direction
      • Carry advertisements in both direction
    • A BGP advertisement can:
      • Associate a number of path attributes with a prefix
      • Path attributes enable routing policy

Inter-Domain Routing
Types of Autonomous System
  • An AS can be:
    • Single-hombed
      • One link to an external peersingle_homed
        • Only one connection to an external peer
        • No need for incoming BGP  here
          • No choices about external routes
          • Alternative: External peer uses static routes to AS 1 prefixes and used redistribution
        • Outgoing BGP might be used
          • to advertise internal prefixes to external peer
    • Multi-homed
      • Multiple links to one or more external peersmulti_homed_BGP
      • Multiple connection to external peers
        • in one or more neighboring ASs
      • Incoming BGP might be needed here
        • For multple choices to same destination
  • An AS can be:
    • Stub
      • All packets entering the AS are to destionans in the AS
      • All packets leaving the AS are from sources in the AS
    • Transit
      • Packets entering the AS can be to destinations in another AS
      • BGP almost always used here
Stub and Transit AS
BGP_ot



  • A stub AS might be single homed or multi-homed
  • A transit AS is always multi-homed
BGP AS Path attributes
  •  One of many BGP path attributes
    • Path attributes enable BGP routing policies
    • AS_PATH also enables two key BGP functions
  • AS_PATH is a list of AS numbers describing the inter-AS path to a destination.
  • AS_PATH has two functions:
    1. Shortest AS path selection
    2. Loop avoidance
Shortest Path Determination function from BGP perspective (See things from AS-level not from internal router level).
SP_determinationFunction
  • AS Chooses shortest AS path
    • Bases on the AS_PATH with the fewest AS numbers on the list
    • BGP Dcision Process, discussed in Basic BGP Policy Concepts
    • AS number prepended to AS_PATH
    • Provides a sequential description of the inter-AS path to the destination
    • Only by AS border router before advertising to its external peer
  • Behavior is similar to distance vector
    • But called path vector – Vulnerable to loop
Loop Avoidance 
Loop_avoidance
  • AS_PATH Loop Avoidance:
    • Drop routes received from external peers if the local AS number is listed in the AS_PATH