Tidbit: Arista/NAPALM Config Replace

Quick one here — if you are dorking about with NAPALM and config replace (I’ve been using Ansible, but probably same story for just pure Python) and you are getting annoying errors on whatever is AFTER your BGP stanza, make sure you “exit” out of your BGP stanza like so:


router bgp 1234
   neighbor remote-as 1234
   neighbor update-source loopback0
  address-family ipv4
   neighbor activate
router ospf 1

Basically I was getting an annoying error saying something about an invalid token and “‘router ospf 1’ failed:”. Adding the “exit” statements out of each of the nested stanzas of BGP fixed this right away. Hopefully this saves somebody some time 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.