首页 > 试题广场 >

TCP协议使用三次握手建立连接,设双方发送初始序号分别为X,

[单选题]
TCP协议使用三次握手建立连接,设双方发送初始序号分别为X,Y,甲方发送帧为SYN=1, Seq=X的报文给乙方,则乙方接受报文后,发送()给甲方,甲方发送一个确认报文给乙方后便建立连接。
  • SYN=0, Seq=Y, AN=X+1
  • SYN=0, Seq=X+1, AN=X+1
  • SYN=1, Seq=Y, AN=X+1
  • SYN=1, Seq=X+1, AN=Y
甲方发送 seq=x
乙方收到数据后回复期望下次收到seq=x+1的数据,即就是通过ack=x+1告诉甲方;
发表于 2017-10-13 17:43:33 回复(0)
SYN为1表示乙方收到了报文,Seq表示乙方的初始序号,AN表示乙方希望收到的报文
发表于 2019-04-11 20:47:18 回复(0)
  • The server must be prepared to accept an incoming connection. This is normally done by calling socket, bind, and listen and is called a passive open.

  • The client issues an active open by calling connect. This causes the client TCP to send a ‘‘synchronize’’ (SYN) segment, which tells the server the client’s initial sequence number for the data that the client will send on the connection. Normally, there is no data sent with the SYN; it just contains an IP header, a TCP header, and possible TCP options.

  • The server must acknowledge (ACK) the client’s SYN and the server must also send its own SYN containing the initial sequence number for the data that the server will send on the connection. The server sends its SYN and the ACK of the client’s SYN in a single segment.

  • The client must acknowledge the server’s SYN.

首先client连接的时候会向server发送SYN,这包含了client下面的数据信息的初始序号,然后server ACK的时候要+1,并发送自己接下来通信中自己的发送数据信息的初始序号。同样client ACK的时候要+1.
所以选C
发表于 2018-06-24 11:24:23 回复(0)
An是乙方希望甲方下次发送的序列号,前面的已经确认
发表于 2020-03-12 15:51:07 回复(0)
D
发表于 2017-08-11 00:15:23 回复(4)
SYN表示同步确认标志位。
报文中的2个重要字段 : 【Seq】Sequence number(序列号) 、【AN】Acknowledge number(确认号)。
Sequence number是数据包本身的序列号;
Acknowledge number是期望对方继续发送的那个确认数据包的序列号 (也就是对方的Sequence number+1)。
发表于 2022-03-06 10:19:01 回复(0)
AN , 是ACK吧,表明收到对方发送下一个报文的第一个字节序号,自己的第N个报文的ACK - 对方第N-1个报文的seq = 第N-1 个报文的数据量
发表于 2018-11-06 22:04:08 回复(0)