BGP Intro Lab

In this lab we will go over basic BGP configurations such as neighborships and network advertisements. At the end we will test with some basic show and utility commands.


Configuration

A basic BGP setup requires us to manually configure neighborships and networks we want to advertise.

We will do R1 first. The loopback interfaces are setup already but we will need to setup the interfaces for the network between routers. If you make your own topology the loopbacks will need to be configured separately from the following configs.

R1:

Bring up and configure the network for int G0/0.

(conf)#int G0/0

(conf-if)#ip address 10.10.10.1 255.255.255.252

(conf-if)#no shut

Configure BGP with the AS number and give a router ID. If you do not assign a router ID in this instance it will choose the loopback interface we have setup already.

(conf)#router bgp "6501"

(conf-router)#bgp router-id "1.1.1.1"

We will now advertise the networks we are connected to. This includes our transit network and the networks we actually want to traverse to and from.

(conf-router)#network 10.10.10.0" mask "255.255.255.252"

(conf-router)#network "10.10.63.0" mask "255.255.255.0"

Lastly we will form a neighborship with R2. If R2 is not setup it won't form but will once BGP is configured on that as well.

(conf-router)#neighbor "10.10.10.2" remote-as "6500"

(conf-router)#neighbor "10.10.10.2" activate


We will now Configure R2, it will be the same commands as above but they will be listed below:

(conf)#int G0/0

(conf-if)#ip address 10.10.10.2 255.255.255.252

(conf-if)#no shut

BGP setup

(conf)#router bgp "6500"

(conf-router)#bgp router-id "2.2.2.2"

Network advertisement:

(conf-router)#network "10.10.10.0" mask "255.255.255.252"

(conf-router)#network "10.10.64.0" mask "255.255.255.0"

Neighborship:

(conf-router)#neighbor "10.10.10.1" remote-as "6501"

(conf-router)#neighbor "10.10.10.1" activate

Testing

Using some basic commands we can test our configuration and troubleshoot if we have issues.

#show ip route


Showing the routing table will give us an idea on if the routes are being propagated correctly. This was done on R1 and we can see the local/connected routes of 10.10.10.x/30 and 10.10.63.x/24 as well as the route from R2 that is being shared via BGP (B in the routing table); 10.10.64.x/24.

#show ip bgp summary


With more entries it may look like this(Advanced lab):





#show bgp neighbor

I won't show the entire output of this command as it is lengthy, but it will give information such as when it was established, neighbor remote IDs/AS numbers, keep alive stats, and address families. Among other things.








Popular posts from this blog