Campus design

Campus networks are built in tiers: access, distribution and core

CoreDistributionAccessbuilding A: users, phones, APsbuilding B: users, phones, APsrouting, policy, first-hop redundancyfast transport onlyCampus networks are built in tiers, so each building connects once to a fast core and failures stay local.Access switches connect users. Distribution switches join the access switches of one building, route between VLANs and applypolicy. The core moves traffic between buildings as fast as possible, with no filtering. Every switch has two uplinks. A smallsite merges core and distribution into one pair, the collapsed core.

A three-tier campus has access, distribution and core layers; small sites merge the top two into a collapsed core.

Campus design · Going deeper

Topologies: star, mesh, point to point, hybrid

Star, hub and spokeone centreFull mesh10 links for 5 sitesPoint to pointone linkHybridmixes the othersA full mesh needs n(n − 1) ÷ 2 links: 10 for 5 sites, 190 for 20, 4,950 for 100. That is why large WANs use hub and spoke or partial mesh.Topologies trade cost for resilience: a star is cheap with one weak point, a full mesh survives anything and grows as n².Most real networks are hybrids: a star of access switches under a redundant pair, sites in hub and spoke, a full mesh only in the core.

A full mesh needs n(n−1)/2 links: 10 for 5 sites, 190 for 20. Most networks are hybrid.

Data centre fabric

In a spine-leaf fabric, every server is the same distance from every other

SpinesLeavesserver Aserver Bany leaf to any leaf: leaf, spine, leafIn a spine-leaf fabric every leaf connects to every spine, so any two servers are always the same three switches apart.4 spines and 8 leaves need 32 links. Traffic between servers (east-west) spreads over all spines at once(equal-cost multipath), and growing means adding a leaf for more ports or a spine for more bandwidth. Data centres moved to itbecause most of their traffic now flows between servers, not in and out to users (north-south).

Spine-leaf: every leaf links to every spine (32 links here), so east-west traffic always crosses leaf, spine, leaf over equal-cost paths.

Data centre fabric · Going deeper

VXLAN overlays

outer Ethernet 14outer IP 20UDP 4789 8VXLAN, VNI 8original frame 1,514VXLAN adds 50 bytes, so the underlay needs an MTU of at least 1550802.1Q VLAN ID: 12 bits4,094 usable segmentsVXLAN network identifier: 24 bits16,777,216 segmentsVXLAN carries layer 2 segments inside UDP across a routed fabric: an overlay on top of the underlay.The physical network (underlay) only routes between leaves. Each leaf is a tunnel endpoint (VTEP) that wraps tenant frames,so a VLAN can stretch across the data centre without spanning tree, and 16 million segments replace 4,094 VLANs.EVPN, carried in BGP, tells each VTEP which MAC addresses live behind which other VTEP.

VXLAN wraps frames in UDP 4789 with a 24-bit VNI: 50 bytes of overhead, 16 million segments.

Scaling services

Load balancers spread the work; CDNs move content closer

usersload balancerone virtual IPhealthyhealthyfailed health checkSydney user, 4 round trips to load a pageorigin, VirginiaCDN edge, Sydneyfrom the origin: 4 × 200 ms = 800 msfrom the edge: 4 × 8 ms = 32 msA load balancer spreads requests over healthy servers; a CDN serves copies from a site near each user.The balancer owns one virtual IP and sends each request to a server that passes its health check, by round robin, leastconnections or a hash. Layer 4 balancers route by address and port; layer 7 by URL, header or cookie, and can end TLS.A CDN caches content at the edge, so distance stops dominating: 800 ms becomes 32 ms. It also absorbs DDoS traffic.

A load balancer sends requests to healthy servers behind one virtual IP; a CDN serves cached content nearby: 800 ms becomes 32 ms.

SDN

Software-defined networks move the decisions into a controller

Traditional: every box decides for itselfManagementControlDataManagementControlDataManagementControlDataController-based: one brain, many handsapps, scripts, AI agentsnorthbound: REST APISDN controller: control and managementdata planedata planedata planesouthbound:NETCONF, RESTCONF, gRPC, OpenFlowSoftware-defined networking moves the decisions into a controller and leaves the switches to forward.Every device has three planes: management (how you reach it), control (how it learns, such as OSPF and STP) and data (forwarding).A controller centralises control and management, talks down to devices through southbound protocols and up to software through anorthbound REST API. Cisco Catalyst Center and SD-Access build an underlay, an overlay and a fabric this way.

SDN separates the control plane from the data plane; a controller has a northbound API (REST) and southbound protocols.

SDN · Going deeper

REST APIs and JSON

GET https://controller/api/v1/network-deviceAccept: application/jsonX-Auth-Token: eyJ0eXAi…HTTP/1.1 200 OK{  "response": [    { "hostname": "SW1", "managementIpAddress": "10.9.1.11",      "platformId": "C9300-48P", "reachabilityStatus": "Reachable" }  ]}VerbsGETreadPOSTcreatePUTreplacePATCHchange partDELETEremove200 OK · 201 Created · 204 No Content400 bad request · 401 not signed in403 forbidden · 404 not found · 500 serverA REST API is HTTP with verbs for create, read, update and delete, and answers in JSON that any script can read.JSON holds objects in braces, lists in brackets, and key-value pairs with string keys. YAML carries the same data with indentationand is what Ansible playbooks use. APIs authenticate with a token in a header; HTTPS protects it on the way.

REST uses HTTP verbs (GET, POST, PUT, PATCH, DELETE) and returns JSON; tokens authenticate.

Automation

Automation turns one change into the same change everywhere

- name: Set NTP on every switch  hosts: access_switches  gather_facts: false  tasks:    - name: NTP server      cisco.ios.ios_ntp_global:        config:          servers:            - server: 10.9.0.123        state: mergedThe same change on 300 switchesby hand, 3 min each: 15 hoursAnsible, 5 at a time, 8 s each: 8 minutes✓identical on every device✓kept in Git, reviewed like code✓run again to fix driftAutomation describes the network as code, so one reviewed change is applied the same way to every device.Ansible is agentless: it connects over SSH or an API, reads YAML playbooks and is idempotent, so running it twice changes nothingthe second time. Puppet and Chef use agents on each device. Terraform builds cloud networks from code (infrastructure as code).Templates (Jinja2) fill in each device’s own values; source control records who changed what and when.

Ansible applies YAML playbooks over SSH without agents: 300 switches in 8 minutes, not 15 hours, and the same every time.

AI operations

An AI agent can run the operations loop, inside limits people set

Observetelemetry, logs, ticketsReasonmodel forms a hypothesisProposea change and its rollbackApprovea person, for risky stepsActthrough the API, scopedVerifydid it fix it? else roll backagent loopRole: you are a network operations assistant.Context: SW1 Gi1/0/5 shows 4,812 CRC errors  in 10 min; config and counters attached.Task: find the likely cause.Limits: read-only commands; do not change  config; say what you are unsure of.Output: cause, evidence, next command.An AI agent can watch, diagnose and act through the same APIs as automation, inside limits that people set.Generative AI answers questions; agentic AI also takes steps with tools: running show commands, opening tickets, proposingchanges. A good prompt gives a role, context, the task, limits and the output format. Guardrails matter more than prompts:read-only by default, least-privilege API tokens, human approval for changes, logs of every action, and a rollback plan.

Agentic AI observes, reasons and acts through APIs; good prompts give role, context, task, limits and format; guardrails keep changes approved.

SD-WAN

SD-WAN sends each application over the best link right now

Branch SD-WAN edgeMPLS12 ms · 0% loss→ voiceBroadband18 ms · 0.4% loss→ web, SaaSLTE45 ms · 1.5% loss→ backupcontrollerpolicy per application, measuredevery few seconds on every pathSD-WAN steers each application over the best link at that moment, managed from one controller.A branch can mix MPLS, broadband and LTE. The edge measures delay, jitter and loss on each path and moves voice off a linkthe moment it degrades. Branches are set up from templates (zero-touch provisioning). SASE combines SD-WAN with securitydelivered from the cloud (SSE: secure web gateway, CASB, zero trust network access and firewall as a service).

SD-WAN measures every path and steers each application by policy; SASE adds cloud-delivered security.

Cloud networks

A VPC is a private network in the cloud, built from subnets and routes

VPC 10.0.0.0/16internet gatewayPublic subnet 10.0.1.0/240.0.0.0/0 → internet gatewayPrivate subnet 10.0.2.0/240.0.0.0/0 → NAT gatewayload balancerNAT gatewayapp serversdatabaseConnect itsite-to-site VPNover the internetDirect Connect, ExpressRouteprivate circuitVPC peeringone pair, not transitivetransit gatewayhub for many VPCsA VPC is your own private network in the cloud: public subnets route to an internet gateway, private ones go out through NAT.What makes a subnet public is only its route table. Instances in the private subnet reach the internet for updates through the NATgateway but cannot be reached from it. Each subnet loses addresses to the provider: a /24 in AWS has 251 usable, not 254.Security groups (stateful, per instance) and network ACLs (stateless, per subnet) filter traffic.

A VPC holds public subnets (route to an internet gateway) and private subnets (out through a NAT gateway). An AWS /24 has 251 usable addresses.

Cloud networks · Going deeper

Security groups, network ACLs and joining many VPCs

Security groupNetwork ACLApplies toan instance or interfacea whole subnetStatestateful: replies allowedstateless: allow both directionsRulesallow onlyallow and deny, numbered, first matchDefaultdeny in, allow outdefault ACL allows allJoining 10 VPCs: a full mesh of peerings needs 45; a transit gateway needs 10 attachments.ModelYou manageIaaSOS, apps, network configPaaSapps and dataSaaSusers and data onlyCloud networks use the same ideas with new names: security groups act like stateful firewalls, network ACLs like ACLs.Peering is not transitive: if A peers with B and B with C, A still cannot reach C. Cloud networking is also virtual networkfunctions (NFV): firewalls, routers and load balancers run as software, scale out on demand and are billed by use.

Security groups are stateful per instance; network ACLs stateless per subnet. 10 VPCs need 45 peerings or one transit gateway.

Lesson complete

You finished “Network design and the cloud”

Nicely done.

Open in a new tab