BGP Configuration for Cisco Routers

I want to show a basic BGP configuration for Internet access. In our case, we have two carriers (Sprint & Level3) and we act as an enterprise company, which needs reliable Internet access.
As a precondition we need an Autonomous System Number (ASN) and an IP address block assigned to us. We have to apply ARIN / RIPE / APNIC / LACNIC / AFRINIC for this purpose. We assume that we have 6767 as our AS number and 193.93.93.0/24 as our official IP block.

To show some different conditions, our connected Level3 router is also the BGP router, but the Sprint BGP router has been located 3 hops away.

! We are starting with the router command with our ASN like EIGRP/OSPF configuration
router bgp 6767
! We have one router in our case and we don’t need IGP / BGP synchronization it is the default in newest IOSes
no synchronization
! To have some idea about our peering history we are recording events
bgp log-neighbor-changes
! We are announcing our network
network 193.93.93.0
! Our first neighbor is Sprint, we have to define neighbor ASN
neighbor 122.22.33.1 remote-as 1239
! Descriptions are always helpful
neighbor 122.22.33.1 description Sprint
! Our bgp neighbor in Sprint 3 hops away
neighbor 122.22.33.1 ebgp-multihop 3
! Sprint will use our Loopback IP (193.93.94.1) for us as the neighbor
neighbor 122.22.33.1 update-source Loopback 0
! If we have enough memory, we can prevent BGP session resets on inbound updates
neighbor 122.22.33.1 soft-reconfiguration inbound
! We won’t announce any network other than ourselves
neighbor 122.22.33.1 filter-list 1 out
! Now the Level 3
neighbor 111.11.11.1 remote-as 3356
neighbor 111.11.11.1 description LevelThree
neighbor 111.11.11.1 soft-reconfiguration inbound
neighbor 111.11.11.1 filter-list 1 out
no auto-summary

!
! Sprint BGP bridgehead is not directly connected to our router
! We must add necessary routing
ip route 122.22.33.1 255.255.255.255 122.22.22.1
!
! This filter means we are not announcing Sprint networks to Level3 or vice versa.
ip as-path access-list 1 permit ^$
!

In the end, if you are not in the middle of the Internet, BGP configuration is not a big issue.

Leave a Reply

Your email address will not be published. Required fields are marked *