BGP Overview

Outlines:

  • Routing protocol Vs Routed Protocol.
  • Routing protocol classification.
  • Why do not we use IGP as routing protocol between Autonomous systems?
  •  EGP history and limitation.
  • When is BGP appropriate  and when it is not ?
  • BGP v4 (RFC 4271) Characteristics and basic configuration.
  • BGP Requirements.

Routing protocol Vs Routed Protocol

Routing protocols:

– it is exchange of data (traffic) between routers so that each router can tell other router about network it can reach.

Examples:

RIPv1&2, IGRP, EIGRP, OSPF, IS-IS, EGP, BGP

Routed Protocols:

– it is the protocol that carries data traffic from end to end and supports:

a-      Logical Addressing.

b-      Encapsulation.

Examples:

IPX, Apple Talk, IPv4, IPv6

Routing protocols classification

-Routing protocols are classified into two protocols

a-      IGP (Interior Gateway Protocols):

-It is the protocol that work within an Autonomous system* (Intra-AS) and provides optimum Intra-AS routing.

-Like RIPv1&2, IGRP, EIGRP, OSPF, IS-IS

b-      EGP (Exterior Gateway Protocols):

-It is the protocol that work between Autonomous systems (Inter-AS) and used to provide security and enable routing policies.

-Like EGP, BGP (EBGP “External BGP”& IBGP “Internal BGP”)**

*Autonomous System: is a group of devices (routers) that work under single technical administration or single routing policy, BGP AS numbering  range is  from 0-65535 & 0 is reserved and IANA divided the remaining (1-65535) into public and private ranges, so the public is from 1 to 64512 and the private is from 64513 to 65535.

**IBGP Vs EBGP:

 

IBGP                                                                                             EBGP

-Run within same AS                                                                 -Run between ASs.

-No need to be directly connected by default.                    –Directly connected by default.

Why do not we use IGP as routing protocol between Autonomous systems?

 

-Other protocols than BGP mainly depend on B.W as their metric  so if we take EIGRP as an example its metric equation depends on B.W as EIGRP metric = 256 * (K1/B.W + K3 * Delay) if we assumed that other K values = 0.

-So if B.W increases the metric decreases (inversely proportional).

-So company A (Outgoing and Return traffic) will prefer the path over 2Mb through company B to reach internet and absolutely company B does not want this so it will make an access-list to drop any routes from A destined to internet and any routes from internet destined for A and this will make black holes (A will prefer the route to internet via B and B always drop A routes).

-For best practice A should reach internet Via ISP only and the returning routes from Internet will be also Via ISP.

-Only local routes of A and of B can be exchanged Via 2Mb link between them and ISP should not know these routes (no transit between A&B).

-EIGRP cannot do this policy as it can filter only individual IP subnet also Link state like OSPF does not have any powerful filtering at all.

-This policy can be achieved using BGP using AS# or manipulating with its other Attributes.

Conclusion:

-Use BGP to hold external routes between ASs.

-Use IGP to hold internal routes within Same As.

EGP history and limitation

-Exterior Gateway Routing protocol “EGP” was originally specified in 1982 by Eric C. Rosen and David L. Mills.

-It is was described in RFC 827 in 1984, and formally specified in RFC 904.

-It was not be used any more as an Internet routing protocol as internet routing table rapid growth due to proliferation increase, and some limitations appeared.

-One of its critical limitations is if the topology of set of autonomous systems is not Tree-structured (i.e. , if it has cycles), it does not provide enough topological information to prevent loops.

-So another routing protocol is needed to overcome these limitations, so that BGP was introduced and we will talk about BGPv4.

When BGP is not appropriate and when it is appropriate?

BGP is not appropriate when:

–          Single connection to ISP.

–          No policies are required.

–          No experience of how to use it.

–          Lack of memory and CPU.

And on contrary

BGP is appropriate when:

–          Multiple connections to Internet or ISP.

–          Policies are required.

–          Very good experience of how to use it.

–          Good memory and CPU.

BGPv4 C/Cs and Basic configuration:

BGPv4 C/Cs:

–          Path vector routing protocol, advanced distance vector.

–          Used rich metric called path attributes.

–          Symbol in routing table is ” B “.

–          There are two types IBGP (Internal BGP) and EBGP(External BGP).

–          Administrative distance for IBGP is 200 and for EBGP is 20.

–          Supports hierarchical design.

–          Supports summarization and CIDR.

–          Loop free topology (uses AS-path list rule, Cluster list rule and originator ID in case of route reflectors…..etc)

–          There are three different types of tables Neighbor*, BGP**and Routing Table***.

–          Reliable updates, run at the top of TCP port 179 (Application protocol).

–          Periodic keep alive updates every 60 seconds (configurable “can be changed”) and Dead time (Hold time)= 3*Keep alive=180 seconds by default.

–          Incremented batched updates for IBGP every 5 seconds and for EBGP every 30 seconds.

–          Identify its neighbor manually using Neighbor command.

–          Updates are sent uni-cast as it defines its neighbor manually using Neighbor command.

–          Full best paths in BGP table are sent at startup and at change.

*Neighbor Table: List of all neighbors and its command “show ip bgp neighbor or show ip bgp summary

**BGP table: List of all learned routes from a neighbor and select best paths and backup ones and its command “Show ip bgp [prefix ][ mask]

***Routing table: All best paths to destination and its command “show ip route [bgp]

Basic Configuration:

NOOR (config) # router bgp <My AS#>

NOOR (config-router) # neighbor <ip address of the neighbor> remote-as <AS# of the neighbor>

-If my own router AS# equals my neighbor one so we are talking about IBGP neighbor ship.

-If my own router AS# not equals my neighbor one so we are talking about EBGP neighbor ship.


BGP Requirements

1-Run BGP on boarders and there is no IGP inside AS:

consider the below scenario where there are two EBGP session between routers E &A and routers C&F, and only IBGP session between router A&C.

 

– As there is an IBGP session only between A&C any routes advertised from router A cannot reach router C as A do not know how to reach router C.

Conclusion:

There must be an IGP inside AS so as the neighbors could be reachable.

2-Run BGP on boarders only and there is an IGP inside AS:

 

– If router E advertises a route (U) towards router A, router A will install it in its routing table with next hop router E.

– Router A will advertise this update(route U) to router C “IBGP” via either router B or D.

– Both router B&D will see this route sourced from router A and destined for C.

-A route can reach successfully router C Via IGP.

-Router C will install this route (U) in its routing table and then advertises it to router F through EBGP session with next hop router C.

-The problem occurs when router F needs to reach a destination for this pre-learned route (U) where Black hole problem will take place.

-Router F can forward any route destined for U successfully to router C and then router C will reflect this route to either router B or D.

-But both routers B&D do not know about this destination U as there is no any information about this in their routing table so they will drop any routes destined for this destination (Black hole problem).

Synchronization problem:

-A route learned from IBGP can never be used or advertised to IBGP or EBGP neighbor unless it is learned from IGP (non-BGP).

Conclusion:

-To avoid black holes problem either disable synchronization and run BGP in all routers inside AS or keep it on and redistribute from BGP into IGP (on router A,C).

 

3-Run BGP in all routers inside AS and there is absolutely an IGP:

 

-Here we will face a split horizon *rule problem.

Split Horizon rule:

A route learned from IBGP can never be advertised to another IBGP.

Conclusion:

To avoid split horizon rule we can run BGP in full mesh fashion.

4-Run BGP in full mesh fashion:

 

Disadvantages:

a-      Large numbers of TCP sessions (overhead).

b-      Unnecessary duplication or routing traffic.

Solution:

-Either to run BGP Confederation* or Route Reflector** design.

*BGP Confederation:

-Is to divide main AS into sub-ASs called member ASs so as each sub-AS act as EPGP session to another one and this design take into consideration AS-Path rule.

**Route Reflector:

-Is to assign a router to become a route reflector and the other routers become clients and its function is to take all routes from a client and reflects it to other clients.