« Back to the main CSCI1680 website

Homework 2

Due Friday, October 14, 2022 at 11:59PM EST

Meta-note

  • You are welcome (and encouraged!) to collaborate with your peers, though the answers you write down must be your own
  • When you are done, please upload a PDF of your work to Gradescope under the assignment labeled "Homework 2". If you have issues accessing Gradescope, please contact the course staff

Problem 1: Ethernet and MAC Learning

Part a

Sending frames on an Ethernet network is very convenient, as you don't have to configure anything. How do hosts get unique Ethernet addresses?

Part b

Consider the following Ethernet network, consisting of 5 hosts (H1H5) and two switches (S1 and S2):

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Assume that both S1 and S2 start with empty MAC address tables. What happens to the tables after each of the following events?

  1. H1 sends a packet to H4
  2. H5 sends a packet to H4
  3. H4 sends a packet to H5

After each event (i)-(iii) occurs, draw the MAC address tables for each of S1 and S2. If, after an event, no entries are added/updated, you may simply copy the table from the previous update.

You can use tables like the examples below:

S1's MAC address table

MAC address Port
.
.
.

S2's MAC address table

MAC address Port
.
.
.

Problem 2: IP and Ethernet Addressing

Note: We will discuss NAT in more detail during class on Tuesday, October 10. Only part (e) of this problem requires dealing with NAT.

Consider the network pictured below, which has two private networks (also called "subnets") connected to router R1 via Ethernet switches S1 and S2. R1 also connects both subnets to the Internet using Network Address Translation (NAT), as the 10.0.0.0/8 prefix is not routable on the Internet. p0p2 are the names of ports on switch S1 (not MAC addresses).

Initially, all ARP tables and MAC learning caches are empty. Assume that all hosts are configured correctly with an IP address, network mask, and default gateway to match the figure. Additionally, assume that the router’s forwarding table is configured appropriately to access both private subnets and the Internet (using NAT).

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Part a

First, H1 sends an IP packet to H3. (Assume that this sends an ARP request, which happens successfully.) For the IP packet, write the source and destination addresses in both the L2 (Ethernet) and L3 (IP) header when it is crossing the link labeled A in the figure. For MAC addresses, you can use names based on the name of the host or router interface, eg. MAC_H1 for H1, MAC_IF1 for R1’s IF1, etc.

Src Address Dst Address
Ethernet
IP

Part b

Router R1 is a cheap model and can only hold 4 entries in its forwarding table. Given that it needs to route packets to both local subnets, and to the entire Internet (including H4), what are the entries in R1's forwarding table? (Assume a default route has already been provided, as shown).

Destination Network Out Port/Next Hop
.
.
.
Default 141.213.10.1

Part c

H2 is trying to send a packet to H3. Similar to part (A), write the source and destination addresses in both the L2 (Ethernet) and the L3 (IP) header for the IP packet when it is crossing the link labeled B in the figure (Again, assume any relevant ARP requests are made and handled successfully).

Src Address Dst Address
Ethernet
IP

Part d

After H2's IP packet successfully reaches H3, what are the contents of H1's ARP table ? (You can fill in a table like the one below, though you may not need as many entries as shown here.)

H1 ARP cache

IP address MAC address
.
.
.

Part e

Note: Network Address Translation (NAT) will be discussed further in Lecture 10 (Tuesday, October 11).

Now H1 wants to send a packet to H4, which is a server out on the Internet. Note that R1 uses NAT to send the outgoing packet, as the 10.0.0.0/8 addresses are not routable on the Internet. What are the source and destination L2 and L3 addresses for this packet when it is crossing link C in the figure?

Src Address Dst Address
Ethernet
IP

Problem 3: Layering

What do you need to do manually for a network with IP over Ethernet to work, if you don’t have the following protocols/features working? For example, your answer might be in the form of "give each X a table mapping A to B," "determine unique IDs for Z," or "nothing."

  • ARP
  • DHCP
  • MAC Learning (at the switches)
  • Intra-domain routing (RIP, OSPF, etc.) [Lecture 10]

Problem 4: Speed test

In lectures 3-4, we learned about how different link-layer protocols and physical layer properties about a link (bandwidth, noise, etc.) can affect a user's access to the network in terms of latency, bandwidth, etc. As we talk more about Internet Service Providers (ISPs) and IP routing on a global scale, we will learn about other factors that affect users' access to the Internetnot only due to technical reasons, but also economic, legal, and social factors as well.

As a starting point for this discussion, we'd like you to measure your Internet speed from one or more locations or networks (eg. wifi on campus, cellular data, coffee shop, etc.) and submit your results. After this assignment is due, we will aggregate everyone's results and discuss them in class, as well as place them in a more global context.

Here's what you need to do:

  • Visit https://speed.cloudflare.com, a site that runs various tests to measure the performance of your Internet connection in terms of bandwidth and latency
  • Enter some of the test results into this form. To fill out the form, you will need to sign in with your Brown account (though the results are anonymous).
  • If possible, repeat this process on a different network than you tried previously, or on the same network under different test conditions. Some examples could include:
    • The campus wireless network
    • A wired connection on campus
    • Cellular data on a phone (eg. 4G, 5G)
    • A wired or wireless connection off-campus
    • Public wifi (from a coffee shop, train station, etc.)
    • A different vantage point on the campus wireless network (ie. a crowded vs. empty area)
  • Note that the form is anonymousyou can submit to it as many times as you want with different test results. Please try to submit two different results if possible, but only one is required to get full credit.
  • For credit on this problem: in your homework submission, include a screenshot of at least one of your test results. If you have thoughts on any comparisions between your rest results, feel free to add themwe'll aggregate all the results and your notes for a larger discussion in class!