[j-nsp] Configuring 200+ BGP sessions via script

James Bensley jwbensley at gmail.com
Wed Sep 12 12:57:09 EDT 2018


On Wed, 12 Sep 2018 at 13:17, Matthew Crocker <matthew at corp.crocker.com> wrote:
>
>
> Hello,
>
> I’m turning up some peering in New York in the coming weeks (NYIIX, DE-CIX) and will need to configure several hundred BGP sessions.   Is there an easy (open source) way of managing the BGP sessions & generating automatic configurations?  Would be great if you could pull down from peeringdb and crank out BGP group configs.
>
> Thanks

Other better options have been provided however, they are peering
specific. You could use this as an opportunity to step towards
automating other bits of config changes (if you haven't already).

I went through the same issue a couple of years ago. I wrote an ugly
Python script that would query peering DB for all peers on a specific
LAN that didn't have a restrictive peering policy and build the config
using OpenConfig YANG models, serialise it as JSON, and send it over
gRPC to ASR9000 devices:
https://null.53bits.co.uk/index.php?page=example-2-public-peering-using-openconfig

You could write a better script than mine but then use your new script
as a stepping stone to automate other stuff using YANG models.

Cheers,
James.


More information about the juniper-nsp mailing list