TCP - Connection

> NetWork > Network - TCP (Transmission Control Protocol)

1 - About

Network - Connection in TCP

A TCP server may serve several clients concurrently with the same local port number and local IP address (ie socket address) by creating a child process for each client for each connection.

Every connection is uniquely identified by an identifier called a socket.

Advertising

3 - Process

  • TCP connections begin with a SYN packet being sent from client to server.
  • The server responds with a SYN/ACK packet.
  • Finally, the client sends an ACK packet.

4 - Properties

4.1 - State

During the lifetime of a TCP connection the local end-point undergoes a series of state changes:

State names vary with UNIX dialects, so it's not possible to provide a complete list. Some common TCP state names are: CLOSED, IDLE, BOUND, LISTEN, ESTABLISHED, SYN_SENT, SYN_RCDV, ESTABLISHED, CLOSE_WAIT, FIN_WAIT1, CLOSING, LAST_ACK, FIN_WAIT_2, and TIME_WAIT.

For further details on States Transmission Control Protocol.

Advertising

5 - Management

5.1 - List

5.1.1 - Powershell

Get-NetTCPConnection
# All listening port
Get-NetTCPConnection -State Listen
# One port
Get-NetTCPConnection -State Listen –LocalPort 1313

5.1.2 - Netstat

On Unix-like and Microsoft Windows based operating systems the netstat command line tool may be used to list all currently established connection (ie sockets).

5.1.3 - Tcpview

5.1.4 - Process Explorer

Advertising

5.2 - Get file

6 - Documentation / Reference

network/tcp/connection.txt · Last modified: 2019/05/22 11:59 by gerardnico