计网Lab2

TCP

2.1

What is the IP address and TCP port number used by the client computer (source) that is transferring the alice.txt file to gaia.cs.umass.edu?

Answer:

  • IP address: 192.168.31.190
  • TCP port number: 52849

在这里插入图片描述


2.2

What is the IP address of gaia.cs.umass.edu? On what port number is it sending and receiving TCP segments for this connection?

Answer: (图同2.1)

  • IP address: 128.119.245.12
  • sending port number: 52849
  • receiving port number: 80

3.1

What is the sequence number of the TCP SYN segment that is used to initiate the TCP connection between the client computer and gaia.cs.umass.edu? What is it in this TCP segment that identifies thesegment as a SYN segment?

Answer:

  • raw sequence number: 717784407
  • 在TCP段中,标识该段为SYN段的内容是TCP标志字段中的SYN标志位被设置为1,表示建立连接的请求。这是三次握手中的第一步。

在这里插入图片描述


3.2

What is the sequence number of the SYNACK segment sent by gaia.cs.umass.edu to the client computer in reply to the SYN? What is it in the segment that identifies the segment as a SYNACK segment? What is the value of the Acknowledgement field in the SYNACK segment? How did gaia.cs.umass.edu determine that value?

Answer:

  • sequence number: 3089007046
  • 标识该段为SYNACK段的标志是TCP段中的SYN标志位被设置为1,ACK标志位也设为1,表示服务器接收到我方的连接请求并且发 SYN-ACK 确认,这是三次握手的第二步。
  • Acknowledgement: 1
  • SYNACK段中的确认字段的值为717784408,表示服务器已确认客户端的连接请求,并准备好接收数据。确认字段的值是根据客户端发送的SYN段的序列号(即上题中的sequence number: 717784407)加1而确定的。

在这里插入图片描述


3.3

What is the sequence number of the TCP segment containing the header of the HTTP POST command? How many bytes of data are contained in the payload (data) field of this TCP segment? Did all of the data in the transferred file alice.txt fit into this single segment?

Answer:

  • sequence number: 1533452819
  • payload: 743 bytes
  • alice.txt文件的所有数据没有都放入这个单个的TCP段中。比如:在第二张图片中,可以看到后面的TCP段中也有部分alice.txt的片段

在这里插入图片描述

在这里插入图片描述


3.4

Consider the TCP segment containing the HTTP “POST” as the first segment in the data transfer part of the TCP connection.

  • At what time was the first segment (the one containing the HTTP POST) in the data transfer part of the TCP connection sent?
  • At what time was the ACK for this first data-containing segment received?
  • What is the RTT for this first data-containing segment?
  • What is the RTT value the second data-carrying TCP segment and its ACK?
  • What is the EstimatedRTT value after the ACK for the second data-carrying segment is received?

Answer:

  • 第一个段(帧521)在从第一个帧开始的7.149280000秒后发送

在这里插入图片描述

  • 第一个段(帧521)ACK是在从第一个帧开始的7.386346000秒后接受到

在这里插入图片描述

  • 从第二张图可以看到或通过前两问相减计算得到,第一个段RTT为0.237066000秒

  • 第二个段RTT为0.221189000秒, 这是对帧532的ACK

在这里插入图片描述

  • EstimatedRTT = (1 - 0.125) * 0.237066000 + 0.125 * 0.221189000 ≈ 0.261565375

3.5

What is the length (header plus payload) of each of the first four data-carrying TCP segments?

Answer:

第一个:743 ; 第二、三、四个:1440

在这里插入图片描述


3.6

What is the minimum amount of available buffer space advertised to the client by gaia.cs.umass.edu among these first four data-carrying TCP segments ? Does the lack of receiver buffer space ever throttle the sender for these first four data-carrying segments?

Answer:(图同3.5)

  • window size,表示发送方可以连续发送多少字节的数据而不需要等待接收方的确认,也就是最小可用缓冲区空间,四个均为132352字节
  • 在TCP段的标志字段中,ACK标志被设置为1,表示确认号字段有效。这表明接收端已经成功接收到之前发送的数据,并向发送端发送了确认。因此,在这个数据传输的段中,接收端缓冲区空间的不足不会对发送端进行限制,因为发送端已经收到了确认并知道数据已被接收。

3.7

Are there any retransmitted segments in the trace file? What did you check for (in the trace) in order to answer this question?

Answer:

没有重传,因为序列号一直在增大,且并未在抓包结果中发现有重传的相关数据包提示。

在这里插入图片描述


3.8

How much data does the receiver typically acknowledge in an ACK among the first ten data carrying segments sent from the client to gaia.cs.umass.edu?

Answer:

除了第一个是743,其余均为1440,所以通常确认1440字节的数据

在这里插入图片描述


3.9

What is the throughput (bytes transferred per unit time) for the TCP connection? Explain how you calculated this value.

Answer:

吞吐量 = 数据传输大小 / 所用时间

所以 throughput = 153064 Bytes / 8.077582 s ≈ 18949.23506 Bytes/s = 18.50511236 kb/s


4.1

Comment on whether this looks as if TCP is in its slow start phase, congestion avoidance phase or some other phase.

Answer:

从0s到0.025s时,处于慢启动阶段,在0.025s处于拥塞避免阶段,0.025s到0.053s慢启动阶段,0.053s处于拥塞避免阶段,0.053s到0.082s慢启动阶段,0.082s处于拥塞避免阶段,0.082s到0.1s慢启动阶段,0.1s处于拥塞避免阶段。(下图为我的实验截图)

在这里插入图片描述


4.2

These “fleets” of segments appear to have some periodicity. What can you say about the period?

Answer:

连续段集之间的时间间隔大约在0.03s左右,这表明TCP流量具有大约0.03秒的定期间隔,段集将在大约0.03秒的规律间隔下发送。


UDP

1.1

Select the first UDP segment in your trace. What is the packet number of this segment in the trace file? What type of application-layer payload or protocol message is being carried in this UDP segment? Look at the details of this packet in Wireshark. How many fields there are in the UDP header? What are the names of these fields?

Answer:

  • packet number: 23
  • DNS
  • 4
  • Source Port, Destination Port, Length, Checksum

在这里插入图片描述


1.2

By consulting the displayed information in Wireshark’s packet content field for this packet, what is the length (in bytes) of each of the UDP header fields?

Answer:(图同1.1)

每个均为2字节


1.3

The value in the Length field is the length of what? Verify your claim with your captured UDP packet.

Answer:(图同1.1)

  • 长度字段(Length field)中的值表示的是UDP头部和数据的总长度。

  • Length字段的值为51,为:UDP payload(43 bytes)表示UDP数据部分的长度,加上UDP头部的长度(4*2字节=8字节),总长度为51字节,与Length字段的值一致。


1.4

What is the maximum number of bytes that can be included in a UDP payload?

Answer:

UDP负载(payload)中可以包含的最大字节数为65,527字节。UDP在其头部使用了一个16位的长度字段,该字段的最大值为: 2^16 - 1 = 65535 字节。然而,这个值包括了UDP头部(8字节)和数据负载。由于UDP头部占用8字节,剩余的最大负载大小为65535 - 8 = 65527字节。


1.5

What is the largest possible source port number?

Answer:

最大可能的源端口号是65535。因为UDP使用16位的源端口字段,可以表示的最大值为65535。这是因为端口号的范围是从0到65535,其中0保留作为保留端口,而65535被用作最大的可用端口号。


1.6

What is the protocol number for UDP?

Answer:

17

在这里插入图片描述


1.7

What is the packet number of the first of these two UDP segments in the trace file? What is the packet number of the second of these two UDP segments in the trace file? Describe the relationship between the port numbers in the two packets.

Answer:(图同1.1)

  • 前者为23,后者为24。
  • 它们之间的关系在于,前者的源端口为后者的目的端口,而前者的目的端口为后者的源端口。

  • 26
    点赞
  • 26
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值