1 of 36

Discussion 1

1

CS 168, Summer 2025 @ UC Berkeley

Slides credit: Sylvia Ratnasamy, Rob Shakir, Peyrin Kao, Iuniana Oprescu

Intro to the Internet 1 🧑‍💻

2 of 36

Agenda

  • Introductions
  • Logistics
  • Terms
  • Poking the Internet
  • Intro to Project Traceroute

Today’s a light discussion

3 of 36

About Me (Jamie)

I’m a 5th semester transfer student studying CS.

I’m from San Diego. I like playing tennis, reading, and playing Valorant occasionally 🙄.

My email: janzai@berkeley.edu (Edstem is faster though)

CS168 TA Picture Here (fun!)

4 of 36

Logistics

  • Project 1A: Basic Traceroute
    • Deadline: Thursday, June 26th
  • Project 1B: Traceroute Error Handling
    • Deadline: Thursday, July 3rd

  • Far ahead: Midterm on July 22nd, 7-9pm (put it in your calendar)!

5 of 36

Terms

  • Routers/Switches
  • End-host
  • Packets
  • Naming
  • Network “Stack”
  • ISP (Internet Service Provider)
  • ASes (Autonomous Systems)

6 of 36

Terms

  • Routers/Switches: Devices that forward packets arriving on one link to another link. We make no distinction between routers/switches at this point

  • End-host: a device attached to the network that sends or receives packets.
  • Examples: mobile phone, laptop, security camera, smart fridge

7 of 36

Terms

  • Packets: A Bags of bits with a
    • Header-- info for network and network stack to make decisions
    • Body-- contains a payload. Ex. A file, image, an application header
      • The network doesn’t really care about what’s in the payload.

Header

“Go Bears”

Body

8 of 36

Terms

  • Naming:
    • Network name: which host it is
    • Network address: where host is located
    • When you move a server to a new building, its name does not change but its address does

Name: mywebsite.com

Addr: 142.250.72.206

Name: mywebsite.com

Addr: 208.117.236.69

9 of 36

Terms

  • Network “Stack”: Networking Software on host.
    • Replicates some router/switch functionality and adds some additional functionality before passing the body of packets to the application

10 of 36

Terms

  • ISP (Internet Service Provider): A network of packet switches and links that provide network access (i.e. Comcast, ATT, Sonic)
  • ASes (Autonomous Systems): Groups of routers under the same control
    • Usually each ISP has one AS, but may have multiple ASes
    • Routers within the same AS will have information about each other

11 of 36

Poking the Internet

  • Ping
  • Traceroute
  • Dig

12 of 36

Ping, Traceroute, Dig

  • Internet is large and complex. Network engineers and researchers have built some handy tools to get some insight into what is going on inside and across the internet.
  • We’re going to play around with them a little bit

Think of this as a “tinker discussion” - you aren’t expected to know any of these concepts yet. We’ll learn about them throughout the semester.

13 of 36

Ping, Traceroute, Dig

  • Simple utility that lets you poke a website and see if it moves (spoiler: most do!)
  • You say hi and see if the server says hi back
    • This by itself is not super interesting
  • Ping also tells you how long the reply took to come back
    • This is more interesting!
  • Let’s try out a few websites.

14 of 36

Ping, Traceroute, Dig

Predictions?

  • berkeley.edu
  • google.com
  • ford.com (Ford, a car company headquartered in Michigan)
  • csail.mit.edu (MIT’s CS department)
  • lmu.de (University of Munich)
  • unam.edu.na (University of Namibia)

15 of 36

Ping: A prediction

  • We’ve pinged a couple websites and seen pretty significant differences in latency.
    • Latency is the time between when a request is sent and when the response is heard.
  • What about differences in latency for the same website, but in different regions?
  • We’ve pinged google.com and seen its latency.
    • How many times longer will it take for a ping to google.co.uk to come back?

16 of 36

Ping, Traceroute, Dig

ping berkeley.edu -c 3

PING berkeley.edu (141.193.213.21): 56 data bytes

64 bytes from 141.193.213.21: icmp_seq=0 ttl=50 time=14.142 ms

64 bytes from 141.193.213.21: icmp_seq=1 ttl=50 time=20.024 ms

64 bytes from 141.193.213.21: icmp_seq=2 ttl=50 time=17.540 ms

--- berkeley.edu ping statistics ---

3 packets transmitted, 3 packets received, 0.0% packet loss

round-trip min/avg/max/stddev = 14.142/17.235/20.024/2.411 ms

ping csail.mit.edu -c 3

PING csail.mit.edu (128.52.132.19): 56 data bytes

64 bytes from 128.52.132.19: icmp_seq=0 ttl=32 time=108.253 ms

64 bytes from 128.52.132.19: icmp_seq=1 ttl=32 time=109.574 ms

64 bytes from 128.52.132.19: icmp_seq=2 ttl=32 time=98.613 ms

--- csail.mit.edu ping statistics ---

3 packets transmitted, 3 packets received, 0.0% packet loss

round-trip min/avg/max/stddev = 98.613/105.480/109.574/4.886 ms

17 of 36

Ping, Traceroute, Dig

  • Tool to trace the route that packets take from your computer to the destination.
    • Specifically lets you see the routers/switches that are forwarding your packets.

1

2

18 of 36

Ping, Traceroute, Dig

  • Traceroute gives you the path of routers and switches your packets take.
  • How?
    • Takes advantage of something called a TTL in the packet IP header.
    • TTL denotes how many times a packet should be forwarded before it is discarded.
      • Why does this exist?
        • To stop the internet from collapsing! (We’ll cover this when we get to routing)
    • Sets the TTL to 1, 2, 3, etc
    • When packets are dropped because of TTL expiring, most routers send back a message telling us.
    • Use the source of this notification to identify the routers along the packet’s path.

19 of 36

Ping, Traceroute, Dig

Demo, pick your favorite(s):

  • berkeley.edu
  • google.com
  • csail.mit.edu (MIT’s CS department)
  • ford.com (Ford, a car company headquartered in Michigan)
  • lmu.de (University of Munich)
  • unam.edu.na (University of Namibia)

Now let’s visualize it online at geotraceroute.com

20 of 36

Ping, Traceroute, Dig

traceroute berkeley.edu

traceroute: Warning: berkeley.edu has multiple addresses; using 141.193.213.20

traceroute to berkeley.edu (141.193.213.20), 64 hops max, 40 byte packets

1 sut-mdc-sr9--ae0-558.net.berkeley.edu (10.40.232.2) 6.154 ms 10.428 ms 7.135 ms

2 sut-mdc-cr1--xe-2-1-13.net.berkeley.edu (128.32.255.96) 16.284 ms 19.354 ms 7.312 ms

3 reccev-cev-cr2--et-0-2-8.net.berkeley.edu (128.32.255.177) 5.652 ms

sut-mdc-cr2--et-0-2-8.net.berkeley.edu (128.32.255.41) 10.454 ms *

4 * * *

5 * sut-mdc-fw9--xe-0-0-1-3.net.berkeley.edu (128.32.255.143) 6.366 ms 5.512 ms

6 reccev-cev-sr1--xe-0-1-1-0-2.net.berkeley.edu (128.32.255.140) 5.309 ms 4.949 ms 5.388 ms

7 reccev-cev-sr1--lt-0-1-0-0.net.berkeley.edu (128.32.255.166) 4.160 ms 5.037 ms 4.338 ms

8 reccev-cev-cr2--et-0-0-0-3.net.berkeley.edu (128.32.255.74) 5.742 ms 9.072 ms 7.551 ms

9 sut-mdc-cr1--et-0-1-0.net.berkeley.edu (128.32.255.40) 7.412 ms

sut-mdc-cr1--et-0-1-5.net.berkeley.edu (128.32.255.176) 5.063 ms

reccev-cev-cr1--et-0-1-0.net.berkeley.edu (128.32.255.174) 6.135 ms

10 reccev-cev-br1--et-1-1-1.net.berkeley.edu (128.32.0.38) 4.994 ms 5.771 ms

reccev-cev-br1--et-1-1-0.net.berkeley.edu (128.32.0.36) 5.349 ms

11 emvl1-agg-01--ucb--100g.cenic.net (137.164.3.26) 9.055 ms 5.400 ms 5.872 ms

12 svl-agg10--emvl1-agg-01--400g--01.cenic.net (137.164.11.94) 9.312 ms 9.272 ms 8.780 ms

13 198.32.251.193 (198.32.251.193) 18.352 ms * 33.886 ms

14 172.68.188.80 (172.68.188.80) 10.743 ms

172.68.188.94 (172.68.188.94) 10.407 ms

172.68.188.80 (172.68.188.80) 26.217 ms

15 141.193.213.20 (141.193.213.20) 8.597 ms 9.852 ms 8.677 ms

21 of 36

Traceroute: Notice anything?

  • Traceroute gives us a lot more interesting feedback than ping.
    • Latency to every step along the way.
      • Can see a breakdown of latencies!
    • Router names.
      • Often have locations in them (i.e. city name)
      • Can roughly trace packet path on a map!
    • Weird stars
      • Some routers just don’t respond ⁻\_(ツ)_/⁻

22 of 36

Ping, Traceroute, Dig

  • When humans want to go to a website, we think in terms of names
    • i.e. google.com
  • The internet does not think this way, it thinks in terms of addresses
    • i.e. “1.2.3.4”
  • It’s like the postal service
    • You wouldn’t just write “To: Alice” on a letter
    • You would look up Alice’s address in some directory
      • Then mail the letter to her address
  • Dig lets you lookup the address of a website by its name
    • Command line interface to the Domain Name Service (DNS)

23 of 36

Dig: A breakdown

  • When using the +trace option, there was a lot more information
  • We could see the steps that were taken when resolving the names
    • First, the ‘root’ servers were queried
    • Then, the TLD (top level domain) server was queried
    • After that, successive servers were asked until the IP was found
  • More on how this works when we discuss DNS

24 of 36

Ping, Traceroute, Dig

Demo

  • berkeley.edu
  • google.com
  • csail.mit.edu (MIT’s CS department)
  • ford.com (Ford, a car company headquartered in Michigan)
  • lmu.de (University of Munich)
  • unam.edu.na (University of Namibia)

(optionally see approximate physical location at https://www.iplocation.net/)

25 of 36

Bonus: What’s your IP Address?

On a Mac, go to System Settings -> Network -> Select “Details” on the network you’re connect to -> TCP/IP:

26 of 36

Worksheet

  • Internet Layers
  • Design Philosophy (Clark Paper)
  • A Gentle Intro to Traceroute

27 of 36

Question 1: Internet Layers

28 of 36

Worksheet

  • Internet Layers
  • Design Philosophy (Clark Paper)
  • A Gentle Intro to Traceroute

29 of 36

Question 2: Design Philosophy (Clark Paper)

30 of 36

Worksheet

  • Internet Layers
  • Design Philosophy (Clark Paper)
  • A Gentle Intro to Traceroute

31 of 36

Question 3: A Gentle Intro to Traceroute

32 of 36

Question 3: A Gentle Intro to Traceroute

33 of 36

Question 3: A Gentle Intro to Traceroute

34 of 36

Question 3: A Gentle Intro to Traceroute

35 of 36

Question 3: A Gentle Intro to Traceroute

36 of 36

Questions?

Feedback Form: https://tinyurl.com/cs168-su25-disc-feedback