Network Design and Architecture Questions
Designing networks at the topology level: data-center fabrics (spine-leaf/Clos, ECMP path selection, underlay and overlay, VXLAN, GENEVE and EVPN-VXLAN, multi-pod and multi-site, lossless RDMA and AI fabrics, low-latency designs), campus and branch design (hierarchical access/distribution/core, small-office design), and WAN and backbone architecture (MPLS label switching, segment routing with SR-MPLS and SRv6, RSVP-TE versus SR-TE, provider POPs and private L3 VPN service, SD-WAN and MPLS migration, multihoming, internet edge, transit and peering cost, backbone and interconnect). Covers redundancy and resilience at the link, device and site level, QoS design, bandwidth and capacity growth planning, segmentation and tenant isolation at design level, the management network, inline service placement, physical constraints such as cabling, optics and power, and equipment and vendor selection with justification. The architecture layer above configuration. Excludes protocol configuration mechanics and BGP or OSPF policy, VLAN and STP operation, cloud VPC and hybrid-cloud design, firewall and zero-trust security design, load balancing, fault diagnosis, telemetry collection, device automation or SDN controller operation, and application-level failover and disaster recovery testing, which are covered elsewhere.
Your company has about 30 small branch offices, heavy SaaS use and a tight budget. Compare MPLS and SD-WAN as the WAN transport and recommend one.
Sample Answer
Direct answer
Recommend SD-WAN (software-defined WAN: software that builds an encrypted overlay, a virtual network of tunnels, across whatever links a branch has and steers each application over the best one) over dual commodity broadband (two ordinary business internet links per branch) for the 30 branches, keeping MPLS (Multiprotocol Label Switching, a carrier-run private network with a contractual SLA, a service level agreement promising latency, loss and uptime) only where a measured requirement justifies it, such as a site with a latency-critical voice or legacy application that a provider SLA covers. Reasons: heavy SaaS use, a tight budget, and branch counts where an overlay is simple to manage. The deciding factor for SaaS is that MPLS backhauls Internet traffic (carries it over the private network to a hub site first) before it reaches the cloud, while SD-WAN does local breakout, meaning it sends that traffic straight out the branch's own internet link.
Comparison for this case
| Axis | MPLS | SD-WAN on broadband |
|---|---|---|
| Cost per Mbps | Highest: carrier-provisioned, long lead times | Much lower per Mbps; you pay for two cheap links plus an appliance or license per site |
| SaaS traffic | Backhauled to hub or DC, then out: extra latency and hub bandwidth | Local Internet breakout straight from the branch |
| Performance guarantee (QoS means quality of service: giving voice priority over bulk traffic) | Provider SLA on latency, jitter, loss, and QoS honoured end to end inside the provider network | None from the Internet; the overlay measures each path and steers around bad ones |
| Resilience | Often a single MPLS circuit per site unless you buy two | Two diverse links by default; failover is decided by probes, so its speed depends on the probe interval and the vendor |
| Provisioning | Weeks to months per site | A new site can come up on whichever link is available |
| Security | Private, but no encryption by default | Encrypted tunnels (IPsec) by default, plus the firewall at the branch |
Availability arithmetic (computed)
Two independent links of 99.5% availability each give 1 - (0.005 x 0.005) = 99.9975% for the branch, about 13 minutes of full outage a year, against 99.5% (about 43.8 hours a year) for either link alone. Series maths shows the cost of a single chain: two 99.5% elements in series give 0.995 x 0.995 = 99.0%. The parallel figure assumes independence. Two links on the same cable route, or two services from the same carrier on one last mile, fail together, so choose diverse carriers or a cable plus a fixed-wireless or LTE/5G (mobile network) backup. Last mile means the final stretch of cable from the carrier's building to the branch, which is where independent carriers can end up sharing a duct. IPsec is the standard suite that encrypts IP traffic between two endpoints.
Topology: hub-and-spoke versus full mesh (30 branches here, 50 as a growth case)
- Full mesh needs n(n-1)/2 tunnels: 435 for the 30 branches here, and 1,225 if the company grows to 50. Hub-and-spoke needs n-1: 29 for 30 (49 for 50).
- Hub-and-spoke is cheapest to manage and keeps policy and firewalling central, but branch-to-branch traffic (voice or video between offices) hairpins (goes in to the hub and back out again) through the hub and adds latency.
- Dynamic mesh is the usual answer: hub-and-spoke by default, with direct spoke-to-spoke tunnels built on demand when branches actually talk. Typically the first traffic between two branches still goes via the hub, the controller or hub tells both ends about each other, and they build a direct tunnel that is torn down after it sits idle (the exact trigger is vendor specific). Manageability comes from the SD-WAN controller creating the tunnels rather than an engineer typing 435 of them (1,225 at 50 branches).
Voice and video
G.711 voice (64 kbps codec, 20 ms packets) is 160-byte payload plus 40 bytes of IP, UDP and RTP headers = 200 bytes x 50 packets a second = 80 kbps per call before layer 2 overhead. Voice is sensitive to delay, jitter (variation in delay) and loss, so reserve a priority queue sized for the peak concurrent calls (the queue is sized, not the whole link). For example (illustrative), a branch that peaks at 10 concurrent calls needs 10 x 80 kbps = 800 kbps, and with 25% headroom for layer 2 overhead and growth about 1 Mbps (800 x 1.25 = 1,000 kbps) reserved on each link the calls may use. Size it that way, and let the SD-WAN policy pin voice to the lower-latency path and fail over on measured jitter. Branches with heavy voice and no second carrier are where a retained MPLS circuit earns its cost.
What would flip the recommendation
- A site in an area with only one poor broadband option, or a regulated workload needing a provider-backed SLA, keeps MPLS at that site (hybrid).
- Fewer than a handful of branches with simple needs and an existing MPLS contract with low cost can make migration not worth it.
- Pitfall: treating SD-WAN as free resilience. The overlay can only choose among the paths you buy, and each branch needs a security stack and a license renewal budget.
You are replacing a live enterprise MPLS WAN with SD-WAN. How do you sequence the migration so branches keep working, and how do you protect routing, policy, security posture and quality of service during cutover?
Sample Answer
Direct answer
Migrate in waves with a coexistence period, never a big-bang cutover. Build the SD-WAN hubs first and connect them to the existing MPLS routing, move a pilot of two branches, soak it, then move groups of branches in growing waves while the old MPLS circuit stays installed and re-enableable until the soak ends (the soak is a fixed waiting period after a move during which you watch for problems before changing anything else). Keep routing safe by letting the hubs be the only place MPLS and SD-WAN routing meet, with route tags to prevent loops; keep policy and security safe by mapping every MPLS-era class, segment and firewall rule to its SD-WAN equivalent before the first branch moves; and keep quality of service (QoS) safe by shaping at the edge, since the internet will not honor your queues.
Assumptions
120 branches, two hub sites (each with an MPLS circuit), carrier BGP (Border Gateway Protocol, the routing protocol between networks) to each branch's customer edge (CE) router, the router you own at the branch that connects to the carrier, voice and video as critical apps. Cutover capacity of 4 branches per night on 2 nights per week, 8 per week. Nothing here is measured; the plan is a template.
The sequence
| Phase | What happens | Exit check |
|---|---|---|
| 0. Baseline | Record per-branch bandwidth, latency, jitter, loss on MPLS, app inventory, QoS classes, firewall rules, VRF/segment list | Baseline stored per site |
| 1. Hubs | Stand up SD-WAN hubs next to the MPLS edge, peer them with the existing routing, test with lab and one test site | Hub failover tested |
| 2. Pilot (2 branches, wave 1) | Install SD-WAN edge alongside the existing MPLS router, MPLS still preferred | Overlay tunnels up on both transports, app probes pass |
| 3. Cutover per branch | Flip preference to SD-WAN during the window, watch, keep MPLS circuit live but standby | Stable through the soak |
| 4. Soak | Two weeks after the pilot before wave 2 | No rollback triggers hit |
| 5. Waves | 8, 20, 40, 50 branches after the 2-branch pilot (2 + 8 + 20 + 40 + 50 = 120) | Each wave's soak clean |
| 6. Decommission | Cancel MPLS circuits per site after soak, then hubs' MPLS last | No traffic seen on MPLS for the soak period |
At 8 branches per week, waves of 2, 8, 20, 40 and 50 need 1, 1, 3, 5 and 7 weeks (rounded up), 17 weeks of cutover windows, plus the 2-week pilot soak, so about 19 weeks until the last branch is cut over if no wave is repeated. Soaks after the earlier waves run in parallel with the next wave's windows, so they do not add elapsed time, but the last wave has no later wave to hide behind: assuming the same two-week soak, its MPLS circuits cannot be cancelled until about week 21. Every soak also keeps the MPLS circuits of the most recent wave billed until it ends. During the overlap the company pays for both transports, so the schedule is also a cost lever: the clock on duplicate circuit billing starts at the install.
Routing during coexistence
The danger is a routing loop or a blackhole while some branches are on MPLS and others on SD-WAN.
- One meeting point. The SD-WAN hub edges exchange routes with the MPLS-connected hub routers. Branches never redistribute between the two worlds: during coexistence a branch has both its MPLS router and its SD-WAN edge and advertises its own prefixes into each, but only the hubs copy routes from one routing domain into the other.
- A migrated branch's prefixes are advertised by the SD-WAN hub into the MPLS-side routing, so branches still on MPLS can reach it through the hub.
- Preference flip is the cutover. Pre-stage the SD-WAN route at lower preference (for example a lower BGP LOCAL_PREF, the number your own network uses to pick between routes to the same prefix where higher wins, or a higher administrative distance, the router's ranking of how much it trusts each routing source where lower wins), validate, then raise it. Rollback is the same single change in reverse, which is why the MPLS circuit stays alive until the soak ends.
- Loop prevention. With two hubs and mutual redistribution (each hub copies routes from the MPLS-side protocol into the SD-WAN protocol and back), a route can be re-advertised back into the protocol it came from. A traced loop using illustrative names: branch 10.5.1.0/24 has moved to SD-WAN, and hub-1 copies it into the MPLS-side routing. Hub-2 hears it there, treats it as an MPLS route and copies it back into SD-WAN routing, where hub-1 hears it again, now apparently from hub-2. Depending on preferences the prefix circulates, or traffic for it bounces between the hubs. The fix is a tag, a small label attached to the route (a BGP community, or a route tag in an IGP). Hub-1 stamps 65000:100 on everything it copies into MPLS, and every hub refuses to copy any route carrying 65000:100 back across the boundary, so the prefix is imported once and stops. A blackhole is the opposite failure: traffic is sent toward a router that has no onward route and is silently dropped.
- Summaries: do not summarize branch prefixes at the hub until the last wave, since a summary can pull traffic for a branch that has not moved.
Policy, security and QoS
- Security posture. An MPLS VPN is private but not encrypted by you; going to the internet requires encrypted tunnels (IPsec), a firewall at each branch or a cloud security service for direct internet breakout, and inbound traffic denied by default. Map each MPLS VRF (virtual routing and forwarding instance, a separate routing table per customer segment) to an SD-WAN segment so that guest, corporate and PCI-scope traffic stay separate, then confirm segmentation with a test from each segment before cutover.
- QoS. Document the classes the carrier sold you and the DSCP (Differentiated Services Code Point) values your devices mark. RFC 4594 gives EF for telephony, AF41 for multimedia conferencing. Preserve those markings inside the overlay. The internet underlay will not honor them end to end, so shape outbound traffic on each branch just below the circuit's measured rate (for example 95% of a measured 100 Mbps, so a shaper at 95 Mbps) so the queue forms in your device, and let SD-WAN application-aware policy steer voice to the path with the best measured delay, jitter and loss. ITU-T G.114 sets one-way delay of 150 ms as the planning limit for voice.
- Policy parity. Export the firewall and ACL (access control list) rules from the MPLS CE routers and recreate them in the SD-WAN policy before cutover. A rule that existed as a router ACL and has no equivalent is silently dropped, which is how a branch ends up open.
The cutover window for one branch
- Confirm SD-WAN tunnels up on both transports and application probes passing with MPLS still primary.
- Take a snapshot of current routes and counters as the baseline.
- Flip the preference. Verify branch prefixes appear via the hub, DNS and key apps respond, a test voice call completes, and QoS counters show voice marked EF in the priority queue. A worked example for one prefix, branch 10.5.1.0/24 (illustrative): before the flip the hub learns it from MPLS with LOCAL_PREF 100 and from SD-WAN with 90, so MPLS wins. The flip raises the SD-WAN route to 110, so it wins and traffic follows the tunnel; the exit check is that the hub's route table shows the prefix via SD-WAN and a test call completes. Rollback sets it back to 90.
- Watch for the rollback triggers set in advance (for example a critical app failing its probe for five consecutive minutes). If hit, flip back.
- Leave MPLS standby until that group of sites finishes its soak period.
Pitfalls
- Turning off the MPLS router at cutover instead of keeping it.
- Forgetting branch-to-branch traffic between a migrated and an unmigrated site, which transits the hubs and can overload them.
- Hub capacity: during the largest wave the hubs terminate tunnels for every migrated branch plus transit, so size hub throughput for the peak wave, not for wave 1.
Your SLA requires 99.99% availability. How do you choose among N+1, 2N, active-active and active-passive redundancy for power, spine switches and firewalls, and how do you reason about the availability you will actually achieve?
Sample Answer
Direct answer
99.99% availability allows 52.56 minutes of downtime per year, or 4.32 minutes in a 30-day month. I would pick the redundancy pattern per layer from how that layer fails: 2N for power, N+1 with equal-cost multipath (ECMP, the switches spread traffic across all spines that offer an equally short path) for the spine layer (the top tier of switches that connect all the leaf switches), and an active-passive pair for stateful firewalls unless throughput forces a cluster. Then I would check the design with an availability model whose biggest terms are usually not hardware failures: failures that hit both halves of a pair at once, and failover time. Finally I would measure the availability users actually get, because a model is only a design check.
The patterns, defined
- N+1: N units are needed to carry the load, plus one spare. Losing one unit is survivable, losing two is not.
- 2N: two complete, independent systems, each able to carry 100% of the load alone.
- Active-active: both units forward traffic all the time. Capacity is only redundant if each unit is sized to carry everything alone.
- Active-passive: one unit forwards, the standby takes over after a failure. Takeover time and state synchronisation become part of the outage.
Choice per layer
| Layer | Choice | Why | What bites |
|---|---|---|---|
| Power | 2N: two feeds (utility, UPS, power distribution unit) on separate paths, every device with two power supplies, one per feed | A single feed's maintenance or fault is invisible to devices | If total load is above what one feed can carry, it is 2N on paper only. Check that each feed alone covers 100% |
| Leaf switches | Dual-homed servers on an active-active pair (multi-chassis link aggregation, MLAG, one logical switch built from two chassis) | Either leaf can fail with no failover event | Both leaves run the same software, so one bug can take both |
| Spines | N+1 with ECMP: 4 spines, 3 needed for peak | No failover event, traffic just rehashes (the switches recompute which spine each flow uses) onto the remaining members | Capacity after a loss (see below) |
| Firewalls | Active-passive HA pair with state sync | Simple, predictable, one policy to audit | Failover takes seconds and sometimes fails; the standby is idle capacity |
Active-active firewalls double capacity but each must be sized for 100% of traffic alone. Two firewalls each running at 70% are N+0 after a failure (no spare left): the one left is asked for 70% + 70% = 140%, which is a brownout (the service is up but so overloaded that it drops traffic or crawls), and a brownout counts against the SLA (service-level agreement) just as an outage does.
Capacity after a failure is part of availability. With 4 spines, a peak of 75% means the three remaining spines run at 100% after one failure. That design is at its capacity limit the moment anything breaks, and it needs a growth path: add a fifth and sixth spine, or cap peak utilisation at 60% so the remaining members run at 80%.
Computing what you will actually achieve
Series components multiply: two 99.9% devices in series give 99.8% (0.999 x 0.999 = 0.998001), and four give 99.60%. Unavailability is the fraction of time something is down, so 99.9% availability is u = 0.001. A redundant pair with independent failures is down only when both are down, which has unavailability u squared, so two 99.9% devices give 0.001 x 0.001 = 0.000001, or 99.9999%. Real pairs do not fail independently, so I add a common-cause fraction beta: the share of failures that hit both members together (the same software bug, the same upgrade, the same room's cooling). With u the unavailability of one unit:
Upair=((1−β)u)2+βu
The first term is both members failing separately (the independent share of failures, squared); the second is the shared cause, which takes both down at once and is not squared. Worked trace for the leaf pair with u = 0.001 and beta = 0.02: the independent share is 0.98 x 0.001 = 0.00098, squared is 0.00000096; the shared share is 0.02 x 0.001 = 0.00002; the sum is 0.00002096. Over 525,600 minutes a year that is 0.00002096 x 525,600 = 11.02 minutes, the figure in the leaf-pair column below. Power at beta = 0.02 follows the same steps with u = 0.0001 and gives 1.06 minutes.
The firewall term adds failover blackout (the seconds of lost traffic while the standby takes over: failures per year x failover time) and failed failovers (failures x 5% x 30 minutes of manual recovery). All inputs below are planning assumptions, not measurements: u = 0.001 for a switch or firewall including software crashes, upgrades and human error, a power feed at 0.0001, repair time 8 hours (1.095 failures per unit per year), failover 30 seconds.
The spine layer needs 3 of 4 spines, so it is down when 2 or more spines are down at once. The code sums the chance of exactly 2, 3 or 4 independent spine failures (a binomial sum) and then adds the shared-cause term.
from math import comb
MIN_YEAR = 365 * 24 * 60 # 525,600 minutes
print(f"99.99% = {MIN_YEAR * 0.0001:.2f} min/yr, {30 * 24 * 60 * 0.0001:.2f} min per 30-day month")
u = 0.001 # assumed all-causes unavailability of one switch or firewall (99.9%)
u_feed = 0.0001 # assumed unavailability of one power feed (99.99%)
fails_per_year = 8760 * u / 8 # MTTR 8 h -> 1.095 failures per node-year
def pair(u, beta): # either member can carry the load; beta = share of failures hitting both
return ((1 - beta) * u) ** 2 + beta * u
def three_of_four(u, beta): # spine layer: needs 3 of 4 spines
p = (1 - beta) * u
both = sum(comb(4, k) * p**k * (1 - p)**(4 - k) for k in (2, 3, 4))
return both + beta * u
def firewall_pair(u, beta, failover_s=30, cover=0.95, manual_min=30):
both_down = pair(u, beta) * MIN_YEAR
failover = fails_per_year * failover_s / 60
failed_failover = fails_per_year * (1 - cover) * manual_min
return both_down + failover + failed_failover
print("beta power leaf-pair spines firewalls total(min/yr) availability within 52.56?")
for beta in (0.01, 0.02, 0.05):
parts = [pair(u_feed, beta) * MIN_YEAR, pair(u, beta) * MIN_YEAR,
three_of_four(u, beta) * MIN_YEAR, firewall_pair(u, beta)]
total = sum(parts)
print(f"{beta:.2f} " + " ".join(f"{p:8.2f}" for p in parts) +
f" {total:8.2f} {100 * (1 - total / MIN_YEAR):.4f}% {total <= MIN_YEAR * 0.0001}")
print("four single nodes in series at 99.9% each:", f"{0.999 ** 4:.4f}")
for peak in (0.60, 0.75):
print(f"4 spines at {peak:.0%} peak: after one fails the other three run at {peak * 4 / 3:.0%}")
Output:
99.99% = 52.56 min/yr, 4.32 min per 30-day month
beta power leaf-pair spines firewalls total(min/yr) availability within 52.56?
0.01 0.53 5.77 8.34 7.96 22.61 99.9957% True
0.02 1.06 11.02 13.54 13.21 38.82 99.9926% True
0.05 2.63 26.75 29.12 28.94 87.45 99.9834% False
four single nodes in series at 99.9% each: 0.9960
4 spines at 60% peak: after one fails the other three run at 80%
4 spines at 75% peak: after one fails the other three run at 100%
Reading the result
At beta = 2% the design uses 38.82 of 52.56 minutes, so it meets the target with 13.74 minutes of margin. At beta = 5% it misses (87.45 minutes). The conclusion is that the lever is not another redundant box but controlling common cause: stagger upgrades across the two members, avoid pushing one change to both at once, keep the pair on different software trains where the vendor allows it, and put the pair in separate fault domains (rooms, rows, feeds).
Two things the model leaves out, which a real commitment must price: upstream carriers and anything outside your control, and planned maintenance if the SLA does not exclude it.
The SLA window matters. The model's firewall term includes failed failovers of 30 minutes. One such event is inside the 52.56-minute annual budget but is 6.9 times the 4.32-minute monthly budget (30 / 4.32). If the SLA is measured monthly, one failed failover breaches it, so failover must be rehearsed and automated.
Verifying in production
Run synthetic probes from user locations to a service through the full path, record success per minute, and compare the measured downtime with the budget each month. Test each redundancy mechanism on purpose in a change window: pull a power feed, drain a spine, force a firewall failover, and confirm the failover time against the 30 seconds assumed above.
Pitfalls
- Counting "two of everything" without checking shared fate: both power supplies on one feed, both firewalls in one rack.
- Quoting a vendor's single-box availability for a pair.
- Treating 2N and N+1 as interchangeable: 2N doubles the plant, N+1 adds one unit, and they fail differently under a second fault.
Design an active-active interconnect between two data centers that must extend layer 2 and keep servers multihomed. How do you stop a failure or loop in one site from taking down the other, and how do you handle a VM moving between sites?
Sample Answer
Direct answer
Build each data center as its own EVPN-VXLAN fabric (EVPN is the BGP control plane that distributes MAC and IP reachability, VXLAN the tunnel that carries layer 2 frames over a routed network), connect the two with a pair of border gateways per site over two diverse routed paths (the data-center interconnect, DCI), give servers all-active EVPN multihoming so they use two leaves at the same time, put the same anycast default gateway in both sites, and limit what is allowed to cross the interconnect. The gateways are what keep a loop or storm in one site from taking down the other, and the anycast gateway plus host routes are what let a VM move without changing its address or hairpinning traffic.
flowchart LR
subgraph A["Site A EVPN domain"]
la[leaf pairs, anycast gateway]
bga[border gateway pair A]
end
subgraph B["Site B EVPN domain"]
lb[leaf pairs, anycast gateway]
bgb[border gateway pair B]
end
la --- bga
lb --- bgb
bga ===|two diverse L3 paths, VXLAN between gateways| bgb
Servers stay multihomed
Each server has two NICs (network cards) in an LACP (Link Aggregation Control Protocol, IEEE 802.1AX) bundle, meaning two physical links that the server and switch treat as one logical link, going to two leaves (the top-of-rack switches the servers plug into). In EVPN the two leaves share an Ethernet Segment Identifier (ESI), a unique non-zero identifier for that segment, and in all-active mode both leaves may forward known unicast to and from the server (RFC 7432). For broadcast, unknown-unicast and multicast (BUM) traffic, a designated forwarder (DF) is elected per segment so the server gets one copy, and split horizon stops a BUM frame from being sent back out the segment it came from. Losing one leaf or one NIC then costs half the server's bandwidth, not its connectivity. Each of the three pieces solves one problem: the ESI tells the fabric which two leaves share one server, the DF stops the server receiving two copies of every flood, and split horizon stops a flood from echoing back to the server that sent it.
Stopping one site's problem from reaching the other
Five failure cases, each handled separately:
- A layer 2 loop inside site A. The loop floods BUM frames. To see why the gateway matters, follow one flooded frame. A frame for an unknown MAC reaches a leaf in site A, which sends a copy to every other leaf in site A. The border gateway in site A receives its copy, and instead of stretching that flood across the interconnect as one shared tree, it sends the other site one new copy, which the site B gateway floods inside site B. In a loop the same frame keeps circling inside site A and multiplies, but the gateway forwards copies only as fast as it is allowed to. That limit is storm control: a rate limit on BUM per port, set to a low single-digit percent of link rate and tuned from a measured baseline. Illustratively, 1% of a 100 Gbps interconnect port is 1 Gbps of flood that can cross, against the up to 100 Gbps a loop can generate. Storm control sits on server ports and on the DCI-facing ports. Do not carry spanning tree BPDUs (bridge protocol data units, the control frames switches use to build a loop-free tree) across the interconnect: each site runs its own spanning-tree view. Edge ports use BPDU guard, which shuts a port down if a BPDU arrives on it, because that means someone plugged in a switch.
- A MAC flapping between ports. Loops make the same MAC appear to move constantly, and every move triggers a BGP update. EVPN's MAC mobility extended community carries a sequence number so the newest location wins, and RFC 7432 defines duplicate MAC detection: if a PE (the EVPN router, here the leaf) sees N moves within M seconds (defaults M = 180 s, N = 5) it must alert the operator and stop advertising that MAC until someone fixes it. A traced example: MAC aa:aa is first learned behind leaf-1 with sequence number 0. A loop makes it appear behind leaf-2, so the route is re-advertised with sequence number 1; then back behind leaf-1 with 2, then 3, then 4, then 5. That is five moves inside three minutes, so the leaf stops advertising aa:aa and raises one alarm instead of sending an endless stream of updates. That turns a loop-driven update storm into one alarm.
- A broadcast-heavy protocol across the interconnect. Turn on ARP (Address Resolution Protocol, how a host finds the MAC address for an IP) suppression: a leaf that already knows the IP-to-MAC binding answers the ARP request itself (RFC 7432 section 10 describes this proxy behavior), so most ARP never leaves the rack (the leaf is the top-of-rack switch). Suppress unknown unicast flooding where the platform supports it.
- The interconnect itself fails. Because each site's overlay is terminated at its own gateways, a total DCI outage partitions the sites but each keeps forwarding locally. Anything that needs quorum across sites (clustered databases, storage) needs a third-site witness (a small tiebreaker node in a third location), because a majority vote (quorum) cannot be reached by one site alone. Without it a partition leaves two halves that each think they own the data (split brain). With the witness, the half that can still reach it holds the majority and keeps running.
- A gateway or one path fails. The surviving gateway keeps the interconnect segment alive, and the failing gateway's routes are withdrawn, which is the normal EVPN failure procedure.
Moving a VM between sites
- The hypervisor copies memory while the VM runs, then pauses it for a final copy. At 10 Gbps a 64 GiB VM needs 55 s to send its memory once if the link is otherwise empty and no pages were rewritten; at 25 Gbps it needs 22 s. Real moves take longer because dirtied pages are resent, so the migration traffic needs its own bandwidth reservation on the DCI.
- Assume the two sites are 60 km apart (the question gives no distance). Latency is not the constraint at that distance: at roughly 4.9 microseconds per km of glass (speed of light divided by a fiber refractive index of about 1.468), 60 km is 0.29 ms one way and 0.59 ms round trip before equipment delay. Check the hypervisor vendor's documented maximum round-trip time for live migration for your version.
- The VM keeps its IP and MAC. The same anycast gateway (identical virtual IP and MAC on every leaf in both sites) means the VM's default gateway is local after the move, so its outbound traffic does not trombone (go back across the interconnect to the old gateway and out again, also called hairpinning).
- The destination leaf learns the MAC and advertises an EVPN MAC/IP route with a higher mobility sequence number, and the old leaf withdraws. Remote leaves switch to the new location.
- Inbound traffic from outside is the part people forget. If the WAN still advertises the subnet from site A, packets for the moved VM enter at site A and cross the DCI. Fix it by advertising per-host routes (a /32 route for each VM's single address) from the site hosting each VM (costly in route count: an assumed 500 VMs is 500 extra routes), or accept the DCI crossing and size it for it, or move gateways and WAN edges together by application. Stateful firewalls in each site make the asymmetric return path break sessions, so session-aware firewalls must either be clustered across sites or the move must carry the policy.
Interconnect sizing and MTU
- MTU: VXLAN adds 50 bytes to the tenant's Ethernet frame (14 outer Ethernet, 20 IP, 8 UDP, 8 VXLAN header) and VTEPs must not fragment (RFC 7348). A 1,500-byte tenant packet plus its 14-byte inner Ethernet header is 1,514 bytes, and the 8 + 8 + 20 bytes of VXLAN, UDP and IP headers make a 1,550-byte outer IP packet, so the interconnect needs at least 1,550 bytes of IP MTU (the outer Ethernet header sits outside the IP MTU). If the circuit is VLAN-tagged, ask the provider whether its stated MTU counts the 4-byte tag. Ask for jumbo MTU on the circuit; if the provider can only offer 1,500, lower the tenant MTU instead.
- Capacity: with two diverse 100G paths, normal load must stay at or below 50% of each if one path is to carry everything after the other fails. If both paths run above 50%, a single failure puts the one left over 100% and drops traffic, so size for one path plus headroom and watch both utilizations against the 50% line.
Trade-offs
Extending layer 2 across sites is a business decision: it buys VM mobility and non-disruptive migrations and costs a shared failure domain (the duplicate-MAC and storm controls above shrink it, they do not remove it). Stretch only the VLANs that need it, and keep everything else routed.
Explain the split between underlay and overlay in a modern data center network. What does each own, and what design problems appear when the boundary between them is drawn badly?
Sample Answer
Direct answer
The underlay is the physical, routed IP network that delivers packets between fabric switches. The overlay is the virtual network built on top: tenant Layer 2 and Layer 3 segments tunnelled across the underlay, typically VXLAN (Virtual Extensible LAN) with a BGP-EVPN control plane. The underlay owns reachability, ECMP (equal-cost multipath: the switches spread traffic across every path of equal cost instead of using just one), MTU (maximum transmission unit: the largest packet a link will carry) and fast failure detection. The overlay owns tenants, segments, MAC and IP reachability for workloads, and policy. Trouble appears when the underlay is asked to know about tenants or when the overlay assumes things the underlay does not provide.
What each owns
| Underlay | Overlay | |
|---|---|---|
| Carries | Outer IP packets between VTEP loopbacks (VTEP: VXLAN tunnel endpoint, the leaf or host that encapsulates) | Tenant frames and packets inside tunnels |
| Protocols | Point-to-point routed links (each link is its own small IP subnet between exactly two switches, with no shared VLAN), eBGP (BGP between different autonomous systems, the usual way to run routing between fabric switches) or an IGP (interior gateway protocol, a single-domain routing protocol such as OSPF or IS-IS), BFD | VXLAN data plane (the part that wraps and forwards packets), BGP-EVPN control plane (the part that advertises which MAC and IP addresses live behind which VTEP, carried in BGP), VNIs (VXLAN Network Identifiers) |
| Knows about | Loopback and link prefixes only: dozens to hundreds of routes | Tenant MACs, IPs, VRFs (virtual routing and forwarding instances: one private routing table per tenant): tens of thousands |
| Scale limit | Number of switches | Number of tenant endpoints and segments |
| Failure handling | Reroute around a link in ECMP | Withdraw routes, move endpoint |
| Identifiers | IP addresses | 24-bit VNI: 2^24 = 16,777,216 segments, versus 4,094 usable VLAN IDs |
The packet shows the boundary
A tenant frame is wrapped in a VXLAN header (8 bytes, carrying the 24-bit VNI), then UDP (destination port 4789 per RFC 7348, source port derived from a hash of the inner headers for ECMP entropy), then an outer IP header addressed to the remote VTEP's loopback. The underlay only ever sees the outer IP and UDP.
A picture of one packet, with illustrative addresses (leaf-1 loopback 10.0.0.1, leaf-2 loopback 10.0.0.2, tenant hosts 192.168.10.5 and 192.168.10.9):
[ outer Ethernet ][ outer IP 10.0.0.1 -> 10.0.0.2 ][ UDP dst 4789, src 51234 ][ VXLAN VNI 10010 ][ inner Ethernet ][ inner IP 192.168.10.5 -> 192.168.10.9 ][ payload ]
underlay forwards on these three outer headers |<---------- tenant frame, invisible to the underlay ---------->|
Entropy here means variety in the header fields that a switch hashes to pick a path. Two flows with different inner addresses get different UDP source ports (51234 here is illustrative), so the hash sees different values and spreads the flows across the equal-cost paths. The source port is picked from a hash of the inner headers, as RFC 7348 recommends.
Worked example: MTU
Encapsulation adds outer IPv4 (20) + UDP (8) + VXLAN (8) + inner Ethernet header (14) = 50 bytes. A host sending a 1,500-byte IP packet therefore produces an outer IP packet of 1,500 + 14 + 8 + 8 + 20 = 1,550 bytes. RFC 7348 says VTEPs must not fragment, and recommends raising the MTU across the physical network. Rule: set the underlay IP MTU at least 1,550 (IPv6 underlay: 1,570) and in practice a jumbo value such as 9,216 on all fabric links, and confirm it hop by hop with a don't-fragment ping sized 1,550 minus 28 = 1,522 bytes of payload. The 28 is the ping's own headers: 20 bytes of IPv4 header plus 8 bytes of ICMP echo header (type, code, checksum, identifier, sequence number), so 1,522 + 28 = 1,550 bytes on the wire; if that ping passes with the don't-fragment bit set, the link carries a 1,550-byte IP packet. If one link is left at 1,500, small packets (pings, TCP handshakes) work and large transfers stall: the classic overlay symptom.
Problems when the boundary is drawn badly
- Tenant routes leaked into the underlay. Every tenant prefix now sits in the fabric IGP, tables grow with tenants, and one tenant's flap triggers fabric-wide reconvergence. Fix: underlay carries loopbacks and links only; tenant routes live in EVPN and VRFs.
- MTU mismatch (above): the overlay assumes the room the underlay never gave.
- No entropy. If the VTEP sets a constant UDP source port, every tenant flow between the same two VTEPs has identical outer addresses, protocol and ports. The underlay's ECMP hash (it hashes outer source and destination IP, protocol and ports) sees one flow per VTEP pair and uses one path, leaving the others idle.
- Shared failure domain. One BGP session or one process carrying both underlay and overlay means a policy mistake in tenant routing drops VTEP reachability. Keep separate sessions or separate address families (the BGP mechanism that carries different kinds of routes, such as plain IPv4 prefixes versus EVPN routes, in distinct lists), and keep policy off the underlay.
- Blind troubleshooting. The overlay can look healthy while the underlay drops, and the reverse. Probe VTEP loopback to loopback in the underlay separately from tenant-to-tenant tests.
- Convergence mismatch. Underlay failure detection (BFD, bidirectional forwarding detection, a fast liveness check) should be faster than the overlay's holdtimers (how long a BGP session waits without hearing from its neighbour before declaring it dead), or the overlay keeps sending to a dead VTEP.
Trade-off
Host-based overlays (VXLAN or Geneve, a similar tunnel format with extensible headers, run on the hypervisor) keep the physical fabric even simpler but make the underlay team blind to tenant flows; network-based overlays on the leaf are more visible but put tenant scale into switch tables.
Unlock Full Question Bank
Get access to all 26 Network Design and Architecture interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.