In today's lab I am going to set up a basic BGP topology with a few separate Autonomous Systems. To begin I set up a simple network with 3 routers that I will place in different Autonomous systems.

I will first configure the each router interface with an IP address and assign each a loopback address.
Once all interfaces are up, we can configure BGP on each router. For this we can use the router bgp AS# command. It is also a good practice to manually set the router ID for each router to avoid misconfigurations. We can do that with the bgp router-id addresscommand.

We then need to identify the neighbor routers we want to form BGP adjacencies with. This can be done with the neighbor neighbor-address remote-as as# command. Since the routers will have two neighbors, we will have to put in a command for each.

Once the BGP neighbor is enabled on the second switch, you can see the neighbor relationship come up in the CLI output. In BGP neighbors must be set manually and cannot be formed dynamically like other routing protocols.

On the final router I ran into a problem with the neighbor relationship not being formed between R1 and R3. Upon review of the output I noticed I had a typo when entering R3's ip address on R1. I put it as 10.3.1.3 rather than 10.3.1.2. I was able to easily make the change and the neighbor relationship formed as expected.

The neighbor relationships can be verified with show ip bgp neighbors

Looking at further verification I uncover a new issue; routes do not seem to be learned via BGP. The show ip bgp has no routes listed.

After some search I determined that the issues was because I was not advertising the network routes through BGP. This can be done with the network ip address mask subnet mask command. This must be done under each BGP instance on each router so they share their networks.

Once completed the bgp table now properly shows the advertised neighbor routes and the paths listed:

And the routing table now shows the BGP learned routes designated with a B:

The routes to the loopback interfaces have been learned on each router by BGP and they can now successfully ping each other. A basic BGP network is now complete, I will look to explore more advanced BGP features in a later lab.
Created with © systeme.io