You're reading the deprecated documentation on readthedocs.io. The documentation has moved to netlab.tools.

EBGP Data Center Fabric

We want to create EBGP-only leaf-and-spine. The fabric will have two leafs (l1, l2) and two spines (s1, s2).

The only routing protocol running in the network is BGP.

module: [ bgp ]

Default device type is Arista EOS:

defaults:
  device: eos

The network topology has four nodes. Each node has a different AS number:

nodes:
  s1:
    bgp:
      as: 65000
  s2:
    bgp:
      as: 65001
  l1:
    bgp:
      as: 65100
  l2:
    bgp:
      as: 65101

The switches are connected into a leaf-and-spine fabric:

links:
- s1-l1
- s1-l2
- s2-l1
- s2-l2

By default, each switch advertises its loopback interface into BGP (there are no stub links in the network topology).

Resulting Data Structures

Data structures generated by the BGP data transformation module include the list of BGP neighbor. Each node has two EBGP neighbors – here is the data structure describing S2:

- bgp:
    as: 65001
    neighbors:
    - as: 65100
      ipv4: 10.1.0.9
      name: l1
      type: ebgp
    - as: 65101
      ipv4: 10.1.0.13
      name: l2
      type: ebgp
    next_hop_self: true

Resulting Device Configurations

The above topology generates the following BGP-related device configuration for S1 (Arista EOS):

router bgp 65000
  neighbor 10.1.0.1 remote-as 65100
  neighbor 10.1.0.1 description l1
!
  neighbor 10.1.0.5 remote-as 65101
  neighbor 10.1.0.5 description l2
!
 address-family ipv4
!
  network 10.0.0.3/32
!
!
  neighbor 10.1.0.1 activate
  neighbor 10.1.0.5 activate

And this is the BGP configuration for an Arista EOS leaf switch:

router bgp 65000
  neighbor 10.0.0.3 remote-as 65000
  neighbor 10.0.0.3 description s1
  neighbor 10.0.0.3 update-source Loopback0
  neighbor 10.0.0.3 next-hop-self
!
  neighbor 10.0.0.4 remote-as 65000
  neighbor 10.0.0.4 description s2
  neighbor 10.0.0.4 update-source Loopback0
  neighbor 10.0.0.4 next-hop-self
!
 address-family ipv4
!
  network 10.0.0.2/32
!
!
  neighbor 10.0.0.3 activate
  neighbor 10.0.0.4 activate

Complete network topology

module: [ bgp ]

defaults:
  device: eos

nodes:
  s1:
    bgp:
      as: 65000
  s2:
    bgp:
      as: 65001
  l1:
    bgp:
      as: 65100
  l2:
    bgp:
      as: 65101

links:
- s1-l1
- s1-l2
- s2-l1
- s2-l2