Skip to content
Mohamad Mobader edited this page Mar 5, 2018 · 5 revisions

Welcome to the cisco-Nexus-automate-vxlan-evpn wiki!

Introduction

This project is still in very early phases, a lot of the parameters are hard-coded in the different functions/classes in order to simplify the configuration. The purpose this project was built for is to generate the configuration for a very large deployment with minimal time and errors.

Objective

The purpose of this program is to automate the configuration of VxLAN and eVPN features on Cisco Nexus switch family. The core package of the program should be isolated from the input scripts. Currently the deployment is done by reading from an excel file which contains the parameters and generating the configuration in a text file. The objective is to have several input (for variables creation) and output modules (for applying the configs or representing them in files) that can be plugged into the program.

Description of the files

VxLAN Header

This package contains the definition of vlan, bgp, and vrf classes. Each is defined by a set of parameters and functions that allows us to append the feature to a specific device. The devices are defined in global_header.py file.

BGP configuration

BGP can be initialized with the basic parameters such as ASN, Router-ID, etc. BGP has the add_vrf function which initializes a VRF from the VRF class and adds it to the BGP parameter vrf_list. This will include the VRF under the BGP process and adds automatically the address-family ipv4 unicast and address-family ipv6 unicast under the process

VLAN configuration

VLAN class has a list of parameters that defines the VLAN in global configuration mode. VLAN class contains as well function that converts the VLAN into a VxLAN overlay. Currently the VxLAN tag is hard coded as 1110 and appended to the VLAN number. to_l3vni function converts the vlan into a l3vni which is used to bridge the different l2vni and allow inter-vlan routing.

Underlay Header

The Underlay header contains all the protocols used to bring up the underlay of the fabric. Below is a list of the classes defined in this package.

OSPF class

OSPF has a the following parameters defined:

  • RID (string): Router-id which is used by the OSPF protocol for neighbor negotiations
  • PID (string): Process-id which is the device specific ID used to identify the OSPF process running on the device
  • interfaces (list of string): The list of interfaces participating in the OSPF protocol
  • config (string): The parameter used to consolidate all the configuration of the OSPF protocol

Global Header

Global header contains the device class which includes the parameters that a device may contain. Each parameter represents a protocol that the device can be running. Functions are defined in this class to initiate the protocol parameters within the class.

Parameter file - excel

The parameters used to configure the VxLAN and eVPN fabric will be defined in the excel file [ip_information.xlsx] ( cisco-Nexus-automate-vxlan-evpn/ip_information.xlsx ). This file contains different tabs with each corresponding to a specific technology in the fabric. For example, OSPF parameters are written in one tab with each host represented in the first column. The fields that do not have a value (usually represented by N/A) should be filled with '-'. Missing values in the cells will generate wrong information.

Read Excel Script

The input module in the program is written in python using pandas package to read from excel file [ip_information.xlsx] ( cisco-Nexus-automate-vxlan-evpn/ip_information.xlsx ). This script is used to give a sample of the VxLAN package. The script contains functions to read from each sheet (read_X(); where X represents the name of the protocol), and then initiate instances from VxLAN.py and underlay.py headers (populate_X(); where X represents the name of the protocol)

Generate Configuration Script

This script calls the functions from read_excel.py and initiates the device_list list which contains the devices listed in the column 'Device' in excel. device_list helps keep the devices unique and append the protocols instances to each device.