Chapter V: Transport Layer Introduction

tcp: process-oriented connection to a reliable communication between processes, provided that full duplex simultaneous two-way transmission of data and,

TCP packet format: the source port number, destination port number. Serial number, header length reservation confirmation number and window size check emergency Pointer Options

Role six pointer

URG: urgent

ACK: acknowledgment

PSH: Push

RST: Reset

SYN: Synchronization number (request)

FIN: termination

TCP three-way handshake

The host sends the request to the client SYN request sequence number representative of SEQ = X SYN = 1 to process the request after the client receives the reply over the host SYN + ACK packet wherein the representative ACK = X + 1 number reply request, then the host himself a send sequence number SEQ = Y own reply to the host, the host receive a reply before a client request is processed and confirmation (SEQ = X + 1 ACK = Y + 1 SYN = 1 ACK = 1) to complete the three-way handshake

TCP's four wave

Because the upload and download data when it is connected number = N + 1 so the host to the client sends (ACK / FIN) packet termination request and even access number = U master into a wait state closed, the client receives the ACK to the host replies acknowledgment packet sequence number = U + 1, this time off the host enters a wait state 2 but can upload data may also receive data, and send the client to the host (FIN / ACK) packet request to terminate the connection ID into the client waits = W off state, the host will return to the waiting client ACK acknowledgment packet sequence number = W + 1, the host enters the wait state. Client closes after receiving confirmation. At this time, the host does not close will wait for a packet maximum time period multiplied by 2 to shut down

TCP port and common function

FTP 21 FTP server ports open

TELNET 23 target computers for remote login manager

Send e-mail because the SMTP 25

HTTP 80 Hypertext Transfer

POP3 110 receiving by mail

UDP port and common function

TFTP 69 Simple Text Transfer Protocol

RPC 111 Remote Procedure Call

NTP 123 Network Time

UDP protocol: connectionless, unreliable protocol but speed, low overhead

 

Guess you like

Origin www.cnblogs.com/CAPF/p/11206496.html