Mohamed G Gouda CS 326E Spring 2013 Midterm 1 ------------------------------------------------------------------------------- Open Notes 1 hour ------------------------------------------------------------------------------- 1. Consider the case where a packet is generated in Computer A, then sent to Computer B, then sent to Computer C, then sent to Computer D, then sent to Computer E, then sent to Computer F and finally sent to Computer G. i. Which of Computers A to G is decidedly a router? ii. Which of Computers A to G is decidedly a host? iii. Which of the Computers A to G can be a router? iv. How many hops did this packet make? Sol: i. Computers B,C,D,E and F are decidedly routers. ii. None of the computers is decidedly a host. iii. Computers A and G can be routers. iv. This packet made 6 hops. ------------------------------------------------------------------------------- 2. The internet service providers ISPs are supposedly connected in a 3-level tree. But, this tree is imperfect. Describe 5 ways in which the ISP tree is imperfect. Sol: i. There are a dozen Tier-1 ISPs (rather than one). ii. There are multiple regional ISPs for the same region. iii. Multihoming- An ISP in level i can be connected to two or more ISPs in level (i-1). iv. Peering - Two ISPs in the same level can be connected on settlement-free basis. v. Shortcut - An ISP in level 3 can be directly connected to a Tier-1 ISP. ------------------------------------------------------------------------------- 3. Assume that there are 17 established TCP connections between one client host and one HTTP server host. i. How many sockets are needed in the client host to support these connections? Explain your answer. ii. How manty sockets are needed in the HTTP server host to support these connections? Explain your answer. Sol: i. 17 sockets are needed in the client host to support the connection with the HTTP server. One socket is needed for each TCP connection. ii. 18 sockets are needed in the server host to support the connections with the client. The HTTP server host needs one more socket to act as a welcome socket for future connections. ------------------------------------------------------------------------------- 4. How many TCP connections need to be established in order to transmit an email message from @ to @. Name the client and server hosts for each one of these TCP connections. Sol: Three TCP connections need to be established. For the first connection, the client host is the one that user-1 uses to write and send the email message. The server host is the one that hosts email-server-1. For the second connection, the client host is the one that hosts email-server-1 and the server host is the one that hosts email-server-2. For the third connection, the client host is the one that user-2 uses to receive and read the email message. The server host is the one that hosts email-server-2. -------------------------------------------------------------------------------