Page Content

Tutorials

Advantages and Disadvantages of bgp Border Gateway Protocol

All of the following topics were covered in this blog: the Border Gateway Protocol (BGP), its protocol characteristics and operation, how it works, types, scalability mechanisms, management commands, advantages and disadvantages of bgp .

Border Gateway Protocol BGP

As the primary navigator or “postal service” that guides the information flow throughout the global network, the Border Gateway Protocol (BGP) is the fundamental routing protocol of the Internet.

Classification and Purpose

Essentially, BGP is an Exterior Gateway Protocol (EGP). Its main function is inter-Autonomous System (AS) routing, which controls connectivity and data exchange across various autonomous systems (autonomously controlled networks).

  • Autonomous Systems (AS): The hundreds of thousands of autonomous systems (ASe) that make up the Internet are a “network of networks.” An AS is a group of networks that are administratively managed by a single organization or Internet service provider (ISP). Every AS has a distinct Autonomous System Number (ASN).
  • Core Function: BGP’s primary responsibility is to establish the optimal route for data packets to take from their source to their destination across this intricate network of ASes and to share network reachability information amongst BGP systems.

Also Read About IP VPN Technology CISCO Secure Enterprise Connectivity

Border Gateway Protocol BGP
Border Gateway Protocol (BGP)

Protocol Characteristics and Operation

BGP differs from internal routing protocols in a number of ways, including:

  • Path-Vector Routing: In contrast to distance-vector or link-state protocols, BGP is a path-vector routing protocol. The AS Path List (AS_PATH), a list of all ASes the route has passed through, and network policies are the two main factors it considers while making routing decisions. Because it prevents an AS number from appearing twice in a path, the AS Path is essential for avoiding routing loops.
  • Runs Over TCP: BGP uses TCP port 179 to provide dependable, connection-oriented communication between BGP peers. It is based on the Transport Control Protocol (TCP).
  • Policy Support: BGP employs a wide range of measures, known as attributes, to affect path selection, in contrast to Interior Gateway Protocols (IGPs), which rely on basic metrics like hop count. Administrators can override strictly technical distance measures by configuring rules based on these attributes to choose paths for political or economic reasons.
  • Scalability and CIDR: BGP is incredibly scalable, built to manage the expansion and intricacy of the global Internet routing table. Classless Inter-Domain Routing (CIDR), which BGP enables, aids in route aggregation and lowers routing table size.

Also Read About What is MPLS Layer 3 VPN? Key Components and Benefits

How BGP Works (Peering and Functions)

Peering is the mechanism by which BGP functions. BGP-enabled routers are deliberately set up to be peers or neighbours to one another.

BGP peers carry out a number of crucial tasks:

  • Peer Acquisition and Authentication: To ensure authorized traffic, peers create a TCP connection and exchange messages to consent to interact.
  • Route Discovery and Storage: Network-Layer Reachability Information (NLRI) and path characteristics are among the routing details that BGP partners share. The router’s Routing Information Base (RIB) contains these data. To save bandwidth, BGP employs incremental updates, sending only modifications following the initial full table exchange.
  • Path Selection: To choose the best path, routers consult the data stored in the RIB. BGP assesses different path properties in a predetermined prioritized order when there are numerous paths available.
    • AS_PATH: The series of AS numbers that the path has passed through.
    • NEXT_HOP: The IP address of the subsequent hop to get to the destination is NEXT_HOP.
    • LOCAL_PREF: The AS’s preference value; a higher value indicates greater preference.
    • MED (Multi-Exit Discriminator): Preferred entry sites into an AS are suggested by MED (Multi-Exit Discriminator).
    • COMMUNITY: Use this tag to apply routing policies and group routes.
  • Route Advertisement: A BGP speaker periodically updates its peers on its knowledge of other networks and how to connect with them. BGP only tells its peers about the path it thinks is the best.
  • Peer Verification: BGP confirms that peers’ connections are operating as intended. To keep the connection going, keep-alive messages are usually delivered (tunable) every 30 seconds.

Types of BGP

BGP is categorized based on whether the communication occurs within or between ASes:

BGP TypePeers’ LocationPurpose
External BGP (eBGP)In different Autonomous SystemsExchanges routing information between ASes, connecting them to the global internet.
Internal BGP (iBGP)In the same Autonomous System (same ASN)Ensures consistent routing information and reachability among routers within a single large AS.

Key Difference in Propagation: Routes that are learnt from an eBGP peer are re-advertised to all peers (iBGP and eBGP), which is a key difference in propagation. Only all eBGP peers are re-advertised routes that have been learnt from an iBGP peer.

Also Read About What Is A VPN Tunnels? How It Works, VPN Tunneling Protocols

Scalability Mechanisms

BGP uses strategies to improve scalability in order to handle the Internet’s tremendous growth:

  • Route Reflectors (RRs): By eliminating the need for a complete mesh of internal BGP neighbor relationships, RRs make iBGP configuration simpler. Many BGP routers (clients) can only peer with an RR since it serves as a central hub.
  • Confederations: Confederations are groups of ASes that are run internally but show to the rest of the Internet as a single ASN. This facilitates internal management of very large networks.
  • Route Aggregation: In order to keep the global routing table reasonable, route aggregation is used in conjunction with CIDR to effectively condense several networks into a single routing table entry.

Also Read About Cisco Dynamic Multipoint VPN DMVPN Phase 1 2 3 In Network

Advantages and Disadvantages of bgp

Advantages and Disadvantages of bgp
Image Credit To Napkin.AI
Advantages (Pros)Disadvantages (Cons)
Global Connectivity: Enables communication and data transfer across borders and between different networks/ISPs.Security Risks: BGP is vulnerable to threats like route hijacking or malicious attacks, leading to unauthorized traffic diversion or disruption.
Scalability: Highly capable of managing the vast number of routes found on the internet.Configuration Complexity: Requires significant expertise and planning for proper implementation and optimal routing.
Efficient and Policy-Driven Routing: Allows organizations to prioritize paths, avoid congestion, and set policies based on various attributes.Slow Convergence: Takes longer to recover from topology changes compared to IGPs like OSPF.
Resilience and Multihoming: Can quickly adapt to network failures and supports multihoming (connecting to multiple ISPs simultaneously) for redundancy and load balancing.High Resource Usage: Consumes significant memory and CPU due to the need to store the constantly growing, large global BGP network routes.
Security Support: Can authenticate messages between routers using preconfigured passwords to filter unauthorized traffic.Stability Issues: Can suffer from route flapping, where routes continuously alternate between available and unavailable states, though this is mitigated by route flap damping.

Unlike OSPF (Open Shortest Path First), an Interior Gateway Protocol, which utilizes a Link State Routing Algorithm for intra-domain routing (inside a single AS), BGP uses a Path Vector Routing Algorithm for inter-domain routing (between ASes). OSPF employs the IP protocol, whereas BGP also uses TCP.

Management Commands

Several commands can be used to manage and verify BGP status:

CommandFunction/Information Displayed
show ip bgp summaryProvides an overview of BGP status, listing each configured neighbour along with its IP address, AS number, and session status. An “Active” state indicates the router is actively trying to establish a connection.
show ip bgpDisplays the entire BGP table and detailed information about each route. A Next Hop of 0.0.0.0 in the output means the network was locally originated on the router using the network command in BGP.
show ip bgp neighborsProvides detailed information about BGP connections, including TCP sessions, BGP parameters, and TCP timers and counters, such as the hold time.

BGP routing protocols can use the functions of an access list (ACL) to control various aspects of the routing protocol’s behavior.

Also Read About IPv4 Address Exhaustion: Simple Guide To IP Address Shortage

Index