VXLAN Configuration
VXLAN Configuration
VXLAN Configuration
Mahdi Esfahani
https://www.linkedin.com/in/mehdiesfahani
Create by 2021
Contents
1) Introduction
2) Prerequisites
3) Requirements
4) Components Used
5) Background Information
6) Terminology
7) What is VXLAN?
8) Why VXLAN?
9) Configure
11) Configurations
12) 3172-A
13) 9396-A
14) 9396-B
15) Verify
17) 3172-A
18) 9396-A
19) 9396-B
21) Troubleshoot
Introduction
This document provides a high-level overview of Virtual Extensible LAN (VXLAN) and a
few
configuration examples followed by verification commands and output.
Prerequisites
Requirements
Cisco recommends that you have knowledge of these topics:
• Multicast routing concepts such as Rendezvous Point (RP) and Platform
Independent Multicast (PIM).
• Virtual Port Channel (vPC) concepts.
This document assumes that the IP routing and multicast routing has been established
prior to VXLAN configuration.
Components Used
The information in this document is based on these software and hardware versions:
• Nexus 9396s as vPC Virtual Tunnel Endpoints (VTEPs) that run Version
7.0(3)I1(1b)
• Nexus 3172 that runs Version 6.0(2)U5(1)
• LAN_ENTERPRISE_SERVICES_PKG license installed
The information in this document was created from the devices in a specific lab
environment. All of the devices used in this document started with a cleared (default)
configuration. If your network is live, make sure that you understand the potential impact
of any command.
Background Information
Terminology
VXLAN (Virtual Extensible LAN) - The technology that provides the same Ethernet
Layer 2 network services as VLAN does today, but with greater extensibility and flexibility.
VNID (Vxlan Network Identifier) - 24 bit segment ID that defines the broadcast domain.
Interchangeable with "VXLAN Segment ID".
VTEP (Virtual Tunnel Endpoint) - This is the device that does the encapsulation and
de-encapsulation.
NVE (Network Virtual Interface) - Logical interface where the encapsulation and de-
encapsulation occur.
What is VXLAN?
• VXLAN is a technology which allows overlaying a Layer 2 (L2) network over a
Layer 3 (L3) underlay with use of any IP routing protocol.
• It uses MAC-in-UDP Encapsulation.
VXLAN solves three main problems:
Why VXLAN?
Network Diagram
Configurations
These configurations are specific to the VXLAN portion of configuration. Note that 9396-
A and B are in a vPC domain while 3172-A is not. These configurations assume full
reachability to all L3 interfaces in the topology with the routing protocol of your choice.
Open Shortest Path First (OSPF) was used in this example. It also assumes the multicast
routing has been established over these same L3 interfaces.
3172-A
feature ospf
feature pim
feature vn-segment-vlan-based
feature nv overlay
vlan 10
vn-segment 160010
vlan 20
vn-segment 160020
interface nve1
source-interface loopback1
member vni 160010 mcast-group 231.1.1.1
member vni 160020 mcast-group 231.1.1.1
no shutdown
interface Ethernet1/3
no switchport
ip address 192.168.1.10/30
ip router ospf 2 area 0.0.0.0
ip pim sparse-mode
interface loopback1
ip address 192.168.2.5/32
ip router ospf 2 area 0.0.0.0
ip pim sparse-mode
9396-A
Note: When vPCs are used as VTEPs, the secondary IP of the loopback interface is
used and shared between the two peers. This is how both peers represent themselves
as a single VTEP to the remote NVE peers.
feature ospf
feature pim
feature vn-segment-vlan-based
feature nv overlay
vlan 1,10,20
vlan 10
vn-segment 160010
vlan 20
vn-segment 160020
vpc domain 1
peer-switch
peer-keepalive destination 10.122.140.99
peer-gateway
interface port-channel1
switchport mode trunk
spanning-tree port type network
vpc peer-link
interface port-channel48
switchport mode trunk
vpc 48
interface nve1
mtu 9216
no shutdown
source-interface loopback1
member vni 160010 mcast-group 231.1.1.1
member vni 160020 mcast-group 231.1.1.1
interface Ethernet1/7
no switchport
ip address 192.168.1.2/30
ip router ospf 1 area 0.0.0.0
ip pim sparse-mode
no shutdown
interface loopback1
ip address 192.168.2.2/32
ip address 192.168.2.1/32 secondary
ip router ospf 1 area 0.0.0.0
ip pim sparse-mode
9396-B
Note: When vPCs are used as VTEPs, the secondary IP of the loopback interface is
used and shared between the two peers. This is how both peers represent themselves
as a single VTEP to the remote NVE peers.
feature ospf
feature pim
feature vn-segment-vlan-based
feature nv overlay
vlan 1,10,20
vlan 10
vn-segment 160010
vlan 20
vn-segment 160020
vpc domain 1
peer-switch
peer-keepalive destination 10.122.140.98
peer-gateway
interface port-channel1
switchport mode trunk
spanning-tree port type network
vpc peer-link
interface port-channel48
switchport mode trunk
vpc 48
interface nve1
mtu 9216
no shutdown
source-interface loopback1
member vni 160010 mcast-group 231.1.1.1
member vni 160020 mcast-group 231.1.1.1
interface Ethernet1/7
no switchport
ip address 192.168.1.6/30
ip router ospf 1 area 0.0.0.0
ip pim sparse-mode
no shutdown
interface loopback1
ip address 192.168.2.3/32
ip address 192.168.2.1/32 secondary
ip router ospf 1 area 0.0.0.0
ip pim sparse-mode
Verify
Use this section to confirm that your configuration works properly.
The Cisco CLI Analyzer (registered customers only) supports certain show commands.
Use the Cisco CLI Analyzer in order to view an analysis of show command output.
• show nve peers < --- you will not see any output for this until traffic is initiated
from both sides of the overlay
• show nve vni
• show run interface nve1
• show nve internal platform interface detail (9K only)
• show mac address-table
• show ip mroute detail
Example Outputs
These outputs are in a steady state. The VTEP peers have discovered each other and
traffic has passed between both in the encap and decap directions.
3172-A
version 6.0(2)U5(1)
interface nve1
source-interface loopback1
member vni 160010 mcast-group 231.1.1.1
member vni 160020 mcast-group 231.1.1.1
no shutdown
9396-A
interface nve1
mtu 9216
no shutdown
source-interface loopback1
member vni 160010 mcast-group 231.1.1.1
member vni 160020 mcast-group 231.1.1.1
vPC domain id : 1
Peer status : peer adjacency formed ok
vPC keep-alive status : peer is alive
Configuration consistency status : success
Per-vlan consistency status : success
Type-2 consistency status : success
vPC role : secondary
Number of vPCs configured : 1
Peer Gateway : Enabled
Dual-active excluded VLANs : -
Graceful Consistency Check : Enabled
Auto-recovery status : Disabled
vPC status
----------------------------------------------------------------
id Port Status Consistency Reason Active vlans
-- ---- ------ ----------- ------ ------------
48 Po48 up success success 1,10
9396-B
9396-B# show nve peers
Interface Peer-IP State LearnType Uptime Router-Mac
--------- ------------- ----- --------- -------- ---------------
nve1 192.168.2.5 Up DP 1w0d n/a
version 7.0(3)I1(1b)
interface nve1
mtu 9216
no shutdown
source-interface loopback1
member vni 160010 mcast-group 231.1.1.1
member vni 160020 mcast-group 231.1.1.1
vPC status
----------------------------------------------------------------
id Port Status Consistency Reason Active vlans
-- ---- ------ ----------- ------ ------------
48 Po48 up success success 1,10
The packet capture (PCAP) is from the previous topology and contains the OSPF hellos,
the PIM Joins/Registers, and the VXLAN encapsulated traffic for the toplogy shown in the
network diagram. You will notice some Internet Control Message Protocol (ICMP) flags
such as 'no response'. This is due to the nature of the monitor session completed on the
RP.
The monitor session included interfaces Eth4/17-18 and Eth4/20, so it throws off
Wireshark some.
Note: All encapsulated packets (BUM, or known unicast) are sourced from the VTEP
loopback IP destined to the remote VTEP loopback IP. This is the secondary loopback IP on
any vPC VTEPs.
BUM (Broadcast, Unknown unicast, Multicast) traffic will be destined to the mcast-group.