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 184.108.40.206/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
! To have some idea about our peering history we are recording events
! We are announcing our network
! Our first neighbor is Sprint, we have to define neighbor ASN
neighbor 220.127.116.11 remote-as 1239
! Descriptions are always helpful
neighbor 18.104.22.168 description Sprint
! Our bgp neighbor in Sprint 3 hops away
neighbor 22.214.171.124 ebgp-multihop 3
! Sprint will use our Loopback IP (126.96.36.199) for us as the neighbor
neighbor 188.8.131.52 update-source Loopback 0
! If we have enough memory, we can prevent BGP session resets on inbound updates
neighbor 184.108.40.206 soft-reconfiguration inbound
! We won’t announce any network other than ourselves
neighbor 220.127.116.11 filter-list 1 out
! Now the Level 3
neighbor 18.104.22.168 remote-as 3356
neighbor 22.214.171.124 description LevelThree
neighbor 126.96.36.199 soft-reconfiguration inbound
neighbor 188.8.131.52 filter-list 1 out
! Sprint BGP bridgehead is not directly connected to our router
! We must add necessary routing
ip route 184.108.40.206 255.255.255.255 220.127.116.11
! 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.