Académique Documents
Professionnel Documents
Culture Documents
com
Search...
Table of Contents
BGP
eBGP Multi-Hop
BGP Auto-summary
In this lesson I will show you how to conᱤgure EBGP (External BGP) and how to advertise networks.
I will be using the following topology:
Let’s start with a simple topology. Just two routers and two autonomous systems. Each router has
a network on a loopback interface which we are going to advertise in BGP.
Emma(config)#router bgp 1
Emma(config‐router)#neighbor 192.168.12.2 remote‐as 2
Marie(config)#router bgp 2
Marie(config‐router)#neighbor 192.168.12.1 remote‐as 1
Use the router bgp command with the AS number to start BGP. Neighbors are not conᱤgured
automatically this is something you’ll have to do yourself with the neighbor x.x.x.x remote-as
command. This is how we conᱤgure external BGP.
Emma# %BGP‐5‐ADJCHANGE: neighbor 192.168.12.2 Up
Marie# %BGP‐5‐ADJCHANGE: neighbor 192.168.12.1 Up
If everything goes ok you should see a message that we have a new BGP neighbor adjacency.
https://networklessons.com/bgp/howtoconfigureebgpexternalbgp/ 2/14
8/8/2016 How to configure EBGP (External BGP) | NetworkLessons.com
Emma(config)#router bgp 1
Emma(config‐router)#neighbor 192.168.12.2 password MYPASS
Marie(config)#router bgp 2
Marie(config‐router)#neighbor 192.168.12.1 password MYPASS
If you like you can enable MD5 authentication by using the neighbor password command. Your
router will calculate a MD5 digest of every TCP segment that is being sent.
Emma#show ip bgp summary
BGP router identifier 1.1.1.1, local AS number 1
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
192.168.12.2 4 2 10 10 1 0 0 00:07:12 0
Marie#show ip bgp summary
BGP router identifier 2.2.2.2, local AS number 2
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
192.168.12.1 4 1 11 11 1 0 0 00:08:33 0
Show ip bgp summary is an excellent command to check if you have BGP neighbors. You also see
how many preᱤxes you received from each neighbor.
Emma(config)#router bgp 1
Emma(config‐router)#network 1.1.1.0 mask 255.255.255.0
Marie(config)#router bgp 2
Marie(config‐router)#network 2.2.2.0 mask 255.255.255.0
https://networklessons.com/bgp/howtoconfigureebgpexternalbgp/ 3/14
8/8/2016 How to configure EBGP (External BGP) | NetworkLessons.com
Let’s advertise the loopback interface by using the network command. If you want to advertise
something with BGP you need to make sure you type the exact subnet mask for the network you
want to advertise. If I would type network 1.0.0.0 mask 255.0.0.0 on router Emma it will not work
since this entry is not in the routing table.
Emma#show ip bgp
BGP table version is 3, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i ‐ internal,
r RIB‐failure, S Stale
Origin codes: i ‐ IGP, e ‐ EGP, ? ‐ incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.0/24 0.0.0.0 0 32768 i
*> 2.2.2.0/24 192.168.12.2 0 0 2 i
Use show ip bgp to look at the BGP database. You can see that router Emma has learned about
network 2.2.2.0 /24 and the next hop IP address is 192.168.12.2. It also shows the path
information. You can see that network 2.2.2.0 /24 is from AS 2.
Marie#show ip bgp
BGP table version is 3, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i ‐ internal,
r RIB‐failure, S Stale
Origin codes: i ‐ IGP, e ‐ EGP, ? ‐ incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.0/24 192.168.12.1 0 0 1 i
*> 2.2.2.0/24 0.0.0.0 0 32768 i
Router Marie learned about network 1.1.1.0/24 with a next hop IP address of 192.168.12.1.
Emma#show ip route bgp
2.0.0.0/24 is subnetted, 1 subnets
B 2.2.2.0 [20/0] via 192.168.12.2, 00:16:13
https://networklessons.com/bgp/howtoconfigureebgpexternalbgp/ 4/14
8/8/2016 How to configure EBGP (External BGP) | NetworkLessons.com
Marie#show ip route bgp
1.0.0.0/24 is subnetted, 1 subnets
B 1.1.1.0 [20/0] via 192.168.12.1, 00:16:59
In the routing table we can ᱤnd an entry for BGP with an administrative distance of 20 for external
BGP.
Configurations
Want to take a look for yourself? Here you will ᱤnd the conᱤguration of each device.
Emma
hostname Emma
!
interface Loopback 0
ip address 1.1.1.1 255.255.255.0
!
interface fastEthernet0/0
ip address 192.168.12.1 255.255.255.0
!
router bgp 1
neighbor 192.168.12.2 remote‐as 2
neighbor 192.168.12.2 password MYPASS
network 1.1.1.0 mask 255.255.255.0
!
end
Marie
hostname Marie
!
interface Loopback 0
ip address 2.2.2.2 255.255.255.0
!
interface fastEthernet0/0
https://networklessons.com/bgp/howtoconfigureebgpexternalbgp/ 5/14
8/8/2016 How to configure EBGP (External BGP) | NetworkLessons.com
ip address 192.168.12.2 255.255.255.0
!
router bgp 2
neighbor 192.168.12.1 remote‐as 1
neighbor 192.168.12.1 password MYPASS
network 2.2.2.0 mask 255.255.255.0
!
end
That's all for now! I will add more BGP lessons later. If you have any questions feel free to ask.
« Previous Lesson
Introduction to BGP
Next Lesson
eBGP Multi-Hop »
Home › Forums › How to conᱤgure EBGP (External BGP)
This topic contains 19 replies, has 9 voices, and was last updated by Andrew P 2 months ago.
https://networklessons.com/bgp/howtoconfigureebgpexternalbgp/ 6/14