VXLAN Underlay eBGP Multi-AS

eBGP is one of the routing protocol options for your VXLAN underlay. One of the advantages is having a single routing protocol for both the underlay and overlay networks. There are two options when you use eBGP:

  • Two-AS model: Use one AS number for the spine switches and another AS number for all leaf switches.
  • Multi-AS model: Use one AS number for the spine switches and a unique AS number for each leaf switch (pair).

As seen in the two-AS model lesson, eBGP has some quirks to make this work. It’s not as straightforward as using OSPF or IS-IS in the underlay network. However, eBGP is an excellent and stable choice once configured and up and running. Because the underlay and overlay networks are so tied together with eBGP, I’ll explain how to configure both the underlay and overlay networks.

One issue with the two-AS model we don’t have to solve with the multi-AS model is that BGP won’t refuse any routes because of duplicate AS numbers. However, there is a new issue in the overlay network related to a mismatch between the route target (RT) and AS number (ASN).

Before continuing this lesson, I recommend first going through the two-AS model lesson. Also, make sure you are familiar with VXLAN in general, MP-BGP, and simple underlay networks like OSPF or IS-IS. Having said that, let’s dive in.

Configuration

Here is the topology we’ll use:

Vxlan Underlay Ebgp Topology

I use a larger topology with two spine switches and four leaf switches. The spine and leaf switches run Cisco Nexus 9000v version 10.4(5). The hosts are Ubuntu containers. These lightweight devices are only needed to test connectivity.

I’ll use the following AS numbers:

  • AS 12: spine switches.
  • AS 3: LEAF1
  • AS4: LEAF2
  • AS5: LEAF3
  • AS6: LEAF4

Configurations

Want to take a look for yourself? Here you will find the startup configuration for each device.

LEAF1

hostname LEAF1

feature pim
feature vn-segment-vlan-based
feature nv overlay

ip pim rp-address 1.1.1.1 group-list 224.0.0.0/4

vlan 1,10

vlan 10
  vn-segment 10010

interface nve1
  no shutdown
  host-reachability protocol bgp
  source-interface loopback0
  member vni 10010
    mcast-group 239.1.1.1

interface Ethernet1/1
  no switchport
  mtu 9216
  mac-address 0050.c253.3001
  ip address 192.168.13.3/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/2
  no switchport
  mtu 9216
  mac-address 0050.c253.3002
  ip address 192.168.23.3/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/3
  switchport access vlan 10

interface loopback0
  ip address 3.3.3.3/32
  ip pim sparse-mode

LEAF2

hostname LEAF2

feature pim
feature vn-segment-vlan-based
feature nv overlay

ip pim rp-address 1.1.1.1 group-list 224.0.0.0/4

vlan 1,10

vlan 10
  vn-segment 10010

interface nve1
  no shutdown
  host-reachability protocol bgp
  source-interface loopback0
  member vni 10010
    mcast-group 239.1.1.1

interface Ethernet1/1
  no switchport
  mtu 9216
  mac-address 0050.c253.4001
  ip address 192.168.14.4/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/2
  no switchport
  mtu 9216
  mac-address 0050.c253.4002
  ip address 192.168.24.4/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/3
  switchport access vlan 10
  
interface loopback0
  ip address 4.4.4.4/32
  ip pim sparse-mode

LEAF3

hostname LEAF3

feature pim
feature vn-segment-vlan-based
feature nv overlay

ip pim rp-address 1.1.1.1 group-list 224.0.0.0/4

vlan 1,10

vlan 10
  vn-segment 10010

interface nve1
  no shutdown
  host-reachability protocol bgp
  source-interface loopback0
  member vni 10010
    mcast-group 239.1.1.1

interface Ethernet1/1
  no switchport
  mtu 9216
  mac-address 0050.c253.5001
  ip address 192.168.15.5/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/2
  no switchport
  mtu 9216
  mac-address 0050.c253.5002
  ip address 192.168.25.5/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/3
  switchport access vlan 10

interface loopback0
  ip address 5.5.5.5/32
  ip pim sparse-mode

LEAF4

hostname LEAF4

feature pim
feature vn-segment-vlan-based
feature nv overlay

ip pim rp-address 1.1.1.1 group-list 224.0.0.0/4

vlan 1,10

vlan 10
  vn-segment 10010

interface nve1
  no shutdown
  host-reachability protocol bgp
  source-interface loopback0
  member vni 10010
    mcast-group 239.1.1.1

interface Ethernet1/1
  no switchport
  mtu 9216
  mac-address 0050.c253.6001
  ip address 192.168.16.6/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/2
  no switchport
  mtu 9216
  mac-address 0050.c253.6002
  ip address 192.168.26.6/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/3
  switchport access vlan 10

interface loopback0
  ip address 6.6.6.6/32
  ip pim sparse-mode

SPINE1

hostname SPINE1

feature pim

ip pim rp-address 1.1.1.1 group-list 224.0.0.0/4

vlan 1

interface Ethernet1/1
  no switchport
  mtu 9216
  mac-address 0050.c253.1001
  ip address 192.168.13.1/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/2
  no switchport
  mtu 9216
  mac-address 0050.c253.1002
  ip address 192.168.14.1/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/3
  no switchport
  mtu 9216
  mac-address 0050.c253.1003
  ip address 192.168.15.1/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/4
  no switchport
  mtu 9216
  mac-address 0050.c253.1004
  ip address 192.168.16.1/24
  ip pim sparse-mode
  no shutdown
  
interface loopback0
  ip address 1.1.1.1/32
  ip pim sparse-mode

SPINE2

hostname SPINE2

feature pim

ip pim rp-address 1.1.1.1 group-list 224.0.0.0/4

vlan 1

interface Ethernet1/1
  no switchport
  mtu 9216
  mac-address 0050.c253.2001
  ip address 192.168.23.2/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/2
  no switchport
  mtu 9216
  mac-address 0050.c253.2002
  ip address 192.168.24.2/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/3
  no switchport
  mtu 9216
  mac-address 0050.c253.2003
  ip address 192.168.25.2/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/4
  no switchport
  mtu 9216
  mac-address 0050.c253.2004
  ip address 192.168.26.2/24
  ip pim sparse-mode
  no shutdown
  
interface loopback0
  ip address 2.2.2.2/32
  ip pim sparse-mode

The only items I have preconfigured are:

  • The leaf switches have NVE interfaces.
  • Multicast for BUM traffic where SPINE1 is the RP.

Underlay Network

Let’s start with the underlay network.




We’ll start with the spine switches. Let’s enable the BGP feature:

SPINE1 & SPINE2
(config)# feature bgp

Now we can configure BGP. We’ll use the unicast address family to establish neighbor adjacencies with the leaf switches. We’ll also advertise all loopbacks in BGP. We’ll need these loopback interfaces for the overlay network. Here is SPINE1:

SPINE1(config)# router bgp 12
SPINE1(config-router)# router-id 1.1.1.1

SPINE1(config-router)# address-family ipv4 unicast 
SPINE1(config-router-af)# network 1.1.1.1/32

SPINE1(config-router-af)# neighbor 192.168.13.3
SPINE1(config-router-neighbor)# remote-as 3
SPINE1(config-router-neighbor)# address-family ipv4 unicast 

SPINE1(config-router)# neighbor 192.168.14.4
SPINE1(config-router-neighbor)# remote-as 4
SPINE1(config-router-neighbor)# address-family ipv4 unicast 

SPINE1(config-router)# neighbor 192.168.15.5
SPINE1(config-router-neighbor)# remote-as 5
SPINE1(config-router-neighbor)# address-family ipv4 unicast 

SPINE1(config-router)# neighbor 192.168.16.6
SPINE1(config-router-neighbor)# remote-as 6
SPINE1(config-router-neighbor)# address-family ipv4 unicast

And this is SPINE2:

SPINE2(config)# router bgp 12
SPINE2(config-router)# router-id 2.2.2.2

SPINE2(config-router)# address-family ipv4 unicast 
SPINE2(config-router-af)# network 2.2.2.2/32

SPINE2(config-router-af)# neighbor 192.168.23.3
SPINE2(config-router-neighbor)# remote-as 3
SPINE2(config-router-neighbor)# address-family ipv4 unicast 

SPINE2(config-router)# neighbor 192.168.24.4
SPINE2(config-router-neighbor)# remote-as 4
SPINE2(config-router-neighbor)# address-family ipv4 unicast 

SPINE2(config-router)# neighbor 192.168.25.5
SPINE2(config-router-neighbor)# remote-as 5
SPINE2(config-router-neighbor)# address-family ipv4 unicast 

SPINE2(config-router)# neighbor 192.168.26.6
SPINE2(config-router-neighbor)# remote-as 6
SPINE2(config-router-neighbor)# address-family ipv4 unicast

Now we’ll do the same thing on all leaf switches. First, enable BGP:

LEAF1, LEAF2, LEAF3, LEAF4
(config)# feature bgp

Now we can advertise all loopback interfaces and neighbor adjacencies with the spine switches. Here is LEAF1:

LEAF1(config)# router bgp 3
LEAF1(config-router)# router-id 3.3.3.3
LEAF1(config-router)# address-family ipv4 unicast
LEAF1(config-router-af)# network 3.3.3.3/32

LEAF1(config-router)# neighbor 192.168.13.1
LEAF1(config-router-neighbor)# remote-as 12
LEAF1(config-router-neighbor)# address-family ipv4 unicast

LEAF1(config-router)# neighbor 192.168.23.2
LEAF1(config-router-neighbor)# remote-as 12
LEAF1(config-router-neighbor)# address-family ipv4 unicast

And we’ll do the same thing on LEAF2, LEAF3, and LEAF4:

LEAF2(config)# router bgp 4
LEAF2(config-router)# router-id 4.4.4.4
LEAF2(config-router)# address-family ipv4 unicast
LEAF2(config-router-af)# network 4.4.4.4/32

LEAF2(config-router)# neighbor 192.168.14.1
LEAF2(config-router-neighbor)# remote-as 12
LEAF2(config-router-neighbor)# address-family ipv4 unicast 

LEAF2(config-router)# neighbor 192.168.24.2 
LEAF2(config-router-neighbor)# remote-as 12
LEAF2(config-router-neighbor)# address-family ipv4 unicast
LEAF3(config)# router bgp 5
LEAF3(config-router)# router-id 5.5.5.5
LEAF3(config-router)# address-family ipv4 unicast
LEAF3(config-router-af)# network 5.5.5.5/32

LEAF3(config-router)# neighbor 192.168.15.1
LEAF3(config-router-neighbor)# remote-as 12
LEAF3(config-router-neighbor)# address-family ipv4 unicast

LEAF3(config-router)# neighbor 192.168.25.2 
LEAF3(config-router-neighbor)# remote-as 12
LEAF3(config-router-neighbor)# address-family ipv4 unicast
LEAF4(config)# router bgp 6
LEAF4(config-router)# router-id 6.6.6.6
LEAF4(config-router)# address-family ipv4 unicast
LEAF4(config-router-af)# network 6.6.6.6/32

LEAF4(config-router)# neighbor 192.168.16.1
LEAF4(config-router-neighbor)# remote-as 12
LEAF4(config-router-neighbor)# address-family ipv4 unicast

LEAF4(config-router)# neighbor 192.168.26.2
LEAF4(config-router-neighbor)# remote-as 12
LEAF4(config-router-neighbor)# address-family ipv4 unicast

That takes care of the leaf switches.

Normally, it would be a good idea to use BGP templates to reduce the number of configuration lines. To keep it simple, I decided to configure all neighbors separately.

Let’s check the neighbor adjacencies:

SPINE1# show ip bgp summary
BGP summary information for VRF default, address family IPv4 Unicast
BGP router identifier 1.1.1.1, local AS number 12
BGP table version is 10, IPv4 Unicast config peers 4, capable peers 4
5 network entries and 5 paths using 1460 bytes of memory
BGP attribute entries [5/1840], BGP AS path entries [4/24]
BGP community entries [0/0], BGP clusterlist entries [0/0]

Neighbor        V    AS    MsgRcvd    MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.13.3    4     3          7          6       10    0    0 00:00:14 1         
192.168.14.4    4     4          7          6       10    0    0 00:00:16 1         
192.168.15.5    4     5          6          5       10    0    0 00:00:15 1         
192.168.16.6    4     6          7          6       10    0    0 00:00:15 1

SPINE2# show ip bgp summary 
BGP summary information for VRF default, address family IPv4 Unicast
BGP router identifier 2.2.2.2, local AS number 12
BGP table version is 10, IPv4 Unicast config peers 4, capable peers 4
5 network entries and 5 paths using 1460 bytes of memory
BGP attribute entries [5/1840], BGP AS path entries [4/24]
BGP community entries [0/0], BGP clusterlist entries [0/0]

Neighbor        V    AS    MsgRcvd    MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.23.3    4     3         16         14       10    0    0 00:09:54 1         
192.168.24.4    4     4         16         14       10    0    0 00:09:07 1         
192.168.25.5    4     5         14         14       10    0    0 00:07:53 1         
192.168.26.6    4     6         14         13       10    0    0 00:01:23 1

The spine switches see four neighbor adjacencies each, one for each leaf switch. They also received a prefix from each leaf switch. Let’s check the BGP tables:

SPINE1# show ip bgp
BGP routing table information for VRF default, address family IPv4 Unicast
BGP table version is 10, Local Router ID is 1.1.1.1
Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup, 2 - best2

   Network            Next Hop            Metric     LocPrf     Weight Path
*>l1.1.1.1/32         0.0.0.0                           100      32768 i
*>e3.3.3.3/32         192.168.13.3                                   0 3 i
*>e4.4.4.4/32         192.168.14.4                                   0 4 i
*>e5.5.5.5/32         192.168.15.5                                   0 5 i
*>e6.6.6.6/32         192.168.16.6                                   0 6 i
SPINE2# show ip bgp
BGP routing table information for VRF default, address family IPv4 Unicast
BGP table version is 10, Local Router ID is 2.2.2.2
Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup, 2 - best2

   Network            Next Hop            Metric     LocPrf     Weight Path
*>l2.2.2.2/32         0.0.0.0                           100      32768 i
*>e3.3.3.3/32         192.168.23.3                                   0 3 i
*>e4.4.4.4/32         192.168.24.4                                   0 4 i
*>e5.5.5.5/32         192.168.25.5                                   0 5 i
*>e6.6.6.6/32         192.168.26.6                                   0 6 i

We see all leaf switch loopback interfaces in the BGP table of our spine switches. Let’s check all leaf switches:

LEAF1# show ip bgp
BGP routing table information for VRF default, address family IPv4 Unicast
BGP table version is 12, Local Router ID is 3.3.3.3
Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup, 2 - best2

   Network            Next Hop            Metric     LocPrf     Weight Path
*>e1.1.1.1/32         192.168.13.1                                   0 12 i
*>e2.2.2.2/32         192.168.23.2                                   0 12 i
*>l3.3.3.3/32         0.0.0.0                           100      32768 i
* e4.4.4.4/32         192.168.13.1                                   0 12 4 i
*>e                   192.168.23.2                                   0 12 4 i
* e5.5.5.5/32         192.168.13.1                                   0 12 5 i
*>e                   192.168.23.2                                   0 12 5 i
* e6.6.6.6/32         192.168.13.1                                   0 12 6 i
*>e                   192.168.23.2                                   0 12 6 i
LEAF2# show ip bgp
BGP routing table information for VRF default, address family IPv4 Unicast
BGP table version is 12, Local Router ID is 4.4.4.4
Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup, 2 - best2

   Network            Next Hop            Metric     LocPrf     Weight Path
*>e1.1.1.1/32         192.168.14.1                                   0 12 i
*>e2.2.2.2/32         192.168.24.2                                   0 12 i
* e3.3.3.3/32         192.168.14.1                                   0 12 3 i
*>e                   192.168.24.2                                   0 12 3 i
*>l4.4.4.4/32         0.0.0.0                           100      32768 i
* e5.5.5.5/32         192.168.14.1                                   0 12 5 i
*>e                   192.168.24.2                                   0 12 5 i
* e6.6.6.6/32         192.168.14.1                                   0 12 6 i
*>e                   192.168.24.2                                   0 12 6 i
LEAF3# show ip bgp
BGP routing table information for VRF default, address family IPv4 Unicast
BGP table version is 15, Local Router ID is 5.5.5.5
Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup, 2 - best2

   Network            Next Hop            Metric     LocPrf     Weight Path
*>e1.1.1.1/32         192.168.15.1                                   0 12 i
*>e2.2.2.2/32         192.168.25.2                                   0 12 i
* e3.3.3.3/32         192.168.15.1                                   0 12 3 i
*>e                   192.168.25.2                                   0 12 3 i
* e4.4.4.4/32         192.168.15.1                                   0 12 4 i
*>e                   192.168.25.2                                   0 12 4 i
*>l5.5.5.5/32         0.0.0.0                           100      32768 i
* e6.6.6.6/32         192.168.15.1                                   0 12 6 i
*>e                   192.168.25.2                                   0 12 6 i
LEAF4# show ip bgp
BGP routing table information for VRF default, address family IPv4 Unicast
BGP table version is 12, Local Router ID is 6.6.6.6
Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup, 2 - best2

   Network            Next Hop            Metric     LocPrf     Weight Path
*>e1.1.1.1/32         192.168.16.1                                   0 12 i
*>e2.2.2.2/32         192.168.26.2                                   0 12 i
* e3.3.3.3/32         192.168.16.1                                   0 12 3 i
*>e                   192.168.26.2                                   0 12 3 i
* e4.4.4.4/32         192.168.16.1                                   0 12 4 i
*>e                   192.168.26.2                                   0 12 4 i
* e5.5.5.5/32         192.168.16.1                                   0 12 5 i
*>e                   192.168.26.2                                   0 12 5 i
*>l6.6.6.6/32         0.0.0.0                           100      32768 i

This is looking good as well. With the two-AS model, we required disable-peer-as-check on the spine switches and allowas-in on the leaf switches. We don’t need those commands now because the leaf switches each have a unique AS number.

Equal-Cost Multi-Path (ECMP)

The leaf switches only select a single path as the best path. That’s the default behavior of BGP. We should use Equal-Cost Multi-Path (ECMP) so the leaf switches can use the path through both spine switches. Let’s configure this:

LEAF1(config)# router bgp 3
LEAF1(config-router)# address-family ipv4 unicast 
LEAF1(config-router-af)# maximum-paths 2
LEAF2(config)# router bgp 4
LEAF2(config-router)# address-family ipv4 unicast 
LEAF2(config-router-af)# maximum-paths 2
LEAF3(config)# router bgp 5
LEAF3(config-router)# address-family ipv4 unicast 
LEAF3(config-router-af)# maximum-paths 2
LEAF4(config)# router bgp 6
LEAF4(config-router)# address-family ipv4 unicast 
LEAF4(config-router-af)# maximum-paths 2

ECMP is now enabled. Let’s check the BGP table:

LEAF1# show ip bgp
BGP routing table information for VRF default, address family IPv4 Unicast
BGP table version is 18, Local Router ID is 3.3.3.3
Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup, 2 - best2

   Network            Next Hop            Metric     LocPrf     Weight Path
*>e1.1.1.1/32         192.168.13.1                                   0 12 i
*>e2.2.2.2/32         192.168.23.2                                   0 12 i
*>l3.3.3.3/32         0.0.0.0                           100      32768 i
*|e4.4.4.4/32         192.168.13.1                                   0 12 4 i
*>e                   192.168.23.2                                   0 12 4 i
*|e5.5.5.5/32         192.168.13.1                                   0 12 5 i
*>e                   192.168.23.2                                   0 12 5 i
*|e6.6.6.6/32         192.168.13.1                                   0 12 6 i
*>e                   192.168.23.2                                   0 12 6 i

Two paths are now selected for each route. You can also verify this from the routing table:

LEAF1# show ip route bgp
IP Route Table for VRF "default"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%' in via output denotes VRF 

1.1.1.1/32, ubest/mbest: 1/0
    *via 192.168.13.1, [20/0], 01:50:53, bgp-3, external, tag 12
2.2.2.2/32, ubest/mbest: 1/0
    *via 192.168.23.2, [20/0], 01:50:57, bgp-3, external, tag 12
4.4.4.4/32, ubest/mbest: 2/0
    *via 192.168.13.1, [20/0], 01:50:51, bgp-3, external, tag 12
    *via 192.168.23.2, [20/0], 01:50:56, bgp-3, external, tag 12
5.5.5.5/32, ubest/mbest: 2/0
    *via 192.168.13.1, [20/0], 01:50:51, bgp-3, external, tag 12
    *via 192.168.23.2, [20/0], 01:50:56, bgp-3, external, tag 12
6.6.6.6/32, ubest/mbest: 2/0
    *via 192.168.13.1, [20/0], 01:50:51, bgp-3, external, tag 12
    *via 192.168.23.2, [20/0], 01:50:56, bgp-3, external, tag 12

Configurations

Want to take a look for yourself? Here you will find the final configuration of each device for the underlay network.

LEAF1

hostname LEAF1

feature bgp
feature pim
feature vn-segment-vlan-based
feature nv overlay

ip pim rp-address 1.1.1.1 group-list 224.0.0.0/4

vlan 1,10
vlan 10
  vn-segment 10010

interface nve1
  no shutdown
  host-reachability protocol bgp
  source-interface loopback0
  member vni 10010
    mcast-group 239.1.1.1

interface Ethernet1/1
  no switchport
  mtu 9216
  mac-address 0050.c253.3001
  ip address 192.168.13.3/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/2
  no switchport
  mtu 9216
  mac-address 0050.c253.3002
  ip address 192.168.23.3/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/3
  switchport access vlan 10

interface loopback0
  ip address 3.3.3.3/32
  ip pim sparse-mode
  
router bgp 3
  router-id 3.3.3.3
  address-family ipv4 unicast
    network 3.3.3.3/32
    maximum-paths 2
  neighbor 192.168.13.1
    remote-as 12
    address-family ipv4 unicast
  neighbor 192.168.23.2
    remote-as 12
    address-family ipv4 unicast

LEAF2

hostname LEAF2

feature bgp
feature pim
feature vn-segment-vlan-based
feature nv overlay

ip pim rp-address 1.1.1.1 group-list 224.0.0.0/4

vlan 1,10
vlan 10
  vn-segment 10010

interface nve1
  no shutdown
  host-reachability protocol bgp
  source-interface loopback0
  member vni 10010
    mcast-group 239.1.1.1

interface Ethernet1/1
  no switchport
  mtu 9216
  mac-address 0050.c253.4001
  ip address 192.168.14.4/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/2
  no switchport
  mtu 9216
  mac-address 0050.c253.4002
  ip address 192.168.24.4/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/3
  switchport access vlan 10

interface loopback0
  ip address 4.4.4.4/32
  ip pim sparse-mode
  
router bgp 4
  router-id 4.4.4.4
  address-family ipv4 unicast
    network 4.4.4.4/32
    maximum-paths 2
  neighbor 192.168.14.1
    remote-as 12
    address-family ipv4 unicast
  neighbor 192.168.24.2
    remote-as 12
    address-family ipv4 unicast

LEAF3

hostname LEAF3

feature bgp
feature pim
feature vn-segment-vlan-based
feature nv overlay

ip pim rp-address 1.1.1.1 group-list 224.0.0.0/4

vlan 1,10
vlan 10
  vn-segment 10010

interface nve1
  no shutdown
  host-reachability protocol bgp
  source-interface loopback0
  member vni 10010
    mcast-group 239.1.1.1

interface Ethernet1/1
  no switchport
  mtu 9216
  mac-address 0050.c253.5001
  ip address 192.168.15.5/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/2
  no switchport
  mtu 9216
  mac-address 0050.c253.5002
  ip address 192.168.25.5/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/3
  switchport access vlan 10

interface loopback0
  ip address 5.5.5.5/32
  ip pim sparse-mode
  
router bgp 5
  router-id 5.5.5.5
  address-family ipv4 unicast
    network 5.5.5.5/32
    maximum-paths 2
  neighbor 192.168.15.1
    remote-as 12
    address-family ipv4 unicast
  neighbor 192.168.25.2
    remote-as 12
    address-family ipv4 unicast

LEAF4

hostname LEAF4

feature bgp
feature pim
feature vn-segment-vlan-based
feature nv overlay

ip pim rp-address 1.1.1.1 group-list 224.0.0.0/4

vlan 1,10
vlan 10
  vn-segment 10010

interface nve1
  no shutdown
  host-reachability protocol bgp
  source-interface loopback0
  member vni 10010
    mcast-group 239.1.1.1

interface Ethernet1/1
  no switchport
  mtu 9216
  mac-address 0050.c253.6001
  ip address 192.168.16.6/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/2
  no switchport
  mtu 9216
  mac-address 0050.c253.6002
  ip address 192.168.26.6/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/3
  switchport access vlan 10

interface loopback0
  ip address 6.6.6.6/32
  ip pim sparse-mode

router bgp 6
  router-id 6.6.6.6
  address-family ipv4 unicast
    network 6.6.6.6/32
    maximum-paths 2
  neighbor 192.168.16.1
    remote-as 12
    address-family ipv4 unicast
  neighbor 192.168.26.2
    remote-as 12
    address-family ipv4 unicast

SPINE1

hostname SPINE1

feature bgp
feature pim

ip pim rp-address 1.1.1.1 group-list 224.0.0.0/4

interface Ethernet1/1
  no switchport
  mtu 9216
  mac-address 0050.c253.1001
  ip address 192.168.13.1/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/2
  no switchport
  mtu 9216
  mac-address 0050.c253.1002
  ip address 192.168.14.1/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/3
  no switchport
  mtu 9216
  mac-address 0050.c253.1003
  ip address 192.168.15.1/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/4
  no switchport
  mtu 9216
  mac-address 0050.c253.1004
  ip address 192.168.16.1/24
  ip pim sparse-mode
  no shutdown

interface loopback0
  ip address 1.1.1.1/32
  ip pim sparse-mode
  
router bgp 12
  router-id 1.1.1.1
  address-family ipv4 unicast
    network 1.1.1.1/32
  neighbor 192.168.13.3
    remote-as 3
    address-family ipv4 unicast
  neighbor 192.168.14.4
    remote-as 4
    address-family ipv4 unicast
  neighbor 192.168.15.5
    remote-as 5
    address-family ipv4 unicast
  neighbor 192.168.16.6
    remote-as 6
    address-family ipv4 unicast

SPINE2

hostname SPINE2

feature bgp
feature pim

ip pim rp-address 1.1.1.1 group-list 224.0.0.0/4

interface Ethernet1/1
  no switchport
  mtu 9216
  mac-address 0050.c253.2001
  ip address 192.168.23.2/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/2
  no switchport
  mtu 9216
  mac-address 0050.c253.2002
  ip address 192.168.24.2/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/3
  no switchport
  mtu 9216
  mac-address 0050.c253.2003
  ip address 192.168.25.2/24
  ip pim sparse-mode
  no shutdown

interface Ethernet1/4
  no switchport
  mtu 9216
  mac-address 0050.c253.2004
  ip address 192.168.26.2/24
  ip pim sparse-mode
  no shutdown

interface loopback0
  ip address 2.2.2.2/32
  ip pim sparse-mode

router bgp 12
  router-id 2.2.2.2
  address-family ipv4 unicast
    network 2.2.2.2/32
  neighbor 192.168.23.3
    remote-as 3
    address-family ipv4 unicast
  neighbor 192.168.24.4
    remote-as 4
    address-family ipv4 unicast
  neighbor 192.168.25.5
    remote-as 5
    address-family ipv4 unicast
  neighbor 192.168.26.6
    remote-as 6
    address-family ipv4 unicast

That completes the underlay network configuration.

Overlay Network

Let’s configure the overlay network.




We need to add the nv overlay evpn command on all switches, otherwise you can’t use the L2VPN EVPN address family. Enable this on all switches:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now!

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You’ve Ever Spent on Your Cisco Career!
  • Full Access to our 812 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)
408 Sign Ups in the last 30 days
satisfaction-guaranteed

  • 100% Satisfaction Guaranteed!
  • You may cancel your monthly membership at any time.
  • No Questions Asked!

Ask a question or start a discussion by visiting our Community Forum