CMPT 471/771: Computer Networks��Introduction
Instructor: Mohamed Hefeeda
1
School of Computing Science �Simon Fraser University
Outline
2
Why study computer networks?
They are critical for every aspect of our life.
Here are some examples …
3
Networks Run Everyday Life
4
Example 1: Rogers Massive Outage: July 2022
5
~12M Canadians affected!
Disrupted almost everything …
From healthcare to entertainment
Even 9-1-1 and government services
The Rogers Outage disrupted services across Canada
Rogers Outage: What Happened?
6
Update to some routers
🡺 removed route distribution filters
🡺 too many routes inserted into core routers, overwhelming them
🡺 routers stopped advertising network prefixes 🡺
🡺 Rogers customers (networks) became unreachable from the Internet!
Example 2: Disruption in the US Air Travel: Nov 2026
7
New router (Arkansas)
FAA telecom network
En route centers
17 unstable, 5 fine
Computer networks are critical for the AI revolution
Here is how …
8
Networks and AI
9
Course Objectives
10
Course Topics
11
1 Introduction
Week 1
2 Network Layer
Weeks 1–2
3 SDN + Virtualization
Weeks 2–3
4 Router Design and QoS
Week 4
5 Programmable Data Planes (P4)
Weeks 5–6
6 TCP and Congestion Control
Weeks 7–8
7 Datacenter Design
Week 9
8 AI Datacenters
Weeks 10–11
9 Protocol Support for AI
Weeks 11–12
Security thread: attacks, vulnerabilities, defenses
AI-for-networks thread: detection, configuration, control
Module 2: Network Layer (Routing and BGP)
12
AS 1
AS 2
BGP
Module 3: SDN and Network Virtualization
13
Apps: routing, firewall
SDN controller
Switch
Switch
Switch
VM
VM
VM
Pod
Virtual switch on one server
Module 4: Router Design and QoS Support
14
Router
In
Out
In
Out
In
Out
Switch fabric
Module 5: Programmable Data Planes (P4)
15
Parser
Match
Action
Match
Action
Match
Action
Deparser
Packets in → out at line rate
Program: P4 code
Tables filled at run time (P4Runtime)
Module 6: TCP and Congestion Control
16
Capacity of the bottleneck
time
Module 7: Datacenter Design
17
Module 8: AI Datacenters
18
Module 9: Protocol Support for AI
19
Ring AllReduce on 4 GPUs
GPU 0
GPU 1
GPU 2
GPU 3
each step: send one
chunk to the neighbor
over RDMA: InfiniBand or Ethernet (RoCE)
Internet: Security and Vulnerability
20
Cloudflare Radar: attacks by source and target
Thread 1: Security
21
Module | Attack or weakness | Defense |
2 Network layer | Prefix and sub-prefix hijacks | Signed routes (RPKI) |
3 SDN, virtualization | Attacks on the controller | SDN as a defense: DDoS, noisy neighbors |
9 AI fabrics (optional) | Tenants sharing one fabric | Partitions; encryption in the NIC |
Thread 2: AI for Networks
22
Module | Where AI helps run the network |
2 Network layer | An LLM assistant diagnoses network failures |
3 SDN | Reinforcement learning for traffic engineering |
6 TCP and congestion control | Learned congestion control |
7 Datacenter design | Cooling control; predicting failures |
Course Information: Reference Books
23
Course Info: Grading
24
The Elephant in the Classroom!
AI Coding Assistants
25
AI Coding Assistants in 2026
26
AI Coding Assistants in the Course
27
AI Coding: Summary
28
Basic Networking Concepts
29
Many Kinds of Networks
30
Home and Wi-Fi
cable, fiber, Wi-Fi
Mobile
cellular 4G and 5G
Campus and enterprise
SFU, offices, hospitals
ISP
ISP backbones
long-haul fiber, IXPs
Content networks
CDNs, nearby caches
Undersea cables
fiber between continents
Satellites
Starlink: 13.6M users
Datacenters, AI clusters
servers and GPUs
Internet
The Internet: Network of Networks
31
mobile network
global ISP
regional ISP
home
network
institutional
network
Internet Structure
32
Tier 1 ISP
Tier 1 ISP
Tier 1 ISP
Tier-1 providers interconnect (peer) privately
IXP
Tier-1 providers also interconnect at public Internet Exchange Points (IXPs)
Vancouver IXP
Tier-1 ISP Network: e.g., Sprint (US)
33
…
to/from customers
peering
to/from backbone
…
…
…
…
POP: point-of-presence
Internet Structure
34
access
ISP
access
ISP
access
ISP
access
ISP
access
ISP
access
ISP
access
ISP
access
ISP
Regional ISP
Regional ISP
IXP
IXP
Tier 1 ISP
Tier 1 ISP
IXP
Internet: Under Sea Cables
35
Google Network
36
Packet Journey
37
access
ISP
access
ISP
access
ISP
access
ISP
access
ISP
access
ISP
access
ISP
access
ISP
Regional ISP
Regional ISP
IXP
IXP
Tier 1 ISP
Tier 1 ISP
IXP
Internet Protocol Stack
38
application
transport
network
link
physical
Encapsulation
39
datagram
frame
Ht
Hn
Hl
M
Ht
Hn
M
segment
Ht
M
message
M
Ht
Hn
Hl
M
Ht
Hn
M
Ht
M
M
application
transport
network
link
physical
application
transport
network
link
physical
link
physical
network
link
physical
Ht
Hn
Hl
M
Ht
Hn
M
Ht
Hn
Hl
M
Ht
Hn
M
Ht
Hn
Hl
M
Ht
Hn
Hl
M
source
destination
router
switch
Internet Services
40
application
transport
network
data link
physical
application
transport
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
logical end-end transport
Internet Services: Connection-Oriented
41
TCP: Transmission Control Protocol [RFC 9293]
42
transport
application
physical
link
network
process
transport
application
physical
link
network
process
TCP “pipe”
Internet
Client
Server
Internet Services: Connectionless
43
?
Why would we need UDP, given that it offers so little?
Performance Analysis: Basics
44
Packet Delay: Four Sources
45
dproc: nodal processing
dqueue: queueing delay
propagation
nodal
processing
queueing
dnodal = dproc + dqueue + dtrans + dprop
A
B
transmission
Packet Delay: Transmission and Propagation
46
propagation
nodal
processing
queueing
dnodal = dproc + dqueue + dtrans + dprop
A
B
transmission
dtrans: transmission delay:
dprop: propagation delay:
Transmission vs. Propagation: One Packet
t = L/R + d/s
47
Sender
Receiver
time
first bit
last bit
L/R
L/R
+ d/s
d/s
Latency or Bandwidth? Transfer Time
T = RTT + S / R
48
Internet: 1 Gb/s, 50 ms
AI: 400 Gb/s, 10 µs
1 KB
1 MB
1 GB
10 µs
1 ms
100 ms
10 s
transfer size S (log)
time T (log)
Packet Switching: Queueing and Losses
49
A
B
C
R = 100 Mb/s
R = 1.5 Mb/s
D
E
queue of packets
waiting for transmission over output link
Queuing: occurs when arrival rate exceeds transmission rate
Packet Loss: occurs when queue (memory) is full
Queueing Delay: Traffic Intensity
ρ = L·a / R
50
ρ = 0.5: short queue
R
ρ = 0.9: long queue
R
ρ > 1: full, packets dropped
R
X
Queueing Delay Explodes with Load
dqueue + dtrans = (L/R) / (1 − ρ)
51
ρ > 1
loss
delay (× L/R)
1
0
0.5
0.8
1
load ρ
2×
5×: 40 ms
25×: 200 ms
End-to-End Delay: Multiple Hops
de2e = Σhops (dproc + dqueue + dtrans + dprop)
52
Host A
Router 1
Router 2
Host B
link 1
link 2
link 3
t = 0
t = 1 × L/R
t = 2 × L/R
t = 3 × L/R
(plus propagation, processing, and queueing at each hop)
End-to-End Throughput: The Bottleneck
throughput = min(Rs, Rc, R/n)
53
Server
Rs = 1 Gb/s
R1
shared R = 10 Gb/s
R2
Rc = 100 Mb/s
Client
other flows
Example: End-to-End Delay and Bottleneck
54
Server
Rs = 1 Gb/s
R1
shared by 200 flows: 10 Gb/s
R2
Rc = 100 Mb/s
Client
path: 1,000 km; empty queues
Let us Measure Latency
55
Which Delay Dominates at Each Scale?
56
Scale | Distance | Propagation | Transmission (1,500 B) | Main delay |
In a node (GPU to GPU) | 1 m | 5 ns | 1.7 ns (NVLink) | processing: NICs, software |
In a rack | 2 m | 10 ns | 30 ns (400 Gb/s) | processing |
In a cluster | 200 m | 1 µs | 30 ns per hop | processing, queueing |
In a region | 50 km | 250 µs | 30 ns | propagation |
Across the globe (to the UK) | 7,526 km | 37.6 ms | 12 µs (1 Gb/s) | propagation |
Summary
57
Readings
58