Josh Smallman
CS 125
Homework Assignment 1
Due Saturday, January 29, 9PM
Formatter: HTML

  1. P&D, #5, pg. 61
    A)
    1000KB * 2^10 * 8 bits/byte = 8192000 bits
    8192000 bits / 1.5 * 10^6 bits/sec = 5.461333 sec
    5.461333 sec + .2 sec handshake = 5.661 sec

    B) 1000 pkts *.1 sec/pkt + .2 sec hdshke = 100.2 sec

    C) 1000/20 = 50 (.1sec) + .2 sec hdshke = 5.2 sec

    D) 9 * .1 sec +.2 sec hdshke = 1.1 sec

  2. P&D, #6, pg. 61
    Prop Delay = 2km / 2 * 10^8 m/s = 1 * 10^-5 sec
    transmit = size/bandwidth, 1x10^-5 = 100bytes / x
    x = 80 Mbs
    transmit = size/bandwidth, 1x10^-5 = 512bytes / x
    x = 409.6 Mbs

  3. P&D, #11, pg. 62
    width = 1 second / 10^9 bits/sec = 1*10^-9 seconds
    length = 1*10^-9 sec * 2.3*10^8 m/sec = .23 meters

  4. P&D, #12, pg. 62
    (X KB * 1024 * 8) / ( y * 10^6) = .008192 (X/Y)

  5. P&D, #13, pg. 62
    A) RTT = (385,000 km * 2) / 3*10^8 m/s = 2.567 seconds
    B) Delay X Bandwidth = 2.567 sec * 100 * 10^6 = 32.1 MB
    C) It's how much data the pipe holds. It's how much data will be sent by the sender before any acknoledgement from the reciever is received by the sender.
    D) RTT of 2.567sec + (25 * 2^20 * 8)/(100 * 10^6) = 2.567 + 2.097 sec = 4.66 seconds

  6. P&D, #14, pg. 62
    A) Open a file- Assuming that you're just opening the file, and not reading the contents of it, the operation would be delay sensitive, since the file open command would need to be sent to then executed by the remote server, which wouldn't necessarily send back much data.
    B) Read the contents of a file- This is more likely to be bandwidth sensitive, since there could be a large amount of data that needs to be sent.
    C) List the contents of a directory- This is most likely delay sensitive, since a directory listing is relatively short and won't require more than a few packets of data to be sent.
    D) Display the attributes of a file- Also delay sensitive, since very little data is going to be sent through the pipe.

  7. P&D, #18, pg. 63
    A) 10,000 bits / (10 * 10^6) bits/sec = .001
    2(.001) + 2 (20*10^-6) + 35*10^-6 = .002075 seconds
    B) 5000 bits / (10 * 10^6) bits/sec = .0005
    3(.0005) + 3 (20*10^-6) + 35*10^-6 = .001595 seconds

  8. P&D, #26, pg. 65
    A) Because only one packet is sent at a time, the ordering of packets is guaranteed to remain correct, so no sequence numbers are needed to put the packets in order.
    B) A two-bit sequence number is enough, as long as no more than 3 packets are lost at a time. A one-bit sequence number only allows for 1 packet to be lost at a time.
    C) This means that the sequence number domain will have to be large enough to span the number of packets transmitted through the link in a minute. This could be a huge amount of sequence numbers if we're talking about any respectable amount of bandwidth..

  9. P&D, #31, pg. 66 add: www.ietf.org, and ftp.isi.edu
    jsmallma@turing [5:37pm] /cs/cs125/tools
    18 > /usr/sbin/ping -s -v www.cs.princeton.edu
    PING glia.CS.PRINCETON.Edu: 56 data bytes
    64 bytes from glia.CS.Princeton.EDU (128.112.136.7): icmp_seq=0. time=95. ms
    64 bytes from glia.CS.Princeton.EDU (128.112.136.7): icmp_seq=1. time=107. ms
    64 bytes from glia.CS.Princeton.EDU (128.112.136.7): icmp_seq=2. time=104. ms
    64 bytes from glia.CS.Princeton.EDU (128.112.136.7): icmp_seq=3. time=93. ms
    64 bytes from glia.CS.Princeton.EDU (128.112.136.7): icmp_seq=4. time=92. ms
    ----glia.CS.PRINCETON.Edu PING Statistics----
    5 packets transmitted, 5 packets received, 0% packet loss
    round-trip (ms) min/avg/max = 92/98/107

    jsmallma@turing [5:38pm] /cs/cs125/tools
    19 > /usr/sbin/ping -s -v www.cisco.com
    PING www.cisco.com: 56 data bytes
    64 bytes from www.cisco.com (198.133.219.25): icmp_seq=0. time=208. ms
    64 bytes from www.cisco.com (198.133.219.25): icmp_seq=1. time=203. ms
    64 bytes from www.cisco.com (198.133.219.25): icmp_seq=2. time=218. ms
    64 bytes from www.cisco.com (198.133.219.25): icmp_seq=3. time=198. ms
    64 bytes from www.cisco.com (198.133.219.25): icmp_seq=4. time=185. ms
    64 bytes from www.cisco.com (198.133.219.25): icmp_seq=5. time=202. ms
    ----www.cisco.com PING Statistics----
    6 packets transmitted, 6 packets received, 0% packet loss
    round-trip (ms) min/avg/max = 185/202/218

    jsmallma@turing [5:41pm] /cs/cs125/tools
    20 > /usr/sbin/ping -s -v www.ietf.org
    PING optimus.IETF.ORG: 56 data bytes
    64 bytes from ietf.org (132.151.1.19): icmp_seq=0. time=242. ms
    64 bytes from ietf.org (132.151.1.19): icmp_seq=1. time=196. ms
    64 bytes from ietf.org (132.151.1.19): icmp_seq=2. time=234. ms
    64 bytes from ietf.org (132.151.1.19): icmp_seq=3. time=251. ms
    ----optimus.IETF.ORG PING Statistics----
    4 packets transmitted, 4 packets received, 0% packet loss
    round-trip (ms) min/avg/max = 196/230/251

    jsmallma@turing [5:43pm] /cs/cs125/tools
    21 > /usr/sbin/ping -s -v ftp.isi.edu
    PING ftp.isi.edu: 56 data bytes
    64 bytes from www.isi.edu (128.9.176.20): icmp_seq=0. time=92. ms
    64 bytes from www.isi.edu (128.9.176.20): icmp_seq=1. time=103. ms
    64 bytes from www.isi.edu (128.9.176.20): icmp_seq=2. time=119. ms
    64 bytes from www.isi.edu (128.9.176.20): icmp_seq=3. time=117. ms
    64 bytes from www.isi.edu (128.9.176.20): icmp_seq=4. time=101. ms
    ----ftp.isi.edu PING Statistics----
    5 packets transmitted, 5 packets received, 0% packet loss
    round-trip (ms) min/avg/max = 92/106/119

    The difference in RTT times during the day could be due to varying degrees of net congestion, as well as changes in the network structure itself (switches go down, which makes the packet find a different route).

  10. P&D, #32, pg. 66 add: www.ietf.org, and ftp.isi.edu
    jsmallma@turing [5:51pm] /cs/cs125/tools
    23 > /usr/sbin/traceroute www.ietf.org
    traceroute to optimus.IETF.ORG (132.151.1.19), 30 hops max, 40 byte packets
    1 router42.cs.hmc.edu (134.173.42.200) 1.376 ms 1.139 ms 1.414 ms
    2 Inferno.Claremont.Edu (134.173.254.1) 1.468 ms 0.929 ms 3.153 ms
    3 atm4-0-4.lax-bb1.cerf.net (134.24.42.17) 6.682 ms 6.310 ms 6.930 ms
    4 pos8-0-155M.lax-bb4.cerf.net (134.24.32.230) 8.638 ms 14.973 ms 4.720 ms
    5 so1-0-0-622M.dfw-bb2.cerf.net (134.24.29.78) 41.197 ms 44.516 ms 41.070 ms
    6 pos2-0-622M.chi-bb4.cerf.net (134.24.46.82) 68.477 ms 65.813 ms 73.963 ms
    7 atm12-0-0.br1.chi1.ALTER.NET (137.39.23.49) 68.493 ms 64.647 ms 65.375 ms
    8 107.ATM2-0.XR2.CHI4.ALTER.NET (152.63.65.174) 67.308 ms 68.916 ms 70.426 ms
    9 194.at-1-1-0.TR2.CHI2.ALTER.NET (152.63.65.74) 73.150 ms 68.079 ms 70.097 ms
    10 126.at-5-1-0.TR2.DCA6.ALTER.NET (152.63.1.126) 103.885 ms 99.233 ms 101.480 ms
    11 286.ATM5-0.XR2.TCO1.ALTER.NET (152.63.34.41) 99.836 ms 104.878 ms 99.337 ms
    12 192.ATM6-0.GW5.TCO1.ALTER.NET (146.188.162.165) 103.694 ms 99.481 ms 98.798 ms
    13 gateway.cnri.reston.va.us (132.151.1.3) 561.248 ms 792.879 ms 726.851 ms
    14 ietf.org (132.151.1.19) 701.727 ms 726.346 ms 770.072 ms


    24 > /usr/sbin/traceroute ftp.isi.edu
    traceroute to ftp.isi.edu (128.9.176.20), 30 hops max, 40 byte packets
    1 router42.cs.hmc.edu (134.173.42.200) 1.775 ms 3.166 ms 1.273 ms
    2 Inferno.Claremont.Edu (134.173.254.1) 1.241 ms 1.018 ms 1.759 ms
    3 atm4-0-4.lax-bb1.cerf.net (134.24.42.17) 17.190 ms 7.934 ms 14.937 ms
    4 atm8-0.lax-bb3.cerf.net (134.24.29.18) 4.444 ms 9.764 ms 11.686 ms
    5 lap.ln.net (198.32.146.10) 21.991 ms 5.232 ms 10.795 ms
    6 c7505.isi.edu (128.9.16.5) 9.267 ms 8.704 ms 18.070 ms
    7 128.9.32.7 (128.9.32.7) 6.776 ms 15.287 ms 8.499 ms
    8 www.isi.edu (128.9.176.20) 16.711 ms * 14.430 ms

    The number of hops seems to scale with the rtt times from ping- the more hops made, the longer the rtt times. The number of hops also tends to increase as geographical distance increases.

  11. Use netstat to look at the state of turing's interface for 2 minutes at 10 second intervals. Attach a printout.

    -see attached printout-

  12. Play with netstat -s and come to some understanding of the stats produced

    played with :). Has a bunch of network statistics (for UDP, TCP, IP, ICMP, and IGMP)

  13. Watch turing's traffic over a 4 hour period. Determine which protocol families are running, e.g., TCP/IP, Appletalk, DecNet, ?

    Couldn't be done due to new security restrictions. :(

  14. How long did you spend on the homework

    Approximately 3 hours.