Thursday, June 2, 2016

EBGP peering - Simple Topology

EBGP peering Lab

The Topology above shows a simple EBGP peers, part of my study journey towards CCIE Routing and Switching certificate.
no matter how big your topology is, EBGP peering basically work the same way

Router #1 contains the configs below:
where the loopback interfaces are used as update source, this type of configs will require IGP route to each loopback interface in order for the routers to be able to
* Adding  the Command #ebgp multihop in order to increase the TTL to be more than 1 and also to cancel the connected check option between two BGP neighbors that requires two routers to be in the same subnet [ connected ] in order to be peers.
=======================================================================
Router #1 Configs :

interface Loopback0
 ip address 100.100.100.100 255.255.255.0
!
interface Loopback100
 ip address 50.50.50.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 10.0.0.1 255.255.255.0
 speed 100
 full-duplex
!
interface FastEthernet0/1
 ip address 13.13.13.1 255.255.255.0
 duplex auto
 speed auto
!
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 50.50.50.0 mask 255.255.255.0
 neighbor 3.3.3.3 remote-as 90
 neighbor 3.3.3.3 ebgp-multihop 2
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 5.5.5.5 remote-as 200
 neighbor 5.5.5.5 ebgp-multihop 2
 neighbor 5.5.5.5 update-source Loopback0
 no auto-summary
!

ip route 3.3.3.0 255.255.255.0 13.13.13.3
ip route 5.5.5.0 255.255.255.0 10.0.0.2


=====================================================================

Router #2 Configs
!
interface Loopback0
 ip address 5.5.5.5 255.255.255.0
!
interface Loopback20
 ip address 20.20.20.20 255.255.255.0
!
interface FastEthernet0/0
 ip address 10.0.0.2 255.255.255.0
 speed 100
 full-duplex
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 network 20.20.20.0 mask 255.255.255.0
 neighbor 100.100.100.100 remote-as 100
 neighbor 100.100.100.100 ebgp-multihop 2
 neighbor 100.100.100.100 update-source Loopback0
 no auto-summary
!

ip route 100.100.100.0 255.255.255.0 10.0.0.1
!

====================================================================


Router #3 Configs

interface Loopback0
 ip address 3.3.3.3 255.255.255.0
interface Loopback90
 ip address 9.9.9.9 255.255.255.0
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
interface FastEthernet0/1
 ip address 13.13.13.3 255.255.255.0
 duplex auto
 speed auto
!
router bgp 90
 no synchronization
 bgp log-neighbor-changes
 network 9.9.9.0 mask 255.255.255.0
 neighbor 100.100.100.100 remote-as 100
 neighbor 100.100.100.100 ebgp-multihop 2
 neighbor 100.100.100.100 update-source Loopback0
 no auto-summary
!

ip route 100.100.100.0 255.255.255.0 13.13.13.1


Now let's verify the configurations :



R1#show ip bgp
BGP table version is 4, local router ID is 100.100.100.100
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
*> 9.9.9.0/24       3.3.3.3                  0             0 90 i
*> 20.20.20.0/24    5.5.5.5                  0             0 200 i
*> 50.50.50.0/24    0.0.0.0                  0         32768 i

===========================================================

R1#show ip bgp summary
BGP router identifier 100.100.100.100, local AS number 100
BGP table version is 4, main routing table version 4
3 network entries using 360 bytes of memory
3 path entries using 156 bytes of memory
4/3 BGP path/bestpath attribute entries using 496 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
Bitfield cache entries: current 1 (at peak 1) using 32 bytes of memory
BGP using 1092 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
3.3.3.3              4    90       8      10        4    0    0                           00:04:04           1
5.5.5.5            4    200       8      10        4    0    0                           00:04:07           1

Hope this was useful!

Samer R. Saleem


No comments:

Post a Comment

Python-Jinja template configuration generator for Cisco devices and printout configs to external text files

 In this post, I worked on collecting a code that works with Jinja template. the nice thing in working with Jinja is that you can have basel...