BGP Configuration for Cisco Routers

I want to present a basic BGP configuration for Internet access. In our case, we have two carriers (Sprint & Level3) and we pretend to be 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 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
! Our first neighbor is Sprint, we have to define neighbor ASN
neighbor remote-as 1239
! Descriptions are always helpful
neighbor description Sprint
! Our bgp neighbor in Sprint 3 hops away
neighbor ebgp-multihop 3
! Sprint will use our Loopback IP ( for us as the neighbor
neighbor update-source Loopback 0
! If we have enough memory, we can prevent BGP session resets on inbound updates
neighbor soft-reconfiguration inbound
! We won’t announce any network other than ourselves
neighbor filter-list 1 out
! Now the Level 3
neighbor remote-as 3356
neighbor description LevelThree
neighbor soft-reconfiguration inbound
neighbor filter-list 1 out
no auto-summary

! Sprint BGP bridgehead is not directly connected to our router
! We must add necessary routing
ip route
! 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 *