🌐 TCP/IP Model (Transmission Control Protocol/Internet Protocol)

📌 Overview

The TCP/IP Model (also known as the Internet Protocol Suite) is the practical implementation of networking used by the internet today. Unlike the theoretical 7-layer OSI model, TCP/IP simplifies networking into 4 layers.


1. The 4 Layers & OSI Comparison

TCP/IP LayerOSI Layer MappingFunctionProtocol ExamplesAzure Component
ApplicationApplication, Presentation, SessionUser interface & data formattingHTTP, DNS, SSHApp Gateway, Front Door
TransportTransportReliability & Flow ControlTCP, UDPAzure Load Balancer
InternetNetworkLogical Addressing & RoutingIP, ICMPVirtual Network (VNET)
Network InterfaceData Link, PhysicalPhysical Hardware & MACEthernet, Wi-FiNIC, ExpressRoute

2. Key Concepts

📨 Encapsulation

As data moves down the stack, each layer adds a "Header" (Envelope).

  1. Application: Data (user payload).
  2. Transport: Adds TCP Header (Source/Dest Port). -> Segment
  3. Internet: Adds IP Header (Source/Dest IP). -> Packet
  4. Network Interface: Adds MAC Header/Trailer. -> Frame

🤝 TCP vs UDP (Transport Layer)


⚔️ TCP vs UDP: The Battle of Protocols

FeatureTCP (Transmission Control Protocol)UDP (User Datagram Protocol)
ConnectionConnection-oriented (3-Way Handshake)Connectionless (Fire and Forget)
ReliabilityHigh (Guarantees delivery via Acks)Low (No guarantee, packets may be lost)
OrderingOrdered (Sequencing of packets)Unordered (Arrive in any order)
SpeedSlower (Overhead of error checking)Faster (No overhead)
Header Size20 Bytes (Heavy)8 Bytes (Lightweight)
Use CaseWeb (HTTP), Email (SMTP), File Transfer (FTP)Streaming, Gaming, DNS, VoIP

🚪 Important Ports & Protocols (Cheat Sheet) 🔑

Knowing these ports is critical for Cloud Security (NSGs) and Debugging.

PortProtocolUsageAzure Context
20/21FTPFile TransferUploading files to App Service / Legacy VMs
22SSHSecure ShellConnecting to Linux VMs securely
23TelnetUnsecured Remote CLIAvoid (Use SSH instead)
25SMTPEmail SendingSending Emails (Blocked in Azure by default)
53DNSDomain Name SystemResolving google.com to IP
80HTTPWeb TrafficStandard unencrypted websites
443HTTPSSecure Web TrafficStandard secured websites (Banks, Azure Portal)
3389RDPRemote DesktopConnecting to Windows VMs GUI
8080HTTP AltWeb Proxy/DevOften used for Tomcat or Testing Servers
1433SQLSQL ServerConnecting to Azure SQL Database
3306MySQLMySQL DatabaseConnecting to Azure Database for MySQL

3. Architecture Diagram

    +--------------------------------+
    |      Application Layer         |
    |  [ HTTP/HTTPS Data (Payload) ] |
    +--------------------------------+
                  |
                  v (Encapsulation)
    +--------------------------------+
    |      Transport Layer           |
    |  [ TCP Segment                 |
    |    Source Port: 1024           |
    |    Dest Port: 80 ]             |
    +--------------------------------+
                  |
                  v (Encapsulation)
    +--------------------------------+
    |      Internet Layer            |
    |  [ IP Packet                   |
    |    Source IP: 10.0.0.5         |
    |    Dest IP: 1.2.3.4 ]          |
    +--------------------------------+
                  |
                  v (Encapsulation)
    +--------------------------------+
    |   Network Interface Layer      |
    |  [ Ethernet Frame              |
    |    MAC Addresses ]             |
    +--------------------------------+
                  |
                  v (Physical Cable)
        ( The Internet / Azure VNET )


💡 Hinglish Explanation (Courier System)

1. Application Layer (Letter Likhna)

2. Transport Layer (Receipt)

3. Internet Layer (Address)

4. Network Interface (Gadi)


💡 Exam Tips for AZ-900