1 of 25

CS168: Discussion 1

Intro to the Internet I

Fall 2024

2 of 25

Agenda

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

Light discussion today

3 of 25

About Me - Arjun (He/Him)

I’m a 4th year undergrad student studying CS and Applied Mathematics

I’m from LA (lowkey actually from Simi Valley which is a lot less interesting), and like climbing, photography, sleeping, yapping, and walking doggs.

Disclaimer: I have NOT taken this class

My office hours (Soda 411), VERY subject to change:

  • Fri: 2-4 PM
  • Tu: 4-5 PM

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

4 of 25

About Me - Anita (She/Her)

I’m a 4th year undergrad student studying CS.

I’m from the East Bay. I like snowboarding, playing the guitar, and CTFs.

My office hours: Monday 2-5 pm @ Soda 411

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

5 of 25

About Me - Ian

I’m a 4th year undergrad student studying CS and DS.

I’m from the East Bay. I like playing basketball, tennis, and exploring new restaurants

My office hours: Tuesday 2-5 pm @ Soda 411

My email: ihdong@berkeley.edu

(Edstem is faster though)

6 of 25

About Me - Jaewon (He/Him)

I’m a 4th year undergrad student studying EECS and ORMS.

I’m from South Bay. I like playing tennis, hiking, and urban exploration!

My office hours (Soda 411):

  • Mon, Wed, Fri: 2-3 PM
  • Tu, Th: 1-3 PM

My email: jaewon.lee@berkeley.edu (please include “[CS 168]” in the header; Edstem is faster though)

7 of 25

Deadlines

Project 1A: Basic Traceroute

  • Deadline: Tuesday 09/10

Project 1B: Traceroute Error Handling (there are a few hard tests)

  • Deadline: Friday 09/20

Additional Information

  • File to modify: traceroute.py
  • Grade: 15%
  • One partner allowed

8 of 25

Terms

9 of 25

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

10 of 25

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

11 of 25

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

12 of 25

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

13 of 25

Terms (cont’d)

  • 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

14 of 25

Poking the Internet

15 of 25

Ping, Traceroute

  • 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.

16 of 25

Ping, Traceroute

  • 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.

17 of 25

Ping, Traceroute

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

18 of 25

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?

19 of 25

Ping, Traceroute

  • 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

20 of 25

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 25

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 25

Traceroute

  • 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.

23 of 25

Visualizing Traceroute

TTL=1

TTL=2

TTL=3

TTL=4

Destination unreachable

Time Exceeded

Time Exceeded

Time Exceeded

Time to Live:

Error:

24 of 25

Traceroute

How many bytes are the headers for IP, ICMP, and UDP packets?

What are the fields in each protocol header?

What ICMP error messages are relevant to traceroute?

Hint 1: What’s included in the ICMP response packets?

Hint 2: Check out some of the professional traceroute implementations.

Hint 3: Implement logging in your code to track the receipt and handling of each packet.

25 of 25

Questions?

Feedback Form: https://tinyurl.com/cs168-disc-fa24