Third experiment: Analysis of TCP connection establishment using Packet Tracer.

(1) Personal information:

                Name: Peng Chen Student Number: 201 821 121 039 Class: calculated 1812

1 Purpose

  • Using different network router.
  • Use the command line router.
  • By grabbing HTTP packets, TCP connection establishment of the analysis process.

2 Experimental content

      Use Packet Tracer, properly configure the network parameters, by crawling HTTP packets, analyzes the TCP connection establishment procedure.

  • Establish a network topology
  • Configuration parameters
  • Ethereal
  • Analysis of the data packet

3. The test report

(1) establish a network topology

 

 

 (2) Configuration Parameters

   . A PC side configuration parameters:

 

   . B server configuration parameters:

 

 

   . C router configuration parameters:

   Configuration, activation port:

   First, according to the instruction: Router> enable to enter privileged mode

      Router # config t Enter the global configuration mode

      Router (config) #interface Fa 0/0 Ethernet interface 0/0

      Router (config-if) #ip address 192.168.1.40 255.255.255.0 add IP addresses

     Router (config-if) #no shutdown activation port

     Router (config-if) #exit return to the previous 

     Router (config) #interface Fa 0/1 Ethernet interface 0/1

    Router (config-if) #ip address 192.168.2.40 255.255.255.0 add IP addresses

    Router (config-if) #no shutdown activation port                    

    3. capture, analyze TCP connection establishment  

 (1) Ethereal

 

 

     

 

( 2 ) the TCP to establish a connection diagram:

(3)分析序号和确认号的变化

     PC先向Server端发送连接请求报文,同部位为1,选择一个初始序号为x(seq=x),Client进入SYN_SENT状态;Server收到请求报文后进行回复确认确认报文段中,SYN=1,ACK=1,确认号ack=x+1,随机产生一个值seq=m,并将该数据包发送给Client以确认连接请求,Server进入SYN_RCVD状态;PC收到Server端的服务进程的报文后发出确认信息。

4)解答:为什么连接建立需要第三次握手

答:为了防止已失效的连接请求报文段突然又传送到了服务端,因为产生错误;若没有三次握手,则连接建立成功,服务器会等待这一无效连接发送数据,造成资源浪费。若采用三次握手,则PC端不会再向服务器发送发送确认应答信息,连接不会被建立。

 

Guess you like

Origin www.cnblogs.com/19980803p-c/p/11690088.html