Homework

 


Hw5 (10pts)


P1/pg.416

In this question, we consider some of the pros and cons of virtual-circuit and datagram networks.

  1. Suppose that routers were subjected to conditions that might cause them to fail fairly often. Would this argue in favor of a VC or datagram architecture? Why?

  2. Suppose that a source node and a destination require that a fixed amount of capacity always be available at all routers on the path between the source and destination node, for the exclusive use of traffic flowing between this source and destination node. Would this argue in favor of a VC or datagram architecture? Why?

  3. Suppose that the links and routers in the network never fail and that routing paths used between all source/destination pairs remains constant. In this scenario, does a VC or datagram architecture have more control traffic overhead? Why?

 

P4/pg.417

Consider the network below.

a. Suppose that this network is a datagram network. Show the forwarding table in router A, such that all traffic destined to host H3 is forwarded through interface 3.

b. Suppose that this network is a datagram network. Can you write down a forwarding table in router A, such that all traffic from H1 destined to host H3 is forwarded through interface 3, while all traffic from H2 destined to host H3 is forwarded through interface 4? (Hint: this is a trick question.)

c. Now suppose that this network is a virtual circuit network and that there is one ongoing call between H1 and H3, and another ongoing call between H2 and H3. Write down a forwarding table in router A, such that all traffic from H1 destined to host H3 is forwarded through interface 3, while all traffic from H2 destined to host H3 is forwarded through interface 4.

d. Assuming the same scenario as (c), write down the forwarding tables in nodes B, C, and D.

 

P9/pg.419 (optional, not graded, we might do it in class)


Hw4 (10pts)


Hw4 (creating a Python3 SMTP mail client) is posted here.

Find online a free SMTP server to test your client. Suggestions: the free mail server SMTP4Dev for Windows; or the following SMTP server http://nilhcem.github.io/FakeSMTP/ (download it from here) works on both Windows and MacOS - make sure you have Java installed for the FakeSMTP.

How to test your SMTP client? My FakeSMTP server is up and running on my virtual machine at socket 140.103.10.136:12000. To prove that your mail client works you have two options:
1) You may choose to send me at the socket above a message from your SMTP mail client. In this case submit a picture of your Terminal showing responses from my server.
2) You may run a free SMTP server on your own computer and send there a message from your SMTP mail client. Submit a screenshot similar to mine showing that your message was received.

Notes:
(1) if you run your e-mail server on your computer where your e-mail client runs, you may set your mailserver variable in the client program to 'localhost'.
(2) read the SMTP client-server communication from page 123 - it is very useful for this hw.
(3) let's all use Python 3.x, so you need to utf-8 encode/decode your strings (for example, the string mssg = "250 reply" is encoded with the Python command mssg.encode('utf-8') before is sent into the socket; also, everyting received from the server must be decoded before beeing printed on the terminal).

An illustration of how your client should communicate (send e-mail) to the server is shown in picture1 and picture2 and picture3 (these show the messages exchanged between client and server).

Please sybmit your MailClientLastName.py and mailPictureLastName.png (a screenshot of your mail server showing that your message sent from your mail client was received by the mail server). Make sure that the From: part shows your last name, for instance, mine will look like "From: visa@whateverYouLike.com"

 


Hw3 (10pts)


Hw3 (creating a Web server) is posted here. Before starting your hw, you must read section 2.7.

Note: my own Web server is up and running all this week (at the IP and port number shown below). Type the following request in your favorite webrowser and my server will honor your request :)
http://140.103.19.172:6789/testSV.html

Now that you have seen my server at work, you must build your own. Your Web server must function in the same way!

Please sybmit your WebServerLastName.py and two pictures similar to mine (see picture1 and picture2), illustrating that your webserver runs accordingly

 


Hw2 (10pts)


1) (2pts) Consider Figure 1.20 at pg. 46. Suppose R_c = 2Mbps and R_s = 3Mbps.
a) If R = 50Mbps, what is the throughput between one of the client-server pair in this figure?
b) If R = 10Mbps, what is the throughput between one of the client-server pair in this figure?

Pg. 75 - P24 (3pts)
Pg. 76 - P25 (5pts) (Hint: width of a bit in a link is the ratio between the length of the link and the bandwidth-delay product)



Hw1 (10pts) - hard copy at the beginning of class (note -- make it via an upload)


1) Equation 1.1 from pg. 24 gives the end-to-end delay for sending one packet of length L over N links of transmission rate R. If N = 3, then to send one packet it takes 3*(L/R), and to send three packets it takes 3*(L/R) + 2*(L/R). What is the the end-to-end delay for sending ten packets.
Pg. 68 - R2, R4, R12
Pg. 71 - P3


Hw 6

 

P7/418

Suppose two packets arrive to two different input ports of a router at exactly the same time. Also suppose there are no other packets anywhere in the router.
  1. Suppose the two packets are to be forwarded to two different output ports. Is it possible to forward the two packets through the switch fabric at the same time when the fabric uses a shared bus?

  2. Suppose the two packets are to be forwarded to two different output ports. Is it possible to forward the two packets through the switch fabric at the same time when the fabric uses a crossbar?

  3. Suppose the two packets are to be forwarded to the same output port. Is it possible to forward the two packets through the switch fabric at the same time when the fabric uses a crossbar?

 

NAT translation problem
Consider the network setup from below showing source S and destination D for a particular connection. Suppose host 10.0.0.1 has two ongoing TCP connections, both to port 80 at destination host 128.119.40.186. Provide the two corresponding entries of the host 10.0.0.1 in the NAT translation table. (Hint: one such entry is already shown in the figure; you need to add an additional one.)


NAT translation table

WAN side

LAN side

 

 

 

 

 

 

Hw6

Pb. 26/422; 28/423; 37/424; 38/425.

 

<