Building network automation solutions

9 module online course

Start now!

Building Unnumbered Ethernet Lab with netsim-tools

Last week I described the new features added to netsim-tools release 0.4, including support for unnumbered interfaces and OSPF routing. Now let’s see how I used them to build a multi-vendor lab to test which platforms could be made to interoperate when running OSPF over unnumbered Ethernet interfaces.

This blog post has been updated to use the new netlab CLI introduced in netsim-tools release 0.8

I needed to define an unnumbered addressing pool first:

addressing:
  core:
    unnumbered: true

I wanted to run OSPF on all devices in the lab:

module: [ ospf ]

I built Vagrant/libvirt boxes for four different platforms (Arista vEOS 4.25.0, Cisco IOS XE 16.06.01, Cisco Nexus 9000v NXOS 9.3(6), Juniper vSRX 3.0 Junos 20.3R1.8), so I needed four nodes in my lab network. As each node uses a different Vagrant box, I couldn’t use default device type:

nodes:
- name: c_nxos
  device: nxos
- name: c_csr
  device: csr
- name: a_eos
  device: eos
- name: j_vsrx
  device: vsrx

Finally, I created a full mesh of P2P links. Each link has two nodes connected to it, and uses core (unnumbered) address pool.

links:
- c_nxos:
  a_eos:
  role: core

- c_nxos:
  c_csr:
  role: core

- c_nxos:
  j_vsrx:
  role: core

- a_eos:
  j_vsrx:
  role: core

- a_eos:
  c_csr:
  role: core

- c_csr:
  j_vsrx:
  role: core

Notes:

  • You did notice I didn’t have to define interfaces on individual nodes, right?
  • I had to use a dictionary format to specify custom addressing pool, otherwise I could specify the links as simple strings like c_nxos-a_eos

Next Steps

  • Install netsim-tools and a lab virtualization provider of your choice.
  • Create Vagrantfile, Ansible inventory in hosts.yml, and ansible.cfg with netlab create command.
  • Start the lab with vagrant up
  • Wait for the network devices to boot. Write this blog post while waiting. At least the libvirt provider starts them in parallel (as opposed to virtualbox provider that starts them in sequence).
  • Deploy IP addressing and OSPF routing configuration with ‌netlab initial -v (v = verbose). Here’s the log file in case you’d like to see how it worked.
  • Use netlab connect to connect to lab devices and inspect the results.
  • Destroy the lab with vagrant destroy –force.

Results

It works. The only glitch I encountered was the incorrect subnet mask in Arista EOS hello packets:

  • OSPFv2 RFC (RFC 2328) specifies that the subnet mask in hello packets sent over unnumbered interfaces should be 0.0.0.0.
  • Arista EOS 4.25.0 sends the subnet mask used by the interface supplying the IP address – 255.255.255.255.
  • Cisco IOS and Nexus OS ignore the subnet mask and establish the adjacency.
  • Junos rejects the incoming hello packets due to invalid subnet mask.

A quick search found an Arista EOS support article describing the ‌interface unnumbered hello mask tx 0.0.0.0 configuration command that solved the problem. Mission accomplished. I also added that command to EOS OSPF configuration template (until the netsim-tools release 0.5 is out, you’ll find it in the dev_0.5 branch).

More to Explore

Directory with all relevant lab files including:

You might also want to watch the Using OSPF in Leaf-and-Spine Fabrics videos that inspired me to run this test.

Revision History

2021-07-12
Updated the blog post to use the new netlab CLI.

Blog posts in this series

1 comments:

  1. Interesting, thanks for working on this.

    I think I might be able to couple it with containerlab, to swap out vagrant and keep the configuration logic.

Add comment
Sidebar