BGP

Course Description

BGP (Border Gateway Protocol) is the routing protocol of the Internet, used to route traffic from one autonomous system (AS) to another. It’s an important topic to understand if you work at an ISP or at a large company that is connected to two or more ISPs. Unlike IGPs like OSPF or EIGRP, BGP uses a set of attributes to determine the best path for each destination. There are a lot of options you can use to manipulate traffic patterns.

Course Highlights

In this course you will learn:

  • What BGP is and when you need it.
  • The difference between internal and external BGP.
  • How BGP neighbors establish an adjacency, and how to troubleshoot it.
  • How to read the BGP table.
  • How BGP uses attributes instead of a metric to select the best path.
  • What BGP communities are and how to use them for routing policies.
  • How to filter BGP prefixes with prefix-lists, AS path filters, and regular expressions.
  • Advanced topics like route reflectors, confederations, MP-BGP, and RPKI.

Presented to you by instructor Rene Molenaar, CCIE #41726

Course at a glance

  • 55 lessons in 7 units, plus a hands-on BGP lab.
  • Exams: covers the BGP topics of CCNP ENCOR 350-401, CCNP ENARSI 300-410, and CCIE Enterprise Infrastructure.
  • Format: self-paced lessons with Cisco IOS configurations, packet captures, and video.
  • Last updated: October 2026.

Requirements

  • CCNA-level knowledge of how routers and routing protocols operate.
  • A good understanding of IGPs like OSPF and EIGRP.

Course Schedule

What is BGP?

BGP (Border Gateway Protocol) is the routing protocol that exchanges routes between autonomous systems. An autonomous system (AS) is a network under a single administrative control, like an ISP, a cloud provider, or a large company, identified by its AS number. BGP is a path-vector protocol: every route carries the list of AS numbers it passed through, and a router drops any route that already contains its own AS number. That’s how BGP prevents loops on a network as large as the Internet.

IGPs like OSPF and EIGRP try to find the shortest path within your own network. BGP is different. It doesn’t care that much about the shortest path; it cares about policy. With BGP attributes, you decide which routes you accept, which routes you advertise, and which way traffic enters and leaves your network. BGP runs on top of TCP (port 179), so it relies on TCP for reliable delivery and doesn’t need its own retransmission mechanism.

Who uses BGP? Every ISP and cloud provider, and any company that connects to two or more ISPs and wants to control its Internet traffic. You’ll also find BGP inside networks: MP-BGP carries customer routes in MPLS VPNs, and BGP EVPN is the control plane for most VXLAN data center fabrics.

BGP Learning Roadmap

This roadmap follows the course units. Each topic has a short explanation and links to the lessons where we cover it in detail.

BGP Fundamentals

You need BGP when you connect to multiple ISPs, or when you are the ISP. We use external BGP (eBGP) between autonomous systems and internal BGP (iBGP) between routers within the same AS. BGP only advertises the networks you tell it to, and its next hop behavior is different from what you are used to with IGPs.

Lessons: Introduction to BGP, eBGP, iBGP, How to read the BGP table, iBGP next-hop-self

BGP Neighbor Adjacency

Unlike IGPs, BGP doesn’t discover its neighbors automatically. You configure them yourself, and the routers set up a TCP session on port 179. The neighbors then go through six states, from Idle to Established, and use four messages: Open, Update, Keepalive, and Notification.

Lessons: BGP neighbor adjacency states, BGP messages, Troubleshooting BGP neighbor adjacency

BGP Attributes and Path Selection

When BGP learns the same prefix from multiple neighbors, it compares the paths attribute by attribute in a fixed order and stops at the first one that makes a difference. The first four are Weight, Local Preference, Locally originated, and AS path length, followed by 7 more. By changing these attributes, you control which way traffic leaves and enters your network.

Lessons: BGP attributes and path selection, Weight, Local Preference, AS path prepending, MED

BGP Communities

A community is a tag you attach to prefixes so that other routers, in your AS or in a neighbor’s AS, can apply a policy to them. There are well-known communities like no-advertise and no-export, and you can define your own values, for example to ask your ISP to lower the local preference of your backup link.

Lessons: BGP communities, No-advertise, No-export, Local-AS

BGP Filtering

By default, BGP advertises everything it has to its eBGP neighbors. If you are connected to two ISPs, that can turn your network into a transit AS between them. Filtering is how you control what you advertise and what you accept: with prefix-lists, distribute-lists, and AS path filters that use regular expressions.

Lessons: BGP transit AS, BGP regular expressions, AS path filter

Advanced BGP Features

iBGP routers don’t advertise routes learned from one iBGP neighbor to another iBGP neighbor, so in theory every iBGP router needs a session with every other one. Route reflectors and confederations solve this full-mesh problem in larger networks. This unit also covers MP-BGP for IPv6 and MPLS VPNs, private and 4-byte AS numbers, multipath, and how to apply policy changes without resetting your neighbors.

Lessons: Route reflector, Confederations, MP-BGP, Private and public AS numbers, BGP multipath

BGP Convergence and Security

BGP normally advertises only its best path for each prefix. That hides backup paths, which slows down convergence when something fails. Features like next hop tracking, additional paths, and PIC (Prefix Independent Convergence) speed up convergence. On the Internet, route leaks and prefix hijacks are a real risk, and RPKI lets you verify that an AS is allowed to originate a prefix.

Lessons: Additional paths, BGP PIC, Route leaking, RPKI

Practice: BGP Lab

Reading about BGP is one thing; configuring it is another. The BGP professional lab lets you put everything together: neighbors, path selection, filtering, and troubleshooting.

Lab: BGP Professional Lab 1

Frequently Asked Questions

What is BGP?

BGP (Border Gateway Protocol) is the routing protocol of the Internet. It exchanges routing information between autonomous systems: networks like ISPs, cloud providers, and large companies that each manage their own routing. Read our introduction to BGP.

What is BGP used for?

BGP connects networks that are managed by different organizations. It’s how ISPs learn how to reach every network on the Internet, and how a company with two Internet connections decides which link to use for which traffic. Inside large networks, BGP is also used for MPLS VPNs and data center fabrics.

Who uses BGP?

Every ISP, cloud provider, and content provider uses BGP. Enterprises use it when they connect to two or more ISPs, and you’ll also find it in data centers and in service provider networks that offer VPN services to customers.

How does BGP work?

You configure your BGP neighbors manually, and they set up a session to exchange routes. Each route comes with attributes, like the path of autonomous systems it went through. Every BGP router uses these attributes and your own policies to select the best path to each destination, and only advertises that best path to its neighbors.

When do you need BGP?

If you have a single Internet connection, you don’t need BGP: a default route to your ISP is enough. You need BGP when you connect to two or more ISPs and want control over how traffic enters and leaves your network, when you are an ISP yourself, or when you build large networks like MPLS VPNs or data center fabrics. Learn about single, dual, and multi-homed designs.

What is the difference between BGP and OSPF?

OSPF is an interior gateway protocol: it routes traffic within your own network and always looks for the shortest path. BGP routes traffic between networks of different organizations and selects paths based on policy instead of the shortest path. Many networks run both: OSPF inside, and BGP at the edge to their ISPs.

What is the difference between eBGP and iBGP?

External BGP (eBGP) runs between routers in different autonomous systems, for example between your router and your ISP. Internal BGP (iBGP) runs between routers within the same autonomous system, to share the routes learned from eBGP throughout your network. Learn more about iBGP.

What is MP-BGP?

MP-BGP (Multiprotocol BGP) is an extension of BGP that can carry more than IPv4 routes. With MP-BGP, the same BGP session can exchange IPv6 routes, multicast routes, and VPN routes, which is why it’s the foundation of MPLS VPNs. Learn how MP-BGP works.

Ready to master BGP?

Get access to all 55 BGP lessons, the BGP lab, and every other course on NetworkLessons.com.

Sign up