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.
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
- 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
- Create Vagrantfile, Ansible inventory in hosts.yml, and ansible.cfg with create-topology -t name -i -c -g.
- 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 initial-config.ansible -v (v = verbose). Here’s the log file in case you’d like to see how it worked.
- Use connect.sh script to connect to lab devices and inspect the results.
- Destroy the lab with vagrant destroy –force.
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:
- Network topology
- Vagranfile (imagine copy-pasting it together manually)
- Configuration deployment log file
- Final device configurations
You might also want to watch the Using OSPF in Leaf-and-Spine Fabrics videos that inspired me to run this test.