02 - VXLAN Part II. The Underlay Network - Unicast Routing
02 - VXLAN Part II. The Underlay Network - Unicast Routing
Introduction
Our example network consists of four Cisco Nexus 9000 switches. The
edge switches Leaf-101 and Leaf-102 works as a VTEP (VXLAN Tunnel
Endpoint) devices. VTEPs are responsible for encapsulation of Ethernet
frames received from directly connected hosts with VXLAN header as well
as removing VXLAN header from the packet received from another VTEP
switch. Spine-11 and Spine-12 are the core switches. These switches are
not aware of hosts/VMs behind the VTEP Leaf switches, Spine switches
only route packet between VTEP switches.
Routing protocols:
IP addressing
Inter-switch link:
All links between switches are Point-to-Point (P2P) links. It is common practice to
use network mask / 30 or / 31 on P2P links. Instead of using dedicated sub-network
between switches, I am going to use an unnumbered IP-addressing scheme where
link addresses are borrowed from the Loopback 0 interface.
Loopback 0:
As already mentioned, Inter-switch links borrow the Loopback 0 ip
address. Loopback0 is also used for underlay routing and as an OSPF
RID.
Loopback 100:
Is used as a VTEP address. We could use the Loopback 0 address for both
RID and VTEP address but by using dedicated VTEP IP-address, we can
remove the Leaf switch from the VXLAN domain by shutting down the
Loopback 100. In this way, we can remove the switch from the VXLAN
domain without removing it from the Underlay network and we can
investigate possible problems in the underlay network without disturbing
server traffic.
Configuration examples
Note that “ip host” configurations in line four to eight are optional as well
the last line “name-lookup” under the OSPF configuration. By using those
optional commands, we get VTEP names on the “show ip ospf neighbor”
instead of RID IP-address.
interface Ethernet1/2
no switchport
medium p2p
ip unnumbered loopback0
ip ospf network point-to-point
ip router ospf UNDERLAY-NET area
0.0.0.0
no shutdown
interface loopback0
description ** RID/Underlay **
ip address 192.168.0.101/32
ip router ospf UNDERLAY-NET area
0.0.0.0
!
interface loopback100
description ** VTEP/Overlay **
ip address 192.168.100.101/32
ip router ospf UNDERLAY-NET area
0.0.0.0
!
router ospf UNDERLAY-NET
router-id 192.168.0.101
name-lookup
interface Ethernet1/2
no switchport
medium p2p
ip unnumbered loopback0
ip ospf network point-to-point
ip router ospf UNDERLAY-NET area
0.0.0.0
no shutdown
interface loopback0
description ** RID/Underlay **
ip address 192.168.0.11/32
ip router ospf UNDERLAY-NET area
0.0.0.0
!
router ospf UNDERLAY-NET
router-id 192.168.0.11
name-lookup
Monitoring
There are two equal costs links between the Leaf switches and OSPF will use both links.
Note! ECMP load sharing is based on 5-tuple (src/dst IP, Transport protocol and src/dst
ports of transport protocol). In VXLAN header, the only changing value is source UDP port
number, which is calculated from the inner frame. This way the traffic flows from hosts/VMs can
be differentiated and send over the different physical links.