Spine and Leaf datacenter style Home Lab

Overview: Layer 3 Spine and Leaf

The hardware used in my Homelab: Spine and leafs: Cisco 3750X/Cisco 3850/Cisco 3650x. Cisco Router 2921 as boarder leafs. Servers: HPE ProLiant DL 360P G8, HPE ProLiant DL 380P G9 and HPE ProLiant 360P G7

The code to my entire home lab fabric can be found on my GitHub .Spine & Leaf underlay python source code . The entire infrastructure was automatically provisioned using python(netmiko ssh based module)

It’s a simple layer 3 spine and leaf point to point underlay fabric.

“The entire infrastructure was automatically provisioned using python(netmiko ssh based module)” 
Top view: This is during a server upgrade
HPE ProLiant DL380P.
The beginning

The layer 3 / layer 2 boundary is at the leaf switches. This means at the leaf layer and below (leaf switches and servers), connection is all attained at layer 2. Subsequently, communication at and above the leaf switches is achieved at layer 3.

It’s using Equal cost multi-path routing to load balance traffic across the layer 3 network. OSPF P2P is used for dynamic routing. Connection from the 3 ESXi hosts(3 HP 380P servers) to leaf switches are layer 2.

“It’s using Equal cost multi-path routing to load balance traffic across the layer 3 network”

Connections to external networks(Remote FlexVPN and internet) are made via a border leaf switch connected to a router. What I like about this is that each host is only a hop away, subsequently latency was low. Sadly I didn’t have access to physical nexus switches to perform the overlay VXLAN, but the routed underlay was read and I even managed to configured multicast PIM sparse mode. Route path tree leading to both rendezvous points(anycast)(spines).

Overview of the Process

To be perfectly honest, what fascinated me the most was the entire planning, design and implementation of this beloved lab, I never once used CLI at all! All of this was through VScode python. From that moment on I become addicted to automation and network programmability. This was my first exposure to network automation!

The planning: IPv4 Subnetting, Port allocation and Port channel(LACP)
The source: The python declarative code parsing data from YAML file for code reusability.

YAML file: This is the network map configuration that will be pushed to the device. You can customise this to add more leafs or spines for the underlay network

I say the most fascinating aspect was seeing all of the switch ports turn into routed ports and light all go from orange(ports no longer participating in STP)to green as the code runs!

It’s highly reusable code considering it’s declarative and procedural(thanks to serialisation language YAML). Generally I like a healthy balanced mix of imperative and declarative code. Didn’t use my beloved object Oriented techniques(classes,attributes,functions). I was in such a rush to get working.

Sadly I will migrate to layer 2.

I will migrate to a layer 2 Spine and Leaf….

This is essentially moving up the L2/L3 boundary to the spines. This allows for 90% virtualised infrastructure, because I can use vSwitch on ESXi as leaf switches. Means I only need two physical switches as spines, it will allows for VMs to transverse across the fabric and hosts without requiring setup changes. Overall will save me the heat and electric bill. Much more practical in the long run!

So much passion and love went into this.

This Lab helped with my ability to pass compTIA a+, Net+, and server+ in less than 72 hours!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s