Posted on Saturday, 16th April 2005 by sean

BGP, the Border Gateway Protocol, is an exterior routing protocol. This means that it is used between two entities, rather than OSPF and EIGRP, which are used within an entity. In routing language, an entity is an Autonomous System, or an AS.

The BCSI exam has several items relating to BGP.

  1. Describe the features and operation of BGP
  2. Explain how BGP policy-based routing functions within an autonomous system
  3. Explain the use of redistribution between BGP and Interior Gateway Protocols (IGPs)
  4. Given a set of network requirements, identify the steps to configure a BGP environment and verify proper operation (within described guidelines) of your routers
  5. Describe the scalability problems associated with internal BGP

In this article I’ll work on #1, and maybe touch on #2. #3 will require several articles, and #4 will require a few more as we talk about route reflectors and confederations.

The lab I’m using at the moment is:

Interior protocols like OSPF, RIP, and EIGRP are great for a company, but they don’t scale to the size of the Internet. Furthermore, their path selection is based purely on finding the quickest path to a destination, where in the Internet, other factors come into play (ignoring the incredible difficulty of finding the “fastest” path). For example, you may have two connections to different ISPs, the first is a flat rate, the second is a lower capacity, pay per megabyte service. In this case, you’ll likely want to use the latter only if the former goes down.

BGP lets you get away from having to know the details of the intermediate ASes. If the path from you to your customer is via Sprint, you really don’t care how Sprint handles the packet, as long as they send it closer to your destination. As such, BGP hides the internal workings of an AS.

To further classify BGP, it is an advanced distance vector protocol like EIGRP in that it starts off like regular distance vector protocols, but brings in features from link state protocols. It chooses routes based on the attributes of the routes, including the path to the destination. In fact, there are 13 different ways a route can be chosen:
BGP Best Path Selection Algorithm

(more on this in another article)

One of the things that is important to understand is when to use BGP vs using other means. If you only have one connection to one ISP, then a static route is a much better way. Similarily, if you have two connections to the same ISP and only want a failover link, static routes or a simple routing protocol is probably better. BGP is useful when

  • You have multiple connections to different ISPs, either as a transit (passing traffic between ISPs) or as a non transit (basic multihomed site, all traffic either originates or terminates in your AS)
  • You need control over how traffic enters or leaves your AS

In addition, you’ll need a bigger router, and the smarts to run BGP. Sadly, some ISPs don’t filter their customer’s routes, so it’s possible that a misconfiguration on your router could have you routing someone else’s traffic or worse!

While studying BGP, it helps to be able to run some of the commands. If you don’t have a lab, or a BGP setup to play with yourself, you can do a lot of the show commands on a route server, such as route-server.ip.att.net (just telnet to it).

Checking it now, I see there are about 157,000 routes on the Internet. The CIDR report is a great source of statisticcs on the historical growth of the global tables. For example, here’s a look at the number of Internet routes since mid 1998 to the present:

Some quick facts about BGP, before I go:

If two peers are in the same AS, they run internal BGP (iBGP). If they are in a different AS, they are speaking external BGP (eBGP). There are different rules for each of them.
BGP runs on TCP port 179, meaning you have to be able to reach your neighbour before you can play. This usually isn’t a problem, since peers are usually directly connected in eBGP.
Since TCP is used the BGP connection is reliable. At the beginning, a full table is exchanged, and then only updates. There are also keepalives that go over the channel. If the channel goes down, the peers are considered to be down.

Next up, a closer look at ASes and the attributes making up BGP advertisements.

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

Posted in Routing | Comments (1)

One Response to “BGP Intro”

  1. szmarcek Says:

    Nice Notes! Going through all of your posts.

Leave a Reply