IP Unnumbered

Introduction:

Spine-Leaf topologies have helped solve the problem of scalability within network fabrics, but several complications arise when deployed at scale. One of these complications relates to the IP addressing of point-to-point networks used to build the ECMP fabric. When building a Spine-Leaf topology, routed point-to-point interfaces are used to connect each Leaf switch to each Spine switch. Creating these routed links can consume a large amount of address space and it can make automating configurations more complicated due to the number of variables that come into play. Thankfully, IP unnumbered and unnumbered OSPF helps to alleviate some of these problems.

The Problem Space:

Let’s take a look at the topology below:

Screen Shot 2018-11-15 at 9.55.35 PM

This is a small topology, but we can see that eight /31 networks need to be created to support router adjacencies and ECMP between the Leaf and Spine layer. If we were to use multiple uplinks between each Leaf and Spine, we’d also be increasing the number of OSPF adjacencies that need to be formed. While this isn’t necessarily a problem with a small network, it’s easy to see how it becomes problematic as the environment scales out:

Screen Shot 2018-11-15 at 10.11.30 PM

The Solution Space:

Rather than relying on /31 subnets to form each routed point-to-point link, we can use IP unnumbered interfaces and unnumbered OSPF to simplify our configuration and design. IP unnumbered allows an interface to borrow the IP address of another interface on the router to process IP packets. Best practice is to use a loopback interface since it is always up unless inadvertently shutdown. IP unnumbered can only be used on point-to-point links; do not try to use IP unnumbered on a broadcast network…it will not work and will only give you headaches.

In the topology below, I created interface loopback1 on each of the routers and assigned it a /32 IP address. I then configured each of the routed links between the Leaf and Spine switches to borrow this loopback IP address. OSPF adjacencies are established using these IP addresses by configuring ip ospf area 0 on the routed interfaces.

Screen Shot 2018-11-15 at 10.30.33 PM

Here are the configurations:

SPINE-1:

config t
!
router ospf 1
router-id 10.1.1.1
!
int lo1
ip address 10.1.1.1 255.255.255.255
!
int range gi0/1-3
no switchport
ip ospf network point-to-point
ip unnumbered loopback1
ip ospf 1 area 0
!
end
!
wr

SPINE-2:

config t
!
router ospf 1
router-id 10.1.1.2
!
int lo1
ip address 10.1.1.2 255.255.255.255
!
int range gi0/1-3
no switchport
ip ospf network point-to-point
ip unnumbered loopback1
ip ospf 1 area 0
!
end
!
wr

LEAF-1:

config t
!
router ospf 1
router-id 10.2.2.1
!
int lo1
ip address 10.2.2.1 255.255.255.255
!
int range gi0/1-2
no switchport
ip ospf network point-to-point
ip unnumbered loopback1
ip ospf 1 area 0
!
end
!
wr

LEAF-2:

config t
!
router ospf 1
router-id 10.2.2.2
!
int lo1
ip address 10.2.2.2 255.255.255.255 
!
int range gi0/1-2
no switchport
ip ospf network point-to-point
ip unnumbered loopback1
ip ospf 1 area 0
!
end
!
wr

LEAF-3:

config t
!
router ospf 1
router-id 10.2.2.3
!
int lo1
ip address 10.2.2.3 255.255.255.255
!
int range gi0/1-2
no switchport
ip ospf network point-to-point
ip unnumbered loopback1
ip ospf 1 area 0
!
end
!
wr

Now, let’s check our adjacencies:

Screen Shot 2018-11-15 at 10.43.41 PMScreen Shot 2018-11-15 at 10.43.52 PMScreen Shot 2018-11-15 at 10.44.29 PMScreen Shot 2018-11-15 at 10.44.49 PMScreen Shot 2018-11-15 at 10.44.42 PM

Conclusion:

As demonstrated in this post, using unnumbered OSPF simplifies the configuration, opens the door for easier automation thanks to the reduced variability in configuration, and conserves IP address space. IP unnumbered is a simple solution to the some of the problems introduced when Spine-Leaf topologies are deployed at scale. With the exception of Arista, most of the common NOS platforms such as IOS, NX-OS, Cumulus Linux, and Junos supports IP unnumbered.

 

Leave a comment