Discussion 10
1
CS 168, Summer 2025 @ UC Berkeley
Slides credit: Sylvia Ratnasamy, Rob Shakir, Peyrin Kao, Iuniana Oprescu
Datacenters 💾
Logistics
Data Centers
Datacenters
Bisection Bandwidth
Bisection Bandwidth
Bisection Bandwidth
Big switch abstraction
Design 1: Fat tree (scale-up)
small switch
big switch
Design 2: Clos (scale-out)
Pod 1
Pod 2
Pod 3
Pod 4
Edge layer
Aggregation layer
Core layer
k = 4
A Closer look at Clos
Pod 1
Pod 2
Pod 3
Pod 4
Edge layer
Aggregation layer
Core layer
k = 4
Fat Tree Clos Network – Bisection Bandwidth
Achieves full bisection bandwidth.
Pod 1
Pod 2
Pod 3
Pod 4
Edge layer
Aggregation layer
Core layer
k = 4
Fat Tree Clos Network
A k-ary fat tree has k pods.
Pod 1
Pod 2
Pod 3
Pod 4
Edge layer
Aggregation layer
Core layer
k = 4
Caveats about clos
ECMP
ECMP
Overlay/Underlay
(Over/Under)lay
How? Encapsulation
Payload
TCP Header
IP (Overlay) Header
IP (Underlay) Header
Payload
TCP Header
IP Header
Original design.
The new design.
Payload
TCP Header
IP Header
IP (Underlay) Header
Payload
TCP Header
IP (Overlay) Header
Encapsulation and Decapsulation
Let's see how to use the new layer to connect the overlay and underlay networks.
Underlay
Overlay
Server 1 1.1.1.1
R1
R2
R3
R4
Virtual Switch
V2
V1
V3
192.0.2.1
192.168.1.2
10.16.1.2
Server 2 2.2.2.2
Virtual Switch
V5
V4
V6
10.7.7.7
10.8.8.8
192.0.5.7
Encapsulation and Decapsulation
Our goal: VM1 wants to talk to VM6.
Underlay
Overlay
Server 1 1.1.1.1
R1
R2
R3
R4
Virtual Switch
V2
V3
192.0.2.1
192.168.1.2
10.16.1.2
Server 2 2.2.2.2
Virtual Switch
10.7.7.7
10.8.8.8
192.0.5.7
V1
V5
V4
V6
Payload
Encapsulation and Decapsulation (Step 1/5)
VM1 adds an overlay header with the destination's virtual address.
Then, VM1 passes the packet to the virtual switch.
Underlay
Overlay
Server 1 1.1.1.1
R1
R2
R3
R4
Virtual Switch
V2
V3
192.0.2.1
192.168.1.2
10.16.1.2
Server 2 2.2.2.2
Virtual Switch
To: 192.0.5.7
Payload
10.7.7.7
10.8.8.8
192.0.5.7
V5
V4
V6
V1
Encapsulation and Decapsulation (Step 2/5)
The virtual switch reads the virtual address and looks up the matching physical address. Then, it adds (encapsulates) a new header with the physical address.
Then, the virtual switch forwards the packet to routers in the datacenter.
Underlay
Overlay
Server 1 1.1.1.1
R1
R2
R3
R4
V2
V1
V3
192.0.2.1
192.168.1.2
10.16.1.2
Server 2 2.2.2.2
Virtual Switch
To: 192.0.5.7
Payload
10.7.7.7
10.8.8.8
192.0.5.7
V5
V4
V6
To: 2.2.2.2
Virtual Switch
Encapsulate
Haven't discussed how to look up yet. For now, it's magic.
Encapsulation and Decapsulation (Step 3/5)
The routers in the datacenter forward the packet according to its physical (underlay) address. No need to think about virtual addresses!
Underlay
Overlay
Server 1 1.1.1.1
R1
R2
R3
R4
Virtual Switch
V2
V1
V3
192.0.2.1
192.168.1.2
10.16.1.2
Server 2 2.2.2.2
Virtual Switch
To: 192.0.5.7
Payload
10.7.7.7
10.8.8.8
192.0.5.7
V5
V4
V6
To: 2.2.2.2
Encapsulation and Decapsulation (Step 4/5)
Eventually, R4 receives the packet and reads its physical (underlay) destination address, 2.2.2.2.
R4 is connected to physical server 2.2.2.2, so it forwards the packet to the server.
Underlay
Overlay
Server 1 1.1.1.1
R1
R2
R3
R4
Virtual Switch
V2
V1
V3
192.0.2.1
192.168.1.2
10.16.1.2
Server 2 2.2.2.2
Virtual Switch
10.7.7.7
10.8.8.8
192.0.5.7
V5
V4
V6
To: 192.0.5.7
Payload
To: 2.2.2.2
Encapsulation and Decapsulation (Step 5/5)
The virtual switch at 2.2.2.2 sees a packet destined for itself.
The virtual switch removes (decapsulates) the underlay header, revealing the virtual address of the destination.
Then, the virtual switch sends the packet to the VM with virtual address 192.0.5.7.
Underlay
Overlay
Server 1 1.1.1.1
R1
R2
R3
R4
Virtual Switch
V2
V1
V3
192.0.2.1
192.168.1.2
10.16.1.2
Server 2 2.2.2.2
10.7.7.7
10.8.8.8
192.0.5.7
V5
V4
V6
To: 192.0.5.7
Payload
To: 2.2.2.2
Virtual Switch
Decapsulate
Encapsulation and Decapsulation
Success – our packet reached VM6!
Underlay
Overlay
Server 1 1.1.1.1
R1
R2
R3
R4
Virtual Switch
V2
V1
V3
192.0.2.1
192.168.1.2
10.16.1.2
Server 2 2.2.2.2
10.7.7.7
10.8.8.8
192.0.5.7
V5
V4
V6
Virtual Switch
Payload
To: 192.0.5.7
Encapsulation and Decapsulation
Why did this work?
Underlay
Overlay
Server 1 1.1.1.1
R1
R2
R3
R4
Virtual Switch
V2
V1
V3
192.0.2.1
192.168.1.2
10.16.1.2
Server 2 2.2.2.2
Virtual Switch
V5
V4
V6
10.7.7.7
10.8.8.8
192.0.5.7
Example of Encapsulation
source: lecture 20, slide 55
Worksheet
Question 1: True/False
Worksheet
Question 2: STP
Question 2: STP
Question 2: STP
Question 2: STP
Worksheet
Question 3: Clos-based Topology & ECMP
Worksheet
Question 4: Encapsulation
Question 4: Encapsulation
Questions?
Feedback Form: https://tinyurl.com/cs168-su25-disc-feedback