













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This midterm exam covers the following data communications and networks topics covered in class: introduction and overview, the application layer, data encoding ...
Typology: Summaries
1 / 21
This page cannot be seen from the preview
Don't miss anything!














This midterm exam covers the following data communications and networks topics covered in class: introduction and overview, the application layer, data encoding and transmission, data link control, and wireless and mobile networks.
As the exam is rather long, it is EXTREMELY IMPORTANT to use GOOD TEST TAKING STRATEGY. That is, first answer the problems that you can answer easily and quickly, and then go to the problems that are going to take you more work. Do not waste a lot of time at the beginning trying to figure out a problem that you find difficult. The answers do not have to be in order in your exam booklet.
General Directions:
This is an open book test; you may bring the course text book(s) or notes to the room. Computers are allowed for access to material stored on the hard drive(s). No internet access via computers or electronic devices is allowed. No communication with other students in the room is allowed.
Each question is preceded by a numeric score in parenthesis: that score indicates both the weight of the question, and a (high) estimate of how many minutes you should be spending on it. The total score is 100. The weight of each question is indicated in points and therefore each point counts for 1% of the total grade. The official exam period is 110 minutes.
Write your answers in your exam booklet(s). It is not expected that you will need additional sheets, but there will be a supply of extra booklets. Please number your booklets as needed. At the end of the exam period, insert all additional booklets and your copy of the exam specification in your first booklet and return the package to the instructor.
Please make sure that you also observe the following:
Please provide answers to all ten (10) questions, unless stated otherwise you will not be penalized for providing a wrong answer. Place your name on your exam booklet(s) and on your copy of the exam specification. Please read the questions carefully and consider all hints and assumptions provided
Problems:
Note: For this particular question, proper context setting and explanations may have led the grader to consider alternate answers as valid.
Indicate whether each of the following statement is true or false (T/F) and explain your answers if/as needed:
1a. (1 point) The internal data rates of LANs are typically much greater than those of WANs.
T
1b. (1 point) Name servers are server programs that hold information about a portion of the domain name tree structure and the associated resource records (RRs).
T
1c. (1 point) Synchronous time division multiplexing is only possible when the achievable data rate (sometimes called bandwidth) of the medium exceeds the data rate of digital signals to be transmitted.
T
1d. (1 point) A set of devices and LANs connected by layer 2 (i.e., link layer) switches is considered to have a “flat” address space where the term “flat” means that all users share a common MAC broadcast address.
T
1.e. (1 point) Channel partitioning strategies (e.g., FDMA, TDMA, and CDMA) are more suitable for burst traffic than for constantly distributed traffic.
F
(e.g., via Skype) are typically supported. (Note: It is assumed here that the voice call would pass through the Internet and a telephone carrier.)
See http://www.mjalali.com/blog/?p=10 for more details
the existing control connection) so the server knows what client address and port number to use for the data-transfer connection. For example, the client on IP address 192.168.0.1 that chose port 49150 for the data connection might send a command like “PORT 192.168.0.1 49150” over the control connection In an alternate implementation approach used to establish the data-transfer connection and referred to as “passive mode,” the server selects a port number and instructs the client (using the existing control connection) to establish the data-transfer connection.
3.a. (2 points) Active mode may cause problems when the client host resides behind a NAT box. Explain why this is the case?
The NAT box maps the IP address and port number of the client’s data connection to new values. As such, the arguments the client sends in the PORT command (sent over the control connection) would not match the values the NAT box would use. In addition, the server would have trouble initiating a data connection to a client lying behind a NAT box, without the NAT box already having a table entry for the associated connection; since the client has not transmitted any packets on the data connection yet, the NAT box would not yet have an entry installed when the server sends the initial SYN packet. Worse yet, the IP address in the PORT command is a private, non-routable address, so the FTP server would not be able to direct a packet with this destination address to the appropriate place.
3.b. (2 points) Suppose a NAT box wanted to correctly handle clients running “active mode” FTP. What actions would the NAT box need to perform on FTP control messages from the client?
The NAT box would need to parse the messages sent on the FTP control connection (i.e., on port 21) to extract the arguments of the PORT command. The NAT box would need to create a table entry for the data connection and modify the arguments in the PORT message accordingly, so the FTP server can successfully create and use the data connection.
3.c. (2 points) Why might these operations change the size of underlying IP packets associated with the control connection? How could the NAT handle the change in packet sizes?
The IP address and port numbers used by the NAT box may have a different number of decimal digits, when represented as the arguments in the PORT command. As such, the NAT box must change the packet sizes, as well as the TCP sequence numbers (when sending to the server) and acknowledgment numbers (when directing return packets to the client) to remain consistent. If the packet size increases, the new packet may exceed the MTU, requiring the NAT box to fragment the IP packets.
3.d. (2 points) What challenges are introduced if other applications (besides FTP control) use port 21? What challenges are introduced if the FTP client and FTP server encrypt their communications?
If another application uses port 21, the NAT may mistakenly think the connection is an FTP control connection and try to parse the messages. If the ot her application also sends the string “PORT”, the NAT box may mistakenly modify the packet contents, leading to unpredictable affects.
If the FTP client and server encrypt their communications, the NAT box cannot parse the PORT command (in the payload of TCP connection) and correctly map the IP address and port number. This can lead to significant confusion for users, when their FTP client works fine in the absence of encryption and then mysteriously does not work when encryption is enabled.
3.e. (2 points) Why is passive mode easier than active mode in the presence of client-side NAT boxes?
In passive mode, the server selects an address and port number, and sends them to the client over the control connection. The client-side NAT does not need to modify the address and port number used by the remote server. (That said, passive mode is challenging in the presence of a server-side NAT box, though this is a much less common configuration.)
If you are curious to learn more about the interaction of FTP and NAT, see
http://en.wikipedia.org/wiki/File_Transfer_Protocol#FTP_and_NAT_devices
The following questions pertain to electronic mail applications in the Internet and the related SMTP protocol:
4a. (2 points) Assuming that the connection establishment and termination durations are excluded, what is the minimum number of network round trips to send a small email message using SMTP?
It is the message passed after connecting to smtp mail server. Client message are blue in color. You can see it need 5 round trip to send mail using smtp.
R:220 Beta.ARPA Simple Mail Transfer Service Ready Sendmail 8.9.3/8.9. S: HELO supermanhelp.com R: 250 yahoo.com
If the same port were used for both traps and requests, separating the manager from the agent in the same system would be difficult.
4d. (2 points) Electronic mail systems differ in the manner they handle multiple recipients. In some systems, the originating user agent or mail sender makes all the necessary copies and these are sent out independently. An alternative approach is to determine the route for each destination first. Then a single message is sent out on the common portion of the route and copies are only made when the routes diverge; this process is referred to as “mail-bagging”. Discuss the relative advantages and disadvantages of the two methods.
Mail-bagging economizes on data transmission time and costs. It also reduces the amount of temporary storage that each MTA must have available to buffer messages in its possession. These factors can be very significant in electronic mail systems that process a large number of messages. Routing decisions may keep mail-bagging in mind.
The following questions pertain to the Internet Directory Service and the World Wide Web and the related DNS and HTTP protocols.
5a. (6 points) Prior to persistent connections, one separate TCP connection was used to fetch each URL. Analyze the advantages of persistent connections over the old HTTP paradigm of one connection per data transfer.
Prior to persistent connections, a separate TCP connection was established to fetch each URL, increasing the load on HTTP servers and causing congestion on the Internet. The use of inline images and other associated data often require a client to make multiple requests of the same server in a short amount of time. Analysis of these performance problems and results from a prototype implementation are available [26] [30]. Implementation experience and measurements of actual HTTP/1.1 (RFC 2068) implementations show good results [39]. Alternatives have also been explored, for example, T/TCP [27].
Persistent HTTP connections have a number of advantages:
waiting for each response, allowing a single TCP connection to be used much more efficiently, with much lower elapsed time.
HTTP implementations SHOULD implement persistent connections.
5b. (6 points) Consider distributing a file of F = 30 Gbits to N peers. The server has an upload rate of us = 50 Mbps, and each peer has a download rate of di = 5 Mbps and an upload rate of u. For N = 100, 1000, and 10,000 and u = 300 Kbps, 900 Kbps, and 2 Mbps, prepare a chart giving the minimum distribution time for each of the combinations of N and u for both client-server distribution and P2P distribution.
The following illustrates a solution for F = 15 Gbits, us=30 Mbps, di = 2Mbps. N=10, 100, 1000 and u=300 Kbps, 700 Kbps, 2 Mbps. The solution to the problem at hand can easily be derived from it.
For the problem at hand, the numbers need to be replaced by F = 30 Gbits, us=50 Mbps, di = 5Mbps. N=10, 100, 1000 and u=300 Kbps, 900 Kbps, 2 Mbps
such as Path MTU Discovery (PMTUD) to ensure that large DNS packets are not discarded or subsequently dropped when they exceed the MTU size configured on a Layer 3 interface.
Similar to the large packets that are impacted by IP fragmentation issues, large DNS packets that use the TCP protocol (that is 53/tcp) may encounter issues due to TCP segmentation, which must be accounted for to ensure that large TCP-based packets are not discarded.
6.b. (3 points) Assume you are setting up a company network that has the following servers: DNS server: “dns1.compxyz.com” (IP: “128.118.13.50”) Web server: “compxyz.com” with two IP addresses as “128.118.12.56” and “128.118.12.58”. The web server also bears the name “www.compxyz.com”. Email server: “email.compxyz.com” (IP: “128.119.12.60”, company email address: “[email protected]”). What resource records (RRs) will you be providing to the .com authoritative registrar?
(compxyz.com, dns1.compxyz.com, NS) (dns1.compxyz.com, 128.118.13.50, A)
6.c. (3 points) Assuming the same context as for 6.(b) above, what resource records will you be placing in the company’s DNS server?
(compxyz.com, 128.118.12.56, A) (compxyz.com, 128.118.12.58, A) (www.compxyz.com, compxyz.com, CNAME) (email.compxyz.com, 128.119.12.60, A) (compxyz.com, email.starwar.com, MX)
7a. (3 points) For the bit stream 1101010, sketch the waveforms for NRZ-L, NRZI, Manchester, and Differential Manchester.
Below is a sample answer for 0101110. The solution to the problem at hand can be easily derived from it.
7b. (5 points) In a CRC error-detecting scheme, choose P(x) = x^4 + x^2 + 1. Encode the bits 11011010111.
A sample answer is provided below for P(x) = x^4 + x^2 + 1 and bits
8a. (3 points) In synchronous TDM, it is possible to interleave bits, one bit from each channel participating in a cycle. If the channel is using a self-clocking code to assist synchronization, might this bit interleaving introduce problems because there is not a continuous stream of bits from one source?
Although it seems logical to think of bits being separated as they come in and then switched unchanged onto the transmission channel, this is not necessarily the way it happens. What the multiplexer receives from attached stations are several bit streams from different sources. What the multiplexer sends over the multiplexed transmission line is a bit stream from the multiplexer. As long as the multiplexer sends what can be interpreted as a bit stream to the demultiplexer at the other end, the system will work. The multiplexer, for example, may use a self-clocking signal.
The incoming stream may be, on the other hand, encoded in some other format.
The multiplexer receives and understands the incoming bits and sends out its equivalent set of multiplexed bits.
8b. (3 points) Explain in terms of data link control and physical layer concepts how error and flow control are accomplished in synchronous time division multiplexing.
Synchronous TDM is a technique to divide the medium to which it is applied into time slots which are used by multiple inputs.
TDM’s focus is on the medium rather than the information which travels on the medium. Its services should be transparent to the user. It offers no flow or error control.
Flow and error controls must be provided on an individual-channel basis by a link control protocol.
8c. (3 points) Assume that six active nodes – nodes A, B, C, D, E, and F – are competing for access to a channel using slotted ALOHA. Assume each node has an infinite number of packets to send. Each node attempts to transmit in each slot with probability p. The first slot is numbered slot 1, the second slot is numbered slot 2, and so on. What is the probability that node A succeeds for the first time in slot 5?, and what is the probability that the first success occurs in slot 3?
The following is a sample solution to a similar problem where the question is about the probability that node A succeeds for the first time in slot 5 with four active nodes A, B, C, D). The solution to the problem at hand can easily be derived from it.
(1 – p(A))^4 p(A) where, p(A) = probability that A succeeds in a slot p(A) = p(A transmits and B does not and C does not and D does not) = p(A transmits) p(B does not transmit) p(C does not transmit) p(D does not transmit) = p(1 – p) (1 – p)(1-p) = p(1 – p)^3 Hence, p(A succeeds for first time in slot 5) = (1 – p(A))^4 p(A) = (1 – p(1 – p)^3 )^4 p(1 – p)^3
Answer - probability that the first success occurs in slot 3:
p(some node succeeds in a slot) = 4 p(1-p)^3 p(no node succeeds in a slot) = 1 - 4 p(1-p)^3 Hence, p(first success occurs in slot 3) = p(no node succeeds in first 2 slots) p(some node succeeds in 3rd slot) = (1 - 4 p(1-p)^3 )^2 4 p(1-p)^3
8d. (3 points) Recall that with the CSMA/CD protocol, the adapter waits K. bit times after a collision, where K is drawn randomly. For K = 500. How long will the adapter wait until returning to step 2 (see textbook’s chapter 5, p. 456, for the complete list of steps) for 5, 10, and 100 Mbps broadcast channels?
The following is a sample solution for K = 100 and for 10, 100 Mbps broadcast channel. The solution to the problem at hand can easily be derived from it.
Wait for 51,200 bit times.
For 10 Mbps, this wait is
51.2 x 10^3 bits : 10 x 10^6 bps = 5.12 msec
For 100 Mbps, the wait is 512 μsec.
Let us consider the operation of a learning switch in the context of a network in which 8 nodes labeled A through H are star connected into an Ethernet switch. Suppose that (i) B sends a frame to F, (ii) F replies with a frame to B, (iii) A sends a frame to B, (iv) B replies with a frame to A. The switch table is initially empty.
9.a. (5 points) Show the state of the switch table before and after each of these events.