Show understanding of the TCP/IP protocol suite

14.1 Protocols – Understanding the TCP/IP Protocol Suite

1. Why Protocols Matter

A protocol is a mutually‑agreed set of rules that allows two or more devices to exchange data. In a computer network a protocol must define:

  • Data format and representation (e.g. binary, ASCII, Unicode)
  • Addressing and routing
  • Error detection and correction
  • Sequencing, flow‑control and congestion‑control
  • Connection establishment, maintenance and termination

2. The TCP/IP Model

The TCP/IP suite is organised into four logical layers. Each layer offers services to the layer above it and uses the services of the layer below it.

TCP/IP Layer Corresponding OSI Layer(s) Primary Functions Key Protocols / Examples
Application Application, Presentation, Session
  • Provides network services directly to end‑user applications
  • Data representation, encoding and application‑level error handling
HTTP, HTTPS, FTP, SFTP, SMTP, POP3, IMAP, Telnet, DNS, DHCP, SSH, TLS/SSL
Transport Transport
  • End‑to‑end communication between processes (sockets)
  • Reliability, flow control, multiplexing, congestion control
TCP, UDP
Internet Network
  • Logical addressing and routing of packets across multiple networks
  • Fragmentation & re‑assembly, error reporting
IPv4, IPv6, ICMP, IGMP, ARP
Link (Network Access) Data Link, Physical
  • Physical transmission of bits, framing, MAC addressing
  • Media‑access control and error detection at the link level
Ethernet (IEEE 802.3), Wi‑Fi (IEEE 802.11), PPP, Frame Relay

3. Core Internet Protocols

3.1 Internet Protocol (IP)

IP supplies the fundamental addressing and routing service. Two versions are in active use.

VersionAddress LengthAddress SpaceHeader Size
IPv432 bits≈ 4.3 × 10⁹ addresses20 bytes (minimum)
IPv6128 bits≈ 3.4 × 10³⁸ addresses40 bytes (fixed)
  • Best‑effort delivery: IP does not guarantee delivery, ordering or integrity – those responsibilities belong to the transport layer.
  • Key addressing concepts (syllabus 14.1.2):
    • Binary‑decimal conversion – e.g. 192.168.1.10 = 11000000.10101000.00000001.00001010₂
    • Public vs. private address ranges – 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
    • Subnet mask and CIDR notation255.255.255.0 = /24
    • Network address, broadcast address and host range – e.g. for 192.168.1.0/24 the network address is 192.168.1.0, broadcast is 192.168.1.255, hosts are 192.168.1.1‑192.168.1.254
    • Network Address Translation (NAT) – maps many private addresses to a single public address for Internet access.

3.2 Transmission Control Protocol (TCP)

TCP adds reliability to the best‑effort IP service.

FeatureExplanation
Connection‑orientedThree‑way handshake (SYN → SYN‑ACK → ACK) establishes a virtual circuit.
SequencingEach byte is numbered; the receiver reassembles data in order.
Acknowledgement & RetransmissionReceiver sends ACKs; sender retransmits lost segments after a timeout.
Flow controlSliding‑window limits the amount of un‑acknowledged data.
Congestion controlAlgorithms such as Slow Start, Congestion Avoidance, Fast Retransmit/Recovery.
Header size20 bytes (without options). Key fields: source/destination ports, sequence number, acknowledgement number, flags (SYN, ACK, FIN, RST, URG, PSH), window size, checksum, urgent pointer.

3.3 User Datagram Protocol (UDP)

UDP provides a lightweight, connectionless service.

FeatureDetails
Connection‑lessNo handshake; each datagram is independent.
ReliabilityNone – delivery, ordering and duplication are not guaranteed.
Header size8 bytes (source port, destination port, length, checksum).
Typical use‑casesReal‑time services where speed outweighs occasional loss – VoIP, online gaming, video streaming, DNS queries.

3.4 Supporting Protocols

  • ICMP (Internet Control Message Protocol) – used for diagnostics and error reporting (e.g. ping echo request/reply, Destination Unreachable, Time Exceeded, Redirect).
  • ARP (Address Resolution Protocol) – resolves an IPv4 address to a MAC address on the local LAN.
    1. Host A broadcasts “Who has 192.168.1.10?”
    2. Host B replies with its MAC address.
  • DHCP (Dynamic Host Configuration Protocol) – automatically assigns IP address, subnet mask, default gateway and DNS server to a host.
  • DNS (Domain Name System) – translates human‑readable domain names (e.g. www.example.com) to IPv4/IPv6 addresses.

3.5 Secure Protocols (syllabus 17.1)

Security is increasingly part of the protocol stack.

  • SSL/TLS – provides encryption, authentication and integrity for transport‑layer connections (HTTPS, FTPS, SMTPS).
  • HTTPS – HTTP over TLS; default port 443.
  • Other secure variants:
    • SSH – secure remote login (port 22)
    • SFTP – file transfer over SSH (port 22)
    • IPsec – network‑layer encryption and authentication

4. Transport‑Layer Services – Ports and Sockets

  • Port numbers identify the application process on a host.
    • Well‑known ports (0‑1023): HTTP = 80, HTTPS = 443, FTP = 21, SMTP = 25, DNS = 53, DHCP = 67/68, SSH = 22.
    • Registered ports (1024‑49151) – assigned by IANA for specific applications.
    • Dynamic / private ports (49152‑65535) – used temporarily by client programs.
  • Socket = IP address + port number; the endpoint for a TCP or UDP connection.
  • Typical client‑server interaction
    1. Server creates a listening socket on a well‑known port (e.g. TCP 80).
    2. Client creates an ephemeral socket (e.g. TCP 49178) and connects to the server’s socket.
    3. Data exchange proceeds over the established connection.

5. Example Communication Flow – TCP + HTTP

  1. Three‑way handshake
    • Client → SYN (seq = x)
    • Server → SYN‑ACK (seq = y, ack = x+1)
    • Client → ACK (ack = y+1)
  2. Client sends an HTTP request, e.g. GET /index.html HTTP/1.1\rHost: www.example.com\r\r inside a TCP segment (source port = 49178, dest = 80).
  3. Server acknowledges the segment (ACK) and returns the HTML page in one or more TCP segments, each carrying sequence numbers.
  4. Client acknowledges each segment; any missing segment is retransmitted after the timeout.
  5. When the transfer is complete, the client initiates a graceful termination: FIN → ACK → FIN → ACK.

6. Mapping TCP/IP to the OSI Model (full comparison)

OSI LayerTCP/IP Layer(s)Typical Protocols / Functions
ApplicationApplicationHTTP, HTTPS, FTP, SMTP, DNS, DHCP, SSH, Telnet, TLS/SSL
PresentationApplicationData encoding, encryption (TLS/SSL), compression
SessionApplicationSession management (e.g. TCP connection establishment)
TransportTransportTCP, UDP
NetworkInternetIPv4, IPv6, ICMP, IGMP
Data LinkLinkEthernet (MAC), Wi‑Fi (802.11), PPP, Frame Relay
PhysicalLinkElectrical/optical signalling, cabling standards, connectors

7. Summary of Key Points

  • The TCP/IP suite consists of four layers – Application, Transport, Internet, Link – each mapping to one or more OSI layers.
  • IP (IPv4/IPv6) provides logical addressing (including subnetting, CIDR, NAT) and routing; it is a best‑effort service.
  • TCP offers reliable, ordered delivery with flow‑control and congestion‑control. UDP provides fast, connectionless delivery for latency‑sensitive applications.
  • Supporting protocols (ICMP, ARP, DHCP, DNS) enable error reporting, address resolution, dynamic configuration and name resolution.
  • Secure protocols (SSL/TLS, HTTPS, SSH, IPsec) extend the stack to provide confidentiality, integrity and authentication.
  • Understanding header fields (ports, sequence/ack numbers, flags) and the sequence of control messages (handshakes, acknowledgements, termination) is essential for troubleshooting and for exam questions.
Suggested diagram: Layered view of the TCP/IP model with example protocols in each layer, shown side‑by‑side with the OSI model.

Create an account or Login to take a Quiz

89 views
0 improvement suggestions

Log in to suggest improvements to this note.