1.0 - Network Fundamentals

Purpose of Connection Establishment


πŸ“‘ On this page
  1. TCP Header
πŸ“š TCP Connection EstablishmentPart 6 of 7
  1. 1. Why TCP?
  2. 2. How People and Computers communicate
  3. 3. TCP Terminology
  4. 4. How Port Numbers work
  5. 5. Problems a missing Packet cause
  6. 6. Purpose of Connection Establishment
  7. 7. Concept of Sequence Number & Acknowledgement

IP is a connectionless protocol. It's job is just to look at the source and destination IP Addresses and forward packets. It works on best effort transport. If a packet goes missing this is not the responsibility of the IP/Network Layer to send this same packet again.

This TCP connection from source to destination is a virtual connection over the medium that is IP.

TCP Header

TCP Segment

Within the TCP header we have certain fields within it as per below:

Port NumberUsed to inform how to access this application. This is comprised of two parts:

Source Port - This is a random Ephemeral port. Ephemeral means if we open a connection we may get a specific source port, but if we close it and reinitiate another connection it may be a different port number. This is always a random number when opening a connection.

Destination Port - This is a Well-Known Port Number. This is always fixed when opening a connection.

Note that when a reply happens the Source/Destination ports become reversed.
FlagsA flag is just a mechanism of conveying information. In TCP there are 5/6 flags. These can only have two values, 1 or 0. 1 is up 0 is down.
Sequence NumberIf we have to send multiple packets we mark them with a particular number. This is not a Flag but a specific field within the TCP header. The value is 2^32 = 4294967296 possible sequence number values.

Note

TCP Header + Payload = TCP Segment.

Comments