Data center
Core13
Compare a classic three-tier data center design with a spine-leaf design.
Say this first
Three tier is access, aggregation and core. It was built for north-south traffic, runs layer 2 up to the aggregation pair, and relies on STP, which blocks half the links. Spine-leaf is a two-stage Clos: every leaf connects to every spine, any leaf reaches any other leaf in exactly two hops (leaf, spine, leaf), and all links forward at once through ECMP routing. You scale it out by adding leaves for ports and spines for bandwidth.
Go deeper
Three tier
- Access switches connect servers, aggregation holds the SVIs, the FHRP and often the services (firewalls, load balancers), core routes between aggregation blocks and to the WAN.
- VLANs stretch from access to aggregation, so STP is in charge of loop prevention and blocks redundant uplinks. Half the bandwidth you paid for sits idle.
- Server-to-server traffic in different blocks climbs to the core and back down. Latency and available bandwidth depend on where the two servers sit.
- Oversubscription compounds at every tier, and growth means buying a bigger aggregation chassis (scale up).
Spine-leaf
- Two layers. Servers, firewalls, routers and storage connect only to leaves. Spines only connect leaves.
- Leaf to spine links are routed, usually /31 point-to-point. No STP between switches.
- Every leaf has an equal-cost path through every spine, so ECMP uses all uplinks.
- Any two servers on different leaves are the same distance apart. Latency is predictable.
- Losing one spine out of four removes 25% of fabric bandwidth, not half of a block.
- Layer 2 between racks, when you need it, is rebuilt on top as an overlay (VXLAN with BGP EVPN).
Three tier Spine-leaf Built for North-south East-west Loop control STP, blocked links Routing, all links active Hops leaf to leaf Varies Always two Growth Scale up chassis Scale out with more boxes Layer 2 reach Native VLANs Overlay (VXLAN) They will ask next
Is three tier wrong today?
No. A small or mostly north-south site can run well on a collapsed core or classic design. The pain shows up with heavy east-west traffic, large layer 2 domains and growth beyond one aggregation pair.
Where does the name Clos come from?
Charles Clos described multistage switching networks for telephone exchanges in the 1950s. A spine-leaf fabric is a folded Clos network: many small switches give the capacity of one huge switch.
Traps
- Saying spine-leaf "needs VXLAN". A pure layer 3 fabric with no overlay is perfectly valid.
- Connecting servers or firewalls to spines. It breaks the uniform two-hop property and complicates the spine.
How did you do?Book 3.2 Switched EthernetBook 3.1 Switching BasicsOwn pageWhat do people mean by east-west and north-south traffic, and why did it change data center design?
Say this first
North-south traffic enters or leaves the data center, for example a user reaching a web server. East-west traffic stays inside it: web to app, app to database, storage replication, VM migration, microservices calling each other. Virtualization and distributed applications made east-west the larger share in most data centers, so designs moved to spine-leaf, which gives every server pair the same bandwidth and latency.
Go deeper
What shifted the traffic
- Multi-tier and microservice apps. One user request fans out into many internal calls.
- Distributed storage and databases. Replication and rebuilds move large volumes between racks.
- Virtualization. Live migration copies VM memory across the network.
- Big data and AI training. Shuffle phases and collective operations hit every node at once.
What it changed
- Topology. Three tier sends cross-block east-west traffic up through aggregation and core. Spine-leaf makes every rack two hops from every other rack.
- Capacity planning. You size leaf uplinks (oversubscription) for server-to-server load, not just for the internet link.
- Security. A perimeter firewall only sees north-south. East-west needs its own controls: segmentation, inter-VRF firewalls, microsegmentation.
- Layer 2 scope. Apps wanted the same subnet in many racks, which pushed overlays such as VXLAN.
They will ask next
How would you prove the traffic mix on an existing network?
Flow telemetry (NetFlow, IPFIX or sFlow) from the aggregation or leaf layer, grouped by source and destination prefix. Compare bytes that stay inside data center prefixes with bytes going to the WAN or internet edge.
Traps
- Swapping the terms. North-south crosses the data center edge, east-west stays inside.
How did you do?Book 1.1 ApplicationsOwn pageHow do you calculate oversubscription on a leaf switch? Walk me through an example.
Say this first
Divide the server-facing bandwidth by the uplink bandwidth. A leaf with 48 x 25G down has 1,200G of downlink. With 6 x 100G up it has 600G of uplink. 1,200 divided by 600 is 2:1. General compute is often built at 3:1 or better, storage and HPC closer to 1:1, and GPU training fabrics at 1:1.
Go deeper
The math
Downlinks Uplinks Ratio 48 x 25G = 1,200G 6 x 100G = 600G 2:1 48 x 10G = 480G 4 x 40G = 160G 3:1 40 x 25G = 1,000G 4 x 100G = 400G 2.5:1 32 x 100G = 3,200G 8 x 400G = 3,200G 1:1 What the ratio really means
- It is the worst case: every server sending at line rate toward other racks at the same moment. Real traffic is burstier and rarely all leaves the rack.
- In a two-stage fabric the spines are not oversubscribed, so the leaf ratio is the fabric ratio. In a five-stage fabric the pod spine to super-spine ratio multiplies with it.
- Plan for failure. With 6 uplinks and one spine down, 1,200G over 500G is 2.4:1.
- Count only the ports you will really use. A rack with 30 servers on a 48-port leaf has a better effective ratio than the box suggests.
They will ask next
How would you get that 48 x 25G leaf to 1:1?
Use only 24 server ports (600G down against 600G up), choose a leaf with more or faster uplinks such as 400G, or accept the ratio for general compute and put storage on a separate non-blocking design.
Why do GPU training fabrics insist on 1:1?
Collective operations (all-reduce) make every GPU send at line rate at the same time. Any oversubscription shows up directly as longer job time, so the back-end fabric is built non-blocking.
Traps
- Comparing port counts instead of bandwidth.
- Ignoring the peer link and border ports when you budget the uplinks.
How did you do?Own pageWhat is the difference between the underlay and the overlay in a data center fabric?
Say this first
The underlay is the physical routed network between the switches. Its only job is IP reachability between switch loopbacks, with ECMP, using eBGP, OSPF or IS-IS. The overlay is the set of virtual networks built on top of it: VXLAN tunnels between VTEPs carrying tenant layer 2 and layer 3 traffic, with BGP EVPN as the control plane. The underlay knows nothing about tenants, VLANs or host MACs.
Go deeper
Underlay
- Point-to-point routed links between leaves and spines, plus loopbacks (router ID and VTEP address).
- Tiny routing table: a few hundred loopbacks even in a large fabric.
- Built for fast convergence and ECMP. MTU set large (9216 is common) to carry VXLAN overhead.
Overlay
- VXLAN encapsulation with a VNI per layer 2 segment and a VNI per tenant VRF.
- BGP EVPN advertises host MACs, host IPs, prefixes and which VTEPs belong to which VNI.
- Holds the scale: thousands of MACs and host routes, many tenants.
Why separate them
- Failure isolation: a tenant change cannot break fabric reachability.
- Simple underlay, rich overlay: you can rebuild tenants without touching the physical design.
Troubleshooting order
Underlay first. Ping VTEP loopback to VTEP loopback, sourced from the loopback, with a full-size packet and DF set. If that fails, nothing above it will work. Then check the EVPN control plane, then the data plane.
They will ask next
Can underlay and overlay both run BGP?
Yes, and often do. eBGP IPv4 unicast on the physical links for the underlay, plus eBGP L2VPN EVPN sessions between loopbacks for the overlay. Some designs carry both address families on the same sessions.
Traps
- Putting tenant subnets into the underlay routing table. They belong in VRFs in the overlay.
What is the difference between top-of-rack and end-of-row switching?
Say this first
Top-of-rack puts one switch, or a pair, in every rack. Servers connect with short copper or DAC cables and the switch has fiber uplinks to the spines or aggregation. End-of-row puts a larger switch at the end or middle of a row and runs structured cabling from every rack to it. Spine-leaf normally uses top-of-rack leaves.
Go deeper
Top-of-rack End-of-row or middle-of-row Server cables Short, inside the rack Long runs across the row Switch count Many small switches Few larger chassis Rack as a unit Yes, pre-cabled racks No, depends on row cabling Unused ports Often stranded per rack Pooled for the row Failure impact One rack Whole row Practical points
- At 25G and 100G, passive DAC works only for a few meters, which favors top-of-rack. Longer runs need active cables or optics.
- Top-of-rack pairs (MLAG or vPC) let you dual-home every server inside the rack.
- Middle-of-row shortens the longest cable run compared with end-of-row.
They will ask next
When does end-of-row still make sense?
Low-density racks, such as storage or older hardware with a few ports each, where a switch per rack would waste most of its ports.
Traps
- Treating top-of-rack and spine-leaf as the same thing. One is about where the switch sits, the other is the topology.
How did you do?Own pageWhat problem does VXLAN solve?
Say this first
VXLAN carries Ethernet frames inside UDP/IP, so a layer 2 segment can span a fully routed fabric. It replaces the 12-bit VLAN ID (4,094 usable VLANs) with a 24-bit VNI (about 16 million segments), keeps the underlay routed with ECMP and no spanning tree, and gives tenants their own segments. It is defined in RFC 7348.
Go deeper
The problems it answers
- Scale of segments. 4,094 VLANs is not enough for a multi-tenant or cloud data center.
- Spanning tree. Stretching VLANs across many racks the classic way means STP, blocked links and large failure domains.
- Workload mobility. VMs and containers want to keep their IP when they move to another rack.
- MAC table size in the core. Underlay switches only see VTEP addresses, not every host MAC.
How it works
A VTEP on the leaf maps a local VLAN to a VNI, wraps the frame in VXLAN, UDP and IP, and sends it to the remote VTEP's loopback. The underlay forwards it like any other UDP packet.
Related encapsulations
GENEVE (UDP 6081) has the same 24-bit VNI plus variable-length options. VMware NSX and some cloud services use it. NVGRE and STT were alternatives that did not win in physical fabrics.
They will ask next
Is VXLAN only for layer 2?
No. With EVPN symmetric IRB, a per-VRF L3VNI carries routed traffic between leaves, so VXLAN transports both bridged and routed tenant traffic.
Why UDP and not GRE?
UDP gives ECMP entropy through the source port, which the VTEP derives from a hash of the inner headers. Underlay switches already hash UDP ports, so different inner flows spread across spines.
Traps
- Calling VXLAN secure or encrypted. It is plain encapsulation with no confidentiality.
- Thinking VXLAN removes broadcast domains. A VNI is still a broadcast domain; EVPN only reduces flooding.
What is a VTEP, and where does it live?
Say this first
A VXLAN tunnel endpoint is the device that encapsulates and decapsulates VXLAN. It maps local VLANs to VNIs, keeps track of which MACs and IPs sit behind which remote VTEP, and sources its tunnels from a loopback advertised into the underlay. Hardware VTEPs are leaf switches. Software VTEPs run in hypervisors and Linux hosts (Open vSwitch, the Linux kernel, VMware NSX).
Go deeper
On each platform
NX-OS interface nve1 no shutdown host-reachability protocol bgp source-interface loopback1 member vni 10010 ingress-replication protocol bgpArista EOS interface Vxlan1 vxlan source-interface Loopback1 vxlan udp-port 4789 vxlan vlan 10 vni 10010Shell ip link add vxlan10010 type vxlan id 10010 local 10.0.1.11 dstport 4789 nolearningWhy a separate VTEP loopback
Most designs use loopback0 for the router ID and BGP peering and loopback1 for the VTEP. In a vPC or MLAG pair, both switches share one VTEP address (an anycast VTEP; on NX-OS a secondary IP on loopback1) so remote leaves see one tunnel endpoint for dual-homed hosts. The router IDs stay unique.
What the VTEP knows
- Local MACs, learned from frames on access ports.
- Remote MACs and IPs, learned from EVPN type 2 routes (or from decapsulated traffic in flood and learn mode).
- Peers, the remote VTEPs it has tunnels to:
show nve peerson NX-OS,show vxlan vtepon EOS.
They will ask next
Is there a tunnel setup handshake between VTEPs?
No. VXLAN tunnels are stateless. A VTEP becomes a "peer" when the control plane tells it that remote VTEP exists, or when it first receives traffic from it in flood and learn mode.
Traps
- Using the shared anycast VTEP address of a vPC pair as the BGP router ID.
How did you do?Own pageWhat is a distributed anycast gateway, and why use it instead of HSRP or VRRP?
Say this first
Every leaf that has a VLAN uses the same gateway IP and the same gateway MAC on that SVI. Hosts always ARP for that one MAC, the local leaf answers and routes, so first-hop routing happens on every leaf at once. There are no FHRP hellos, no active and standby, no hairpin to a central gateway, and a VM that moves to another rack keeps working with its cached ARP entry.
Go deeper
Configuration
NX-OS feature fabric forwarding fabric forwarding anycast-gateway-mac 2020.0000.00aa ! interface Vlan10 vrf member TENANT-A ip address 10.10.10.1/24 fabric forwarding mode anycast-gatewayArista EOS ip virtual-router mac-address 00:1c:73:00:00:99 ! interface Vlan10 vrf TENANT-A ip address virtual 10.10.10.1/24The gateway MAC is one value for the whole fabric, configured identically on every leaf.
Compared with HSRP or VRRP
- HSRP has one active router per group. In a fabric, every rack's traffic would cross to that router.
- FHRPs exchange hellos and fail over in seconds. An anycast gateway has nothing to fail over.
- A moved VM keeps the same gateway MAC and IP, so it does not need to re-ARP.
Operational points
- The gateway IP is shared, so you cannot use it to reach one specific leaf. Give each leaf a unique loopback in the tenant VRF for monitoring.
- DHCP relay must use a unique source per leaf (that loopback) so the server's reply returns to the right leaf, with option 82 link selection telling the server which scope to use.
They will ask next
Do you still need an FHRP anywhere?
Yes, outside the EVPN fabric: classic vPC or MLAG aggregation without EVPN, or edge devices such as firewalls and routers that offer a gateway to a segment.
Traps
- Using different anycast gateway MACs on different leaves. Moved hosts then talk to a MAC that no longer exists locally.
How did you do?Own pageWhat are vPC and MLAG, and what problem do they solve?
Say this first
They let two separate switches act as one LACP partner, so a server or downstream switch can bundle links to both and use all of them. There is no STP blocking and no single switch failure takes the device down, while each switch keeps its own control plane and can be upgraded on its own. vPC is the NX-OS feature. MLAG is the generic term and the name of Arista's feature.
Go deeper
Building blocks
vPC (NX-OS) MLAG (EOS) Job vPC domain MLAG domain The pair, identified by a domain ID Peer link Peer link Port-channel carrying member VLANs and state sync Peer keepalive Heartbeat, dual-primary detection Telling "link down" from "peer dead" vpc 20on a port-channelmlag 20on a port-channelMember port toward the device How the pair looks like one switch
- Both peers send the same LACP system ID. NX-OS derives a vPC system MAC from the domain ID
(
0023.04ee.bexx, where xx is the domain ID in hex). - MAC addresses, ARP entries (with
ip arp synchronize) and IGMP snooping state are synced across the peer link. - Each peer forwards locally. The peer link carries data only for single-attached devices and failures.
- Loop prevention: a frame that arrived over the peer link is not sent out a vPC member port, unless the peer's matching member port is down.
Compared with stacking or VSS
Stacking, VSS and StackWise Virtual merge two switches into one control plane with one config. vPC and MLAG keep two brains. You upgrade one peer at a time, but you must keep the configs consistent, which is what the consistency checks enforce.
They will ask next
Can a vPC domain have three switches?
No, it is always a pair. EVPN multihoming with an ESI is the standards-based way to attach a host to more than two leaves.
What happens to spanning tree?
STP still runs as a safety net. With
peer-switchon NX-OS both peers send BPDUs with the same bridge ID, so downstream switches see one root and there is no reconvergence when one peer fails.
Traps
- Calling vPC a stack. There are two control planes and two configs.
How did you do?Own page- Both peers send the same LACP system ID. NX-OS derives a vPC system MAC from the domain ID
(
What is the difference between a layer 4 and a layer 7 load balancer?
Say this first
A layer 4 load balancer decides with IP addresses and ports only. It forwards or NATs TCP and UDP connections without reading the payload, so it is fast, works with any protocol and needs no certificates. A layer 7 load balancer terminates the client's TCP and usually TLS, parses HTTP or gRPC, and picks a server by host, path, header or cookie. It can rewrite headers, insert X-Forwarded-For, compress and run a WAF, at the cost of more CPU and holding the certificates.
Go deeper
Layer 4 modes
- NAT: rewrites the destination VIP to a server address, one TCP connection end to end.
- Full proxy at layer 4: separate client-side and server-side TCP connections, no payload parsing.
- Direct server return: only the request passes the load balancer.
Layer 7
Always a full proxy with two connections. It can reuse server-side connections, speak HTTP/2 to clients and HTTP/1.1 to servers, and make per-request decisions on the same client connection.
TLS choices
Mode Who decrypts Use Passthrough The server Layer 4, end-to-end TLS, no inspection Termination (offload) The load balancer Layer 7 routing, plain HTTP to servers Re-encryption Both Layer 7 routing with encrypted server-side traffic Same idea on different products
HAProxy
mode tcpvsmode http, F5 FastL4 vs a standard virtual server with an HTTP profile, AWS NLB vs ALB, NGINXstreamvshttp.They will ask next
Can a layer 4 load balancer route by hostname?
Only by peeking at the TLS ClientHello for the SNI (HAProxy
req.ssl_sni), without decrypting. That stops working if the client uses Encrypted Client Hello.
Traps
- Saying layer 7 is always better. Layer 4 is the right choice for non-HTTP protocols and raw throughput.
How did you do?Own pageWhat load-balancing algorithms do you know, and when would you use each?
Say this first
Round robin, the usual default, for short and similar requests. Weighted round robin when servers differ in size. Least connections, often weighted, for long-lived or uneven sessions. Least response time when servers slow down unevenly. Source IP hash or consistent hashing when the same client or key should land on the same server, as with caches. Persistence (stickiness) is a separate setting, by source IP or by cookie.
Go deeper
Algorithm Good for Watch out for Round robin Short, uniform requests Ignores server load Weighted round robin Mixed server sizes Weights need maintenance Least connections WebSockets, database proxies, long sessions A new server with zero connections gets flooded Least response time Servers that degrade unevenly Noisy measurements Source IP hash Simple affinity without cookies Many users behind one NAT all land on one server Consistent hash (ring, Maglev) Caches, sharded backends Adding a server moves only about 1/N of keys Random of two choices Large pools, distributed balancers Needs a load signal Persistence
- Source IP affinity: breaks behind carrier NAT and for mobile users who change IP.
- Cookie insert: the layer 7 balancer sets a cookie naming the server. The most reliable for HTTP.
Defaults
HAProxy uses
balance roundrobinunless told otherwise. F5 pools default to round robin. Envoy's least request picks two random hosts and sends to the less busy one.They will ask next
How do you stop a freshly added server from being overwhelmed under least connections?
Slow start: the balancer ramps the new server's share up over a period, for example
slowstart 30son an HAProxy server line.
Traps
- Recommending source IP persistence for public internet users behind carrier-grade NAT.
How did you do?Own pageHow do load balancer health checks work, and how do you design a good one?
Say this first
The load balancer probes each pool member at an interval, marks it down after a number of consecutive failures and up again after a number of successes. Probes range from ICMP and TCP connect to an HTTP request that must return a given status or text. A good check tests what that server needs to serve requests, through a lightweight endpoint like /healthz, without depending on a shared backend that could mark every member down at once, and uses rise and fall counts to avoid flapping.
Go deeper
Probe types
Probe Proves Misses ICMP Host is up The service TCP connect Port is listening The app returning errors HTTP with expected status or string The app answers correctly Deep dependency problems, by design Passive (real traffic) Real users get errors Idle servers Timers you should know
- HAProxy defaults:
inter 2s,fall 3,rise 2. A dead server is removed after about 6 seconds. - F5 HTTP monitor defaults: interval 5 seconds, timeout 16 seconds.
Design rules
- Shallow, not deep. If every server's check queries the same database, a database hiccup removes the whole pool and turns a slowdown into an outage.
- Drain gracefully. Fail the check or set the member to drain before maintenance so existing sessions finish.
- Know the all-down behavior. Some balancers return 503, others fail open. AWS ALB, for example, sends traffic to all targets when every target is unhealthy.
- Probe source. Checks come from the load balancer's own address. Firewalls and host ACLs must allow it, and a green check does not prove that client traffic works.
They will ask next
How do liveness and readiness checks in Kubernetes map to this?
Readiness is the load balancer's question: should this pod get traffic. A failed readiness probe removes the pod from the Service endpoints. Liveness asks whether to restart the container.
Traps
- Checking only that TCP 443 is open while the application behind it returns 500.
How did you do?Own page- HAProxy defaults:
Compare Fibre Channel, iSCSI and FCoE. What should a network engineer know about storage networking?
Say this first
All three carry SCSI block storage. Fibre Channel is a separate lossless fabric with its own switches, addressing (WWNs and FCIDs), zoning, and buffer-to-buffer credits for flow control. iSCSI runs SCSI over TCP port 3260 on normal Ethernet and IP and relies on TCP for loss recovery. FCoE puts FC frames directly into Ethernet (Ethertype 0x8906) and needs lossless Ethernet through DCB. Newer arrays add NVMe over Fabrics: NVMe/TCP, NVMe over RoCEv2 and NVMe/FC.
Go deeper
Block and file
A SAN gives hosts raw block devices (FC, iSCSI, FCoE, NVMe-oF). A NAS shares files (NFS, SMB).
Fibre Channel essentials
- WWNN and WWPN identify nodes and ports, like burned-in MACs. The switch assigns a 24-bit FCID at fabric login.
- Zoning on the switches decides which initiators may talk to which targets. LUN masking on the array decides which volumes a host sees.
- Credits. A port only transmits when the receiver has advertised buffer space, so FC does not drop for congestion. A slow-drain device instead backs up the fabric.
- Two fabrics. Fabric A and fabric B are physically separate and never joined. Hosts use multipathing across them. Cisco MDS adds VSANs to split one physical fabric into logical ones.
iSCSI essentials
- Initiator (host) and target (array), named by IQNs such as
iqn.2024-01.com.example:array1. - TCP 3260, CHAP for authentication, no encryption by default.
- Multipathing across two subnets rather than link aggregation.
FCoE and DCB
FCoE needs PFC (802.1Qbb) for a no-drop class, ETS (802.1Qaz) for bandwidth shares and DCBX to negotiate them. FIP (Ethertype 0x8914) handles discovery and login. It saw use at the server edge and has faded.
NVMe over Fabrics
NVMe/TCP (port 4420) runs on ordinary networks. NVMe over RoCEv2 (UDP 4791) needs a lossless class.
They will ask next
What is the difference between zoning and LUN masking?
Zoning is enforced by the FC switches and controls reachability between ports. LUN masking is enforced by the array and controls which volumes a host may see. Use both.
Traps
- Saying iSCSI needs a lossless network. It runs on TCP; it likes low loss but does not need DCB.
How did you do?Own page
Working18
What are the wiring rules in a spine-leaf fabric, and how do you scale it?
Say this first
Every leaf connects to every spine. Spines never connect to each other, leaves never connect to each other except an MLAG or vPC peer link, and all endpoints attach to leaves. The number of spines is capped by uplinks per leaf, and the number of leaves is capped by ports per spine. Add leaves for more server ports, add spines for more bandwidth, and go to a five-stage design with super-spines when spine ports run out.
Go deeper
Worked example
Leaves with 48 x 25G down and 6 x 100G up, spines with 64 x 100G:
- Up to 6 spines (one uplink from each leaf to each spine).
- Up to 64 leaves (one spine port per leaf), minus any ports used for border leaves.
- 64 leaves x 48 ports = 3,072 server ports at 25G, or 1,536 dual-homed servers.
How it grows
- More ports: add a leaf (or leaf pair) and cable it to every spine. No change to existing racks.
- More bandwidth: add a spine and one uplink from every leaf. Each leaf gains a new ECMP path.
- Past one spine's port count: build pods (each a spine-leaf), then connect pod spines to a super-spine layer. That is a five-stage Clos. Traffic between pods takes four hops.
Roles on the leaves
Not every leaf has servers. A border leaf connects WAN routers or the internet edge, and a service leaf connects firewalls and load balancers. They are still leaves and follow the same rules.
They will ask next
Why no links between spines?
They add nothing. Traffic between two leaves always goes up one spine and down. Spine-to-spine links would create unequal paths and give the routing protocol alternate paths to hunt through during convergence.
What happens when a spine fails?
Each leaf loses one of its ECMP next hops. With four spines, fabric capacity drops 25% and flows on the failed spine rehash onto the others. That is why you size uplinks for N minus one spines.
Traps
- Using a different number of uplinks from different leaves to the same spine. ECMP assumes equal paths.
- Forgetting border leaves when counting spine ports.
How did you do?Own pageHow does ECMP work in a spine-leaf fabric, and what can go wrong with it?
Say this first
Each leaf learns every remote prefix from every spine at equal cost and installs all of them as next hops. For each packet it hashes header fields, normally the 5-tuple, and the hash picks one uplink, so a flow always takes the same path and stays in order. Problems: it balances flows, not bytes, so a few elephant flows can overload one link; identical hashing at every tier can polarize; and BGP installs only one path unless you raise maximum-paths.
Go deeper
Making it work
- BGP installs one best path by default on IOS, NX-OS and EOS. Configure
maximum-paths(eBGP) to at least the number of spines. On EOS it ismaximum-paths 4 ecmp 4. - With OSPF or IS-IS, equal-cost paths are installed automatically up to the platform's limit.
- VXLAN keeps ECMP useful: the VTEP sets the outer UDP source port from a hash of the inner headers, so different inner flows between the same two VTEPs take different spines.
What goes wrong
- Elephant flows. Backups, storage rebuilds and replication are few and huge. Two of them can land on the same 100G uplink while others idle. Fixes: more or faster uplinks, more parallel streams, or dynamic load balancing (flowlet switching) where the ASIC supports it.
- Polarization. If every switch hashes the same fields with the same function, flows that chose link 1 at one stage all make the same choice at the next stage. Vendors add a per-switch seed.
- Rehash on change. Adding or removing a path can move many flows. Resilient hashing moves only the flows that used the failed path.
- Unequal paths. One leaf with two links to a spine and one link to another breaks the "equal" in ECMP. Keep cabling symmetric.
They will ask next
Why not balance per packet?
Packets of one flow would take paths with different queue depths and arrive out of order. TCP reads reordering as loss, sends duplicate ACKs, retransmits and slows down.
How do you find which uplink a flow uses?
Use the platform's hash calculator (on NX-OS
show routing hash), or send a test flow and watch interface counters. In VXLAN, remember the hash is on the outer header.
Traps
- Saying ECMP gives each flow the sum of all links. One flow is limited to one link.
- Forgetting
maximum-paths, then wondering why only one spine carries traffic.
How did you do?Book 3.4 RoutingOwn page- BGP installs one best path by default on IOS, NX-OS and EOS. Configure
Why do many fabrics use eBGP for the underlay instead of OSPF or IS-IS?
Say this first
RFC 7938 describes it: one protocol for underlay and overlay, no flooding domain, a clean failure boundary on every link, per-neighbor policy, and AS-path loop prevention that stops bad paths in a Clos. It scales to very large fabrics and lets you drain a switch with a route-map. OSPF or IS-IS with iBGP EVPN on top is also common, especially in Cisco reference designs, and is simpler for small fabrics.
Go deeper
Arguments for eBGP
- No flooding. A link flap in a link-state IGP floods LSAs everywhere and triggers SPF on every switch. In eBGP only the affected paths are updated.
- Policy. Route-maps and prefix lists per neighbor. You can drain a spine by prepending AS path.
- One protocol. The same BGP stack carries L2VPN EVPN for the overlay.
- Loop prevention by ASN. With all spines in one ASN, a route cannot go leaf, spine, leaf, spine.
What you must tune
- Detection. Default BGP timers are 60 s keepalive and 180 s hold. Use BFD, and rely on immediate session teardown when a directly connected link goes down.
- Multipath.
maximum-pathsmust be raised or there is no ECMP. - ASN plan. See the ASN scheme question. Bad plans cause path hunting or dropped routes.
When I would pick OSPF or IS-IS
A small or medium fabric, a team that knows OSPF well, or a vendor design that expects an IGP underlay with spines acting as iBGP route reflectors for EVPN. Both approaches work. Consistency matters more.
They will ask next
What does the underlay need to advertise?
Only loopbacks: the router ID loopback used for BGP EVPN peering and the VTEP loopback. Point-to-point subnets are optional, and BGP unnumbered removes them entirely.
Why is iBGP alone a poor underlay?
iBGP needs a full mesh or route reflectors, does not change the next hop by default and has no AS-path loop protection inside the AS. You end up needing an IGP underneath it anyway.
Traps
- Claiming eBGP converges faster by itself. Without BFD and fast link-down handling it is slower than a tuned IGP.
How did you do?Book 4.1 Global InternetOwn pageA spine fails, or you need to upgrade one. What happens to traffic, and how do you take a spine out of service cleanly?
Say this first
On a hard failure the leaf sees the link go down, tears down the directly connected eBGP session at once and removes that spine from the ECMP group. Flows rehash onto the remaining spines in well under a second. If the link stays up but the spine stops forwarding, BFD detects it. For an upgrade I drain first: make the spine's paths less attractive (AS-path prepend, graceful shutdown community, or NX-OS maintenance mode), watch traffic move off, then reload.
Go deeper
Failure detection
- Link down. Fastest. Directly connected eBGP sessions drop immediately when the interface goes down.
- BFD. Catches failures where light stays on: a hung line card, a one-way fiber, a DWDM or media converter in the middle. Typical values are a few hundred milliseconds total detection.
- BGP hold timer. 180 s by default. Never rely on it in a fabric.
Clean drain options
- AS-path prepend outbound on the spine toward every leaf. Leaves still have the path as a backup.
- GRACEFUL_SHUTDOWN community
65535:0(RFC 8326). Receivers that match it set local preference to 0. - Vendor maintenance mode. NX-OS Graceful Insertion and Removal (
system mode maintenance) isolates the switch from routing protocols. EOS has its own maintenance mode for BGP peers and interfaces.
Upgrade routine
- Check the remaining spines can carry the load (oversubscription with N minus one).
- Drain, then confirm interface counters on the spine drop to near zero.
- Upgrade and reload, verify sessions and routes, then undrain.
They will ask next
Why drain at all if ECMP fails over in under a second?
A reload is not one clean failure. Ports come up before routing is ready, and routes can be advertised before the forwarding tables are programmed. That causes black holes. Draining moves traffic before anything breaks, and the undrain step lets the switch settle first.
Traps
- Upgrading two spines at once in a four-spine fabric and halving capacity at peak time.
How did you do?Own pageWalk me through a VXLAN packet. Which headers are added, and how much overhead is it?
Say this first
The VTEP adds an outer Ethernet header (14 bytes), an outer IPv4 header (20), a UDP header (8) with destination port 4789, and the 8-byte VXLAN header holding a 24-bit VNI. That is 50 bytes on an IPv4 underlay without an outer VLAN tag. The original frame rides inside without its FCS. The outer UDP source port is a hash of the inner headers, which gives the underlay ECMP entropy.
Go deeper
Layout
Output +----------------+------------+---------+----------+---------------------------------+ | Outer Ethernet | Outer IPv4 | UDP | VXLAN | Inner Ethernet frame | | 14 bytes | 20 bytes | 8 bytes | 8 bytes | dst MAC, src MAC, type, payload | +----------------+------------+---------+----------+---------------------------------+The 8-byte VXLAN header
Output | Flags (8 bits, I flag set) | Reserved (24 bits) | | VNI (24 bits) | Reserved (8) |The I flag set to 1 means the VNI field is valid. Everything else is reserved and zero.
Outer header details
- Outer IP source is the local VTEP loopback. Destination is the remote VTEP, or a multicast group for BUM traffic in multicast mode.
- UDP destination 4789 is the IANA port. The Linux kernel defaults to 8472 (the pre-standard port)
unless you create the interface with
dstport 4789. - UDP source port comes from a hash of the inner frame. RFC 7348 recommends the 49152 to 65535 range.
- No fragmentation. VTEPs must not fragment VXLAN packets, so the underlay MTU has to fit them.
- The inner 802.1Q tag is normally removed: the VLAN is mapped to the VNI and recreated at the far end.
Overhead variations
Underlay Overhead IPv4, untagged links 50 bytes IPv4, 802.1Q tagged links 54 bytes IPv6, untagged links 70 bytes They will ask next
What happens to QoS markings?
Most VTEPs copy the inner DSCP into the outer IP header, so the underlay can queue VXLAN traffic by the tenant's marking. Check your platform's default, because the underlay only sees the outer header.
How is GENEVE different?
GENEVE uses UDP 6081, has an 8-byte base header plus variable-length TLV options and a protocol type field. The options let systems carry metadata such as policy group, which VXLAN cannot do without extensions.
Traps
- Saying the VXLAN header is 50 bytes. The VXLAN header is 8 bytes; 50 is the total overhead.
- Forgetting the extra 4 bytes when underlay links carry an 802.1Q tag.
How did you do?Book 3.3 Internet (IP)Own pageHosts can ping each other across a VXLAN fabric, but large file transfers hang. What do you suspect and how do you prove it?
Say this first
MTU. A host packet of 1500 bytes becomes a 1550-byte outer IP packet. If any underlay link along the path is still at 1500, full-size packets are dropped, while small pings and the TCP handshake pass. I prove it with DF-set pings at increasing sizes, host to host and VTEP loopback to VTEP loopback, then set the fabric MTU to 9216 on NX-OS (9214 on EOS) on every underlay link, including the new or replaced ones.
Go deeper
The math
Inner IP packet 1500 + inner Ethernet header 14 = 1514. Add VXLAN 8, UDP 8 and outer IPv4 20 and the outer IP packet is 1550 bytes. The underlay interface must carry at least that, plus the outer Ethernet header on the wire.
Proving it from a Linux host
Shell ping -M do -s 1472 10.10.10.12 # 1472 + 28 = 1500-byte packet, fails if the underlay is at 1500 ping -M do -s 1422 10.10.10.12 # 1450-byte packet, passesThen test the underlay itself from the leaf: ping the remote VTEP loopback, sourced from the local VTEP loopback, with the DF bit set and a large size (NX-OS
ping 10.0.1.12 source-interface loopback1 df-bit packet-size 8000). Walk the path link by link withshow interface | include MTUto find the odd one.Why PMTUD does not save you
The underlay switch that drops the packet sends ICMP "fragmentation needed" to the outer source, which is the VTEP, not the host. VTEPs do not translate it back to the inner sender, so the host keeps sending 1500-byte packets into a black hole.
The fix
- Every fabric link (leaf to spine, DCI, border) at a jumbo MTU, the same everywhere.
- Or, where the underlay cannot be raised (some WAN or cloud paths), lower the host MTU to 1450.
They will ask next
Why does SSH log in fine but hang when you run a command with long output?
The login exchange uses small packets. Long output fills full-size segments, which are the ones dropped. The same pattern shows on web pages that load half way.
Where else have you seen 1450-byte host MTUs?
Tenant networks in OpenStack and many Kubernetes CNIs that use VXLAN set 1450 on the guest interface for the same 50-byte reason.
Traps
- Testing with a default 56-byte ping and declaring the path healthy.
- Fixing the leaf uplinks but forgetting a newly added spine or a DCI link.
How did you do?Own pageWhat is the difference between flood-and-learn VXLAN and VXLAN with a BGP EVPN control plane?
Say this first
Flood and learn has no control plane. BUM traffic goes to every VTEP in the VNI through underlay multicast or a static peer list, and VTEPs learn remote MACs from the inner source MAC of what they decapsulate, like a classic switch. EVPN uses MP-BGP to advertise MACs, IPs, prefixes and VNI membership, so VTEPs know where hosts are before traffic flows. That gives ARP suppression, integrated routing with anycast gateways, multi-tenancy through route targets, multihoming and MAC mobility handling.
Go deeper
Flood and learn BGP EVPN Remote MAC learning Data plane Control plane (type 2) VTEP discovery Multicast or static list Type 3 routes BUM Multicast group per VNI, or static ingress replication Ingress replication or multicast ARP handling Flooded Suppressed when the binding is known Inter-subnet routing Separate, often a central gateway Distributed anycast gateway, L3VNI Multi-tenancy VNI only VRFs, RDs and route targets Standards RFC 7348 RFC 7432 and RFC 8365 Points worth saying out loud
- EVPN is the control plane, VXLAN is the data plane. EVPN also runs over MPLS.
- EVPN still learns local MACs from the data plane on access ports, then advertises them.
- EVPN is MP-BGP with AFI 25 (L2VPN) and SAFI 70 (EVPN).
- Flood and learn trusts any VTEP that sends traffic. EVPN only installs what BGP advertised.
They will ask next
Does EVPN remove all flooding?
No. Broadcasts such as DHCP, ARP for unknown targets and unknown unicast are still flooded. Some platforms can suppress unknown unicast when every host is learned through the control plane.
Traps
- Saying EVPN replaces VXLAN.
How did you do?Book 3.2 Switched EthernetOwn pageHow is BUM traffic handled in a VXLAN fabric? Compare a multicast underlay with ingress replication.
Say this first
BUM means broadcast, unknown unicast and multicast. With a multicast underlay each VNI maps to a group, for example 239.1.1.10, and PIM replicates packets inside the fabric. With ingress (head-end) replication the source VTEP sends a separate unicast copy to every remote VTEP in that VNI. Ingress replication needs no multicast and, with EVPN, builds its list from type 3 routes, at the cost of N minus 1 copies on the source leaf's uplinks. Most enterprise fabrics use ingress replication.
Go deeper
Multicast underlay
- VTEPs join the group for each local VNI. The outer destination IP of BUM packets is the group.
- Needs PIM sparse mode (often anycast RP on the spines) or PIM BiDir.
- Efficient for many VTEPs and heavy BUM, but adds multicast state and a new class of problems.
NX-OS interface nve1 member vni 10010 mcast-group 239.1.1.10Ingress replication
- EVPN type 3 routes tell every VTEP who else is in the VNI, and the PMSI tunnel attribute says
ingress replication. NX-OS:
ingress-replication protocol bgp. EOS builds the flood list from type 3 automatically. - Flood and learn can use a static list (
ingress-replication protocol staticwith peer addresses). - Cost example: 40 VTEPs in a VNI and 2 Mbps of broadcast means 78 Mbps leaving the source leaf. Usually small, because ARP suppression removes most broadcasts.
They will ask next
When would you choose multicast?
Very large VNIs spread over hundreds of VTEPs, heavy BUM, or when you already run tenant routed multicast and the team operates PIM well.
Traps
- Forgetting that unknown unicast is flooded too, not just broadcast.
How did you do?Book 4.3 MulticastOwn pageWhat are the main EVPN route types, and what is each one for?
Say this first
Type 1, Ethernet auto-discovery, and type 4, Ethernet segment, support multihoming. Type 2, MAC/IP advertisement, carries host MACs and optionally their IPs. Type 3, inclusive multicast Ethernet tag, says a VTEP is in a VNI and how to send it BUM traffic. Type 5, IP prefix, carries subnets and external routes. In a typical VXLAN fabric, types 2, 3 and 5 do most of the work.
Go deeper
Type Name Carries Used for 1 Ethernet auto-discovery ESI, per segment and per EVI Fast mass withdraw, aliasing, split horizon 2 MAC/IP advertisement MAC, optional IP, L2VNI, optional L3VNI Bridging, host routes, ARP suppression 3 Inclusive multicast Ethernet tag Originating VTEP IP, VNI, replication type BUM flood lists, VTEP discovery 4 Ethernet segment ESI, originating VTEP Finding peers on a segment, DF election 5 IP prefix Prefix, L3VNI, router MAC Subnets, external and inter-site routes Types 6 to 8 handle IGMP and MLD proxy for selective multicast.
What they look like on NX-OS
Output [2]:[0]:[0]:[48]:[0050.56a1.0011]:[0]:[0.0.0.0]/216 MAC only [2]:[0]:[0]:[48]:[0050.56a1.0011]:[32]:[10.10.10.11]/272 MAC and IP [3]:[0]:[32]:[10.0.1.11]/88 VTEP 10.0.1.11 is in this VNI [5]:[0]:[0]:[24]:[10.10.20.0]/224 prefix 10.10.20.0/24In a type 2 string the fields are type, ESI, Ethernet tag, MAC length, MAC, IP length, IP.
Standards
RFC 7432 (EVPN base), RFC 8365 (EVPN with VXLAN), RFC 9135 (integrated routing and bridging) and RFC 9136 (type 5 prefixes).
They will ask next
Which route builds the BUM flood list?
Type 3. If a VTEP misses another VTEP's type 3 route, BUM toward that VTEP silently stops.
Which route gives fast convergence when a multihomed link fails?
Type 1 per Ethernet segment. The leaf withdraws one route and remote VTEPs drop that next hop for every MAC on the segment at once, instead of waiting for thousands of type 2 withdrawals.
Traps
- Mixing up type 3 and type 5.
How did you do?Own pageWhat is inside an EVPN type 2 route, and what does a remote leaf do with it?
Say this first
It carries the RD, the ESI, an Ethernet tag, the host MAC and optionally its IP, a label for the L2VNI and, for symmetric IRB, a second label for the L3VNI. Extended communities add the route targets, the encapsulation type (VXLAN), the advertising leaf's router MAC, and a MAC mobility sequence number after a move. The remote leaf imports it by route target: the MAC goes into the MAC table pointing at the VTEP, the IP becomes a /32 host route in the tenant VRF, and the binding fills the ARP suppression cache.
Go deeper
Fields, with example values
Field Example Meaning RD 10.0.0.11:32777 Makes the route unique per leaf and MAC-VRF ESI 0 Zero for a single-homed host Ethernet tag 0 Zero for VLAN-based service MAC 0050.56a1.0011 The host IP 10.10.10.11 Optional, learned from ARP or ND Label 1 10010 L2VNI, for bridging Label 2 50001 L3VNI, for routing (symmetric IRB) Route targets 65000:10010, 65000:50001 Import into MAC-VRF and IP-VRF Encapsulation VXLAN (type 8) Data plane to use Router MAC the leaf's MAC Inner destination MAC for routed packets Two routes per host
Leaves often send a MAC-only route and a MAC+IP route for each host. The first is enough for bridging. The second drives routing and ARP suppression.
What the receiver installs
- MAC table:
0050.56a1.0011in VLAN 10, next hop VTEP 10.0.1.11, VNI 10010. - VRF table:
10.10.10.11/32via 10.0.1.11, VNI 50001, inner destination MAC set to that leaf's router MAC. - ARP suppression cache: 10.10.10.11 is at 0050.56a1.0011.
They will ask next
Why does the remote leaf need the router MAC?
In symmetric IRB a routed packet travels in the L3VNI as an Ethernet frame. Its inner destination MAC must be the egress leaf's router MAC so that leaf routes it instead of bridging it.
Traps
- Saying the IP field is mandatory. It is optional; MAC-only routes are normal.
- Thinking a type 2 route sets up a tunnel. VXLAN tunnels are stateless.
How did you do?Own page- MAC table:
When do you need EVPN type 5 routes?
Say this first
A type 5 route carries an IP prefix in a tenant VRF, not tied to any MAC, with the L3VNI as its label and the router MAC of the advertising leaf. I use it for external routes from a border leaf (a default route, WAN or firewall prefixes), for subnet routes so leaves without a VLAN can still reach it, for reaching silent hosts, and for routed connectivity between fabrics or sites without stretching layer 2.
Go deeper
Typical uses
- Border leaf. Learns 0.0.0.0/0 from a firewall or WAN router over eBGP in the VRF (VRF-lite handoff) and re-advertises it as type 5 to every leaf.
- Subnet routes. Each leaf advertises its SVI subnets. A leaf that does not have VLAN 20 routes toward 10.10.20.0/24 using the type 5, and the receiving leaf ARPs for the host.
- Silent hosts. A host that never sends has no type 2. The type 5 gets traffic to a leaf that owns the subnet, which then resolves the host.
- Layer 3 only tenants and DCI, including summaries between sites.
Config sketch
NX-OS router bgp 65001 vrf TENANT-A address-family ipv4 unicast advertise l2vpn evpn redistribute direct route-map RM-TENANT-SUBNETSArista EOS router bgp 65001 vrf TENANT-A rd 10.0.0.11:50001 route-target import evpn 65000:50001 route-target export evpn 65000:50001 redistribute connectedType 2 and type 5 together
A /32 host route from a type 2 is more specific than the /24 type 5, so longest match sends traffic straight to the leaf where the host really is. The type 5 is the fallback.
They will ask next
Can a type 5 route carry a /32?
Yes. Loopbacks, service VIPs and host routes exported toward another site are often type 5 /32s.
Traps
- Expecting type 5 to help bridging inside a subnet. It is layer 3 only.
How did you do?Own pageWhat does ARP suppression do in an EVPN fabric?
Say this first
The leaf builds a cache of IP-to-MAC bindings from EVPN type 2 MAC+IP routes. When a local host ARPs for an IP the leaf already knows, the leaf replies itself instead of flooding the request to every VTEP in the VNI. Requests for unknown targets are still flooded. It cuts BUM traffic, which matters most with ingress replication.
Go deeper
Flow
- SRV2 on LEAF2 sends its first packet. LEAF2 learns its MAC and IP and advertises a type 2 MAC+IP route.
- LEAF1 installs 10.10.10.12 at 0050.56a1.0012 in its suppression cache.
- SRV1 on LEAF1 ARPs for 10.10.10.12. LEAF1 answers locally. Nothing crosses the fabric.
Config and checks
NX-OS interface nve1 member vni 10010 suppress-arpshow ip arp suppression-cache detaillists local (L) and remote (R) entries. On some older Nexus 9000 hardware ARP suppression needs a TCAM region carved first, which takes a reload. IPv6 has the same idea for neighbor discovery.Limits
- A silent host has no entry, so the first ARP for it is flooded. That is normal.
- DHCP and other broadcasts are untouched.
They will ask next
Does ARP suppression help hosts reach their gateway?
Not much. With an anycast gateway the local leaf owns the gateway IP and answers that ARP anyway. Suppression matters for hosts in the same subnet on different leaves.
Traps
- Claiming ARP suppression removes all broadcast traffic.
How did you do?Own pageWhat is the difference between the vPC peer link and the peer keepalive, and what happens when each one fails?
Say this first
The peer link is a port-channel that carries vPC VLAN traffic and the control sync between the peers. The peer keepalive is a separate layer 3 heartbeat, usually over mgmt0, on UDP 3200, sent every second with a 5-second timeout. It only exists to tell "peer link down" from "peer dead". Keepalive down alone: no traffic impact, just an alarm. Peer link down with keepalive up: the secondary suspends its vPC member ports and its vPC VLAN SVIs, and the primary carries everything. Both down: each thinks the other is dead, which is dual-active.
Go deeper
Failure table
Peer link Keepalive Result Up Down Nothing changes for traffic. Fix the keepalive before anything else fails. Down Up Secondary suspends its vPCs and vPC VLAN SVIs. Orphan ports stay up but are stranded. Down Down Dual-active. Both keep forwarding without sync. Unpredictable. Roles
Primary and secondary are decided by role priority (lower wins, default 32667), then by system MAC. The election is not preemptive, so after a reload the roles may stay swapped.
Design rules
- Peer link: at least two members on different line cards or ASICs.
- Keepalive: never over the peer link. Use mgmt0 in the management VRF, or a dedicated routed link in its own VRF.
auto-recovery: lets the secondary take over when it concludes the primary is really gone, and lets a switch that boots alone bring its vPCs up after a delay (240 seconds by default).
Arista MLAG difference
Arista sends MLAG heartbeats over the peer link itself, on a dedicated VLAN (4094 by convention). For split-brain protection you add
peer-address heartbeatover the management network and adual-primary detectionaction.They will ask next
Why must the keepalive not run over the peer link?
Then a peer link failure always takes the keepalive with it. Both peers think the other is dead and you are in dual-active every time.
What are type 1 and type 2 consistency checks?
Type 1 parameters must match or the vPC is suspended: for example STP mode, LACP mode, speed and MTU. With graceful consistency check (the default), only the secondary suspends. Type 2 mismatches log a warning and can still cause subtle forwarding problems.
Traps
- Saying a keepalive failure takes vPCs down. It does not while the peer link is up.
How did you do?Own pageWhat is an orphan port in vPC, and why should you care?
Say this first
An orphan port is a port in a vPC VLAN that is not a vPC member: a single-attached server, a firewall with one link, or the standby NIC of an active/standby team. When the peer link fails, the secondary suspends its vPCs and vPC VLAN SVIs but leaves orphan ports up. A device on the secondary's orphan port keeps link but cannot reach anything. The fix is to dual-attach it, or to configure
vpc orphan-port suspendso the port goes down with the vPCs and the host fails over to its NIC on the primary.Go deeper
In normal operation
Orphan traffic often has to cross the peer link to reach devices that hash to the other peer. Size the peer link for it.
Finding them
show vpc orphan-portslists every orphan port per VLAN.Fixing them
NX-OS interface Ethernet1/10 description SRV2 nic1, active-standby team vpc orphan-port suspendUse it on physical ports facing hosts that can fail over to a second NIC on the other peer. For devices with one NIC, the real fix is a second link.
They will ask next
Can a router run a routing protocol to both vPC peers over a vPC?
Historically it was not supported, because routed packets crossing the peer link hit the loop prevention rule. Newer NX-OS releases support it with
layer3 peer-routerin the vPC domain. The classic advice is separate routed links from the router to each peer.
Traps
- Moving single-attached devices to the primary and calling it fixed. Roles are not preemptive and swap after a reload.
How did you do?Own pageWhy do load balancers use SNAT, and how does it compare with routed mode and direct server return?
Say this first
In one-arm mode the load balancer changes the destination from the VIP to a server. If it keeps the client's source IP, the server replies straight to the client through its default gateway, the client sees a reply from an address it never contacted, and the connection fails. SNAT rewrites the source to a load balancer address so replies come back through it. The costs are losing the client IP (restored with X-Forwarded-For or PROXY protocol) and SNAT port limits. Routed mode makes the load balancer the servers' gateway and keeps client IPs. Direct server return sends only requests through the load balancer and servers reply from the VIP directly, which is fast but layer 4 only.
Go deeper
Mode Return path Client IP at the server Notes SNAT, one-arm Back through the load balancer Lost, restore with XFF or PROXY Easiest to insert into an existing network Routed, inline Through the load balancer as gateway Preserved All server traffic crosses it Direct server return Server to client directly Preserved Layer 4 only, servers need the VIP on loopback SNAT port exhaustion
Every connection to the same server IP and port needs a unique SNAT address and port pair, so one SNAT address supports roughly 64,000 concurrent connections per server and port. Busy VIPs use a SNAT pool of several addresses. The symptom is intermittent connection failures under load.
Direct server return on Linux servers
Shell ip addr add 10.20.0.100/32 dev lo sysctl -w net.ipv4.conf.all.arp_ignore=1 sysctl -w net.ipv4.conf.all.arp_announce=2The VIP on loopback lets the server accept packets for it. The two sysctls stop the server answering ARP for the VIP so only the load balancer owns it on the segment. The load balancer rewrites only the destination MAC, so servers must share the layer 2 segment, unless you use IP-in-IP tunneling as Linux IPVS tunnel mode does.
Restoring the client IP with SNAT
- HTTP: X-Forwarded-For (HAProxy
option forwardfor, an F5 HTTP profile setting). - Any TCP: PROXY protocol prepended to the connection. The server must be configured to expect it.
They will ask next
Why don't health checks catch a missing SNAT?
Probes are sourced from the load balancer's own address, so their replies come back to it. Only client traffic, sourced from client addresses, takes the broken return path.
Traps
- Turning on PROXY protocol at the load balancer but not on the server. The server sees junk at the start of every connection.
How did you do?Own page- HTTP: X-Forwarded-For (HAProxy
How would you design the network for iSCSI storage?
Say this first
Two independent paths, each with its own VLAN and subnet, on separate host NICs and ideally separate switches, with multipathing (MPIO) on the host instead of LACP. If I use jumbo frames, they are set end to end: host, every switch port and the array. Initiators and targets share a layer 2 segment so storage is not routed or firewalled. Host and array ports are edge ports, and I monitor latency, drops and TCP retransmits.
Go deeper
Layout
Path VLAN Subnet Host NIC Array ports A 101 10.101.0.0/24 ens224 Controller A port 1, controller B port 1 B 102 10.102.0.0/24 ens256 Controller A port 2, controller B port 2 Why MPIO and not LACP
LACP hashes one iSCSI session onto one link, so it adds no per-session throughput and fails over at the link layer without knowing the array. MPIO sees every path, balances I/O across them and fails over with awareness of the array's controllers. Most storage vendors require MPIO for iSCSI.
MTU
9000 on hosts and array, switch ports at 9216 or the platform maximum. Test each host NIC with
ping -M do -s 8972 <target>. A mismatch shows as sessions that log in fine and then stall on large reads.Other points
- Avoid routing and firewall inspection between initiator and target. Both add latency and session drops.
- Edge ports (PortFast) on host and array ports so a topology change does not stall storage.
- Follow the array vendor on Ethernet flow control. Recommendations differ.
- Dedicated switches, or QoS when shared. Many hosts reading at once cause microbursts.
They will ask next
Why keep the two paths in different subnets?
With both NICs in one subnet, the host's routing table picks one NIC for everything and the second path carries nothing useful. Separate subnets force each session onto its own NIC and switch.
Traps
- Enabling jumbo frames on the hosts and the array but missing one switch port in the middle.
How did you do?Own pageHow would you connect two data centers? Talk me through the options and the risks of stretching layer 2.
Say this first
I prefer layer 3 between sites, with applications running active/active behind DNS or anycast. If layer 2 really has to stretch, I use VXLAN EVPN Multi-Site with border gateways, or EVPN across the WAN, rather than bridging VLANs over dark fiber with back-to-back vPC. A stretched layer 2 joins the failure domains (one loop or broadcast storm hits both sites), causes traffic tromboning, and risks split brain in clusters when the link fails.
Go deeper
Transport
Dark fiber or DWDM (lowest latency, you own the optics), carrier MPLS or Metro Ethernet, and internet IPsec as a backup.
Layer 3 only
Each site has its own subnets. BGP between sites. Service failover through GSLB, DNS or anycast. Replication in the database or application. The cleanest failure isolation.
Layer 2 extension options
Option Notes Back-to-back vPC or MLAG over fiber Simple, but one STP and broadcast domain; storm control is essential OTV Cisco legacy, replaced by VXLAN EVPN Multi-Site VXLAN EVPN Multi-Site Border gateways end each fabric's VXLAN and re-encapsulate between sites; separate underlays and control planes; BUM can be rate limited EVPN over MPLS, VPLS Service provider style Risks of stretched layer 2
- Shared failure domain. A loop in one site floods the other.
- Tromboning. A host in site B uses a gateway in site A. Fix with an anycast gateway in both sites.
- Ingress asymmetry. Traffic enters through site A's firewall and leaves through site B's, and stateful firewalls drop it.
- Split brain. Clusters need a quorum witness in a third location.
- Latency. Synchronous replication and live migration have distance limits.
They will ask next
How do you stop ingress tromboning for a subnet that lives in both sites?
Advertise host routes (/32 from EVPN type 2 or type 5) toward the WAN from the site where each host actually is, or steer clients with DNS. The longest match then brings traffic to the right site.
Traps
- Proposing "just trunk the VLAN over the fiber" without storm control, loop protection or a plan for link failure.
How did you do?Own pageHow do you secure east-west traffic in a data center? What is microsegmentation?
Say this first
The perimeter firewall only sees north-south traffic. For east-west I layer two things: coarse segmentation, with VRFs or zones whose traffic must cross a firewall, and microsegmentation, which is per-workload policy written against labels or groups (application, tier, environment) instead of subnets, and enforced as close to the workload as possible: in the hypervisor, on the host or in the fabric. Default deny between groups, built from observed flows.
Go deeper
Enforcement points
Where Examples Strength Weakness Firewall between VRFs or zones Physical or virtual NGFW Full inspection, IPS Hairpin and throughput, coarse Hypervisor VMware NSX distributed firewall Per VM at the vNIC, follows the VM Virtual workloads only Host nftables, Windows Firewall, eBPF (Cilium), central manager Works anywhere Agents and policy management at scale Fabric Cisco ACI EPGs and contracts, group tags (SGT, VXLAN group policy) Line rate in switch hardware Vendor-specific Cloud Security groups Native One cloud at a time Rolling it out
- Get visibility: flow telemetry or host agents to map who talks to whom.
- Define groups by labels, such as app=payroll, tier=db, env=prod.
- Write allow rules between groups and run them in log-only mode.
- Enforce default deny one application at a time.
- Keep policy in version control with review.
They will ask next
Why labels and not IP addresses?
Workloads scale, move and get new addresses, especially containers. A label follows the workload, so the rule stays correct without edits.
Traps
- Calling VLANs segmentation when traffic between them is routed with no policy point.
How did you do?Own page
Expert7
How would you assign BGP AS numbers in an eBGP spine-leaf fabric, and why?
Say this first
All spines share one ASN, for example 65100. Each leaf, or each MLAG or vPC leaf pair, gets its own ASN: 65001, 65002 and so on. Shared spine ASN means a route can never pass through two spines, which stops valley paths and path hunting. Unique leaf ASNs mean a leaf accepts routes from other leaves without allowas-in, and every spine delivers the same AS path, so ECMP works without multipath-relax.
Go deeper
Why the spines share an ASN
When LEAF2's loopback is withdrawn, a spine with its own ASN could pick a backup path through another leaf and another spine, then withdraw that too. That is path hunting and it slows convergence. When all spines are 65100, any path that would cross a second spine contains 65100 twice and is rejected on arrival.
Why each leaf gets its own ASN
- If all leaves were 65001, LEAF1 would drop routes from LEAF2 because 65001 is already in the path.
You would need
allowas-inon leaves, which weakens loop protection. - LEAF1 receives LEAF2's prefix from SPINE1 and SPINE2 with the same path
65100 65002, so plainmaximum-pathsinstalls both.
Leaf pairs
MLAG or vPC peers commonly share one ASN and run an iBGP session across the peer link, so either peer can still reach the fabric if it loses all its uplinks.
ASN ranges
2-byte private ASNs are 64512 to 65534 (1,023 numbers). Large fabrics use 4-byte private ASNs, 4200000000 to 4294967294 (RFC 6996).
When you do need multipath-relax
When the same prefix arrives with different AS paths of equal length, for example an anycast service advertised from leaves in 65001 and 65002 (
65100 65001and65100 65002). IOS and NX-OS only use both paths withbestpath as-path multipath-relax(IOS spells itbgp bestpath as-path multipath-relax).They will ask next
What is BGP unnumbered?
Peering over IPv6 link-local addresses learned from router advertisements, and carrying IPv4 prefixes with an IPv6 next hop (RFC 5549, updated by RFC 8950). No /31 addressing plan is needed for fabric links. FRR-based systems such as SONiC made it popular.
Would you ever give each spine its own ASN?
Rarely. It reintroduces path hunting. Some designs give each spine plane its own ASN in a five-stage Clos, with careful policy. In a simple two-stage fabric, one spine ASN is the norm.
Traps
- Fixing a shared leaf ASN with
allowas-ineverywhere instead of fixing the ASN plan. - Saying multipath-relax is always required. It is only needed when equal-length AS paths differ.
How did you do?Book 4.1 Global InternetOwn page- If all leaves were 65001, LEAF1 would drop routes from LEAF2 because 65001 is already in the path.
You would need
What is TCP incast, and how do data center switches and hosts deal with it?
Say this first
Incast is many senders answering one receiver at the same instant, as in scatter-gather requests or distributed storage reads. The responses converge on one leaf port, overflow its buffer, and many flows lose packets together. Each waits for a retransmission timeout, which on Linux is at least 200 ms against microsecond round trips, so throughput collapses. Fixes are deeper or better-managed buffers, ECN with DCTCP, a lower minimum RTO, and spreading requests in the application.
Go deeper
Why it hurts so much
- Data center RTTs are tens to hundreds of microseconds. A 200 ms RTO stall is a thousand times longer.
- Losses are synchronized, so many flows stall together and the link sits idle.
- Five-minute or even one-minute interface counters average it away. These are microbursts.
Network side
- Buffers. Shallow-buffer switches share a few tens of MB across all ports. Deep-buffer platforms at congestion points (storage leaves, border, DCI) absorb bursts. Tune the shared-buffer thresholds.
- ECN. Switches mark packets instead of dropping when a queue passes a threshold.
- Telemetry. Watch per-queue drops and buffer occupancy, not interface averages.
Host side
- DCTCP reacts to the fraction of ECN-marked packets with a proportional slowdown, keeping queues short.
- Lower RTO minimum on Linux per route (
ip route change ... rto_min 5ms) in controlled environments. - Application pacing. Add jitter or limit how many servers answer at once.
RDMA is different
RoCEv2 (UDP 4791) does not tolerate loss well, so it runs on lossless classes with PFC (802.1Qbb) plus ECN.
They will ask next
What is the risk of PFC?
Pause frames spread backwards. A slow receiver can pause upstream ports, causing head-of-line blocking, pause storms or deadlock in a looped path. Use PFC only for the classes that need it and enable the PFC watchdog.
Traps
- Diagnosing "no congestion" from interface utilization graphs. Microbursts do not show up there.
Explain route distinguishers and route targets in EVPN. What breaks when you use auto-derived route targets with eBGP?
Say this first
The RD only makes routes unique in BGP, so the same MAC or prefix from two leaves does not collide. The RT is an extended community that decides import: a leaf imports a route into a MAC-VRF or IP-VRF when an RT matches. NX-OS derives auto RTs as local-ASN:VNI. With one ASN per leaf, LEAF1 exports 65001:10010 and LEAF2 imports 65002:10010, so nothing is imported. Fix it with the same manual RTs everywhere, or with NX-OS
rewrite-evpn-rt-asnon the eBGP EVPN neighbors.Go deeper
Route distinguisher
- NX-OS
rd autofor a MAC-VRF is router-ID:(32767 + VLAN ID). VLAN 10 on router ID 10.0.0.11 gives10.0.0.11:32777. - Keep RDs unique per leaf. If two leaves used the same RD for the same prefix, a spine or route reflector would see one NLRI, keep one best path and hide the other leaf, which breaks ECMP to anycast or multihomed destinations.
Route target
- Set per MAC-VRF (L2VNI) and per IP-VRF (L3VNI). A MAC+IP type 2 carries both.
- Import policy can differ from export: a shared-services VRF can import from many tenants.
The eBGP auto RT mismatch
Leaf ASN Auto export RT Auto import RT LEAF1 65001 65001:10010 65001:10010 LEAF2 65002 65002:10010 65002:10010 Fixes:
- Manual RTs with a fabric convention, for example
route-target both 65000:10010for VNI 10010. rewrite-evpn-rt-asnunder the L2VPN EVPN address family of each eBGP neighbor on NX-OS: the receiver replaces the ASN part of incoming RTs with its own before import.
Spine behavior with eBGP EVPN
- NX-OS spines have no VNIs, so they drop routes with no matching import RT unless you configure
retain route-target allunderaddress-family l2vpn evpn. - Spines must keep the next hop: NX-OS uses an outbound route-map with
set ip next-hop unchanged, EOS usesneighbor ... next-hop-unchanged.
They will ask next
Why does iBGP EVPN not hit the auto RT problem?
All leaves share one ASN, so every leaf derives the same ASN:VNI value.
What happens if a spine rewrites the next hop to itself?
Leaves build VXLAN toward the spine's address, which is not a VTEP. The routes look fine in BGP and traffic is black-holed.
Traps
- Treating the RD as import control. It has no policy meaning at all.
How did you do?Own page- NX-OS
Explain symmetric and asymmetric IRB in VXLAN EVPN. Which would you choose, and why?
Say this first
Both route between subnets on the leaves. In asymmetric IRB the ingress leaf routes into the destination VLAN and bridges across the fabric in the destination's L2VNI, and the egress leaf only bridges. Replies come back in the source's L2VNI, hence asymmetric, and every leaf needs every VLAN, VNI and SVI of the tenant. In symmetric IRB the ingress leaf routes into a per-VRF L3VNI and the egress leaf routes again into the destination VLAN, so both directions use the L3VNI and leaves only need their local VLANs. I choose symmetric: it scales and supports type 5. NX-OS only implements symmetric for EVPN.
Go deeper
Example
SRV1 10.10.10.11 in VLAN 10 on LEAF1 talks to SRV3 10.10.20.22 in VLAN 20 on LEAF2. VRF TENANT-A, L2VNIs 10010 and 10020, L3VNI 50001.
Asymmetric
- LEAF1 routes from VLAN 10 to VLAN 20 using its own VLAN 20 SVI.
- LEAF1 bridges to SRV3's MAC in VNI 10020.
- LEAF2 decapsulates and bridges to SRV3. The reply is routed by LEAF2 and sent in VNI 10010.
Symmetric
- LEAF1 looks up 10.10.20.22/32 in VRF TENANT-A, learned from LEAF2's type 2 MAC+IP route.
- LEAF1 encapsulates in VNI 50001. Inner source MAC is LEAF1's router MAC, inner destination MAC is LEAF2's router MAC.
- LEAF2 maps VNI 50001 to the VRF, routes to VLAN 20 and delivers to SRV3. The reply uses VNI 50001 too.
Asymmetric Symmetric VLANs and SVIs per leaf All of the tenant's Only local ones, plus the L3VNI MAC and ARP state Every host on every leaf Local hosts plus host routes Extra VNI None One L3VNI per VRF Type 5 prefixes Not usable Supported Lookups Route at ingress only Route at ingress and egress They will ask next
Why does NX-OS need a VLAN for the L3VNI?
NX-OS binds the L3VNI to a VLAN and an SVI that has
ip forwardand no address, which gives the VRF its forwarding context in hardware. EOS does not need a VLAN;vxlan vrf TENANT-A vni 50001is enough.Can leaves in the same VRF use different models?
Avoid it. A routed packet would arrive in a VNI the egress leaf does not expect for that destination. Multi-vendor fabrics agree on symmetric IRB.
Traps
- Reading "asymmetric" as different physical paths. It describes which VNI each direction uses.
How did you do?Own pageA VM moves from LEAF1 to LEAF3. How does EVPN handle it, and how does it detect a MAC that keeps moving?
Say this first
LEAF3 learns the MAC locally (the hypervisor sends a RARP or gratuitous ARP after the move), sees it already has a remote route for that MAC from LEAF1, and advertises its own type 2 with the MAC mobility extended community and a higher sequence number. Every VTEP prefers the higher sequence, and LEAF1 withdraws its route. If a MAC moves too often, 5 moves in 180 seconds by default on NX-OS and as suggested by RFC 7432, it is flagged duplicate and no longer advertised, so a loop or a cloned MAC cannot churn the whole fabric.
Go deeper
Sequence numbers
- The first advertisement of a MAC carries no mobility community, which counts as sequence 0.
- Each move adds one. The highest sequence wins, before normal BGP best path comparison matters.
- If two leaves claim the same sequence number, RFC 7432 picks the route from the lower originator IP.
- A MAC advertised as static (sticky) cannot move. Gateway MACs use this.
With an anycast gateway
The VM keeps its cached gateway ARP entry because every leaf owns the same gateway MAC. Its /32 host route moves with the MAC+IP type 2 route, so routed traffic follows it.
Duplicate detection
- Real causes: a layer 2 loop at the access layer, cloned VMs with the same MAC, a broken multihoming setup that learns the same MAC on both sides.
- NX-OS marks the entry with a
Dupflag inshow l2route evpn mac alland stops advertising it. After repeated detections it can freeze the MAC until you clear it. - Duplicate IP detection works the same way for MAC+IP routes.
They will ask next
Why does the hypervisor send a RARP or GARP after the move?
So the new leaf learns the MAC immediately and the old location is corrected without waiting for the VM to send traffic on its own.
Traps
- Saying BGP picks the new location by shortest AS path. The mobility sequence number decides.
How did you do?Own pageWhat is EVPN multihoming with an ESI, and how does it compare with MLAG or vPC?
Say this first
The host's links to two or more leaves form an Ethernet segment, identified by a 10-byte ESI configured the same on each leaf, plus a common LACP system ID so the host sees one partner. Leaves discover each other with type 4 routes and elect a designated forwarder per VLAN for BUM toward the host. Type 1 routes give mass withdraw and aliasing. There is no peer link and no state sync, it is standards-based and multi-vendor. MLAG and vPC are vendor-specific pairs with a peer link.
Go deeper
What each piece does
- Type 4 Ethernet segment route. Leaves with the same ESI find each other and elect a designated forwarder (DF) per VLAN, so only one leaf sends BUM traffic down to the host.
- Type 1 per segment. If a leaf loses its link, one withdrawal tells every remote VTEP to stop using that leaf for all MACs on the segment (mass withdraw).
- Type 1 per EVI. Aliasing: remote leaves load-balance to every leaf on the segment, even if only one of them learned the MAC.
- Split horizon. With VXLAN, local bias: BUM from a host is delivered to the segment by the leaf it arrived on, and peers on the same segment do not send it back.
Config on EOS
Arista EOS interface Port-Channel10 switchport mode trunk switchport trunk allowed vlan 10 evpn ethernet-segment identifier 0000:0000:0102:0304:0506 route-target import 01:02:03:04:05:06 lacp system-id 0102.0304.0506The same block, with the same ESI and system ID, goes on the other leaf.
MLAG or vPC EVPN ESI multihoming Peer link Required None Leaves per segment Two Two or more (vendor limits apply) Standards Vendor-specific RFC 7432, RFC 8365 State sync Over the peer link Through BGP Typical home NX-OS fabrics, classic pairs Arista, Junos, multi-vendor fabrics They will ask next
What goes wrong if the LACP system IDs differ?
The host sees two different partners and cannot bundle the links. Depending on the OS, one link stays out of the bundle or the bond flaps.
Traps
- Forgetting that BGP convergence now drives multihoming failover, so the overlay must be healthy.
How did you do?Own pageWhere do you put firewalls in a VXLAN EVPN fabric, and how does traffic between tenant VRFs reach them?
Say this first
Usually on a pair of border or service leaves. Each tenant VRF peers with the firewall over its own VLAN or subinterface, using eBGP or static routes. The firewall advertises a default route, or the other tenants' prefixes, back into each VRF, and the service leaves re-advertise them into EVPN as type 5 routes. Since the fabric does not leak routes between VRFs, the only path between tenants is through the firewall. Traffic inside one VRF stays on the fabric unless you add redirection or microsegmentation.
Go deeper
The VRF sandwich
Output VRF PROD on the fabric -> VLAN 3901 -> FW1 inside-prod interface VRF DEV on the fabric -> VLAN 3902 -> FW1 inside-dev interfaceEach VRF learns 0.0.0.0/0 from FW1. The service leaves export it as a type 5 route with that VRF's L3VNI. A PROD host sending to a DEV host follows the default route to the service leaf, crosses the firewall and enters VRF DEV.
What bites
- Symmetry. A stateful firewall must see both directions. Active/active firewalls on different leaves or sites need shared state or pinned flows.
- Failover. An active/standby pair moves its MAC and IP. EVPN MAC mobility handles it, but attach each firewall with vPC, MLAG or ESI so one link flap does not cause a move.
- Capacity. All inter-VRF traffic hairpins to the service leaves. Size the firewall and those uplinks.
- Route leaking. Leaking routes between VRFs on the fabric for shared services bypasses the firewall. Do it on purpose and narrowly.
- Intra-VRF traffic. Never reaches this firewall, because the ingress leaf routes it locally. Use policy-based redirection (NX-OS ePBR, ACI service graphs) or microsegmentation for that.
They will ask next
How does internet traffic flow in the same design?
The firewall's outside interface connects to the border leaves' external VRF or directly to the edge routers. The default route each tenant VRF learns from the firewall carries internet traffic too.
Traps
- Assuming a border firewall inspects traffic between two subnets of the same VRF.
How did you do?Own page