This repository is deprecated; please follow the main search page or use the ‘Related code repos’ widget on the right side of the current page.

title: "Deploying iBGP over OSPF via NETCONF"
date: "29th Oct 2020"
tags: ["nornir", "scrapli", "netconf"]

Dependencies

python3 -m pip install scrapli-netconf
python3 -m pip install nornir
python3 -m pip install nornir-scrapli
python3 -m pip install nornir-utils
python3 -m pip install nornir-jinja2

Tutorial Workflow & Overview

Build the topology using three CSR1000v routers and one out-of-band switch. Copy the start-up configurations into each device. Then simply deploy the script by typing python3 run1.py

You should now have an iBGP over OSPF network, with CSR2 acting as a Route Reflector, and CSR3 advertising 2 prefixes into BGP!

Connectivity

The MGMT IP address range I use in my lab is 192.168.31.0/24. This is the IP address range used on the GigabitEthernet1 interface of each router, and the IP range used in my Nornir hosts.yaml inventory file. Change these addresses to suit your own lab requirements.

Device Version (Running vs Candidate)

This lab was tested using the following CSR1000v image taken from my Personal CML-P account:

Cisco IOS XE Software, Version 16.11.01b

Cisco IOS Software [Gibraltar], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.11.1b, RELEASE SOFTWARE (fc2)

Be aware that newer versions of the CSR1000v support the option for a Candidate configuration. When “candidate” data store is enabled, the Running data store isn't writable through NETCONF sessions. Instead all configurations get committed only through Candidate. In this case, users should modify the target data store in the run1.py script from target="running" to target="candidate" - and then commit the configuration to transfer it into the live running configuration.

TOPOLOGY

alt text

About Me

My name's John McGovern, I maintain a Youtube channel called IPvZero and I am trainer for CBT Nuggets.
I create instructional videos on Python Network Automation.

Contact

Twitter

Youtube

LinkedIn

CBT Nuggets

Advanced Network Automation with Cisco and Python

View code on GitHub
  • Owner

  • Contributors

    +1Github contributor
  • Categories

  • Programming Languages

    HTML
  • License

    BSD 3-Clause "New" or "Revised" License

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.