# Homework 4 **Due Friday, November 18 by 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](https://www.gradescope.com/courses/437277) under the assignment labeled "Homework 4". If you have issues accessing Gradescope, please contact the course staff :::info Since you're already working on TCP, this homework intended to be relatively short. Problem 1 is *specifically* designed to give you some practice with sending/ACKing TCP segments--**we HIGHLY recommend doing this problem soon, ie. WHILE you are working on this part of your TCP project**, we promise it will help! ::: ## Problem 1: Sending data with TCP Suppose A and B create a TCP connection with initial sequence numbers 20000 and 5000, respectively, and an initial window of 8000 bytes. The table below depicts the flow of the connection, which has 3 main events: 1. A sends three 100-byte segments (which we will name `DataA1`, `DataA2`, and `DataA3`, respectively) and B sends ACKs for each 2. Between segments `DataA2` and `DataA3`, B calls `conn.Read()` on the socket associated with the connection, which returns 200 bytes 3. B sends a 100-byte segment (`DataB1`) to A and begins the connection termination process by sending a `FIN` In the table below, fill in the SEQ, ACK, and WIN fields for each packet shown, given the listed initial sequence numbers and window sizes. :::info **Hint**: Try to create a similar connection flow using the TCP reference, while looking at the packets sent in Wireshark--this should allow you to view changes in sequence numbers and window sizes. Another reference that may be useful is [Section 17.3 of the Dordal textbook](https://intronetworks.cs.luc.edu/current2/html/tcpA.html#tcp-connection-establishment). ::: <span style="font-size: 0.98em; text-align: center"> <table> <colgroup> <col width="6%" /> <col width="48%" /> <col width="48%" /> </colgroup> <thead> <tr> <td>t</td> <td><b>Packets sent by A</b></td> <td><b>Packets sent by B</b></td> </tr> </thead> <tbody> <tr><td>0</td><td>SYN, seq=20000,win=8000</td><td></td></tr> <tr><td>1</td><td></td><td>SYN+ACK, seq=5000,ack=__,win=8000</td></tr> <tr><td>2</td><td>ACK,seq=__,ack=___win=___,data=DataA1</td><td></td></tr> <tr><td>3</td><td></td><td>ACK,seq=__,ack=___win=___</td></tr> <tr><td>4</td><td>ACK,seq=__,ack=___win=___,data=DataA2</td><td></td></tr> <tr><td>5</td><td></td><td>ACK,seq=__,ack=___win=___</td></tr> <tr><td>6</td><td></td><td><i>[B calls Read() => returns 200 bytes]</i></td></tr> <tr><td>7</td><td>ACK,seq=__,ack=___win=___,data=DataA3</td><td></td></tr> <tr><td>8</td><td></td><td>ACK,seq=__,ack=___win=___</td></tr> <tr><td>9</td><td></td><td>ACK,seq=__,ack=___win=___,data=dataB1</td></tr> <tr><td>10</td><td>ACK,seq=__,ack=___win=___</td><td></td></tr> <tr><td>11</td><td></td><td>FIN+ACK,seq=__,ack=___win=___</td></tr> <tr><td>12</td><td colspan="2">...</td></tr> </tbody> </table> </span> :::success **Do you use latex?** Want a pretty version of this table you can copy into your document? [Here's a latex version!](https://www.overleaf.com/read/ndgcgbmccnpm) :wink: ::: ## Problem 2: The state of Internet access today We have spent a lot of time in this course assuming that the network infrastructure to support the systems and protocols we're learning about actually exists and--for the most part--works. To solve a problem at one layer, we assume that we have some infrastructure from the layer below. However, this is not always true in practice: at the most fundamental level, someone needs to build the physical infrastructure, and not everyone can access it. The International Telecommunications Union (ITU) is a UN agency that develops standards for communication networks and works to facilitate connectivity around the world. The ITU publishes a [Global Connectivity Report](https://cs.brown.edu/courses/csci1680/f22/content/itu-global-connectivity-report-2022.pdf) about the state of Internet access globally. In this problem, we'll examine some findings from this report to explore differences in Internet access and usage across regions, and consider some of the barriers to connectivity today. ### Part A: Comparing speeds Open up the [ITU Global Connectivity Report](https://cs.brown.edu/courses/csci1680/f22/content/itu-global-connectivity-report-2022.pdf) and take a look at **Figure 2.22**. (You can find it in the PDF's table of contents.) **i)** Which region of the world has the highest median download and upload speeds across both figures, and what are they (in Mbps)? Your answer should include two numbers with units. <!-- Figure 2.22: Europe: 86Mbps, 43Mpbs --> **ii)** On HW2, you measured upload and download speeds from your own devices, mainly from the Brown campus network. Across all of your measurements, the median reported download and upload speeds were **139.5 Mbps** and **93.8 Mbps**, respectively. In a sentence, how does this compare to the numbers you found in part (i)? <!-- The median download and upload speeds for Homework 2 are higher (approx 2x, though they don't need to specify this to receive full credit) than the median download and upload speeds of Europe. --> ### Part B: Growth **i)** Now take a look at **Figure 2.2**. What is the _percentage_ and _number_ of people that the ITU estimates as **using** the Internet in 2021? Report your answer as two numbers. <!-- 63%, 4.901 billion people --> **ii)** Start reading **Section 2.3**. What is _number_ of people that the ITU estimates as **not using** the Internet in 2021? <!-- Figure 2.2, document page 21: 63% using the internet, 37% not using the Internet, 2.9 billion people still offline. --> <!-- ### Part C: The three stages of connectivity Take a look at Box 1.5 (listed in the table of contents), which breaks down connectivity over the past few decades into three stages. Define each stage in 1-2 sentences. For the latter two stages, include an explanation for how it emerged from the previous stage. --> <!-- 1990s: Dialup, fixed broadband, early cellular services connecting everyone, but expensive--> <!-- 2000s: Growing mobile networks, competition, Internet services made possible by the smartphone --> <!-- 2010s: Expansion of network coverage worldwide, lack of usage in some areas --> ### Part C: Today **i)** Take a look at **Figure 2.16**. What percentage of the world population does the ITU estimate as being *covered* at least a 3G network in 2021? <!-- 88% 4G, 95% at least 3G network --> **ii)** Take a look at **Figure 2.18**. On a global scale, what does the ITU estimate to be the difference between the percentage of people *covered* by an Internet network and the percentage _who actually use_ the Internet (the number you found in Part B)? What name does the ITU report name this difference? **iii)** Skim over **Sections 2.4 and 2.5**--you don't need to read it all, just look over the headers and figures to get a sense of the major points. What are some of the barriers identified by the ITU that prevent people from using the Internet today? You can express your answer in 1-2 sentences, or a couple of bullet points. <!-- 32%, the usage gap --> <!-- #### iii) Suppose that you make it your goal to ensure that everyone who _wants_ to use the Internet _can_. Drawing on the Report, explain in 3-5 sentences how the difference that you found above shapes your priorities in 2022 relative to say, 1990. --> <!-- You'd want to build lines... now there is infrastructure, need to overcome other circumstances --><!-- , 1990. ### Part E: By nearly every measure... #### i) pp 24, pp 25, pp 27, pp 31, pp 34, pp 36, pp 37 Throughout the Report, the ITU divides the world into six distinct regions. Glancing at each of the figures shown on the pages above, which of these regions performs the worst by nearly every measure of Internet access offered by the ITU? #### ii) pp 34 Returning to **Figure 2.18: Coverage gap and usage gap**, what is the breakdown for the region you identified above? Report your answer as three labeled numbers. --> <!-- ## Problem 2: Infrastructural politics in and around Africa ### Part A: Vertical integration along the OSI model - Read [this article](https://restofworld.org/2022/google-meta-underwater-cables/). - -->