Cisco VXLAN Configuration Lab Using Nexus 9000V DCNM & Ansible
Cisco VXLAN Configuration Lab Using Nexus 9000V DCNM & Ansible
Cisco VXLAN Configuration Lab Using Nexus 9000V DCNM & Ansible
Roger Perkin
Learn Network Automation
Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
This post details my approach to setting up a POC lab to prove the operation of Nexus 9K switches doing VXLAN using BGP EVPN, it
will also show how I deployed and verified the configurations and operation using Ansible.
You will follow the process from the start and learn such things as “What is a VTEP?” and “What is a VNI?”
For this lab I will be using VMWare ESXi, 3 x Nexus 9000V (https://www.cisco.com/c/en/us/support/switches/nexus-9000v-
switch/model.html) switches and a local installation of Ansible (https://www.rogerperkin.co.uk/network-automation/ansible/)
running on Ubuntu.
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 1/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
The Nexus 9000v switch image is purely for educational purposes and is not intended to be used in production.
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 2/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 3/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
NEX-9K-SPINE1# sh ver
Cisco Nexus Operating System (NX-OS) Software
Software
BIOS: version
NXOS: version 7.0(3)I7(2)
BIOS compile time:
NXOS image file is: bootflash:///nxos.7.0.3.I7.2.bin
NXOS compile time: 11/22/2017 13:00:00 [11/22/2017 21:55:29]
Hardware
cisco Nexus9000 9000v Chassis
NEX-9K-SPINE1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 4/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
If you get an error when trying this configuration you might be hitting this
bug https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvm37015 (https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvm37015)
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 5/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
I will not be showing you how to deploy an ova file as I am assuming if you are looking to deploy VXLAN you should be able to
install an ova file!
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 6/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
The interfaces within ESXi are mapped directly to E1/1 – E1/12 on the 9000v.
Network adapter 1 always goes to the Management interface this needs to go to your local network. Then configure the
management interface on your Nexus 9000v with an IP in the same network.
My Local Network is called VM Network on the 192.168.1.0/24 network so I will configure the management interface as below
interface mgmt0
vrf member management
ip address 192.168.1.179/24
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 7/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
The connection between Spine to Leaf 1 is via it’s own virtual switch
I will now address E/1 with the first point to point link
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 8/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
interface Ethernet1/1
description P2P link to Leaf1
ip address 10.1.0.1/30
ip ospf network point-to-point
no shutdown
I need to do the same for Leaf 2 with a separate virtual switch. Now we have connectivity, let’s get some IP’s on the interfaces and
verify connectivity.
All connections in a Leaf & Spine topology are made of L3 point to point links.
We will be running OSPF on these links to provide the connectivity for the underlay network.
The switches will also require a loopback interface, it is best practice to configure one loopback for the Router ID and a second for
the VTEP
So the final config I have is with two interfaces e1/1 and e1/2 on the Spine switch connected to e1/1 on each leaf switch. Each point
to point point link is addressed with a /30 range and there are two loopbacks configured on each switch. Finally OSPF has been
configured and all interfaces are part of Area 0 so we have full IP reachability on the underlay network.
NEX-9K-SPINE-1
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 9/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
feature ospf
int lo0
description Routing ID
ip address 1.1.1.1 255.255.255.0
int lo1
description VTEP ID
ip address 100.100.100.1 255.255.255.255
int e1/1
description To-Leaf-1
ip address 10.0.0.1 255.255.255.252
ip ospf network type point-to-point
int e1/1
description To-Leaf-2
ip address 10.0.0.5 255.255.255.252
ip ospf network type point-to-point
feature ospf
router ospf UNDERLAY
router-id 1.1.1.1
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 10/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
NEX-9K-LEAF-1
feature ospf
int lo0
ip address 1.1.1.2 255.255.255.0
int lo1
ip address 100.100.100.2 255.255.255.255
int e1/1
ip address 10.0.0.2 255.255.255.252
ip ospf network type point-to-point
feature ospf
router ospf UNDERLAY
router-id 1.1.1.2
network 1.1.1.2 0.0.0.0 area 0
network 10.0.0.2 255.255.2.252
NEX-9K-LEAF-2
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 11/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
feature ospf
int lo0
ip address 1.1.1.3 255.255.255.0
int lo1
ip address 100.100.100.3 255.255.255.255
int e1/1
ip address 10.0.0.3 255.255.255.252
ip ospf network type point-to-point
feature ospf
router ospf UNDERLAY
router-id 1.1.1.3
network 1.1.1.3 0.0.0.0 area 0
network 10.0.0.6 255.255.2.252
Note: The interfaces have been configured as ospf network type point-to-point. This eliminates any DR/BDR elections and ensures
that only type-1 LSAs are sent on the network. This makes sure OSPF is running as lean as possible and makes convergence times
quicker.
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 12/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
IS-IS – When running VXLAN using ACI the underlay network is configured using IS-IS, but this is all hands off as the controller is
doing all the configuration. If you are running VXLAN using NX-OS it is recommended to use OSPF mainly because it is more
commonly understood compared to IS-IS. The convergence times are about the same until you start to scale the networks and the
routing tables get bigger, in which case IS-IS would be the slightly better choice.
For this lab and any production scenarios you are looking at I would recommend you use OSPF for the underlay protocol.
Before we go any further, let’s just verify we have L3 connectivity between all of our switches
From the Spine switch I can ping the loopbacks on both leaf switches, so we are good to proceed to the next step.
Throughout this post there are a lot of acronmyms – so let’s just do a quick recap on what they mean.
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 13/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
VXLAN Terminology
VNI – VXLAN Network Identifier – or also known as VXLAN Segment ID – this is the VXLAN Number
L2 VNI
L3 VNI
VPC
First define your Layer 2 VLAN and assign it to a VXLAN Network Identifier
MP BGP-EVPN
MP-BGP EVPN is a control protocol for VXLAN based on IETF RFC 7342 (https://tools.ietf.org/html/rfc7342). Prior to EVPN, VXLAN
overlay
networks operated using the flood-and-learn model. In this model, end-host information learning and VTEP
discovery are both data-plane based, with no control protocol to distribute end-host reachability information among
VTEPs.
MP-BGP EVPN changes this model. It introduces control-plane learning for end hosts behind remote
VTEPs. It provides control-plane and data-plane separation and a unified control plane for both Layer 2 and Layer
3 forwarding in a VXLAN overlay network.
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 14/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
feature nv overlay
feature bgp
feature pim
feature interface-vlan
feature vn-segment-vlan-based
nv overlay evpn
BGP will require the LAN_ENTERPRISE_SERVICES_PKG licence if you do not have this it does not matter for a lab environment as
the feature is enabled on an honor based system. If you are running this in production I recommend you purchase the license
required.
NEX-9K-SPINE-1
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 15/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
NEX-9K-LEAF-1
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 16/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
NEX-9K-LEAF-2
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 17/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
We are going to be running iBGP with a single Autonomous System (6412) so each device is running router bgp 64512, each leaf is
neighbors wth the spine and the spine is neighbors with each leaf, using their loopback interfaces.
Then you configure the address family l2vpn evpn and under that configure it to send extended communities.
We should now have some BGP neighbors, let’s check that from the Spine switch
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 18/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
NEX-9K-SPINE-1
ip pim rp-address 1.1.1.1 group-list 224.0.0.0/4 <this sets the Rendezvous Point IP address to Loopback0
ip pim ssm range 232.0.0.0/8 - this sets the source specific multicast range
int loopback0
ip pim sparse-mode
NEX-9K-Leaf-1
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 19/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
ip pim rp-address 1.1.1.1 group-list 224.0.0.0/4 <this sets the Rendezvous Point IP address to Loopback0
ip pim ssm range 232.0.0.0/8 - this sets the source specific multicast range
int loopback0
ip pim sparse-mode
ip pim rp-address 1.1.1.1 group-list 224.0.0.0/4 <this sets the Rendezvous Point IP address to Loopback0
ip pim ssm range 232.0.0.0/8 - this sets the source specific multicast range
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 20/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
int loopback0
ip pim sparse-mode
The next step in the configuration is to setup a VLAN locally on the switch and map it to a VXLAN – We also need to setup a special
VLAN which will used specifically as a layer 3 VNI to route inter-VNI traffic. (more on that a bit later)
vlan 50
name VLAN-50-Desktops
vn-segment 10000050
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 21/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
interface vlan30
no shut
vrf member EVPN-L3-VNI-VLAN-900
ip address 10.0.0.1/24
fabric forwarding mode anycast-gateway
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 22/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
Next step is to configure the NVE interface – NVE is the Network Virtual Interface where VXLAN packets are encapsulated and
decapsulated
interface nve1
no shut
source-interface lo1
host-reachability protocol bgp
member vni 10000900 associate-vrf
member vni 10000050
suppress-arp
mcast-group 239.1.1.50
to be continued…
We will now perform the same configuration but this time using Cisco Data Center Network Manager.
For a quick tutorial on how to install DCNM, check out this post
Cisco Data Center Manager Installation Tutorial (https://www.rogerperkin.co.uk/data-center/dcnm/data-centre-network-manager-
installation/)
If you are looking to upgrade the software on your Nexus 9000 switches, check out this post
Nexus 9000 Software Upgrade Procedure (https://www.rogerperkin.co.uk/software-upgrade-guides/nexus-9000-software-
upgrade/)
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 23/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
(https://www.rogerperkin.co.uk/data-center/vxlan/vxlan- (https://www.rogerperkin.co.uk/uncategorized/data-centre-
terminology/) network-manager-installation/)
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 24/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
Comments
Jefrey cayab
Thank you for sharing this. Was wondering if The rest of the Article is up? Would also like to check if it’s possible learn nsx on aci
using this kind of setup?
Thanks,
Jef
a.B bARGOOB
tHANKS FOR SHARING (SORRY FOR THE caPS), ITS NOT ALLOWING ME TYPE MY APPRECIATION IN LOWER CASE BUT i REALLY
WANT TO THANK YOU IN A BIG WAY FOR PUTTING ALL THIS TOGETHER FOR US. iT IS REALLY HELPFUL WHEN THERE IS NOT MUCH
AVAILABLE ON dcnm.
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 25/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
Home Get in touch with me here Don’t forget to take a look at Best Vertical Mouse for RSI
(https://www.rogerperkin.co.uk my YouTube Channel (https://www.rogerperkin.co.uk
hello@rogerperkin.co.uk
/) /work-from-home/best-
(mailto:hello@rogerperkin.co.uk
vertical-mouse/)
Blog )
(https://www.rogerperkin.co.uk
/blog/) (https://#) (https://www.youtube.com/rog
(https://#) erperkin?sub_confirmation=1)
About
(https://www.rogerperkin.co.uk
rogernperkin)
(https://twitter.com/
/about/) /)
n.com/in/rogerperkin
(https://www.linkedi
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 26/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
Contact sub_confirmation=1)
e.com/rogerperkin?
(https://www.youtub
(https://www.rogerperkin.co.uk
Buy (https://www.buym
/contact/)
me a eacoffee.com/HsS3
Network Automation
coffee gIUFu)
(https://www.rogerperkin.co.uk/
network-automation/)
Network Tools
(https://www.rogerperkin.co.uk/
network-tools/)
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 27/28
19/12/2022 16:48 Cisco VXLAN Configuration Lab using Nexus 9000V DCNM & Ansible
Copyright © 2022 · Roger Perkin (https://www.rogerperkin.co.uk) · All Rights Reserved · Powered by Mai Theme
https://www.rogerperkin.co.uk/data-center/vxlan/cisco-vxlan-lab-using-nexus-9000v-switches/#VLAN-and-Layer-3-configuration 28/28