13.01.2014 Views

Solutions 2

Solutions 2

Solutions 2

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ECEN 619 - HW#2: Please answer the following questions:<br />

Due on Feb 19, 2013, in class. (No late homework accepted)<br />

1) Give 3 examples of network attacks.<br />

Spam, denial of service attacks, viruses.<br />

2) What is HTTP protocol and which layer does HTTP sit at?<br />

HTTP is Hypertext Transfer Protocol<br />

HTTP assumes messages can be exchanged directly between HTTP client and<br />

HTTP server<br />

In fact, HTTP client and server are processes running in two different<br />

machines across the internet.<br />

HTTP uses the reliable stream transfer service provided by TCP<br />

HTTP builds on top of TCP<br />

HTTP protocol sits at application layer.<br />

3) What is DNS protocol and which layer does DNS sit at?<br />

DNS is Domain Name System protocol<br />

DNS protocol allows queries of different types<br />

(1) Name-to-address or Address-to-name<br />

(2) Mail exchange<br />

DNS usually involves short messages and so uses service provided by UDP<br />

DNS builds in top of UDP<br />

DNS protocol sits at application layer.<br />

4) What is UDP protocol and which layer does UDP sit at?<br />

UDP is User Datagram Protocol<br />

UDP provides best-effort datagram service between two processes in two<br />

computers across the internet<br />

Port numbers distinguish various processes in the same machine<br />

UDP is connectionless<br />

Datagram is sent immediately when data is ready<br />

Quick, simple, but not reliable<br />

TCP builds on top of IP<br />

UDP protocol sits at transport layer.<br />

5) Describe the differences between the connection-oriented transport protocol and<br />

connectionless transport protocol.


(1) The connection-oriented transport protocol specifies that the connection need to<br />

be established before data can be exchanged, which cause the data can arrive in<br />

order. It guarantees delivery successfully by sending ACK. An example for the<br />

connection-oriented is TCP.<br />

(2) The connectionless transport protocol states different from the connectionoriented<br />

protocol. The delivery is not reliable. An example sor the connectionless<br />

transport protocol is UDP.<br />

6) Describe the differences between the packet-switching networks and circuitswitching<br />

networks.<br />

(1) In circuit switching networks, the data transmission path is dedicated to an entire<br />

data block, which implies that there no other data transmission can share the same<br />

channel. The channel can only be used by others when the current data has been<br />

finished transmitted.<br />

(2) In packet switching networks, the data is partitioned into a number of data units<br />

(packets) with their own sequence number. These data packets are sent through<br />

different channels in different times, but they will be reassembled in the original<br />

order at receiver.<br />

7) Describe the TCP Tahoe and TCP Reno algorithm, respectively.<br />

TCP-tahoe (Jacobson, 1988)<br />

- Time-out based protocol –use timeout to detect packet loss and<br />

congestions<br />

- Protocol:<br />

i. After every acknowledgement of a new packet:<br />

If W


ii.<br />

iii.<br />

when the duplicate acknowledgement exceeds a threshold, retransmit<br />

“next expected” packet:<br />

set W t =W/2, then set W= W t (i.e. halve the window);<br />

resume congestion avoidance using new window once retransmission<br />

is acknowledged.<br />

Upon timer expiry, the algorithm goes into slow start as before:<br />

Set W t =W/2;<br />

Set W=1<br />

8) What are the major differences between TCP Tahoe and TCP Reno?<br />

TCP Reno introduces fast retransmissions and fast recovery. TCP Reno uses triple<br />

duplicate ACKs to the same sequence number. The missing segment is retransmitted<br />

immediately<br />

9) Describe the principle of “Self-clocking” of TCP protocol.<br />

Packets after the first burst are sent only in response to an ACK, the sender’s packet<br />

spacing will exactly match the packet time on the slowest link in the path. Since the<br />

packet transmission is dominated by ACK, self-clocking is achieved<br />

Sender sends packets back-to-back to receiver<br />

The vertical line is bandwidth<br />

The horizontal line is time<br />

Each of shaded box is a packet<br />

Bandwidth*Time = Bits, and so the area of each box is the packet size.<br />

The number of bits doesn’t change as a packet goes through the network so a<br />

packet squeezed into the smaller long-haul bandwidth must spread out in time.<br />

The time P b represents the minimum packet spacing on the slowest link in the<br />

path (the bottleneck)<br />

As the packets leave the bottleneck for the destination net, nothing changes<br />

the inter packet interval so on the receiver’s net packet spacing P r = P b .<br />

If the receiver processing time is the same for all packets, the spacing<br />

between ACKs on the receiver’s net A r = P r = P b<br />

10) What are the major factors to determine the "timeout" clock value?<br />

The Round Trip Time (RTT)<br />

11) Why is it difficult to design the "timeout" clock value for TCP in Internet?<br />

The timeout value needs to be longer than RTT, which varies randomly. If the<br />

timeout value set too short, then there will have unnecessary retransmissions. If the<br />

timeout value is set too long, then TCP alright waste time to wait for the lost packet.<br />

12) Is there the optimal value for "timeout" clock for TCP in Internet?<br />

Non.


13) During which phase does TCP loose throughput most significantly?<br />

Slow start phase.<br />

14) Why does TCP Reno outperform TCP Tahoe?<br />

Because when three duplicate ACKs are received, TCP Reno will have a congestion<br />

window and set the slow start equal to the congestion window. Basing on this<br />

technique, TCP Reno can do fast retransmission.<br />

TCP Reno can retransmit the data faster than TCP Tahoe when the three duplicate<br />

ACKs have been received. Because when the above situation occurs, TCP Reno will<br />

skip the slow start phase and enter the congestion avoidance phase, unlike TCP<br />

Tahoe that has to start from slow start phase with window size equal to 1.<br />

15) Describe the "triple-duplicate ACK" control mechanism in TCP-Reno.<br />

If triple-duplicate-ACK with same sequence number has been received. TCP starts<br />

the congestion avoidance, which is set the congestion window size to half instead of<br />

one with window size in slow start phase. After triple-duplicate-ACK has been<br />

received, TCP Reno will start fast retransmission and fast recovery.<br />

16) When will the "fast retransmissions and fast recovery" control action be kicked in?<br />

When triple-duplicate-ACK with same sequence number has been received, fast<br />

retransmission and fast recovery starts.<br />

17) Can TCP Reno solely rely on the "triple-duplicate ACK" control mechanism for<br />

flow control and why?<br />

No, because timeout must be used when there is severe congestion or connection is<br />

broken.<br />

18) Can TCP flow control totally eliminate packet losses and why?<br />

No, because TCP creates packet losses.<br />

19) Is the "Slow Start" really SLOW for TCP in Internet?<br />

No, because the slow start increases the congestion window exponentially, which is<br />

fast increase.<br />

20) What are the control laws for "Congestion Avoidance Phase" and "Slow Start Phase"<br />

for TCP?<br />

Congestion avoidance phase: linearly increasing congestion window (CWND)<br />

Slow-start phase: exponentially increasing congestion window size (CWND).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!