16

I have a question about BGP.

When exactly is BGP needed?

I remember reading that BGP is needed for communication between autonomous systems, but is this always true?

For example, in packet tracer I can have a single autonomous system running EIGRP, but I can simply just use a static route to connect that autonomous system to the local ISP routers that are running OSPF.

So I'm struggling to see where BGP is needed.

Any help would be appreciated.

-Artekis

1
  • 6
    Static routes don't scale, and are not dynamic. Running the Internet requires a routing protocol to scale and be dynamic, and, currently, BGP is the routing protocol of choice by agreement.
    – Ron Maupin
    Commented Apr 13, 2015 at 15:22

5 Answers 5

12

The generic statement that BGP is required when you need to route between two autonomous systems is fairly misleading. There are a lot of scenarios in which you may choose to use BGP, or it might even be required.

In the service provider world, BGP is used heavily, as it is the routing protocol of the Internet—but it sounds like your question is regarding the enterprise. In that case, you may be required to use BGP when interfacing with service providers for Internet and sometimes WAN connectivity, or you may choose to run BGP internally due to it being the most flexible routing protocol as far as routing policy goes.

Some examples of its use in the enterprise:

  1. Your enterprise controls a block of portable public IP space. "Portable" in this case means that the space is registered to your organization by a Regional Internet Registry, like ARIN. Your organization hosts internet accessible services that utilize addressing from this address space. You typically have two options for letting the world know how to get to you:

    1. Your service provider could advertise this space to the Internet via BGP and static route back to your environment.

    2. You could peer with your service provider and advertise the space to them via BGP. In the case where you have more than one ISP, this is the only option. You'd advertise the space to both service providers and then use various policies or manipulation of attributes to control the paths incoming traffic takes.

    In this scenario, the service providers may each advertise a default route to you (rather than the full internet routing table) and you may want to load balance your outbound Internet traffic across ISPs. In this case, you might need to manipulate BGP to ensure traffic takes the path you want it to and return traffic is influenced back through the same ISP it left on. This is super high level, but hopefully you get the picture.

  2. Most of the time when you have MPLS links for WAN connectivity, you're not actually doing anything with MPLS. MPLS will terminate on the service provider's Provider Edge (PE) router and they will connect to your Customer Edge (CE) router with a regular ethernet link on a /30 point to point connection. In this case, you'll typically have to redistribute your IGP (internal gateway protocol e.g. OSPF, EIGRP, etc.) routes into BGP to share with the service provider. They will pass those routes through their MPLS network to their PE at your remote site, which will BGP peer with your CE at that site, at which point, you will learn the routes there and redistribute them again back into the IGP at your remote site. The same thing will happen in the other direction.

    BGP isn't a requirement here, but it's typically what the service provider will want to run to keep things consistent across all of their connections to customers.

  3. As said above, you may run BGP inside of your network, which is known as IBGP. It's actually the same exact protocol, but when you run BGP between routers in the same AS, a couple of the behaviors of BGP will change. Anyway, this is really all about control. You may have layer 2 virtual networks for WAN connectivity or even VPN links that you could run OSPF over, but in some designs, you may need more control over routing policy to achieve the behavior you want over these paths, in which case, BGP might be the right tool for the job.

Sorry to be somewhat broad, but every case is really different. When you're just learning networking, especially from Cisco, they will simplify everything to help you understand the concepts. In a way, I think they go too far in insinuating that certain generic statements are "rules" and even test you on them as if they are 100% strict rules.

The best advice I can give is to learn it their way to get down the concepts and pass your certs, but keep your mind wide open. If you want to add something a bit less formal and a bit more real world to your network learning and training, definitely pick up some O'Reilly books (related to the topics you're studying) with the animals on them. You can get them pretty cheap used on the Internet.

1
  • 1
    "You could peer with your service provider and advertise the space to them via BGP. In the case where you have more than one ISP, this is the only option." Why is peering the only option? You mean we cannot static route to multiple ISPs?
    – Noob_Guy
    Commented Nov 17, 2022 at 6:05
12

Instead of describing where you would use BGP, let me describe why:

Other protocols like EIGRP or OSPF assume the best way to get somewhere is the fastest link -- i.e. the link with the highest bandwidth. As such, they have a simple metric for selecting routes.

In many situations, especially between different organizations (autonomous systems), the reason for choosing a particular path may have nothing to do with bandwidth. It may be due to a pre-arranged agreement on who will carry what traffic, or based on some financial agreement. You may want to route some traffic to one neighbor, but different traffic to another.

The main advantage of BGP is that it gives you much more control over what routes you advertise and what advertisements you accept from your neighbors. BGP gives you more control over route selection and your neighbor's route selection. That's one of the major reasons BGP is The Routing Protocol for the Internet.

1
  • Indeed some people even suggest that this flexibility and conrol means you should do away with traditional IGPs and just use BGP youtube.com/watch?v=yJbqnOdD3cg Commented Sep 26, 2016 at 23:47
1

BGP is the standard way to exchange routes between autonomous systems.

If you have only a single link to the internet then you have no real reason to dynamically exchange routes with your ISP. They can point a static route in your direction, you point you default gateway to them and that is the end of it.

If you are multihomed either to multiple PoPs of the same ISP or to multiple ISPs you want to dynamically advertise your prefix to your ISPs. The reason for this is if one ISP link goes down you want your traffic to be rerouted.

If you are multihomed to different ISPs then you may also want to consider receiving routes over BGP. Sometimes ISPs lose routes to parts of the internet, if you are just using default gateways you won't see this whereas if you are importing full tables the traffic should just shift over. On the other hand importing full tables may overwhelm older/cheaper routers.

If you are getting into peering relationships then you will certainly need to talk BGP to find out what prefixes a peer is prepared to take traffic for.

2
  • "If you have only a single link to the internet then you have no real reason to dynamically exchange routes with your ISP." There are a few reason to do this. For instance, if you have provider-independent address space, then you probably want to do this. You don't want to give your ISP the right to advertise the prefixes you own unless you first advertise them to the ISP.
    – Ron Maupin
    Commented Sep 27, 2016 at 1:16
  • @RonMaupin this a very good reason, another is that you might want to set community values that tells other AS how to treat your prefix etc so even with a single link there are times when using BGP is valuable Commented Dec 31, 2020 at 8:07
0

Keeping it succinct, BGP is needed primarily in a multi-homed scenario that is when you connect to two providers and want to achieve failover as well as apply policy maps. It works as a EGP (eBGP) and in fact it is the only EGP.

The other scenario is using BGP as IGP (iBGP) that is establishing peering with router within same AS but that is not suggested for the routing complexity and resources burden. Only in specific cases iBGP is required.

Coming to packet tracer example, it's different than real world where connecting to ISP isn't the conclusion of routing. It's merely the starting, then comes applying policies, tuning the performance of link with QoS, prioritizing traffic, and more.

Unless you work in a small organization with sole objective of forwarding any type of traffic to ISP without advance routing, you may not want to rely on static routes and EIGRP.

-6

In the context of Enterprise (non carrier) networks, BGP is primarily used when you have more than one Internet link for your organization's offices to use. BGP is required to steer inbound traffic towards your organization in case of primary Internet link outage.

The other reason you see BGP in Enterprise networks is MPLS WAN's. However, most MPLS providers do offer IGP's also, and even if they refused an overlay such as DMVPN could be used on top of the MPLS to allow an IGP to make WAN routing decisions.

Carriers primarily use BGP to direct traffic as BGP is purpose built for this.

9
  • 2
    BGP is not a requirement for redundant upstream providers, and the emphasis on inbound is also unnecessary as you can use it to influence outbound path selection as well. Commented May 26, 2015 at 16:19
  • 3
    Please tell me why you need to run BGP if you have two transit links with the same provider, or even different providers (see floating static defaults). EDIT: Also please look up the localpref BGP attribute. Commented May 26, 2015 at 16:25
  • 3
    You're missing the point. You stated authoritatively that "BGP is used when you have more than one Internet link for your organization's offices to use". This simply isn't true 100% of the time. You don't need to use BGP when you have link or provider diversity for redundancy. Commented May 26, 2015 at 16:52
  • 1
    And furthermore, BOTH providers and customers use localpref ALL THE TIME to influence outbound path selection. This is nothing new. In the future I suggest taking a minute to determine if future answers that you are about to provide to questions are actually contributing anything to answer the OP's question. Commented May 26, 2015 at 16:54
  • 4
    FYI Ron, you're debating a guy who ran the bgp policies for major internet ixp. Regardless of your personal billing rate, consider the possibility that he has a clue. Also remember it was only a few days ago that you said you wanted to learn more about this routing stuff Commented May 26, 2015 at 21:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.