Building network automation solutions

9 module online course

Start now!

netlab VXLAN Bridging Example

netlab release 1.3 introduced support for VXLAN transport with static ingress replication. Time to check how easy it is to replace a VLAN trunk with VXLAN transport. We’ll use the lab topology from the VLAN trunking example, replace the VLAN trunk between S1 and S2 with an IP underlay network, and transport Ethernet frames across that network with VXLAN.

Lab topology

Lab topology

We still have to define the VLANs; we’ll set VLAN mode to bridge as we don’t want to do any routing between VLANs.

Defining VLANs
    mode: bridge
    mode: bridge

Next: nodes and links. The only difference from the VLAN trunking topology is the last link: a point-to-point IP link between S1 and S2.

Defining nodes and links
nodes: [ h1, h2, h3, h4, s1, s2 ]

- h1:
    vlan.access: red
- h2:
    vlan.access: red
- h3:
    vlan.access: blue
- h4:
    vlan.access: blue
- s1:

Finally a touch of magic. We’ll deploy VLAN, VXLAN and OSPF configuration modules on the switches – and that’s it (full topology).

Defining device groups
    members: [ h1, h2, h3, h4 ]
    device: linux
    members: [ s1,s2 ]
    module: [ vlan,vxlan,ospf ]

Behind the scenes:

  • OSPF configuration module starts OSPF routing process on both switches, enabling IP connectivity between their loopback interfaces (which are then used as VXLAN VTEPs).
  • VLAN configuration module creates VLAN data structures and figures out that S1 and S2 need red and blue VLANs based on the VLAN access interfaces.
  • By default, the VXLAN configuration module transports all local VLANs across the underlay network. You can change that behavior with vxlan.vlans list, and extend only some of the VLANs across the underlay network.
  • VXLAN configuration module automatically builds per-VLAN ingress replication lists for every node using vxlan module based on which other nodes use the same VLAN. You can even define multiple VXLAN bridging domains.

Here’s a sample Arista EOS configuration generated during the netlab initial process:

Arista cEOS VXLAN bridging configuration
hostname s1
spanning-tree mode mstp
vlan 1000
   name red
vlan 1001
   name blue
interface Ethernet1
   switchport access vlan 1000
interface Ethernet2
   switchport access vlan 1001
interface Ethernet3
   description s1 -> s2
   no switchport
   ip address
   ip ospf network point-to-point
   ip ospf area
interface Loopback0
   ip address
   ip ospf area
interface Vlan1000
   description VLAN red (1000) -> [h1,h2,s2]
interface Vlan1001
   description VLAN blue (1001) -> [h3,h4,s2]
interface Vxlan1
   vxlan source-interface Loopback0
   vxlan udp-port 4789
   vxlan vlan 1000 vni 101000
   vxlan vlan 1001 vni 101001
   vxlan vlan 1000 flood vtep
   vxlan vlan 1001 flood vtep
ip routing
router ospf 1
   max-lsa 12000

Want to run this lab on your own, or try it out with different devices? No problem:

Latest blog posts in Build Virtual Labs with netlab series

Add comment