Discussion 4
1
CS 168, Summer 2025 @ UC Berkeley
Slides credit: Sylvia Ratnasamy, Rob Shakir, Peyrin Kao, Iuniana Oprescu
Routing II 📩
Logistics
Routing
Link State Routing
Each router knows its own local “link state”:
4
2
1
Link State Routing
4
2
1
Link State Routing
4
2
1
Distance Vector vs Link State
Routing
Requirements of Addressing
IP Address
1.2.2.0/23
0000 0001 0000 0010 0000 0010 0000 0000
first 23 bits for network address
last 9 bits for host address
Network prefixes (netmasks)
Mask: 123.96.0.0/12
01111011 . 01100000 . 00000000 . 00000000
Addr: 123.100.42.6
01111011 . 01100100 . 00101010 . 00000110
Classful Addressing
Network bits
Host bits
Network bits
Host bits
Network bits
Host bits
Classful Addressing
Classless Inter-Domain Routing (CIDR)
IP Address
Subnet Mask
1100 0000 . 1000 1010 . 0000 1100 . 0000 0010
1111 1111 . 1111 1000 . 0000 0000 . 0000 0000
network address 192.136.0.0/13
Prefixes
host
host
host
LAN 1
...
host
host
host
LAN 2
...
WAN
WAN
1.2.3.4
1.2.3.7
1.2.3.156
5.6.7.8
5.6.7.9
5.6.7.212
1.2.3.0/24
5.6.7.0/24
forwarding table
host
5.6.7.213
router
router
router
Worksheet
Question 1: Link-State Routing
Worksheet
Question 2: More L3 Link State
Question 2: More L3 Link State
Question 2: More L3 Link State
Question 2: More L3 Link State
Worksheet
Question 3: IP Addressing
Question 3: IP Addressing
Question 3: IP Addressing
Questions?
Feedback Form: https://tinyurl.com/cs168-su25-disc-feedback