Takeaway: The Border Gateway Protocol (BGP) is the routing protocol oI the Internet. However, routers usually only use BGP when there are multiple connections to the Internet. But iI you did have a BGP router conIiguration, would you know what to look Ior? Let`s look at a sample conIiguration and discuss what you need to know. II you |...| The Border Gateway Protocol (BGP) is the routing protocol oI the Internet. However, routers usually only use BGP when there are multiple connections to the Internet. But iI you did have a BGP router conIiguration, would you know what to look Ior? Let`s look at a sample conIiguration and discuss what you need to know. II you used the show running-configuration command or the show runn'beg bgp command. would you know what you were looking at in the output? Below is an example oI a BGP router conIiguration Irom an actual working router. (I`ve changed the passwords, IP addresses, and AS numbers Ior security purposes.) name-Router# show running-configuration | beg bgp router bgp 55555 no synchronization bgp log-neighbor-changes bgp dampening network 3.3.3.0 neighbor 1.1.1.1 remote-as 1234 neighbor 1.1.1.1 description Provider1 neighbor 1.1.1.1 password 7 09823490822093482F neighbor 1.1.1.1 update-source Loopback1 neighbor 1.1.1.1 version 4 neighbor 1.1.1.1 route-map Provider1 out neighbor 2.2.2.2 remote-as 5678 neighbor 2.2.2.2 description Provider2 neighbor 2.2.2.2 password 7 09823490822093482F neighbor 2.2.2.2 update-source Loopback2 neighbor 2.2.2.2 version 4 neighbor 2.2.2.2 weight 50 What can we tell Irom this output? We can tell that this router connects to two ISPs, and it`s probably perIorming dynamic, shortest AS path routing between the two. In addition, we can tell that passwords exist on each connection, and there are descriptions to help identiIy each connection. Now that you have an idea what we`re working with, here are the Iive most important things you need to know about BGP conIiguration.
What is the AS number? A very important number in this conIiguration is the autonomous system (AS) number. In this example, it`s 55555, in the line route bgp 55555. This number uniquely identiIies the routing domain under your control that connects to the Internet. BGP is a 'path vector routing protocol. In its most basic sense, BGP`s iob is to choose the shortest path through the Internet cloud oI autonomous systems. You can obtain the BGP AS number Irom the American Registry Ior Internet Numbers (ARIN). The AS number uniquely identiIies you in the BGP cloud oI the Internet. What is the minimum needed to configure a BGP neighbor? The minimum BGP conIiguration that a router needs to communicate with a BGP peer (i.e., a neighbor) is a neighbor statement and a route to that neighbor. The conIiguration could be as small as this: router bgp 55555 neighbor 1.1.1.1 remote-as 1234 However, more realistically, you`re also advertising a network. For example: network 3.3.3.0 With this command, you`re telling BGP neighbors which IP network you`re advertising to them. That way, when you send traIIic out, they know how to get the response back to you. In addition, you should conIigure a password to perIorm secure MD5 encryption on BGP transactions. Which BGP show commands should I use? Here are the two most important BGP show commands: O $how ip bgp summarv: This command displays the status oI your BGP peering relationships. O $how ip bgp: This command displays all routes received Irom your BGP peers. You`ll use these commands over and over again when using BGP. In Iact, I`ve used them so much that I created command shortcuts. Here`s an example: alias exec sib show ip bgp alias exec sibs show ip bgp summary Now, I can iust type sibor sibs to get this important BGP command output. Which metrics does BGP use? When using BGP, you need to know how BGP makes its decisions. I mentioned that BGP chooses the shortest AS path through the Internet. While this is true, it also uses a number oI other important metrics to make decisions. To Iind out, read Cisco`s BGP Best Path Selection Algorithm documentation. For example, the metric oI 'shortest AS path is actually Iourth in the list oI metrics used. BGP only uses it iI there`s a 'tie when comparing the weight, local preIerence, and locally originated vs. aggregate addresses. What`s with the no synchronization command? One oI the more conIusing BGP commands is the no svnchronization command. By deIault, BGP only advertises routes (i.e., networks) to neighbors iI it already has an internal route with that route in the routing table. Many times, this is one oI the Iirst things that admins do when conIiguring BGP simply because they don`t have a dynamic internal routing protocol running on their Internet router. But there`s a purpose Ior this command to only advertise networks that the router can communicate with. However, you can still disable it. Here`s an example: Router bgp 55555 no synchronization