OSPF Unnumbered Sample Configurations

Follow

Environment

  • Cumulus Linux, all versions

Background

Cumulus Linux supports provisioning systems in an "unnumbered" fashion as a way to limit address space consumption. More precisely, this method is one where you can reuse the IP address assigned to the loopback on your point-to-point links to neighboring nodes. While other articles in this Knowledge Base provide automation demos that show how to automatically provision networks set up in this fashion with Ansible and Puppet, this article is meant to show you what the configurations look like on the system after the automation tools have run. This way, if you have other automation tools in your environment, you can leverage this as a sample for how to set up the systems.

Topology

The topology used in this example is from our 2-Spine, 2-Leaf Cumulus Workbench deployments. Below is a picture reflecting the cabling in use between each of the four nodes.

Configuring the Interfaces

The first component to set up is the interface configuration. You do this in the /etc/networking/interfaces file. The primary steps are:

  1. Enable and assign an IP address to the loopback interface.
  2. Enable and utilize the same IP address from the loopback interface on the remaining point-to-point interfaces in the system.

 

Leaf1 Leaf2
auto lo
iface lo inet loopback
auto lo:1
iface lo:1
  address 10.2.1.1/32
auto swp1 iface swp1 address 10.2.1.1/32 auto swp2 iface swp2 address 10.2.1.1/32 auto swp3 iface swp3 address 10.2.1.1/32 auto swp4 iface swp4 address 10.2.1.1/32
auto swp17 iface swp17 address 10.2.1.1/32 auto swp18 iface swp18 address 10.2.1.1/32 auto swp19 iface swp19 address 10.2.1.1/32 auto swp20 iface swp20 address 10.2.1.1/32
auto lo
iface lo inet loopback
auto lo:1
iface lo:1
  address 10.2.1.2/32
auto swp1 iface swp1 address 10.2.1.2/32 auto swp2 iface swp2 address 10.2.1.2/32 auto swp3 iface swp3 address 10.2.1.2/32 auto swp4 iface swp4 address 10.2.1.2/32
auto swp17 iface swp17 address 10.2.1.2/32 auto swp18 iface swp18 address 10.2.1.2/32 auto swp19 iface swp19 address 10.2.1.2/32 auto swp20 iface swp20 address 10.2.1.2/32
Spine1 Spine2
auto lo
iface lo inet loopback
auto lo:1
iface lo:1
  address 10.2.1.3/32
auto swp1 iface swp1 address 10.2.1.3/32 auto swp2 iface swp2 address 10.2.1.3/32 auto swp3 iface swp3 address 10.2.1.3/32 auto swp4 iface swp4 address 10.2.1.3/32
auto swp17 iface swp17 address 10.2.1.3/32 auto swp18 iface swp18 address 10.2.1.3/32 auto swp19 iface swp19 address 10.2.1.3/32 auto swp20 iface swp20 address 10.2.1.3/32
auto lo
iface lo inet loopback
auto lo:1
iface lo:1
  address 10.2.1.4/32
auto swp1 iface swp1 address 10.2.1.4/32 auto swp2 iface swp2 address 10.2.1.4/32 auto swp3 iface swp3 address 10.2.1.4/32 auto swp4 iface swp4 address 10.2.1.4/32
auto swp17 iface swp17 address 10.2.1.4/32 auto swp18 iface swp18 address 10.2.1.4/32 auto swp19 iface swp19 address 10.2.1.4/32 auto swp20 iface swp20 address 10.2.1.4/32

 

Configuring OSPF under Quagga

The second component to configure is to set up OSPF under Quagga. The primary steps are:

  1. Ensure that the router-id is set to the loopback IP address.
  2. Ensure the IP address used by the loopback has a corresponding network statement.
  3. Set the interfaces facing the neighboring nodes into point-to-point mode.

The sample below is not meant to reflect the whole Quagga configuration, but rather just the specific configuration lines that reflect the topology from the demos referenced at the beginning of the article. The command stanzas are also in the order highlighted in the steps above and not how Quagga will reorder them in the running or saved configuration.

Leaf1 Leaf2
router-id 10.2.1.1
router ospf
  ospf router-id 10.2.1.1
  network 10.2.1.1/32 area 0.0.0.0
!
interface swp1
  ip ospf network point-to-point
!
interface swp2
  ip ospf network point-to-point
!
interface swp3
  ip ospf network point-to-point
!
interface swp4
  ip ospf network point-to-point
!
interface swp17
  ip ospf network point-to-point
!
interface swp18
  ip ospf network point-to-point
!
interface swp19
  ip ospf network point-to-point
!
interface swp20
  ip ospf network point-to-point
router-id 10.2.1.2
router ospf
  ospf router-id 10.2.1.2
  network 10.2.1.2/32 area 0.0.0.0
!
interface swp1
  ip ospf network point-to-point
!
interface swp2
  ip ospf network point-to-point
!
interface swp3
  ip ospf network point-to-point
!
interface swp4
  ip ospf network point-to-point
!
interface swp17
  ip ospf network point-to-point
!
interface swp18
  ip ospf network point-to-point
!
interface swp19
  ip ospf network point-to-point
!
interface swp20
  ip ospf network point-to-point
Spine1 Spine2
router-id 10.2.1.3
router ospf
  ospf router-id 10.2.1.3
  network 10.2.1.3/32 area 0.0.0.0
!
interface swp1
  ip ospf network point-to-point
!
interface swp2
  ip ospf network point-to-point
!
interface swp3
  ip ospf network point-to-point
!
interface swp4
  ip ospf network point-to-point
!
interface swp17
  ip ospf network point-to-point
!
interface swp18
  ip ospf network point-to-point
!
interface swp19
  ip ospf network point-to-point
!
interface swp20
  ip ospf network point-to-point
router-id 10.2.1.4
router ospf
  ospf router-id 10.2.1.4
  network 10.2.1.4/32 area 0.0.0.0
!
interface swp1
  ip ospf network point-to-point
!
interface swp2
  ip ospf network point-to-point
!
interface swp3
  ip ospf network point-to-point
!
interface swp4
  ip ospf network point-to-point
!
interface swp17
  ip ospf network point-to-point
!
interface swp18
  ip ospf network point-to-point
!
interface swp19
  ip ospf network point-to-point
!
interface swp20
  ip ospf network point-to-point

 

Conclusion

By re-utilizing the loopback IP address on your point-to-point links, leveraging Quagga for OSPF, and defining the interfaces as point-to-point within OSPF, deployments of Cumulus Linux can allow you to not have to assign address blocks for the interconnect between multiple nodes, saving that space for your end-systems.

Have more questions? Submit a request

Comments

Powered by Zendesk