-------------------------------------------------------------------------- Mohamed G. Gouda CS 356 Spring 2017 Homework 1 -------------------------------------------------------------------------- 1. Consider an ISP tree that has one Tier-1 ISP: T1, two Regional ISPs: R1 and R2, and four Access Networks: A1, A2, A3, and A4 Connections in this tree are as follows. T1 is connected to both R1 and R2, R1 is connected to both A1 and A2, and R2 is connected to both A3 and A4. In Exercise 1, we show that if any one of the ISPs in this tree, namely T1, R1, or R2, fails and can no longer receive or send messages, then there is a message whose original source is in an Access Network Ai and whose ultimate destination is in another Access Network Aj and this message cannot be routed from its original source to its ultimate destination. Show that three more ISPs, namely T2, R3, and R4, can be added to this ISP tree such that the following condition holds. If any one ISP (whether original ISP or added ISP) fails, then every message whose original source is in an access network Ai and whose ultimate destination is in another Access Network Aj can still be routed from its original source to its ultimate destination. (Hint: The added ISP T2 is a Tier-1 ISP, and the added ISPs R3 and R4 are Regional ISPs.) ----------------------------------------------------------------------------- 2. Explain how a company, whose domain is x.com, can be registered in DNS. This company has an "A" DNS server, a web server, and an email server. The "A" DNS server has the following properties Canonical Name: Chicago.center.us.x.com IP Address: 128.83.15.7 The web server has the following properties Alias Name: x.com Canonical Name: www.x.com IP Address: 128.83.201.49 The email server has the following properties Canonical Name: mail.x.com IP Address: 128.83.12.129 --------------------------------------------------------------------------- 3. Identify all the errors in following scenario of the Cookie protocol, where C stands for a client and S stands for a server: C --> S: HTTP rqst1 ( ) C <-- S: HTTP rspn1 (Cookie: 125) C --> S: HTTP rqst2 (Set-cookie: 125) C <-- S: HTTP rspn2 (Cookie: 125) --------------------------------------------------------------------------- 4. In the Bit-Torrent protocol, when a peer P registers with the tracker of a torrent T, P receives IP adresses of 50 peers out of the 1000 peers that the tracker keeps track of. (a) Why does not P receive the IP adresses of all 1000 peers? (b) Why does not P receive the IP address of only one peer? --------------------------------------------------------------------------- Solutions --------------------------------------------------------------------------- 1. Add the three ISPs T2, R3, and R4 along with the following connections to the original ISP tree: T2 is connected to both R3 and R4 R3 is connected to both A1 and A2 R4 is connected to both A3 and A4 It is straightforward to show that if any of the six ISPs, namely T1, T2, R1, R2, R3, and R4, fails, then every message whose original source is in an access network Ai and whose ultimate destination is in another access network Aj can still be routed from its original source to its ultimate destination. ----------------------------------------------------------------------------- 2. To register this company in DNS, the following three steps are executed: (a) Publish the following two RRs in every com DNS server in the world: (x.com, Chicago.center.us.x.com, NS, TTL) (Chicago.center.us.x.com, 128.83.15.7, A, TTL) (b) Publish the following two RRs in the "A" DNS server of the company: (x.com, www.x.com, CNAME, TTL) (www.x.com, 128.83.201.49, A, TTL) (c) Publish the following RR in the "A" DNS server of the company: (mail.x.com, 128.83.12.129, A, TTL) -------------------------------------------------------------------------- 3. The Cookie header for a response message from S to C is Set-cookie rather than Cookie. Thus the second and fourth messages in the given scenario are erroneous. The cookie header for a request message from C to S is Cookie rather than Set-cookie. Thus the third message in the given scenario is erroneous. The first message in the given scenario can be correct. ------------------------------------------------------------------------- 4. (a) If P receives the IP addresses of all 1000 peers, then P needs to communicate with all 1000 peers to get all chunks of any file F that P needs, even though the probability, that all chunks of F can be obtained from any 50 peers out of the 1000 peers, can be very high. (b) If P receives the IP address of only one peer Q, then P needs to get all chunks of any file F that P needs from Q, even though the probability that Q has all chunks of F can be very small. ----------------------------------------------------------------------------