3700 Midterm Exam

Ace your homework & exams now with Quizwiz!

Suppose you have the following two bytes: 11110101 and 01101001. What is the 1s complement of these two bytes?

Adding the two bytes gives 01011111. The 1s complement gives 10100000.

Suppose within your Web browser you click on a link to obtain a Web page. The IP address for the associated URL is not cached in your local host, so a DNS lookup is necessary. Denote RTT as the roundtrip time between the local host and the server containing the Web page. Assume the Web page consists of a base HTML file and three small images. Assume the transmission times for all of the objects are negligible in comparison with the RTT. How much time elapses (in terms of RTTs) from when the user clicks on the link until the client receives the entire Web page with the following? non persistent HTTP with up to 5 parallel connection

2 RTT for base, 2 RTT for remaining three images: 4 RTT

Suppose within your Web browser you click on a link to obtain a Web page. The IP address for the associated URL is not cached in your local host, so a DNS lookup is necessary. Denote RTT as the roundtrip time between the local host and the server containing the Web page. Assume the Web page consists of a base HTML file and three small images. Assume the transmission times for all of the objects are negligible in comparison with the RTT. How much time elapses (in terms of RTTs) from when the user clicks on the link until the client receives the entire Web page with the following? Persistent HTTP with pipelining

2 RTT for base; 1 RTT for remaining three images: 3 RTT

Suppose you have the following two bytes: 00110101 and 01101001. What is the 1s complement of these two bytes?

Adding the two bytes gives 10011110. Taking the 1s complement gives 01100001.

Suppose within your Web browser you click on a link to obtain a Web page. The IP address for the associated URL is not cached in your local host, so a DNS lookup is necessary. Denote RTT as the roundtrip time between the local host and the server containing the Web page. Assume the Web page consists of a base HTML file and three small images. Assume the transmission times for all of the objects are negligible in comparison with the RTT. How much time elapses (in terms of RTTs) from when the user clicks on the link until the client receives the entire Web page with the following? non-persistent HTTP with no parallel connections

2 RTT to get each image: 4(2 RTT) = 8 RTT

How long does it take a packet of length 1,000 bytes to propagate over a link of distance 5,000km propagation speed 2.5 * 10^8 m/s, and transmission rate 1 Mbps? Generally, how long does it take a packet of length L to propagate over the length of distance d, propagation speed s, and transmission rate R bps?Does this delay depend on packet length?Does this delay depend on transmission rate?

20 msec; d>s; no; no.

How long does it take to transmit a packet of length 1,000 bytes a link of distance 5,000 km, propagation speed 2.5 * 10^8 m/s, and transmission rate 1 Mbps? Generally, how long does it take to transmit a packet of length L over a link of distance d, propagation speed s, and transmission rate R bps? Foes this delay depend on the length of the link? Does this delay depend on the propagation speed of the link?

8 msec; L>R; no; no.

Describe 2 ways in which caching is used in Web access. Describe 1 way in which caching is used in DNS.

A web browser will cache objects locally in its browser cache. An institution might also have a Web cache, which each browser contacts to satisfy its Web requests. If the request Web page is not in the Web cache, the Web cache will request and receive the object from the origin server, cache the object locally (in case some other browser requests the object), and return the object to the request browser. When the local DNS gets a translation request for a name that is not in its cache, it will obtain the name/address translation pair and then cache this value so that future requests for translating the same name can be satisfied by the local DNS server, without going out to the larger DNS system.

Let a = 0.2. Suppose for a given TCP con- nection three acknowledgments have been returned with RTTs: RTT for first ACK = 80 msec; RTT for second ACK = 60 msec; and RTT for thirdACK = 100 msec. Determine the value of EstimatedRTT after each of the three acknowledgments.

After the first ACK, the EstimatedRTT is equal to the RTT associated with the ACK, namely, 80 msec. After the second ACK, we use the following formula: EstimatedRTT = (1 - a) EstimatedRTT + a SampleRTT to obtain: EstimatedRTT = (0.8)(80 msec) + (0.2)(60 msec) = 76 msec Similarly, after third ACK, we get EstimatedRTT = (0.8)(76 msec) + (0.2)(100 msec) = 71.2 msec

What are the five protocol layers, from top to bottom, in the Internet?

Application Transport Network Link Physical

Suppose that in TCP, the sender window is of size N, the base of the window is at sequence number x, and the sender has just sent a complete window's worth of segments. Let RTT be the sender-to-receiver-to-sender round-trip time, and let MSS be the segment size. Assuming no loss, what is the throughput (in packets/sec) of the sender- to-receiver connection?

Assume that N is measured in segments. The sender can thus send N seg- ments, each of size MSS bytes every RTT sec. The throughput isN * MSS / RTT.

Suppose users share a 1 Mbps link. Also suppose each user requires 500 kbps when transmitting, but each user transmits only 10% of the time. Suppose there are 3 users. Find the probability that at any given time, all three users are transmitting simultaneously. Find the fraction of time during which the queue grows.

Assuming that all 3 users are transmitting independently, the probability that all of them are transmitting simultaneously is (0.1)^3=.001. Since the queue only grows when all three users are transmitting, the fraction of time during which the queue grows (which is equal to the probability that all three users are transmitting simultaneously) is .001.

Suppose that all of the network sources send data at a constant bit rate. Would packet-switching or circuit-switching be more desirable in this case? Why?

Circuit-switching is more desirable here because there are no statistical multiplexing gains to be had, and by using circuits, each connection will get a constant amount of bandwidth that matches its CBR rate. On the other hand, circuit-switching has more overhead in terms of signaling needed to set up the call, so there is an argument that packet-switching is preferable here since there is no call setup overhead with packet-switching. If this were an exam question either answer would be correct (as long as you provide the correct reasoning).

Consider the following forms of non-Internet data distribution: FM radio, broadcast TV, and newspapers. Are these "push" or "pull" systems? Explain. Is the traditional Web browser/server a "push" or "pull" system? Explain. Are there any non-Internet "pull" systems in your life?

FM Radio, broadcast TV, and newspapers are all push systems. Information sent out via these media regardless of whether or not anyone is turning into the TV or radio stations, or buying the newspaper. Also contents is not individualized for the receiver. The Web is a pull system because data is not transmitted to the browser unless it is explicitly requested by the browser. Some automated phone response systems are non-Internet full systems. For example, I may call a number to get my horoscope, and enter my brith date in order to have my horoscope read to me.

For the bytes in part a)(00110101 and 01101001), give an example where one bit is flipped in each of the two bytes and yet the 1s complement doesn't change.

First byte = 00110001; second byte = 01101101.

Suppose that a Web server runs in host C on port 80.Suppose this Web server uses persistent connections, and is currently receiving requests from two different hosts: A and B. Are all of the requests being sent through the same socket at host C? If they are being passed through different sockets, do both of the sockets have port 80? Discuss and explain.

For each persistent connection, the Web server creates a separate "connection socket." Each connection socket is identified with a four-tuple: (source IP address, source port number, destination IP address, destination port number). When Host C receives an IP datagram, it examines these four fields in the datagram/segment to determine to which socket it should pass the payload of the TCP segment. Thus, the requests from A and B pass through different sockets. The identifier for both of these sockets has 80 for the destination port; however, the identifiers for these sockets have different values for the source IP addresses. Unlike UDP, when the transport layer passes a TCP segment's payload to the application process, it does not specify the source IP address, as this is implicitly specified by the socket identifier.

What are the two most common multiplexing techniques used in circuit switching?

Frequently division multiplexing, which partitions the bandwidth in a link using frequency bands, such as in FM radio; and time division multiplexing, which partitions time in a link with a revolving frame, giving each connection the same slot in the revolving frame.

Suppose users share a 1 Mbps link. Also suppose each user requires 500 kbps when transmitting, but each user transmits only 10% of the time. (Suppose the packet switching is used for this question) Why will there be essentially no queuing delay before the link if two or fewer users transmit simultaneously? Why will there be a queuing delay if three users transmit simultaneously?

If two users transmit simultaneously, the input rate is a constant 1 Mbps. Since the link is also 1 Mbps, there will be no queuing delay. If three users transmit simultaneously, then the input rate is a constant 1.5 Mbps. Since the maximum output rate is 1 Mbps, bits will build up in a queue at a rate of 0.5 Mbps. After one second, the queue length will be approximately 500,00 bits.

Three application architectures: client server, P2P, and a hybrid of the two. Classify the scenario below and explain. Skype

In order to locate a peer, a client will first contact a directory server in a client-sever manner. Therefore this has a hybrid application architecture.

Suppose that in TCP, the sender window is of size N, the base of the window is at sequence number x, and the sender has just sent a complete window's worth of segments. Let RTT be the sender-to-receiver-to-sender round-trip time, and let MSS be the segment size. Is it possible that there are ACK segments in the receiver-to-sender channel for segments with sequence numbers lower than x? Justify your answer.

Is it possible. Suppose that the window size is N = 1. The sender sends packet x - 1, which is delayed and so it timeouts and retransmits x - 1. There are now two copies of x - 1 in the network. The receiver receives the first copy of x - 1 and ACKs. The receiver then receives the second copy of x - 1 and ACKs. The sender receives the first ACK and sets its window base to x. At this point, there is still an ACK for x - 1 propagat- ing back to the sender.

For each of the five layers, what is the name of packets processed at the layer?

Message Segment Datagram Frame Packet

Suppose that in TCP, the sender window is of size N, the base of the window is at sequence number x, and the sender has just sent a complete window's worth of segments. Let RTT be the sender-to-receiver-to-sender round-trip time, and let MSS be the segment size. Suppose TCP is in its congestion avoidance phase. Assuming no loss, what is the window size after the N segments are ACKed?

N + 1

indicate whether TCP or UDP (or both or neither) provide the following services to the below application minimum data transmission rate between processes

Neither

Recall the Go-back-N protocol. Does this protocol have a timer for each unacknowledged packet?

No, GBN has only one timer, for the oldest unacknowledged packet.

Suppose that all of the network sources are bursty - that they only occaisionally have data to send. Would packet-switching or circuit switching be more desirable in this case? Why?

Packet-switching is better here because there are statistical multiplexing gains - when a source does not have data to send, it will not be allocated bandwidth (it would be unused when the source had nothing to send). With packet-switching, this bandwidth is avail for use by other sources.

Consider a short (10 meter) link, over which a sender can transmit at a rate of 100 bits/sec in both directions. Suppose that packets containing data are 100Kbits long, and packets containing only control (for example, ACK or handshaking) are 100 bits long. Assume that N parallel connections each get 1/N of the link bandwidth. Now consider the HTTP protocol, and suppose that each downloaded object is 100Kbits long, and that the initial downloaded object contains 10 reference objects from the dame sender. Would parallel downloads via parallel instances of non-persistent HTTP make sense in this case? Now consider persistent HTTP? Do you expect significant gains over the non-persistent case? Explain your answer.

Parallel download would only share the 100K bandwidth among the 10 connections (each getting 10K bits/sec) thus, there is no significant advantage here. With persistent HTTP we avoid the SYN and SYNACK exchange, but that only requires 2 seconds (1 second to send the 100 bit SYN message over the 100 bps link, and 1 second to receive the ACK). Given that each object takes 101 seconds to send and receive the ACK, the use of pipelining gives only a 2% gain.

Suppose users share a 1 Mbps link. Also suppose each user requires 500 kbps when transmitting, but each user transmits only 10% of the time. Find the probability that a given user is transmitting.

Since each user is transmitting 10% of the time, the probability that a user is transmitting at any instant is 0.1 .

indicate whether TCP or UDP (or both or neither) provide the following services to the below application congestion controlled data transfer between processes

TCP

indicate whether TCP or UDP (or both or neither) provide the following services to the below application Reliable data transfer between processes

TCP provides a reliable byte-stream between between client and server

indicate whether TCP or UDP (or both or neither) provide the following services to the below application guaranteed in order delivery of data to the receiver

TCP will deliver bytes to the receiver in the order in which they were sent. UDP does not guarantee delivery of message data in the order in which they were sent.

What is the difference between MAIL FROM: in SMTP and From: in the mail message itself?

The MAIL FROM: in SMTP is a message from the SMTP client that identifies the sender of the mail message to the SMTP server. The From: on the mail message itself is NOT an SMPT message, but rather is just a line in the body of the mail message.

Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 144. Suppose that Host A then sends two segments to Host B back-to-back. The first and second segments contain 20 and 40 bytes of data, respectively. In the first segment, the sequence number is 145, source port number is 303, and the destination port number is 80. Host B sends an acknowledgement whenever it receives a segment from Host A. If the second segment arrives before the first segment, in the acknowledgement of the first arriving segment, what is the acknowledgment number?

The acknowledgment number will be 145, indicating that it is still wait- ing for bytes 145 and onward.

Recall the Go-back-N protocol. Use the interactive applet for Go-Back-N and quickly try to generate seven packets. How many packets did you generate? Just after attempting to generate the seven packets, pause the animation and kill the first packet. What happens when the timeout expires?

The applet only generates six packets since the window size is six. The sender doesn't receive an acknowledgment for previously unacknowl- edged data before the timer expires. When the timer expires, the sender resends all six packets.

A packet switch receives a packet and determines the outbound link to which the packet should be forwarded. At packet arrival, one other packet is half transmitted on this outbound link and three other packets are waiting to be transmitted. Packets are transmitted in order of arrival. Suppose all packets are 1,00 bytes and the link rate is 1 Mbps. What is the queuing delay for the packet?

The arriving packet must first wait for the link to transmit 3,500 bytes or 28,000 bits. Since these bits are transmitted at 1 Mbps, the queuing delay is 28 msec. Generally, the queuing delay is [NL + (L - x)]>R.

Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 144. Suppose that Host A then sends two segments to Host B back-to-back. The first and second segments contain 20 and 40 bytes of data, respectively. In the first segment, the sequence number is 145, source port number is 303, and the destination port number is 80. Host B sends an acknowledgement whenever it receives a segment from Host A. If the first segment arrives before the second segment, in the acknowledgement of the first arriving segment, what is the acknowledgment number, the source port number, and the destination port number?

The first acknowledgment has acknowledgment number 165, source port 80, and destination port 303.

Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 144. Suppose that Host A then sends two segments to Host B back-to-back. The first and second segments contain 20 and 40 bytes of data, respectively. In the first segment, the sequence number is 145, source port number is 303, and the destination port number is 80. Host B sends an acknowledgement whenever it receives a segment from Host A. In the second segment sent from Host A to B, what are the sequence number, source port number, and destination port number?

The first and second segments contain 20 and 40 bytes of data, respec- tively. In the second segment sent from A to B, the sequence number is 165, the source port number is 303, and the destination port number is 80.

Recall the selective repeat protocol. When an acknowledgement arrives for the oldest unacknowledged packet, what happens?

The window advances. If the sender has another packet to send, it sends the packet and starts a timer for the packet.

With UDP sockets, a server can easily determine the IP address of the client, from the data returned via a socket read. AND same question of TCP sockets True or False

True- UDP packet contains the IP address of the sender of the UDP packet. False- TCP socket only returns the byte stream sent by the client, but no identifying information about the client

Suppose users share a 1 Mbps link. Also suppose each user requires 500 kbps when transmitting, but each user transmits only 10% of the time. When circuit switching is used, how many users can be supported?

Two users, each getting a dedicated 500 kbps.

indicate whether TCP or UDP (or both or neither) provide the following services to the below application Preserve application level message boundaries. That is, when a sender sends a group of bytes into a socket via a single send operation, that group of bytes will be deliver as a group in a single receive operation at the receiving application

UDP preserves message boundaries, while TCP is byte stream oriented, and does not preserve message boundaries

Recall the Go-back-N protocol. When a timer expires, what happens?

When the timer expires, the sender resends all packets that have been sent but have not yet been acknowledged.

What does it mean when we say that control messages are "in-band"? What does it mean when we say that control messages are "out-of-band"? Give an example of protocol that has in-band control messages and an example of a protocol that has out-of-band control messages?

When we say that control messages are "in-band," it means that control messages and data messages may be interleaved with each other one the same connection. A single message may contain both control information and data. When we say that control messages are "out-of-band," it means that control and data messages are carried on separate connections. HTTP, DNS, and SMTP have in-band control, while FTP has out-of-band control messages.

Suppose a process in host C has a UDP socket with port number 787. Suppose host A and host B each send a UDP segment to host C with destination port number 787. Will both of these segments be di- rected to the same socket at host C? If so, how will the process at host C know that these segments originated from two different hosts?

Yes, both segments will be directed to the same socket. For each received segment, at the socket interface, the operating system will provide the process with the IP address of the host that sent the segment. The process can use the supplied IP addresses to determine the origins of the individual segments.

Recall the selective repeat protocol. Does this protocol have a timer for each unacknowledged packet?

Yes, there is a timer for each unacknowledged packet.

Suppose you use UDP to do a transaction from a remote client to a server. UDP provides no reliability, but you want your transaction request to be sent reliably. How could you do this?

You would build reliability into your application. This could be done, for example, by having the client retransmit its request if it doesn't hear back from the server within a certain amount of time.

Suppose that data is being output at a sensor at 1 sample per second. It is important for the receiver to have the most recent value of the sensor's reading, rather than all values (for example, it is better for the receiver to get a current value, rather than an outdates value). Would you use TCP or UDP to send this sensor data? Why?

You would use UDP. With TCP, data (even old data) will be sent again and again until it is received correctly. Moreover, since data is passed up in order by the TCP receiver, newer data will not be delivered to the receiving application until all old data has been delivered to the application. With UDP, if data is list, newer data will eventually be sent and receiver, without waiting for the lost data to be recovered.

Suppose you want to do a transaction from a remote client to a server as fast as possible, would you use UDP or TCP?

You would use UDP. With UDP, the transaction can be completed in one round trip (RTT) - the client sends the transaction request into a UDP socket, and the server sends the reply back to the client's UDP socket. With TCP, a minimum of two RTT's are needed - one to set-up the TCP connection, and another for the client to send the request, and for the server to send back the reply.

A link-layer switch processes up to which layer?

a link-layer switch processes up through the link layer

Three application architectures: client server, P2P, and a hybrid of the two. Classify the scenario below and explain. BitTorrent

a pure P2P application architecture. It is interesting because it will concurrently download different pieces of a file from different peers.

Three application architectures: client server, P2P, and a hybrid of the two. Classify the scenario below and explain. Ebay

a pure client server application architecture. it is also implemented as a web server ( more accurately, a farm of Web servers) that responds to Web client (browser) requests using HTTP.

Three application architectures: client server, P2P, and a hybrid of the two. Classify the scenario below and explain. Telnet

a pure client-server application architecture. The client is the process that contacts the Telnet server (at port 23 to allow remote login on the remote machine where the serve process is running.

Three application architectures: client server, P2P, and a hybrid of the two. Classify the scenario below and explain. DNS

a pure client-server application architecture. The client is the process that sends the "_____ REQUEST" message (to port 53 at the ___ server); the server is the ___ server process that replies with "___ REPLY" message .

A router processes up to which layer?

a router processes up through the network layer

An application may choose UDP for a transport protocol because UDP offers finer application control (than TCP) of what data is sent in a segment and when it is sent. a. Why does an application have more control of what data is sent in a segment? b. Why does an application have more control of when the segment is sent?

a. Consider sending an application message over a transport protocol. With TCP, the application writes data to the connection's send buffer and TCP will grab bytes without necessarily putting a single message in the TCP segment; TCP may put more or less than a single message in a segment. UDP, on the other hand, encapsulates in a segment whatever the application gives it; so that, if the application gives UDP an application message, this message will be the payload of the UDP segment. Thus, with UDP, an application has more control of what data is sent in a segment. b. With TCP, due to flow control and congestion control, there may be significant delay from the time when an application writes data to its send buffer until when the data is given to the network layer. UDP does not have delays due to flow control and congestion control.

a. A server process in Host B has a welcoming socket at port 977. What will trigger the server process to create a connection socket? What is the source IP address and source port number for this connection socket? b. How many bytes is a TCP SYN segment? What flags are set in a TCP SYN segment? c. What must happen for Host B to complete this connection?

a. When Host B receives a TCP SYN segment with destination port number 977, the operating system at Host B will create a (half-open) connection socket. The TCP SYN packet has a source port number, which becomes the source port number of the socket. The TCP SYN segment is also con- tained in an IP datagram, which has a source IP address, which in turn becomes the source IP address for the socket. b. A TCP SYN packet contains no data and is thus 20 bytes. In a SYN seg- ment, the SYN flag is set, but not the ACK flag. c. After receiving the SYN packet, the server sends to the client on Host B a SYNACK segment, which is also 20 bytes, and which has both the SYN and ACK flags set. The client then sends an ACK packet back to the server. Upon receiving this ACK packet, the connection is fully open at both the client and server sides.

An end-system processes up to which layer?

an end-system processes up through the application layer

indicate whether TCP or UDP (or both or neither) provide the following services to the below application a guarantee that data will be delivered within a specified amount of time.

neither


Related study sets

Completing the Application, Underwriting and Delivering the Policy

View Set

PHY 1409 Book MisConceptual Questions Ch 16-30

View Set

GRIZAL: Education Abroad - Jose Rizal's Biography

View Set

Financial Analysis - USCA MBA - CH3 SB

View Set

Straighterline Intro to Nutri Chap 8 Vitamins

View Set