# Copyright (C) 2016-2017 Cumulus Networks, inc.
#
# All Rights reserved.
#
# This software is subject to the Cumulus Networks End User License Agreement available
# at the following locations:.
#
# Internet: https://cumulusnetworks.com/downloads/eula/latest/view/
#
# Cumulus Linux systems: /usr/share/cumulus/EULA.txt

Scenario
========

   +-----------+     +------------+
   |  AS 65100 |     |  AS 65100  |
   |           |     |            |
   |  spine-1  |     |  spine-X   |
   +-----------+     +------------+
        |       \   /       |
        |        \ /        |
        |         X         |
        |        / \        |
        |       /   \       |
  +------------+     +------------+
  |  AS 65201  |     |  AS 6520Y  |
  |            |     |            |
  |   leaf-1   |     |   leaf-Y   |
  +------------+     +------------+
    |        |         |        |
    |        |         |        |
 host1     hostN    host1     hostN


- 2-Tier CLOS network with X Spine and Y Leaf nodes
- Hosts hanging off of each Leaf on VLAN 100 and VLAN 200
- Each Leaf (VTEP) is configured for vxlan10100 (associated with vlan 100)
  and vxlan10200 (associated with vlan 200)
- Using unnumbered EBGP in Clos


net config commands
===================

On Leaf nodes
leaf-1# net add loopback lo ip address 6.0.0.15/32
leaf-1# net add vxlan vxlan10100 vxlan id 10100
leaf-1# net add vxlan vxlan10100 bridge access 100
leaf-1# net add vxlan vxlan10100 bridge learning off
leaf-1# net add vxlan vxlan10100 vxlan local-tunnelip 6.0.0.15
leaf-1# net add vxlan vxlan10200 vxlan id 10200
leaf-1# net add vxlan vxlan10200 bridge access 200
leaf-1# net add vxlan vxlan10200 bridge learning off
leaf-1# net add vxlan vxlan10200 vxlan local-tunnelip 6.0.0.15
leaf-1# net add bridge bridge ports swp3-4
Note: swp3 and swp4 on leaf-1 connect to host-11 and host-12

To turn on ARP suppression
leaf-1# net add vlan 100 ip forward off
leaf-1# net add vxlan vxlan10100 bridge arp-nd-suppress on
leaf-1# net add vlan 200 ip forward off
leaf-1# net add vxlan vxlan10200 bridge arp-nd-suppress on

Assuming EBGP session with Spines are already setup
leaf-1# net add bgp evpn neighbor SPINES activate
leaf-1# net add bgp evpn advertise-all-vni
Note: SPINES is a peer-group with all Spines as peer-group members

To customise the Route Distinguisher and/or Route Target values for a VNI
leaf-1# net add bgp evpn vni 10100 rd 10:100
leaf-1# net add bgp evpn vni 10100 route-target import 10:100
leaf-1# net add bgp evpn vni 10100 route-target export 10:100


On Spine nodes
Assuming EBGP session with Leaf nodes are already setup
spine-1# net add bgp evpn neighbor LEAF activate
Note: LEAF is a peer-group with all Leaf nodes as peer-group members

Review and commit changes
leaf-1/spine-1# net pending
leaf-1/spine-1# net commit


Verification
============
leaf-1# net show bgp evpn route
leaf-1# net show bgp evpn route rd <rd>
leaf-1# net show bgp evpn route rd <rd> mac <mac>
leaf-1# net show bgp evpn route rd <rd> type macip
leaf-1# net show bgp evpn route rd <rd> type multicast
leaf-1# net show bgp evpn route type macip
leaf-1# net show bgp evpn route type multicast
leaf-1# net show bgp evpn route vni all
leaf-1# net show bgp evpn route vni 10100
leaf-1# net show bgp evpn route vni 10100 mac <mac>
leaf-1# net show bgp evpn route vni 10100 multicast <ipv4>
leaf-1# net show bgp evpn route vni 10100 type macip
leaf-1# net show bgp evpn route vni 10100 type multicast
leaf-1# net show bgp evpn summary
leaf-1# net show bgp evpn vni 10100
leaf-1# net show evpn vni 10100
leaf-1# net show evpn mac vni all
leaf-1# net show evpn mac vni all vtep <ipv4>
leaf-1# net show evpn mac vni 10100
leaf-1# net show evpn mac vni 10100 mac <mac>
leaf-1# net show evpn mac vni 10100 vtep <ipv4>

