Computer Networking Quiz

jaypyon·2021년 4월 18일
0

Computer Networking

목록 보기
7/7
post-thumbnail

Chapter.1

R1. What is the difference between a host and an end system? List several different types of end systems. Is a Web server an end system?

차이는 없다. 엔드시스템과 호스트는 같은 말이다. 엔드시스템은 모바일 장치가 될 수도 있고, 서버가 될 수도 있고, 개인용 컴퓨터가 될 수도 있다.
웹 서버 역시 엔드시스템에 포함된다.

R2. The word protocol is often used to describe diplomatic relations. How does Wikipedia describe diplomatic protocol?

프로토콜이란 '규약'이라는 뜻이며 외교적 용어로는 의전, 의정서 등의 뜻으로 쓰인다.

R3. Why are standards important for protocols?

상호간의 약속이기 때문에 Standard가 있어야만 해당 내용에 따라서 다수의 사람들이 불편이나 상이함 없이 원활하게 소통이 가능하다. 따라서 스탠다드는 중요하다.

🎈 R4. List six access technologies. Classify each one as home access, enterprise access, or wide-area wireless access.

DSL, HFC, switched Ethernet, Wifi, 3G, 4G, 5G ...
가정용 DSL, HFC, Ethernet, Wifi
기업용 Ethernet, Wifi
Wide-area wireless access : 3G, 4G, 5G

R5. Is HFC transmission rate dedicated or shared among users? Are collisions possible in a downstream HFC channel? Why or why not?

HFC의 다운로드 속도는 공유된다. downstream에서는 Head-end의 정보를 모두 동일하게 받으므로 충돌은 발생하지 않는다.

R7. What is the transmission rate of Ethernet LANs?

10,100,1000,10000Mbps

🎈 R8. What are some of the physical media that Ethernet can run over?

꼬임선(Twisted pair)을 이용한다.

🎈 R9. Dial-up modems, HFC, DSL and FTTH are all used for residential access. For each of these access technologies, provide a range of transmission rates and comment on whether the transmission rate is shared or dedicated.

  • 다이얼업 모뎀 : 56kbps
  • HFC : 다운스트림 42.8Mbps, 업스트림 30.7Mbps
  • ADSL : 다운스트림 24Mbps, 업스트림 2.5Mbps
  • FTTH : 다운로드 20Mbps, 업로드 10Mbps

5G, wifi(802.11)

R11. Suppose there is exactly one packet switch between a sending host and a receiving host. The transmission rates between the sending host and the switch and between the switch and the receiving host are R1 and R2 , respectively. Assuming that the switch uses store-and-forward packet switching, what is the total end-to-end delay to send a packet of length L? (Ignore queuing, propagation delay, and processing delay.)

그러니까 transmission delay만 고려하라는 뜻이고 각각의 지연은 L/R1, L/R2이다.
두개를 합하면 정답이다.

🎈R12. What advantage does a circuit-switched network have over a packet-switched network? What advantages does TDM have over FDM in a circuit-switched network?

네트워크 회선의 사용이 bursty하지 않다면 circuit-switched 방식이 적합하다. 우선 패킷교환방식을 사용하게 된다면 패킷이 분할되며 각각에 헤더가 붙기때문에 원본 데이터보다 데이터 량이 많아지며, 도착 순서와 같은 세부사항에 오버헤드가 발생한다. 또, 연결을 설정할때 오버헤드 또한 발생한다. 하지만 회선교환방식은 한번 링크를 유지하면 지속적인 전송이 가능하기 때문에 신뢰성 있는 전송이 가능하며, 전송할 데이터량의 변화가 없다.

주파수분할 방식의 경우 주파수로 분할하기 때문에 간섭이 크고, 아날로그 하드웨어가 추가로 필요하다.

a. When circuit switching is used, how many users can be supported?
2명이 지원된다.
b. For the remainder of this problem, suppose packet switching is used. Why will there be essentially no queuing delay before the link if two or fewer users transmit at the same time? Why will there be a queuing delay if three users transmit at the same time?
총 링크의 전송률이 2Mbps이므로 1Mbps짜리 패킷을 세개를 보낸다면 두개의 패킷이 링크를 통해 전송되는 동안 한개의 패킷이 남게된다. 따라서 큐잉지연이 발생한다.

c. Find the probability that a given user is transmitting.
0.2

d. Suppose now there are three 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.
3C3*0.2^(3-0)*(1-0.2)^(3-3) = 0.008

🎈 R14. Why will two ISPs at the same level of the hierarchy often peer with each other? How does an IXP earn money?

만약 연결되어있지 않다면 계층상 더 위에있는 ISP로 트래픽을 발생시킬 것이고 그렇게 된다면 이는 추가 비용의 지출로 이어진다. 따라서 같은 계층의 ISP들은 POP라는 연결접점을 생성한다.
IXP는 Internet Exchange Points이고 여러 ISP들의 연결 접점이다. 이들은 자신에게 연결된 ISP들에게 요금을 청구한다.

R15. Some content providers have created their own networks. Describe Google’s network. What motivates content providers to create these networks?

자신들이 발생시키는 트래픽에 대한 요금보다 직접 ISP를 구축하여 사용하는 것이 더 경제적이기 때문에 자신들의 CDN, ISP 구축 사업을 진행한다.

R16. Consider sending a packet from a source host to a destination host over a fixed route. List the delay components in the end-to-end delay. Which of these delays are constant and which are variable?

고정된 경로로 이동하게 된다면, 물리적 링크의 손상이 있을 경우 전파지연이 무한대가 되며 송수신이 제한될 것이다.
또, 해당 고정 경로상의 링크, 라우터 등은 다른 사용자 및 서버들도 사용할 것이기 때문에 상황에 따라 가변적인 큐잉 딜레이를 가질 것이다. 따라서 처리지연과 전송지연은 constant할 것이지만 전파지연과 큐잉지연은 가변적인 요소가 될 것이다.

4ms(transmission delay) + 10ms(propagation delay) = 14ms
1. 전파되는 시간 : 10ms
2. d/s
3. 아니다.
4. 아니다.

a. Assuming no other traffic in the network, what is the throughput for the file transfer?
bottleneck bandwidth : 500kbps

b. Suppose the file is 4 million bytes. Dividing the file size by the throughput, roughly how long will it take to transfer the file to Host B?
32*10^6bits/ 5*10^5bps = 64s
대략 64초가 걸린다.

c. Repeat (a) and (b), but now with R2 reduced to 100 kbps.
100kbps, 320초

A는 Large file을 여러개의 chunk로 분할하여 보내게 된다. 라우터는 도착한 패킷의 헤더를 확인하고 목적지의 IP주소를 확인한 뒤 동적 라우팅이나 정적 라우팅으로 생성된 라우팅 테이블을 참조해서 다음 홉으로 보내게 되고 패킷을 보내게 된다.

🎈R22. List five tasks that a layer can perform. Is it possible that one (or more) of these tasks could be performed by two (or more) layers?

에러제어, 흐름제어, 세그멘테이션, 조립, 멀티플렉싱, 연결설정 Yes, these tasks can be duplicated at different layers. For example, error control is often provided at more than one layer.

R23. What are the five layers in the Internet protocol stack? What are the principal responsibilities of each of these layers?

물리계층, 링크계층, 네트워크계층, 전송계층, 어플리케이션계층

  1. 어플리케이션에서 전송을 원하는 메시지이다. 전송계층으로 전달된다.
  2. 전달된 메시지에 전송계층의 헤더를 붙인 세그먼트이다. 네트워크계층으로 전달된다.
  3. 전달된 메시지에 네트워크계층의 헤더를 붙인 패킷이다. 링크계층으로 전달된다.
  4. 전달된 메시지에 링크계층의 헤더를 붙인 프레임이다. 물리계층으로 전달된다.
  1. 3계층
  2. 2계층
  3. 5계층

R27. Describe how a botnet can be created and how it can be used for a DDoS attack.

악성메일, 악성 링크로 접속한 사용자의 PC는 좀비PC가 될 수 있고, 봇넷으로 이용당할 수 있다. 봇 마스터는 감염된 여러대의 PC를 이용하여 특정 공격원점에 다량의 트래픽을 발생시켜서 DDoS 공격이 가능하다. 최근에는 피해를 더 확장할 수 있는 DRDoS 등의 방법론으로 기존 봇넷이 발생시킬수 있는 트래픽보다 적게는 수배 많게는 수만배 증폭시켜 공격하기도 한다.

R28. Suppose Alice and Bob are sending packets to each other over a computer network. Suppose Trudy positions herself in the network so that she can capture all the packets sent by Alice and send whatever she wants to Bob; she can also capture all the packets sent by Bob and send whatever she wants to Alice. List some of the malicious things Trudy can do from this position.

Trudy는 둘 사이의 패킷을 스니핑할 수 있으며 중요한 개인정보를 빼낼 수 있다.
MITM공격을 하여 더 나아가 조작된 패킷을 보내서 잘못된 동작을 시킬 수 있다.

첫 패킷의 종단간 지연 = NL/R
두번째 패킷의 도착 시간 = NL/R + L/R
세번째 패킷의 도착 시간 = NL/R + L/R + L/R = NL/R + 2L/R
P번째 패킷의 도착 시간 = NL/R + (P-1)L/R
(N+P-1)L/R

P3. Consider an application that transmits data at a steady rate (for example, the sender generates an N-bit unit of data every k time units, where k is small and fixed). Also, when such an application starts, it will continue running for a relatively long period of time. Answer the following questions, briefly justifying your answer:

a. Would a packet-switched network or a circuit-switched network be more appropriate for this application? Why?
회선교환이 적합하다 왜냐하면 패킷의 발생이 bursty하지 않고 짧은 주기로 자주 도착하기 때문이다.

b. Suppose that a packet-switched network is used and the only traffic in this network comes from such applications as described above. Furthermore, assume that the sum of the application data rates is less than the capacities of each and every link. Is some form of congestion control needed? Why? 혼잡제어는 필요하지 않다. 충분히 수용 가능한 data rate이기 때문에 혼잡상황이 발생하지 않는다.

a. What is the maximum number of simultaneous connections that can be in progress at any one time in this network? 16개의 링크로 각각의 라우터는 연결될 수 있다.

b. Suppose that all connections are between switches A and C. What is the maximum number of simultaneous connections that can be in progress?
B로 4개, D로 4개의 회선 구성이 가능하여 8개이다.

c. Suppose we want to make four connections between switches A and C, and another four connections between switches B and D. Can we route these calls through the four links to accommodate all eight connections?
할 수 있다. 2개의 링크씩 분산하여 구성하면 된다.

아날로그 신호가 64kbps 비트 스트림으로 전환되고, 56바이트 패킷이 모이면 전송된다.
즉, 568/6410000 = 7ms이 되고, 7ms마다 패킷 하나를 전송한다.
transmission delay는 224마이크로초이고 Propagation delay는 10ms이므로 17.224ms가 걸리게 된다.

a. When circuit switching is used, how many users can be supported?
20명
b. For the remainder of this problem, suppose packet switching is used. Find the probability that a given user is transmitting.
p = 0.1
c. Suppose there are 120 users. Find the probability that at any given time, exactly n users are transmitting simultaneously. (Hint: Use the binomial distribution.) 120Cn p^n (1-p)^(120-n)
d. Find the probability that there are 21 or more users transmitting simultaneously
0명부터 20명까지 동시사용하는 확률의 합을 전체확률에서 빼면 21명부터 120명까지 동시사용하는 확률이 나올 것이다.

1- sigma(n=0 to 20){120Cn * p^n * (1-p)^(120-n)}

a. What is N, the maximum number of users that can be supported simultaneously under circuit switching?
10000명
b. Now consider packet switching and a user population of M users. Give a formula (in terms of p, M, N) for the probability that more than N users are sending data.
1- sigma(n=0 to N){MCn * p^n * (1-p)^(M-n)}

d_proc이 존재하기 때문에 각 링크에 대해서 L/R을 따로 더해야만 한다.

d_end-end = L/R1 + L/R2 + L/R3 + d1/s1 + d2/s2 + d3/s3+ d_proc+ d_proc

6 + 6 + 6 + 20+16 + 4 + 3 + 3 = 64 msec.

P11. In the above problem, suppose R1=R2=R3=R and dproc=0. Further suppose the packet switch does not store-and-forward packets but instead immediately transmits each bit it receives before waiting for the entire packet to arrive. What is the end-to-end delay?

store and forward 방식이 아니라고 했으므로 R1,R2,R3가 모두 같기 때문에 L/R을 한번만 계산하면 된다.

d_end-end = L/R + d1/s1 + d2/s2 + d3/s3

6 + 20+16 + 4 = 46ms

밑의 문제인 평균 큐잉 지연을 생각하고 있었어서 한참 헤매었다. 일반적으로 종단간 딜레이를 측정할 때의 큐잉지연이란, 전체 패킷들에 대해서 생각하는 것이다. 개념을 정확히 알고 있는게 중요할 것 같다.

P13.

N개의 패킷이 LN/R 마다 한번씩 도착한다. d_trans가 L/R이기 때문에 LN/R 시간에는 기존에 도착한 한 주기의 N개의 패킷은 모두 도착했을 것이다. 그렇게 된다면 a와 동일한 문제가 된다.

P14. Consider the queuing delay in a router buffer. Let I denote traffic intensity; that is, I=La/R. Suppose that the queuing delay takes the form IL/R(1-I) for I<1.

a. Provide a formula for the total delay, that is, the queuing delay plus the transmission delay.

b. Plot the total delay as a function of L/R.

11 = a (packets/s) x (0.01s +0.01s)
a = 550

P17.

Q : 링크수

a. Generalize Equation 1.2 in Section 1.4.3 for heterogeneous processing rates, transmission rates, and propagation delays.

b. Repeat (a), but now also suppose that there is an average queuing delay of d at each node.

Rs, Rc , R/M 중에 최솟값이 bottle neck link의 throughput이 될 것이다.


확률을 구하는 문제이다. 서버로부터 클라이언트까지 손실 없이 갈 확률은 (1-p)^N 이 될 것이다.

확률 (1-p)^N 를 Ps라고 할때, 1/Ps 번의 시도를 하면 1번을 성공할 수 있다는 가정을 할 수 있을 것이고, 첫 시도를 제외한 (1/Ps) - 1이 재시도횟수가 된다.

a. What is the packet inter-arrival time at the destination? That is, how much time elapses from when the last bit of the first packet arrives until the last bit of the second packet arrives?
1번 패킷과 2번 패킷의 차이는 결국 큐잉지연 또는 출발시간의 차이밖에 없다. Rs가 bottleneck link이기 때문에 다음 홉에서 client간의 큐잉 지연은 없을 것이고 Rs링크에서의 큐잉지연만을 고려하면 된다. 따라서 L/Rs이다.

b. Now assume that the second link is the bottleneck link (i.e.,Rc<Rs). Is it possible that the second packet queues at the input queue of the second link? Explain. Now suppose that the server sends the second packet T seconds after sending the first packet. How large must T be to ensure no queuing before the second link? Explain.

첫번째 패킷이 L/Rc의 transmission 과정을 끝마쳤을때, 두번째 패킷이 홉에 도착하면 된다.
즉 각각의 종료시점을 첫번째 패킷은 Rc 링크로 올라갔을때, 두번째 패킷은 홉에 도착했을 때로 설정하고 그림을 그려보면 이렇게 나오게 된다. 따라서 최소 L/Rc-L/Rs의 시간 차이로 패킷을 보내면 큐잉지연이 발생하지 않는다.

계산하면 320의 10의4승 초가 나오고 일단위 환산하면 37일 걸린다. FedEx 써라.

a. Calculate the bandwidth-delay product, R⋅dprop.
20\*10^6 / 2.5\*10^8 = 0.08
0.08 \* 2\*10^6 = 160000bits

b. Consider sending a file of 800,000 bits from Host A to Host B. Suppose the file is sent continuously as one large message. What is the maximum number of bits that will be in the link at any given time?
160000bits

c. Provide an interpretation of the bandwidth-delay product.
대역폭 지연 곱이란? 주어진 시간에 최대로 선로에 있는 데이터량

d. What is the width (in meters) of a bit in the link? Is it longer than a football field?
m/bit의 결과를 얻으면 된다. 20000km/160000bit = (0.125)km/bit 풋볼 경기장의 너비를 모르겠다. 125m보다 큰가?

e. Derive a general expression for the width of a bit in terms of the propagation speed s, the transmission rate R, and the length of the link m.
m/{(m/R)*s} = s/R

s/R = M으로 두고 계산하면 된다. 20000km = 2.5*10^8/R R= 12.5bps

P28. Refer again to problem P25.

a. How long does it take to send the file, assuming it is sent continuously?

전송지연 400ms + 전파지연 80ms = 480ms

b. Suppose now the file is broken up into 20 packets with each packet containing 40,000 bits. Suppose that each packet is acknowledged by the receiver and the transmission time of an acknowledgment packet is negligible. Finally, assume that the sender cannot send a packet until the preceding one is acknowledged. How long does it take to send the file?

c. Compare the results from (a) and (b)

전파지연은 80ms으로 동일하나 전송 횟수가 20번으로 늘었기 때문에 20*80ms = 1600ms가 되었다. 전송지연은 동일하게 400ms이다. 따라서 2000ms가 걸린다. 약 4배의 속도 차이가 발생한다.

인공위성은 36,000km 떨어져있다.

a. What is the propagation delay of the link? 0.15sec
b. What is the bandwidth-delay product, R*dprop ? 1.5Mbits
c. Let x denote the size of the photo. What is the minimum value of x for the microwave link to be continuously transmitting?
***Every minute the satellite takes a digital photo ***라고 쓰여있으므로 X/10^7 = 60이다. 따라서 최소 X = 600,000,000bits 이상이어야만 지속적인 전송이 일어난다.

풀이 생략.

Chapter.3

P3. UDP and TCP use 1s complement for their checksums. Suppose you have the following three 8-bit bytes: 01010011, 01100110, 01110100. What is the 1s complement of the sum of these 8-bit bytes? (Note that although UDP and TCP use 16-bit words in computing the checksum, for this problem you are being asked to consider 8-bit sums.) Show all work. Why is it that UDP takes the 1s complement of the sum; that is, why not just use the sum? With the 1s complement scheme, how does the receiver detect errors? Is it possible that a 1-bit error will go undetected? How about a 2-bit error?


3개의 word를 보낼때, 그의 checksum 인 1개의 word를 추가로 보낸다.
만약 checksum과의 합에 0이 존재한다면 그것은 오류를 뜻한다.
한 비트에만 오류가 발생할 경우는 잘 감지하지만, 두개의 오류가 나게된다면 서로 상호 보완하여 보수와의 합에는 영향을 주지 않을 수 있다. (예를들어 마지막 자리가 각각 1 0 1이었는데 1 1 0으로 두개의 비트가 바뀌어도 감지하지 못한다는 뜻이다.)

Suppose you have the following 2 bytes: 01011100 and 01100101. What is the 1s complement of the sum of these 2 bytes? give an example where one bit is flipped in each of the 2 bytes and yet the 1s complement doesn’t change.

00111110
만약 01011101과 01100100이 도착한다면 오류를 감식할 수 없다.

Suppose you have the following 2 bytes: 11011010 and 01100101. What is the 1s complement of the sum of these 2 bytes?

10111111

P5. Suppose that the UDP receiver computes the Internet checksum for the received UDP segment and finds that it matches the value carried in the checksum field. Can the receiver be absolutely certain that no bit errors have occurred? Explain.

앞서 살핀 예와 같이 수신자는 확신할 수 없다. 두개의 16비트 중 한개의 비트 오류라면 감지할 수 있지만, 두개의 오류 비트라면 감지할 수 없는 것을 위 문제에서 보았다.

P7. In protocol rdt3.0 , the ACK packets flowing from the receiver to the sender do not have sequence numbers (although they do have an ACK field that contains the sequence number of the packet they are acknowledging). Why is it that our ACK packets do not require sequence numbers?

한가지 개념을 헷갈리고 있었다. 필자는 ACK가 ACK자체의 순서번호를 포함하는줄 알았지만 사실 ACK가 포함하는 것은 '수신된 패킷의 순서번호'였다.
ACK는 수신된 패킷의 순서번호를 갖고 송신자에게 가게되며, 송신자는 자신이 보냈던 패킷에 대한 ACK인지 판별하게 된다. 따라서 ACK 패킷은 순서번호가 필요하지 않다.

P10. Consider a channel that can lose packets but has a maximum delay that is known. Modify protocol rdt2.1 to include sender timeout and retransmit. Informally argue why your protocol can communicate correctly over this channel.

rdt2.1은 ACK, NAK를 포함한다.수신자에게 중복된 패킷이 도착한다면 가장 마지막 ACK를 송신하며,
문제가 있는 패킷을 수신한다면 NAK를 보내는게 2.1버전의 핵심이었다.

타임아웃 이벤트를 두개의 (wait for ACK or NAK0),(wait for ACK or NAK1) 상태의 이벤트로 추가한다.
송신자는 NAK0 또는 NAK1을 전송받게 된다면 해당하는 패킷을 재전송하게되고, 타임아웃 이벤트가 발생하면 재전송하게된다.
ACK의 손실 또는 timeout 이라는 두개의 이벤트에 대해서 중복 패킷이 발생할 수 있는데, 중복된 패킷의 경우 수신자측에서 마지막으로 수신한 ACK응답을 cumulative하게 보내므로 걱정하지 않아도 된다.

🎈P13. Consider the rdt 3.0 protocol. Draw a diagram showing that if the network connection between the sender and receiver can reorder messages (that is, that two messages propagating in the medium between the sender and receiver can be reordered), then the alternating-bit protocol will not work correctly (make sure you clearly identify the sense in which it will not work

메시지 교환의 단계별 프로세스 :

  • 발신자는 D0 데이터를 수신자에게 전송하고 수신자의 승인을 기대합니다. 따라서 발신자는 특정 기간 동안 승인을 기다립니다.
  • 발신자는 수신자로부터 수신 확인을받지 못하기 때문에 D0 데이터가 수신자에게 수신되지 않는다고 가정합니다. 따라서 발신자는 D0을 다시 보냅니다.
  • 두 번째로 D0 데이터를 전송 한 후 송신자는 수신자로부터 수신 확인 A0을 수신하고 데이터 D1을 전송합니다.
  • 수신자는 데이터 D1을 수신하고 수신 확인 A1을 발신자에게 보냅니다.
  • 수신자는 재전송 된 데이터 D0을 수신하고 이전 승인이 송신자에 의해 수신되지 않았다고 가정하여 승인 A0을 송신자에게 다시 보냅니다. 따라서 이전 버전의 데이터 D0은 수신자가 확인합니다.
  • 발신자는 데이터 D1 전송을 반복하고 수신자는 수신 확인 A1을 발신자에게 보냅니다.
  • 수신자가 수신 한 데이터 D0의 새 버전은 재정렬로 인해 이전 버전의 데이터 D0로 대체됩니다.

따라서 프로토콜이 제대로 작동하지 않고 메시지 교환이 부적절합니다. 데이터가 의도 한대로 전송되지 않습니다.

P12. The sender side of rdt3.0 simply ignores (that is, takes no action on) all received packets that are either in error or have the wrong value in the acknum field of an acknowledgment packet. Suppose that in such circumstances, rdt3.0 were simply to retransmit the current data packet. Would the protocol still work? (Hint: Consider what would happen if there were only bit errors; there are no packet losses but premature timeouts can occur. Consider how many times the nth packet is sent, in the limit as n approaches infinity.)

비트오류가 발생했다면, 수신자는 가장 최근에 성공한 ACK를 다시 보냅니다.
따라서 송신자는 아무 일도 하지 않고 timeout을 기다립니다. 이 과정은 상당히 낭비일수 있으므로 해당 내용에 premature timeout 과정을 추가해준다면 더 좋을 것 같습니다.

프로토콜 rtd3.0은 송신자에서 수신자로 데이터를 전송하는 데 사용됩니다.
발신자가 패킷을 수신자에게 전송하면 수신자는 확인을 위해 ACK (Acknowledgement)를 수신하여 발신자에게 보냅니다.
수신자가 비트가 순서가 맞지 않거나 오류가 발생한 패킷을 수신하면 승인을 보내지 않습니다.
보낸 사람은 시간 초과 후 패킷을 다시 전송합니다.
패킷이 여러 번 전송되면 프로토콜이 비효율적으로 보일 수 있습니다.
그 이유는 특정 패킷을 보내려고 시도하고 나머지 중단되지 않은 대기 패킷은 특정 패킷이 전달 될 때까지 기다려야하기 때문입니다.
따라서이 문제를 방지하기 위해 조기 시간 초과가 발생하도록 허용하는 것이 좋습니다.

P15. Consider the cross-country example shown in Figure 3.17 . How big would the window size have to be for the channel utilization to be greater than 98 percent? Suppose that the size of a packet is 1,500 bytes, including both header fields and data.

링크 전송률(R) = 1Gbps

송신자 이용률 = (L/R) / (RTT+L/R)
15008/10^9 = 0.012ms
따라서 송신자 이용률은 0.012 / 30ms+0.012이고, 패킷의 갯수
송신자이용률 = 0.98인 방정식을 풀면 답을 구할 수 있다.

P22. Consider the GBN protocol with a sender window size of 4 and a sequence number range of 1,024. Suppose that at time t, the next in-order packet that the receiver is expecting has a sequence number of k. Assume that the medium does not reorder messages. Answer the following questions: a. What are the possible sets of sequence numbers inside the sender’s window at time t? Justify your answer. b. What are all possible values of the ACK field in all possible messages currently propagating back to the sender at time t? Justify your answer

a.
Case 1:
k-1 까지 모든 ACK를 받은 경우 [ k, k+N-1]

Case 2:
k-1까지 모든 ACK를 받지 못한 경우 [ k-N, k-1]

따라서 윈도우는 [k-N,k]의 범위에서 시작한다.

b.
수신자가 k번 패킷을 기대하고 있는 상황이기 때문에, 송신자로 전송되는 ACK는
Case2 의 경우엔 k-N번째 패킷에 대한 응답이 아직 전송중일 수 있고, Case1의 경우엔 k-1번째 패킷일 수 있다.
따라서 [k-N,k-1]

P32. Consider the TCP procedure for estimating RTT. Suppose that x=0.1. Let SampleRTT1 be the most recent sample RTT, let SampleRTT2 be the next most recent sample RTT, and so on.

a. For a given TCP connection, suppose four acknowledgments have been returned with corresponding sample RTTs: SampleRTT4 , SampleRTT3 , SampleRTT2 , and SampleRTT1 . Express EstimatedRTT in terms of the four sample RTTs.

b. Generalize your formula for n sample RTTs.
c. For the formula in part (b) let n approach infinity. Comment on why this averaging procedure is called an exponential moving average.

Problem 21
Because the A-to-B channel can lose request messages, A will need to timeout and
retransmit its request messages (to be able to recover from loss). Because the channel
delays are variable and unknown, it is possible that A will send duplicate requests (i.e.,
resend a request message that has already been received by B). To be able to detect
duplicate request messages, the protocol will use sequence numbers. A 1-bit sequence
number will suffice for a stop-and-wait type of request/response protocol.
A (the requestor) has 4 states:
• “Wait for Request 0 from above.” Here the requestor is waiting for a call from
above to request a unit of data. When it receives a request from above, it sends a
request message, R0, to B, starts a timer and makes a transition to the “Wait for
D0” state. When in the “Wait for Request 0 from above” state, A ignores
anything it receives from B.
• “Wait for D0”. Here the requestor is waiting for a D0 data message from B. A
timer is always running in this state. If the timer expires, A sends another R0
message, restarts the timer and remains in this state. If a D0 message is received
from B, A stops the time and transits to the “Wait for Request 1 from above” state.
If A receives a D1 data message while in this state, it is ignored.
• “Wait for Request 1 from above.” Here the requestor is again waiting for a call
from above to request a unit of data. When it receives a request from above, it
sends a request message, R1, to B, starts a timer and makes a transition to the
“Wait for D1” state. When in the “Wait for Request 1 from above” state, A
ignores anything it receives from B.
• “Wait for D1”. Here the requestor is waiting for a D1 data message from B. A
timer is always running in this state. If the timer expires, A sends another R1
message, restarts the timer and remains in this state. If a D1 message is received
from B, A stops the timer and transits to the “Wait for Request 0 from above”
state. If A receives a D0 data message while in this state, it is ignored.
The data supplier (B) has only two states:
• “Send D0.” In this state, B continues to respond to received R0 messages by
sending D0, and then remaining in this state. If B receives a R1 message, then it
knows its D0 message has been received correctly. It thus discards this D0 data
(since it has been received at the other side) and then transits to the “Send D1”
state, where it will use D1 to send the next requested piece of data.• “Send D1.” In this state, B continues to respond to received R1 messages by
sending D1, and then remaining in this state. If B receives a R1 message, then it
knows its D1 message has been received correctly and thus transits to the “Send
D1” state.

profile
DGU CSE

0개의 댓글