3

I was trying to configure BGP peers on sample topologies, Now considering that BGP is the protocol that routes the internet it must not be possible to establish thousands of EBGP peers by such manual configuration using CLI commands. So I was wondering is there a way to automate this process and how to do it?

On a related topic, BGP I read that BGP exchanges RIB information and updates once the peer group is established. Can someone point out what exactly are the contents of that RIB and how is policy implemented through them.?

  • I think you misunderstood what BGP peering is. A router peer only with the neighbors routers (the routers it is directly connected to). So most routers have a few peers (as few as only one). So yes automated configuration is possible (and desirable) but not required. – JFL Mar 8 '17 at 8:49
  • Most ISPs are quite particular about the companies with which they will peer. Considering that circuits between companies must be set up manually, It is not much more effort to add the BGP peering to the script to configure a new circuit to another company. – Ron Maupin Mar 8 '17 at 13:26
  • No need for setting up circuits on internet exchange points (IXPs). – Teun Vink Mar 8 '17 at 13:57
  • @JFL Thanks JFL, there are over 60,000 public AS assigned and almost all ISP's provide global connectivity. So I was under the assumption that each AS may have several peers. I didnt know the peering is so restrictive. If an AS maintains just 1 or 2 peers, doesnt it introduce a single point of failure in case the peer group is down. Then there is no way for the AS to update its routes. – john Mar 9 '17 at 23:43
3

Many vendors provide some infrastructure for automation, for example using SNMP-set, Netconf, Ansible or Puppet. This allows you to build scripts which can pull peer configuration from a database and provision BGP sessions accordingly. Which solution works best is differs per vendor.

One very cool example of this is the way Coloclue (a Dutch not for profit ISP) manages its peering sessions: they allow you to do pull requests on their github repository which contains their peering records, and once the pull request is accepted the configuration is pushed to their routers, using peer information from PeeringDB.

3

You are looking for BGP Dynamic Peering which, in the Cisco world, allows an entire subnet range to be specified as a peer and a given interface to be set to simply listen for new connections. It's actually an older feature and the wisdom in its use both was- and is- arguably limited.

Consider that there were (and are) good reasons for BGP relationships to be explicitly defined: security, management of scalability, consistency of policy application, stability of infrastructure, etc. There seems to be a push periodically to make BGP act like an IGP. I would suggest this is slightly better than trying to make OSPF handle inter-domain routing but still the wrong tool for the job.

The right answer for maintaining lots of BGP peering info is the use of a tool like Ansible or Puppet (or most any similar scripting tool that can front-end a policy repository) but if you insist on a mechanism to dynamically form peers then the above works, as does the use of dynamically generated v6 link local addresses to establish NLRI (...see RFC 5549).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.