Sample configuration for iBGP VSX EVPN

The following sample configuration solution shows the relevant EVPN/VSX configurations on the primary and secondary VSX switches.

Spine configuration
interface loopback 1
    ip address 3.3.3.3/32
    ip ospf 1 area 0.0.0.0
router bgp 1
    bgp router-id 3.3.3.3
    neighbor 2.2.2.2 remote-as 1
    neighbor 2.2.2.2 update-source 3.3.3.3
    neighbor 10.10.10.10 remote-as 1
    neighbor 10.10.10.10 update-source 3.3.3.3
    neighbor 20.20.20.20 remote-as 1
    neighbor 20.20.20.20 update-source 3.3.3.3
    address-family l2vpn evpn
        neighbor 2.2.2.2 activate
        neighbor 2.2.2.2 route-reflector-client
        neighbor 2.2.2.2 send-community extended
        neighbor 10.10.10.10 activate
        neighbor 10.10.10.10 route-reflector-client
        neighbor 10.10.10.10 send-community extended
        neighbor 20.20.20.20 activate
        neighbor 20.20.20.20 route-reflector-client
        neighbor 20.20.20.20 send-community extended
    exit-address-family
Leaf1 configuration (Primary VTEP)
vlan 1-2
evpn
    vlan 2
        rd 1.1.1.1:2
        route-target export 2:2
        route-target import 2:2
interface 1/1/17
    no shutdown
    no routing
    vlan trunk native 1 tag
    vlan trunk allowed all
interface loopback 1
    ip address 1.1.1.1/32
    ip ospf 1 area 0.0.0.0
interface loopback 2
    ip address 10.10.10.10/32
    ip ospf 1 area 0.0.0.0
interface vlan2 
    ip address 10.1.1.5/24
    active-gateway ip mac 00:00:00:00:00:33
    active-gateway ip 10.1.1.10
vsx
    inter-switch-link 1/1/17
    role primary
    keepalive peer 20.1.1.2 source 20.1.1.1

interface vxlan 1
    source ip 1.1.1.1
    no shutdown
    vni 100
        vlan 2
    !
router bgp 1
    bgp router-id 10.10.10.10
    neighbor 3.3.3.3 remote-as 1
    neighbor 3.3.3.3 update-source 10.10.10.10
    address-family l2vpn evpn
        neighbor 3.3.3.3 activate
        neighbor 3.3.3.3 send-community extended
    exit-address-family
Leaf1' configuration (Secondary VTEP)
vlan 1-2
evpn
    vlan 2
        rd 1.1.1.1:2
        route-target export 2:2
        route-target import 2:2
interface 1/1/23
    no shutdown
    no routing
    vlan trunk native 1 tag
    vlan trunk allowed all
interface loopback 1
    ip address 1.1.1.1/32
    ip ospf 1 area 0.0.0.0
interface loopback 2
    ip address 20.20.20.20/32
    ip ospf 1 area 0.0.0.0
interface vlan2 
    ip address 10.1.1.6/24
    active-gateway ip mac 00:00:00:00:00:33
    active-gateway ip 10.1.1.10
vsx
    inter-switch-link 1/1/23
    role secondary
    keepalive peer 20.1.1.1 source 20.1.1.2
interface vxlan 1
    source ip 1.1.1.1
    no shutdown
    vni 100
        vlan 2
    !
router bgp 1
    bgp router-id 20.20.20.20
    neighbor 3.3.3.3 remote-as 1
    neighbor 3.3.3.3 update-source 20.20.20.20
    address-family l2vpn evpn
        neighbor 3.3.3.3 activate
        neighbor 3.3.3.3 send-community extended
    exit-address-family
Leaf2 configuration
vlan 1-2
evpn
    vlan 2
        rd 2.2.2.2:2
        route-target export 2:2
        route-target import 2:2
interface loopback 1
    ip address 2.2.2.2/32
    ip ospf 1 area 0.0.0.0
interface vlan2 
    ip address 10.1.1.7/24
    active-gateway ip mac 00:00:00:00:00:33
    active-gateway ip 10.1.1.10
interface vxlan 1
    source ip 2.2.2.2
    no shutdown
    vni 100
        vlan 2
    !
router bgp 1
    neighbor 3.3.3.3 remote-as 1
    neighbor 3.3.3.3 update-source 2.2.2.2
    address-family l2vpn evpn
        neighbor 3.3.3.3 activate
        neighbor 3.3.3.3 send-community extended
    exit-address-family