Home > BSCI, CCNP, LAB > BSCI – BGP Lab

BSCI – BGP Lab

I’ve used BGP for years. We have three data lines spanning two sites and one ISP, all using the same BGP network. The way we use it is main internet connection for the HQ in NY as the primary connection, than the backup for the same office as secondary connection and if both are down, BGP will route our inbound traffic to a Branch office in California. Though we hardly have to use it in production (and I thank the ISP gods for that) we do test it twice a year and make sure it really roll over. Usually it does.

BGP is an old but reliable protocol and most service providers use it. It is flexible and very tunable and most important, capable of handling the huge amounts of data (and endless routing tables) that modern internet require.

BSCI - BGP Lab

My first BGP lab will have basic configuration but will show both eBGP – E for external, and iBGP – I for internal.

This lab has five routers: R1 & R4 use both BGP and OSPF and maintain an iBGP connection, R2 & R3 use OSPF and share area 0 with R1 & R4.
R5 is an external router that maintain an eBGP connection with R4.

I’ll start with eBGP as it only involve two routers. Each router belong to a different AS and the commands show it:

R5(config)#router bgp 6500
R5(config-router)#neighbor 10.1.45.1 remote-as 5500

R4(config)#router bgp 5500
R4(config-router)#neighbor 10.1.45.2 remote-as 6500

You can see that the command is similar using the neighbor’s IP and AS.
When both ends are configured BGP neighbor relationship will be established and the following output will prompt on the console:

*Mar  1 00:05:00.515: %BGP-5-ADJCHANGE: neighbor 10.1.45.1 Up

This output show the ‘Active’ state before the neighbor changed to UP and after the connection was established

R5#show ip bgp summary
BGP router identifier 10.1.45.2, local AS number 6500
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.45.1       4  5500       0       0        0    0    0 never    Active

R5#show ip bgp summary
BGP router identifier 10.1.45.2, local AS number 6500
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.45.1       4  5500       2       2        0    0    0 00:00:09        0

When the connection status is Active it indicates that it is actively trying to establish the connection, do not mistake it with a working connection.

In this scenario iBGP is a bit more complicated. All four routers are in one OSPF area and they all share the same OSPF database. The way R1 and R4 are connected they have two ways to interact: via R2 or via R3.
When BGP receive packets from it will get it on one of the two interfaces but will have problems if this interface will be used as the neighbor interface, that is because a failed line will cause BGP packets to access the same router via different interface and the neighbors relationship won’t work.

Loopback interfaces on both BGP routers (R1 & R4) bypass this problem and set each BGP router with one IP address that does not change, no matter which path will be used. These are the commands used for this configuration:

R4(config)#router bgp 5500
R4(config-router)#neighbor 1.1.1.1 remote-as 5500

R1(config)#router bgp 5500
R1(config-router)#neighbor 4.4.4.4 remote-as 5500

At this point the neighbors will not connect and this is the error message that BGP show on the screen:

*Mar  1 00:02:41.851: BGP: 4.4.4.4 open active, local address 10.1.12.1
*Mar  1 00:02:42.211: BGP: 4.4.4.4 open failed: Connection refused by remote host,
open active delayed 30472ms (35000ms max, 28% jitter)

The reason that the connection refused by remote host is simple (and logical) – the Loopback interfaces are not the source of the packets and we need an extra command to adjust the source address:

neighbor 1.1.1.1 update-source Loopback 4

neighbor 4.4.4.4 update-source Loopback 1

Now the connection is up as we can see:

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

*Mar  1 00:02:28.551: %BGP-5-ADJCHANGE: neighbor 4.4.4.4 Up
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
4.4.4.4         4  5500       5       5        1    0    0 00:01:27        0

Full router configuration is available for R1, R2, R3, R4 and R5.

This is only the basic of BGP, just the beginning for this series that suppose to be the hardest. So far it is not that bad and I hope it will keep the logic concepts and ease of configuration (and I bet it won’t).

Find more labs here

About these ads
  1. derf
    June 24, 2011 at 3:26 pm | #1

    hi! i’m using jeremy’s video as well to study for the CCNP ROUTE exam…i got this thing going (the above diagram) but what I need to know is why I cannot ping a loopback interface I assigned on the ISP router which was advertised in BGP. R1 is receiving the network advertisement fine and installs it on its routing table with the next hop set to the loopback address of R4. when I send a ping it stops at either R2 or R3 with a status of unreachable. any help is appreciated. =)

  2. kami
    February 23, 2011 at 2:36 am | #2

    Lol… dont use jeremy ciora’s tutorial lab. but thanx any ways. :)

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 44 other followers

%d bloggers like this: