Transmission Control Protocol (TCP) is a communications standard that enables application programs and computing devices to exchange messages over a network. It is designed to send packets across the internet and ensure the successful delivery of data and messages over networks.
TCP includes mechanisms to solve most of the problems that arise from packet-based messaging, such as duplicate packets, lost packets, out of order packets and corrupted packets. TCP resides at the transport layer of the Open Systems Interconnection (OSI) model. TCP works with the IP, which defines how computers send packets of data to each other. Since TCP is the protocol used most commonly on top of IP, the Internet protocol stack is sometimes referred to as TCP/IP. Together, TCP and IP are the basic rules that define the internet and ensure the successful delivery of messages over networks.

3 Way Handshake
When two computers want to send data to each other over TCP, they first need to establish a connection. This is done by the three way handshake.
- Client sends SYN to the Server
- Server responds with SYN / ACK to the Client
- Client responds ACK to the Server

Ideas to understand TCP
Sequence Numbers and Acknowledgement Numbers
- Sequence Numbers track what is sent
- Acknowledgement Numbers track what is received
Sequence Numbers track what is sent.
Acknowledgement Numbers track what is received.The main function of layer 1 is Transporting Bits. It is responsible for the actual physical connection between the devices. When data needs to be transferred, the layer 1 devices are used to carry the bits from one device to another. The common L1 technologies devices are: Cables, Fiber, WIFI, Repeater, Hubs
Sequence / Acknowledgement numbers are a measure of bytes
The Layer 2 devices Interact with the wire (i.e Physical layer).
The main function of layer 2 is Hop to Hop delivery. The common Layer 2 devices are NIC – Network Interface cards, WIFI Access cards and Switches. They facilate the communication from one host to another. The Addressing Scheme used is the MAC address. A MAC address (media access control address) is a 12-digit hexadecimal number assigned to each device connected to the network. It is a unique addres, hard-coded into your network device by the manufacturer.
MAC Address
FA-3F-80-2E-1B-A6 (Windows)
FA:3F:80:2E:1B:A6 (Linux)
FA3F:802E:1BA6 (Cisco)
48 bits, represented as 12 hex digits