Poems

Chapter 3, problem 1. Chapter 3, problem 3. Chapter 3, problem 8.

Description
Chapter 3, problem a)-d): You can choose arbitrary port numbers you want, but you have to following several rules: (). The service port on a server is predetermined and they cannot be changed. (2). The
Categories
Published
of 5
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Transcript
Chapter 3, problem a)-d): You can choose arbitrary port numbers you want, but you have to following several rules: (). The service port on a server is predetermined and they cannot be changed. (2). The source port from a client must be within , since the port number -23 are reserved for various services. source port Numbers destination port numbers a) A S b) B S c) S A d) S B e) Yes. f) No. Since these two connections need the source port to differ them from each other. Remember that the TCP uses 4-tuple (source IP, source port, dest IP, dest port) to identify connections. Chapter 3, problem 3. + One's complement =. + + (overflow bit added) = To detect errors, the receiver adds the four words (the three original words and the checksum). If the sum contains a zero bit, the receiver knows there has been an error. All one-bit errors will be detected, but two-bit errors may be undetected (e.g., if the last digit of the first word is converted to a and the last digit of the second word is converted to a ). Chapter 3, problem 8. Here, we add a timer, whose value is greater than the known round-trip propagation delay. We add a timeout event to the Wait for ACK or NAK and Wait for ACK or NAK states. If the timeout event occurs, the most recently transmitted packet is retransmitted. Let us see why this protocol will still work with the rdt2. receiver. Suppose the timeout is caused by a lost data packet, i.e., a packet on the sender-to-receiver channel. In this case, the receiver never received the previous transmission and, from the receiver's viewpoint, if the timeout retransmission is received, it look exactly the same as if the original transmission is being received. Suppose now that an ACK is lost. The receiver will eventually retransmit the packet on a timeout. But a retransmission is exactly the same action that is taken if an ACK is garbled. Thus the sender's reaction is the same with a loss, as with a garbled ACK. The rdt 2. receiver can already handle the case of a garbled ACK. Chapter 3, problem. M A M A M M A M A old version of M accepted! New M is lost! Chapter 3, problem 2. Refer to the Figure 3.8 (b) in the textbook (page 26), we can extend the sender utilization formula in Page 25 to be: U W L / R = sender RTT + L / R Where W is the sender window size. As shown in Page 24: L/R =.8 milliseconds. RTT=3 milliseconds. U sender ( RTT + L / R) Thus we can derive W = =3376. L / R Chapter 3, problem 9. a) True. Suppose the sender has a window size of 3 and sends packets, 2, 3 at t. At t ( t t) the receiver ACKS, 2, 3. At t 2 ( t 2 t) the sender times out and resends, 2, 3. At t 3 the receiver receives the duplicates and re-acknowledges, 2, 3. At t 4 the sender receives the ACKs that the receiver sent at t and advances its window to 4, 5, 6. At t 5 the sender receives the ACKs, 2, 3 the receiver sent at t 2. These ACKs are outside its window. b) True. By essentially the same scenario as in (a). c) False. As shown in the Problem, the alternative-bit protocol does not work correctly if the network can reorder messages. Since the SR used unique sequence number for every packet, it does not have problem to work with window size. d) False. The same reason as in c). Chapter 3, problem 2 There are 2 32 = 4,294,967, 296 possible sequence numbers since TCP has 4 bytes for sequence number. a) The sequence number does not increment by one with each segment. Rather, increments by the number of bytes of data sent. So the size of the MSS is irrelevant -- the maximum size file that can be sent from A to B is simply the number of bytes representable by Gbytes b) The number of segments is = 2,94, bytes of header get added to each segment giving a total of 94,56,28 bytes of header. The total number of bytes transmitted is ,56,28 = 3,59 bits. Thus it would take 3,59 seconds = 59 minutes to transmit the file over a ~Mbps link. Problem 8: This problem is to test whether you understand how TCP uses sequence number and acknowledge number in its two-way communication. Things to consider: (). The value in sequence/ack are the number of bytes, not the value for the packet. (2). The ACK number is the next byte position that the send is expected to receive in the future from the other end. (3). The Seq number is the position of the first byte in the sender s sending data byte stream. Host A Seq=,Ack=,data = bytes Host B Seq=,Ack=,data = 25 bytes Seq=,Ack=25,data = 4 bytes Problem 9: #define N // points in the data. double SampleRTT[N] = { 3, 5, 4.6, 9.8,.}; double EstimateRTT[N]; EstimateRTT[] = SampleRTT[]; for ( int i=; i n;i++) EstimateRTT[i] = (-alpha) * EstimateRTT[i-] + alpha*samplertt[i]; Problem : This is a problem on M/M/ queue, which is very similar to the example I showed in class. The router has a constant outgoing bandwidth, but since each packet has exponential distributed length, thus the service time is exponential distributed and satisfies the M/M/ queue requirement. The service rate is: μ =Mbps/.4Kbps=74. The combined arrival rate is λ =4+25 = 65. Thus the traffic intensity is: ρ = λ / μ =.9 (a). average delay is: =5.6 ms μ λ (b). ρ E [N] = =. packets ρ 4 (c). p = ρ p = ρ 4 ( ) =.62 4 ρ
Search
Similar documents
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks