How to configure EBGP (External BGP)

In this lesson I will show you how to configure EBGP (External BGP) and how to advertise networks. I will be using the following topology:

bgp as1 as2

Let’s start with a simple topology. Just two routers and two autonomous systems. Each router has a network on a loopback interface which we are going to advertise in BGP.

R1(config)#router bgp 1
R1(config-router)#neighbor 192.168.12.2 remote-as 2
R2(config)#router bgp 2
R2(config-router)#neighbor 192.168.12.1 remote-as 1

Use the router bgp command with the AS number to start BGP. Neighbors are not configured automatically this is something you’ll have to do yourself with the neighbor x.x.x.x remote-as command. This is how we configure external BGP.

R1# %BGP-5-ADJCHANGE: neighbor 192.168.12.2 Up
R2# %BGP-5-ADJCHANGE: neighbor 192.168.12.1 Up

If everything goes ok you should see a message that we have a new BGP neighbor adjacency.

R1(config)#router bgp 1
R1(config-router)#neighbor 192.168.12.2 password MYPASS
R2(config)#router bgp 2
R2(config-router)#neighbor 192.168.12.1 password MYPASS

If you like you can enable MD5 authentication by using the neighbor password command. Your router will calculate a MD5 digest of every TCP segment that is being sent.

R1#show ip bgp summary 
BGP router identifier 1.1.1.1, local AS number 1
BGP table version is 1, main routing table version 1

Neighbor     V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.12.2 4     2      10      10        1    0    0 00:07:12        0
R2#show ip bgp summary 
BGP router identifier 2.2.2.2, local AS number 2
BGP table version is 1, main routing table version 1

Neighbor     V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.12.1 4     1      11      11        1    0    0 00:08:33        0

Show ip bgp summary is an excellent command to check if you have BGP neighbors. You also see how many prefixes you received from each neighbor.

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 655 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

546 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Tags:


Forum Replies

  1. Hi Romeo,

    There are many things to learn about BGP. If you are completely new to it then you might like some of my blog posts that I wrote a long time ago:


    ... Continue reading in our forum

  2. Hi Rene,
    1st of all thank you for all of your precious writings.

    I started reading your BGP blog. But im struggling to find an easy way to start with BGP. Because topics are scattered all over the place. Can’t figure out which topics I should read first. Can you please help and show me the correct order that i should follow to become a BGP guru.

    Thank you

  3. Hello Rene,
    I seem to be having a problem with some of your labs, specifically where you have to configure a loopback. I keep getting a bad mask /24 when I try to configure loopbacks on my routers. I cannot get this lab to work. My router will not accept 1.1.1.0 /24. I tried the ip subnet-zero command but it doesn’t work either. Any suggestions/ideas?

  4. Hi @williebrown2463,

    If you get this message, it means you are entering a network address instead of an IP address.

    1.1.1.0/24 is a network address…

    * 1.1.1.0 = network address
    * 1.1.1.1 up to 254 are host addresses
    * 1.1.1.255 = broadcast address

    For R1, try using 1.1.1.1/24 :slight_smile:

    Rene

35 more replies! Ask a question or join the discussion by visiting our Community Forum