• Skip to main content
  • Skip to primary sidebar

Technipages

Tutorials and fixes for smartphone, gadget, and computer problems

  • Topics
    • Android
    • Browsers
    • Gaming
    • Hardware
    • Internet
    • iPhone
    • Linux
    • macOS
    • Office
    • Reviews
    • Software
    • Windows
    • Definitions
  • Product Reviews
  • Downloads
  • About
What Is BGP (Border Gateway Protocol)?

What Is BGP (Border Gateway Protocol)?

October 3, 2022 by Mel Hawthorne 1 Comment

BGP or Border Gateway Protocol is one of several standardized protocols used to route network traffic on the Internet. BGP is an exterior gateway protocol responsible for exchanging routing and reachability info. Decisions for routing are based on paths, policies, and the rules a network administrator sets for that network.

There is another version of BGP – iBGP or Interior Border Gateway Protocol. This version is used to route within autonomous systems only. BGP refers to the exterior border gateway protocol when used on the Internet. Sometimes, it will be mentioned as BGP, in that case.

History and Operation

The protocol was first standardized in 1989 and has been used since 1994. The protocol has remained relatively unchanged across multiple versions. The current version of BGP is version 4, standardized in 2006. This version supports CIDR addressing, route aggregation, and multiprotocol extensions. The multiprotocol extensions allow BGP to advertise IPv4 and IPv6 routes simultaneously rather than requiring separate protocols.

BGP relies on peers – other BGP routers – configured manually to create a session. Specifically, a TCP session on port 179. BGP is unique in using the TCP as a transport protocol here – other types of connections rely on UDP or, in some cases, raw IP. To keep the BGP connection up, a member of the network connection sends keep-alive messages. In other words, it sends an empty message telling other members to stay connected at regular intervals – by default, 30 seconds. The administrator of the network can configure this interval.

eBGP vs iBGP

The difference between these two types of BGP is mainly the router’s location, which affects how routes are passed from peer to peer. iBGP routers run within one autonomous system. eBGP routers sit on the edge or border of an autonomous system. When a system has multiple peers, then eBGP peers would be at the edge or outside of the network, communicating with the eBGP routers of adjacent autonomous systems. iBGP peers, in this case, would be the internal ones that only communicate with each other rather than outside elements.

Note: An “autonomous system” or AS is a network or set of networks controlled by or for a single entity. A corporate network, for example, may have numerous network segments, all being part of a single AS.

When an eBGP peer finds new routes, they are taught to all other peers on the network. In contrast, if an iBGP peer finds a new route, it will be taught only to eBGP peers, not other iBGP peers. In other words, no matter what, eBGP peers will be taught any new route discovered and established, whereas only some will be introduced to iBGP peers. These rules mean new routes to external addresses are advertised to all internal devices. Conversely, new routes to an internal address are only advertised outside of the AS. This is based on the assumption that an interior routing protocol will already provide access to internal devices.

The States

BGP networks and peers can have multiple different states. Each state signifies something, and most are part of the normal operation process of a BGP connection. The first state is Idle – when in this state, the BGP initializes, refuses connection attempts, and establishes a TCP connection to the peer.

The second stage is Connect – the router has to wait for the TCP connection to complete. When successful, Connect morphs into OpenSent. When not, it repeats the attempt to connect or returns to the beginning to start over.

OpenSent means the BGP sender waits for an ‘open’ message from its peer. The message is then checked for validity – when it’s found valid, the router returns a Keepalive message, then changes the status to OpenConfirm. In this state, the device is waiting for a KeepAlive message from the other party – when it arrives in time, the next state is Established. Otherwise, it transitions back to Idle and starts all over. In other words, after a peer has sent their KeepAlive message, it listens for the same from other peers – and when that second message arrives at its goal, the final state – Established – happens.

In the Established stage, peers can freely send update messages to exchange information about the possible routes between peers. If one of the set timers expires at any point of the process or an error message appears, the affected peer automatically moves into the Idle state and starts over from the beginning. The same thing happens in cases of BGP version mismatches and similar issues.

Conclusion

BGP or Border Gateway Protocol is an exterior gateway protocol designed to advertise routing information between autonomous systems on the Internet. It advertises routes from internal devices to external devices and learns about routes to external addresses to inform routing decisions. BGP is notoriously complex to manage and has a history of abuse in BGP hijacking attacks. However, BGP is a critical part of routing Internet traffic over IPv4 and IPv6.

You Might Also Like

  • What Is a Gateway?
    What Is a Gateway?
  • What Is ARP (Address Resolution Protocol)?
    What Is ARP (Address Resolution Protocol)?
  • What Is FTP (File Transfer Protocol)?
    What Is FTP (File Transfer Protocol)?

Filed Under: Hardware

Reader Interactions

Comments

  1. Antonio Rodriguez says

    October 7, 2022 at 3:04 am

    You promise

Did this help? Let us know!

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Recent Posts

  • Windows 11: What is Dynamic Lock and How to Set It Up
  • How to Use Google Pay on Android
  • What is a Firefox Primary Password and How to Create One
  • Fix: Windows 11 Mic Not Working
  • How to Update Galaxy Tab S8
  • How to View a List of Recently Uninstalled Apps on Android
  • How to Sign Into WhatsApp on Multiple Devices
  • Dedicated Server vs. Shared Hosting Server

Who’s Behind Technipages?

Baby and Daddy My name is Mitch Bartlett. I've been working in technology for over 20 years in a wide range of tech jobs from Tech Support to Software Testing. I started this site as a technical guide for myself and it has grown into what I hope is a useful reference for all.

You May Also Like

  • Connectionless Protocol
  • Connection-Oriented Protocol
  • Server Message Block (SMB) Protocol

© Copyright 2023 Guiding Tech Media · All Rights Reserved · Privacy