0% found this document useful (0 votes)
7 views

Lab 2.6 - Configure EBGP

This document outlines the configuration of eBGP between two routers with different Autonomous System numbers. It details the steps for configuring interfaces, establishing BGP neighbor relationships, and advertising routes. The document also explains how to verify the BGP setup and the significance of various output parameters such as prefix counts and path attributes.

Uploaded by

Htet Aung Shine
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Lab 2.6 - Configure EBGP

This document outlines the configuration of eBGP between two routers with different Autonomous System numbers. It details the steps for configuring interfaces, establishing BGP neighbor relationships, and advertising routes. The document also explains how to verify the BGP setup and the significance of various output parameters such as prefix counts and path attributes.

Uploaded by

Htet Aung Shine
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Lab 2.

6: Configure eBGP
In this lab we will learn a simple eBGP (two BGP routers with different Autonomous System
numbers) configuration between two routers with the topology below:

First we need to configure some interfaces on two routers as follows:


So we have just configured interface gigabitethernet0/0/0 and loopback0 on both routers.
R1(config)#interface gigabitethernet0/0/0 R2(config)#interface gigabitethernet0/0/0
R1(config-if)#ip address 11.0.0.1 255.255.255.0 R2(config-if)#ip address 11.0.0.2 255.255.255.0
R1(config-if)#no shutdown R2(config-if)#no shutdown
R1(config-if)#interface loopback 0 R2(config-if)#interface loopback 0
R1(config-if)#ip address 1.1.1.1 255.255.255.0 R2(config-if)#ip address 2.2.2.2 255.255.255.0

Next we will configure the BGP configuration part on R1:


R1(config)#router bgp 1
R1(config-router)#neighbor 11.0.0.2 remote-as 2

The configuration is very simple with only two lines on R1.


In the first line, BGP configuration begins with a familiar type of command: the router
bgp command, where AS number is the BGP AS number used by that router.
The next command defines the IP address of the neighbor. Unlike OSPF or EIGRP, BGP cannot
discover its neighbors automatically so we have to explicitly declare them. We also have to know
and declare the neighbor’s BGP AS number as well. In this case R1 wants to establish BGP
neighbor relationship with R2 (in BGP AS 2) so it choose an interface on R2
(Gigabitethernet0/0: 11.0.0.2) and specify R2 is in BGP AS 2 via the command
“neighbor 11.0.0.2 remote-as 2“. At the other end R2 will do the same thing for R1 to set up
BGP neighbor relationship.

Page 1 of 4
R2(config)#router bgp 2
R2(config-router)#neighbor 11.0.0.1 remote-as 1

So after forming BGP neighbor relationship we can verify by using the “show ip bgp summary”
command on both routers:

Please pay attention to the “State/PfxRcd” column of the output. It indicates the number of
prefixes that have been received from a neighbor. If this value is a number (including “0”,
which means BGP neighbor does not advertise any route) then the BGP neighbor relationship
is good. If this value is a word (including “Idle”, “Connect”, “Active”, “OpenSent”,
“OpenConfirm”) then the BGP neighbor relationship is not good.
In the outputs above we see the BGP neighbor relationship between R1 & R2 is good with zero
Prefix Received (PfxRcd) because they have not advertised any routes yet.
How about the BGP routing table? We can check with the “show ip bgp” command but currently
this table is empty! This is because although they formed BGP neighbor relationship but they
have not exchanged any routes.
Let’s try advertising the loopback 0 interface on R1 to R2:
R1(config-router)#network 1.1.1.0 mask 255.255.255.0
advertise the routes in the “network” command.
Note: With BGP, you must advertise the correct network and subnet mask in the
“network” command ( in this case network 1.1.1.0/24). BGP is very strict in the routing

Page 2 of 4
advertisements. In other words, BGP only advertises the network which exists exactly in the
routing table (in this case network 1.1.1.0/24 exists in the routing table as the loopback 0
interface). If you put the command “network 1.1.0.0 mask 255.255.0.0” or “network 1.0.0.0
mask 255.0.0.0” or “network 1.1.1.1 mask 255.255.255.255” then BGP will not advertise
anything.
Now the BGP routing tables on these two routers contain this route:

An asterisk (*) in the first column means that the route has a valid next hop. A greater-than sign
(>) indicates the route has been selected as the best path to that network.
 The “Metric” column here is not the usual metric like in OSPF or EIGRP. It is the Multi
Exit Discriminator (MED) attribute of BGP. “Weight” is another BGP attribute. The
default values of both MED and Weight are 0 (as you see at the outputs above).
 The “Path” column shows the AS paths that prefix were sent to reach us. It would better to
read the “Path” from right to left to understand which path this prefix travel to reach our
router.
 Letter “i” is considered the starting point of the prefix and the next number is the originating
AS where this prefix originated. Next numbers are the recorded paths it traveled. For
example if a prefix had to travel from AS 1 -> 2 -> 3 -> 4 -> 5 (our AS) then we will see
the path “4 3 2 1 i” on our router.
Note: A blank AS path (only letter “i” is shown) means that the route was originated in the local
AS.

Page 3 of 4
 In the R1 output above, network 1.1.1.0/24 is originated from R1 so we see the path only
has one letter “i”.
 One notice is on R1 the “Next Hop” is 0.0.0.0 which means this prefix is originated from
the local router.
 On R2 the Next Hop is pointing toward the interface Gigabitethernet0/0/0 of R1 (11.0.0.1)
to which R2 will send traffic for the destination 1.1.1.0/24.

Page 4 of 4

You might also like