Basic BGP setup on Cisco

By | April 22, 2012

To begin with we need to set up the below network.

We need to configure the IP addressing for all routers. Now we have setup the network we need to configure the iBGP neighbour relationship between R1 and R2. iBGP (internal BGP) is a type of BGP that is used between routers in the same autonomous system. eBGP (external BGP) is used between routers in different autonomous systems. An autonomous system is a group or routers under a single administration

R1# configure terminal
R1(config)# router bgp 100
R1(config-router)# neighbor 192.168.1.2 remote-as 100
R2# configure terminal
R2(config)# router bgp 100
R2(config-router)# neighbor 192.168.1.1 remote-as 100

Now we have set up the iBGP neighbour relationship we have to setup the eBGP neighbour relationship.

R2# configure terminal
R2(config)# router bgp 100
R2(config-router)# neighbor 172.16.1.3 remote-as 200
R4# configure terminal
R4(config)# router bgp 200
R4(config-router)# neighbor 172.16.1.2 remote-as 100

Now we have set up the eBGP neighbour relationship we need to add some networks into BGP. This is done using the “network” command.

R1(config)# router bgp 100
R1(config-router)# network 192.168.1.0 mask 255.255.255.0
R4(config)# router bgp 200
R4(config-router)# netowrk 172.16.1.0 mask 255.255.255.0

Now we have added routes to BGP. Its now time to check our config. First we check the BGP table by using the “show ip bgp” command

Now we can check our neighbours by using “show ip bgp summary”

and finally we can do a ping to test the connectivity

now we has setup basic iBPG and eBGP.