Sunteți pe pagina 1din 6

MET CS 625 Business Data Communication and Networks Assignment 2

1. (10 pts) Assume that a node SENDER wants to transmit a message to a node RECEIVER at the data link layer. Review the scenarios below, which describe the success or failure of the initial transmission of the message or the ACK. For each scenario, indicate a complete and numbered series of steps describing exactly how the SENDER and RECEIVER successfully transmit the message. The last step for each scenario should be the successful acknowledgment from the receiver. If you are having difficulty with this problem, it may help you to draw the numbered steps (drawing the steps is optional).

Scenario Scenario Scenario Scenario

1: 2: 3: 4:

The The The The

message is initially transmitted with an error. message is transmitted without an error. ACK for the message is initially lost. message is initially lost.

Answer 1. We are assuming that once the error has been detected, it is corrected with stopand-wait ARQ.

For Scenario 1 - the message is initially transmitted with an error.

Step Step Step Step Step

1: 2: 3: 4: 5:

Sender sends the message A with an error Receiver detects error, send sends a NAK A(negative acknowledgement) frame Sender retransmits message A Receiver receives message A and sends ACK A Sender receives ACK and A is completed

For Scenario 2: The message is transmitted without an error. Step 1: Sender sends the message A without an error Step 2: Receiver detects no error, send a ACK A(acknowledgement) frame Step 3: Sender receives ACK and A is completed For Scenario 3: The ACK for the message is initially lost. Step 1: Sender sends the message A Step 2 Receiver detects no error, send a ACK A(acknowledgement) frame, but ACK is
Copyright 2010-2011 Boston University. All Rights Reserved. Page 1 of 6

lost Step 3: Sender retransmits message A after timeout with no error Step 4: Receiver receives message A and sends ACK A Step 5: Sender receives ACK and A is completed

For Scenario 4: The message is initially lost. Step 1: Sender sends the message A, but message A gets lost. Step 2: Receiver receives a duplicate copy of the message A Step 3: Receiver detects no error, send a ACK A(acknowledgement) frame Step 4: Sender receives ACK and A is completed 2. (10 pts) Identify and explain three important factors to consider when determining whether to use a large or a small frame (or PDU protocol data unit) size when transmitting data over a network. Answer 2. Three important factors to consider when determining whether to use a large or a small frame size when transmitting data over a network are: Throughput is defined as the total number of information bit received per second, after taking into account the overhead bits and the need to transmit frames containing errors. Typically small frames provide better throughput for circuits with more errors, whereas larger frames provide better throughput in less-error prone networks. Packet size: Smaller frame sizes have more overhead and therefore lower efficiency. Larger frame sizes have less overhead, but are more likely to have an error and are more expensive to retransmit. In some cases, end users may want to use small frames with inefficient overhead in order to reduce latency for applications such as VoIP. Transmission Efficiency: defined as the total number of information bits (i.e., bits in the message sent by the user) divided by the total bits in transmission (i.e., information bits plus overhead bits). For example, lets calculate the transmission efficiency of asynchronous transmission. Assume we are using 7-bit ASCII. We have 1 bit for parity, plus 1 start bit and 1 stop bit. Therefore, there are 7 bits of information in each letter, but the total bits per letter is 10 (7 + 3). The efficiency of the asynchronous transmission system is 7 bits of information divided by 10 total bits, or 70 percent. We can improve efficiency by reducing the number of overhead bits in each message or by increasing the number of information bits. For example, if we remove the stop bits from asynchronous transmission, efficiency increases to 7/9, or 77.8 percent.

3. (10 pts) Determine the effective data rate of a 128 kbps connection in an asynchronous transmission using 7-bit ASCII, 1 parity bit, 1 start bit, and 1 stop bit. Show your work to receive credit. Answer 3.
Page 2 of 6

Asynchronous Transmission Information bits = 7-bit ASCII Overhead bits = 3 (1 parity bit, 1 start bit, and 1 stop bit) Transmission Efficiency = 7/ (7+3) = 70% For a 128 kbps connection, 128 * 0.7 = 89.6 Kbps effective rate Lecture 5 4. (10 pts) Identify and explain two similarities and three differences between the TCP and UDP protocols. Answer 4. Similarities between TCP and UDP Both TCP and UDP use the IP protocol to traverse the network Both TCP and UDP use port numbers to separate themselves from other applications on the same computer.

Difference between TCP and UDP TCP UDP

Reliability: TCP is connection-oriented Reliability: UDP is connectionless protocol. protocol. When a file or message send it When you a send a data or message, you will get delivered unless connections don't know if it'll get there, it could get lost fails. If connection lost, the server will on the way. There may be corruption while request the lost part. There is no cortransferring a message. ruption while transferring a message. Ordered: If you send two messages Ordered: If you send two messages out, along a connection, one after the other, you don't know what order they'll arrive in you know the first message will get i.e. no ordered there first. You don't have to worry about data arriving in the wrong order. Heavyweight: - when the low level parts Lightweight: No ordering of messages, no of the TCP "stream" arrive in the wrong tracking connections, etc. It's just fire and order, resend requests have to be sent, forget! This means it's a lot quicker, and and all the out of sequence parts have the network card / OS have to do very litto be put back together, so requires a tle work to translate the data back from bit of work to piece together. the packets. Streaming: Data is read as a "stream," Datagrams: Packets are sent individually with nothing distinguishing where one and are guaranteed to be whole if they arpacket ends and another begins. There rive. One packet per one read call. may be multiple packets per read call.

5. (10 pts) HTTP uses TCP for communication. TCP provides connections that are reliable and involve multiple message exchanges. Yet HTTP is said to be connectionless. Explain this apparent contradiction.
Page 3 of 6

Answer 4. TCP/ IP can operate either connection-oriented or connectionless. HTTP is a protocol built on top of TCP. HTTP requests are considered as short so they utilize UDP connectionless rather than TCP connectionoriented messaging. Custom, interactive protocols can be much more efficient when implemented on TCP than on HTTP, because HTTP works on a rather basic request/response base. On a pure TCP connection, both ends can send messages whenever they want. On HTTP the server can't really proactively send a message to the client. It needs to wait for the client to send a request.

6. (10 pts) Explain why DNS often uses UDP. Answer 6. DNS application protocol consists of sending DNS query and DNS response messages which are short messages that fit in one IP packet. It is faster to use UDP to transport these messages because we do not have to have three-packet handshake for every DNS message as in TCP. But since UDP does not provide reliable delivery of messages, DNS clients must keep track of requests they have sent. If no response is received after a particular amount of time, the request must be retransmitted. The need to take care of these details is considered an acceptable trade-off for the lower setup costs involved with UDP, such as not requiring a connection.

7. (10 pts) Explain how the loss of a DNS request embedded in a UDP packet is handled. Answer 7. As stated in the previous question, DNS primarily uses UDP for sending queries and responses although TCP may also be used. Per lecture notes, Using UDP enables the resolver and DNS servers to communicate via single-packet messages without the overhead of establishing a connection. Most DNS queries and responses are short. In case, a UDP packet is lost, the client retransmits the query if no response is forthcoming within some time period. If the querying name server does not receive response within a certain period of time, it will resend the query until a retry limit is reached. Intuitively, intervals between retransmissions in most DNS servers should be substantially larger than RTT of most paths. Dan Bernstein suggests that most clients will retry up to four times.

8. (10 pts) A client computer on a local network obtains the data link layer (MAC) address of its subnet router to send it packets. Identify the protocol used to do so, and explain the mechanics of that protocol. Answer 8. The Internet Protocol (IP) uses the address resolution protocol (ARP) to map IP network addresses to the hardware (media access sublayer (MAC) ) addresses used by the data link protocol. The ARP protocol operates between the network layer and the data link layer in the Open System Interconnection (OSI) model.
Page 4 of 6

The phrase address resolution refers to the process of finding a MAC address of a host (computer) on a network. The address is resolved using a protocol in which a short frame (data link layer packet) is broadcast on the local network by the host attempting to transmit data (client). The server on the receiving end processes the frame. The address resolution procedure is completed when the client receives from the server, a response containing the servers address. The hardware address that is sent back to the host is known as the Medium Access Control (MAC) address. Every hardware devices MAC address can be found on the network interface card (NIC), which is located inside the host. The MAC address is hard coded, which means that it cannot (usually) be altered by software. 9. (10 pts) Review the scenario below, then follow the subsequent instructions. A web browser sends a message using HTTP over TCP/IP over Ethernet. The web browser request consists of 130 bytes. The HTTP protocol adds an additional 50 bytes of overhead to the request as part of the HTTP PDU. There is neither noise nor errors on the circuit involved in the transmission. Calculate the overall transmission efficiency of the web browser's request. You may assume that nominal TCP and IP headers are used, both of which consist of 20 bytes. Show your work to receive credit. Answer 9. Transmission Efficiency = number of information bits / total number of bits transmitted number of information bits = 130 bytes * 8 bits/ byte = 1040 bits total number of bits transmitted = total number of information bits + total number of overhead bits total number of overhead bits = bits in header + bits in trailer + 50 * 8 bits/ byte = 20 * 8 bits/ byte +20* 8 bits/ byte + 50 * 8 bits/ byte = 160 + 160 + 400 = 720 bits Transmission efficiency = 1040 / (1040 +720) = 59.09%

10. (10 pts) Review the network diagram below, then follow the subsequent instructions.

Page 5 of 6

Assume that a user physically logged into Computer 3 uses Telnet to remotely log on to Computer 1. She then uses the Telnet client to run the ipconfig command, which lists an IP address, subnet mask, and default gateway. Note that there is only one correct value for the IP address and default gateway, but there are several possible correct values for the subnet mask. a. Indicate the correct value for the IP address and default gateway. b. Pick one of the correct values for the subnet mask, and explain why that subnet mask is correct given the network setup illustrated in the diagram.

Page 6 of 6

S-ar putea să vă placă și