EVPN and VXLAN Configuration Guide
EVPN and VXLAN Configuration Guide
There are multiple ways to deploy the EVPN underlay and overlay.
You can use an IGP like OSPF or IS-IS
in the underlay and run either IBGP or EBGP in the overlay.
You can run EBGP in the underlay and IBGP on the overlay.
---------------------------
L2 VXLAN
RD = Loopback0:VNI
RT = VRF_ID:VNI
L3EVPN
------------------------------
Configure VXLAN Tunnel Endpoints (VTEP)
------------------------------
# leaf1
int loop1
ip add [Link]/32 <<<<<<<<<< IP del VTEP
!
router bgp 65001
address-family ipv4
network [Link]/32
!
int vxlan1
vxlan source-int lo1
vxlan udp-port 4789
vxlan learn-restrict any
------------------------------
Transporting L2VXLAN with EVPN
------------------------------
# leaf1
vlan 40
name test-l2-vxlan
!
int vxlan1
vxlan vlan 40 vni 100040
!
router bgp 65001
!
vlan 40
rd 65001:100040
route-target both evpn 40:100040
redistribute learned
----------------------------------------
Transporting L3VXLAN with EVPN
----------------------------------------
# leaf1
vrf instance gold
!
ip routing vrf gold
!
int vxlan1
vxlan vrf gold vni 100001
!
router bgp 65001
vrf gold
rd [Link]:1
route-target both evpn 1:100001
redistribute connected
----------------------------------------
We will start with the initial configuration of underlay components, such as MLAG
and underlay BGP.
Next, we’ll configure the EVPN overlay and VTEPs.
Lastly, I’ll give an example configuration of L2VXLAN (EVPN Type-2) and L3VXLAN
(EVPN Type-5).
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
! Leaf 1 Physical Links and Loopback 0 Interface Configuration (Leaf1-Phy
configlet)
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
interface Ethernet3
no switchport
ip address [Link]/30
interface Ethernet4
no switchport
ip address [Link]/30
interface Ethernet5
no switchport
ip address [Link]/30
interface Ethernet6
no switchport
ip address [Link]/30
interface Loopback0
ip address [Link]/32
!
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
! Leaf 1 eBGP Underlay Routing Configuration (Leaf1-eBGPUnderlay)
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!
service routing protocols model multi-agent
!
ip routing
!
router bgp 65001
router-id [Link]
maximum-paths 4 ecmp 4
no bgp default ipv4-unicast
bgp log-neighbor-changes
distance bgp 20 200 200
address-family ipv4
network [Link]/32
neighbor SpineUnderlay activate
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
! Leaf1-eBGPOverlay Configlet:
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
address-family ipv4
no neighbor SpineOVERLAY activate
address-family evpn
neighbor SpineOVERLAY activate
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
! Leaf1--->MLAG<----Leaf2
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
vlan 4094
trunk group MLAGVLAN
interface Port-Channel100
description Peer Link Leaf1_to_leaf2
switchport mode trunk
switchport trunk group MLAGVLAN
! spanning-tree link-type point-to-point
no shut
!
interface Vlan4094
no autostate
ip address [Link]/30
no shut
mlag configuration
domain-id DomainLeaf1Leaf2
local-interface Vlan4094
peer-address [Link]
peer-link Port-Channel100
no shut
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
! Port Channel con MLAG
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
Vlan 101,201,4093
interface Loopback1
ip address [Link]/32
interface Ethernet 7
channel-group 1 mode active
no shut
interface Ethernet 9
channel-group 2 mode active
no shut
interface Port-Channel1
description Peer Link Host1
switchport
switchport access vlan 101
mlag 1
no shut
!
interface Port-Channel2
description Peer Link Host2
switchport
switchport access vlan 201
mlag 2
no shut
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
! Leaf1-eBGPOverlay Configlet:
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
address-family ipv4
no neighbor SpineOVERLAY activate
address-family evpn
neighbor SpineOVERLAY activate
!----------------------------------------------------------------------------------
----
! Ethernet Segment Multihoming LEAF ----> HOST
!----------------------------------------------------------------------------------
----
Vlan 301,401,4093
interface Ethernet 7
channel-group 1 mode active
no shut
interface Ethernet 9
channel-group 2 mode active
no shut
interface Port-Channel1
description Peer Link Host
switchport
switchport mode access
switchport access vlan 301
no shut
evpn ethernet-segment
identifier 0050:0c00:0700:0700:aaaa
route-target import 00:1c:73:f5:f7:6c
lacp system-id [Link]
interface Port-Channel2
description Peer Link Host
switchport
switchport mode access
switchport access vlan 401
no shut
evpn ethernet-segment
identifier 0050:0c00:0700:0700:bbbb
route-target import 00:1c:73:6a:b5:3e
lacp system-id [Link]
!----------------------------------------------------------------------------------
--
!-------------------------------------------------------
vrf instance VRF-C
ip routing vrf VRF-C
!
interface vlan 101
no autostate
vrf VRF-C
ip virtual-router address [Link]
ip address [Link]/24
!
interface vlan 201
vrf VRF-C
no autostate
ip virtual-router address [Link]
ip address [Link]/24
!---------------------------------------------------
!---------------------------------------------------
! IGBP para cuando hay MLAG en Underlay
!---------------------------------------------------
!---------------------------------------------------
address-family ipv4
neighbor [Link] activate
---------------------------------------------------
Route MAPS
!---------------------------------------------
interface Vxlan1
!-----------------------------------------------------------------------------
! Configure MAC-VRFs and IP-VRFs and EVPN Route Updates for Tenant C Overlay
!-----------------------------------------------------------------------------
router bgp 65001
vlan 101
rd [Link]:11111
route-target both 1111:1111
redistribute learned
vlan 201
rd [Link]:2222
route-target both 2222:2222
redistribute learned
vrf VRF-C
rd [Link]:7777
route-target export evpn 7777:7777
route-target import evpn 7777:7777
redistribute connected
redistribute attached-host
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!------>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<---------!
!------>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<---------!
!------>>>>>>>>>>>>>>>>>>>>>>>>> SPINE <<<<<<<<<<<<---------!
!------>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<---------!
!------>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<---------!
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
! Spine 1 Physical Links and Loopback 0 interface Configuration (Spine1-Phy
configlet)
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!
interface Ethernet1
shutdown
interface Ethernet2
shutdown
interface Ethernet3
no switchport
ip address [Link]/30
interface Ethernet4
no switchport
ip address [Link]/30
interface Ethernet5
no switchport
ip address [Link]/30
interface Ethernet6
no switchport
ip address [Link]/30
interface Ethernet7
no switchport
ip address [Link]/30
interface Ethernet8
no switchport
ip address [Link]/30
interface Loopback0
ip address [Link]/32
!
!-------------------------------------------------------------------
!-------------------------------------------------------------------
! Spine 1 eBGP Underlay Routing Configuration (Spine1-eBGPUnderlay)
!-------------------------------------------------------------------
!-------------------------------------------------------------------
!
!
address-family ipv4
network [Link]/32
neighbor [Link] activate
neighbor [Link] activate
neighbor [Link] activate
neighbor [Link] activate
neighbor BorderleafUnderlay activate
redistribute connected
!----------------------------------------------------------------------------------
---------
!----------------------------------------------------------------------------------
---------
! Spine1-eBGPOverlay, Spine2-eBGPOverlay, Spine3-eBGPOverlay, Spine4-eBGPOverlay
Configlet:
!----------------------------------------------------------------------------------
---------
!----------------------------------------------------------------------------------
---------
router bgp 65100
address-family ipv4
no neighbor [Link] activate
no neighbor [Link] activate
no neighbor [Link] activate
no neighbor [Link] activate
no neighbor BorderleafOVERLAY activate
address-family evpn
neighbor [Link] activate
neighbor [Link] activate
neighbor [Link] activate
neighbor [Link] activate
neighbor BorderleafOVERLAY activate
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!------>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<---------!
!------>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<---------!
!------>>>>>>>>>>>>>>>>>>>>>>>>> BorderLeaf <<<<<<<<<<<<---------!
!------>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<---------!
!------>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<---------!
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
! Borderleaf 1 Physical Links and Loopback 0 Interface Configuration (Borderleaf1-
Phy configlet)
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
interface Ethernet3
no switchport
ip address [Link]/30
interface Ethernet4
no switchport
ip address [Link]/30
interface Ethernet5
no switchport
ip address [Link]/30
interface Ethernet6
no switchport
ip address [Link]/30
interface Loopback0
ip address [Link]/32
!
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
! Borderleaf 1 eBGP Underlay Routing Configuration (BorderLeaf1-eBGPUnderlay)
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
address-family ipv4
network [Link]/32
neighbor SpineUnderlay activate
redistribute connected
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
! BorderLeaf1-eBGPOverlay Configlet:
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
address-family ipv4
no neighbor SpineOVERLAY activate
address-family evpn
neighbor SpineOVERLAY activate
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
vlan 4094
trunk group MLAGVLAN
interface Port-Channel100
description Peer Link Leaf1_to_leaf2
switchport mode trunk
switchport trunk group MLAGVLAN
no shut
!
interface Vlan4094
no autostate
ip address [Link]/30
no shut
mlag configuration
domain-id DomainBorderLeaf1BorderLeaf2
local-interface Vlan4094
peer-address [Link]
peer-link Port-Channel100
!---------------------------------------------------
!---------------------------------------------------
!---------------------------------------------------
vrf instance VRF-C
ip routing vrf VRF-C
!
vlan 67
!
interface vlan 67
no autostate
vrf VRF-C
ip virtual-router address [Link]
ip address [Link]/24
!---------------------------------------------
interface Loopback1
ip address [Link]/32
!
interface Vxlan1
!-----------------------------------------------------------------------------
! Configure MAC-VRFs and IP-VRFs and EVPN Route Updates for Tenant C Overlay
!-----------------------------------------------------------------------------
router bgp 65500
vlan 67
rd [Link]:6767
route-target both 6767:6767
redistribute learned
vrf VRF-C
rd [Link]:7777
route-target export evpn 7777:7777
route-target import evpn 7777:7777
redistribute connected
redistribute attached-host
!-------------------------------------------------
!-------------------------------------------------
! IBGP ----> BorderLeaf
!-------------------------------------------------
!-------------------------------------------------
vlan 4093
interface Vlan4093
no autostate
ip address [Link]/30
no shut
address-family ipv4
neighbor [Link] activate
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
!------>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<---------!
!------>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<---------!
!------>>>>>>>>>>>>>>>>>>>>>>>>> HOST <<<<<<<<<<<<---------!
!------>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<---------!
!------>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<---------!
Vlan 101
interface Port-Channel1
description Peer Link Host
switchport mode access
switchport access vlan 101
no shut
!
interface Vlan 101
ip address [Link]/30
no autostate
no shut
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
! Comandos Show
!----------------------------------------------------------------------------------
----
!----------------------------------------------------------------------------------
----
show mlag
show mlag detail
show mlag interfaces
-----------------------------------------------
Transporting L2VXLAN with EVPN
# leaf1
vlan 40
name test-l2-vxlan
!
int vxlan1
vxlan vlan 40 vni 100040
vxlan vrf red vni 100080
!
router bgp 65001
!
vlan 40
rd 65001:100040
route-target both evpn 40:100040
redistribute learned
------------------------------------------------
Transporting L3VXLAN with EVPN
# leaf1
vrf instance gold
!
ip routing vrf gold
!
int vxlan1
vxlan vrf gold vni 100001
!
router bgp 65002
vrf gold
rd [Link]:100001
route-target both evpn 1:100001
redistribute connected
# leaf1
vlan 34
int vlan 34
vrf gold
ip address [Link]/24
ip virtual-router address [Link]
------------------------------------------------
------------------------------------------------
PIM Sparse mode with a Static RP
------------------------------------------------
MULTICAST configurar en Leaf and SPINE
router multicast
ipv4
routing
software-forwarding sfe
!
router pim sparse-mode
ipv4
rp address [Link]
!
interface ethernet3-6
pim ipv4 sparse-mode
------------------------------------------------
Configurar los Leaf asi:
interface Vlan101
pim ipv4 sparse-mode
interface Ethernet7
pim ipv4 sparse-mode
------------------------------------------------
interface Vlan101
pim ipv4 sparse-mode
interface Ethernet7
pim ipv4 sparse-mode
------------------------------------------------
------------------------------------------------
PIM Sparse-mode with Dynamic RP
------------------------------------------------
Add BSR router configuration to Spine3-Multicast configlet.
router pim bsr
ipv4
candidate loopback 0
-----------------------------------------
Con gateways
vlan 15
interface Vlan15
no autostate
ip address virtual [Link]/24
router bgp 1
router-id [Link]
!
vlan 15
rd [Link]:10015
rd evpn domain remote [Link]:1
route-target import 10015:10015
route-target export 10015:10015
route-target import evpn domain remote 1:10015
route-target export evpn domain remote 1:10015
redistribute learned