KAHIBARO Bookshelves
Discord Login Register

4. TCP/IP Model

Overview

The TCP/IP model is the practical foundation of how the internet works. While the OSI model is mostly used for learning and discussion, TCP/IP describes how real-world protocols are organized and how devices actually communicate.

In this chapter you will see the big picture of TCP/IP as a model. Later chapters in this section will focus on each of its layers in detail, so here we keep to the overall structure and ideas.

Historical Context

TCP/IP was created as part of ARPANET, a research network funded by the United States government, which later evolved into the modern internet. Its main design goal was to allow different kinds of networks and computers to communicate reliably with one another.

Instead of describing a theoretical seven layer structure, the creators grouped related functions into fewer, more practical layers. Over time, TCP/IP and its protocols became the standard that all internet connected devices follow today.

Layer Structure of the TCP/IP Model

The TCP/IP model is usually shown with four layers. Each layer groups a set of protocols that perform related functions and that rely on the services of the layer below.

A common four layer view looks like this:

TCP/IP LayerTypical OSI Layers (rough mapping)Main Role
ApplicationApplication, Presentation, SessionNetwork services used by applications
TransportTransportEnd to end communication between hosts
InternetNetworkAddressing and routing of packets
Network AccessData Link, PhysicalAccess to physical network media

This table is only a comparison aid. The TCP/IP model stands on its own. It is not just a compressed OSI model, it is defined by the actual protocols that use it.

Important: The TCP/IP model is usually represented with 4 layers. Some sources show a 5 layer variation that splits the Network Access layer into separate Data Link and Physical layers, but the 4 layer view is the classic TCP/IP description.

Relationship Between TCP/IP and Protocols

The name TCP/IP comes from two key protocols:

  • Transmission Control Protocol (TCP)
  • Internet Protocol (IP)

These are not the only protocols in the model, but they are historically central. In the TCP/IP model:

  • The Internet layer includes IP as its core protocol.
  • The Transport layer includes TCP and also UDP.
  • The Application layer includes many protocols, such as HTTP, DNS, and others.
  • The Network Access layer includes technologies like Ethernet and Wi Fi, which will be mapped to other chapters.

Each protocol is designed to operate at a specific layer, use services from the layer below, and offer services to the layer above. For example, HTTP uses TCP, TCP uses IP, and IP uses a link technology such as Ethernet.

Encapsulation in the TCP/IP Model

When data moves from an application on one host to an application on another host, it is wrapped step by step as it passes down the TCP/IP layers. Each layer adds its own header information. This process is encapsulation in the context of TCP/IP.

Conceptually:

  1. An application creates some data.
  2. The Transport layer adds a transport header.
  3. The Internet layer adds an IP header.
  4. The Network Access layer adds link specific information and sends bits over the medium.

On the receiving host, the reverse process happens. Each layer reads and removes its own header and passes the remaining data up to the next layer.

You will study encapsulation mechanics and detailed headers in other chapters, so here it is enough to understand that the TCP/IP model provides the structure that defines which layer adds which information and why.

TCP/IP as an Implementation Model

One key difference from OSI is that TCP/IP is tied directly to real implementations. Operating systems, routers, and network devices are built to support TCP/IP protocols. When you configure an IP address, a default gateway, or a DNS server on your computer, you are directly working with the TCP/IP model.

TCP/IP also defines how devices should behave when they:

  • Forward packets across networks.
  • Handle congestion.
  • Fragment and reassemble packets.
  • Recover from errors.

Many of these behaviors are documented in technical documents called RFCs, which are the formal specifications for internet protocols. The TCP/IP model gives a layered framework in which these RFC defined protocols fit together.

Variations of the Model

Different textbooks and vendors sometimes draw the TCP/IP model with slight differences. The most common variations are:

  • 4 layer model, which you will use in this course.
  • 5 layer model, which explicitly shows a Physical layer below the Data Link part of Network Access.
  • Some diagrams use different names such as Link layer instead of Network Access, or Internet Protocol layer instead of Internet layer.

The important thing is not the label but the idea of grouping protocols by function:

  • Local network access and framing at the bottom.
  • Logical addressing and routing above that.
  • Reliable or unreliable end to end delivery above that.
  • Application services at the top.

Whenever you see a picture of TCP/IP with slightly different names or an extra split at the bottom, look at the functions that are included rather than focusing only on the number of layers.

How TCP/IP and OSI Work Together Conceptually

Although TCP/IP and OSI are two different models, networking professionals often use both ideas at the same time. They might say that an issue is at the "Layer 3" level according to OSI, but they will be troubleshooting an IP problem in the Internet layer of TCP/IP.

In practice:

  • The OSI model is used as a teaching and troubleshooting language.
  • The TCP/IP model represents how protocols and software are actually structured and implemented.

Later chapters will compare the two models explicitly, and map specific protocols to layers. For now, it is enough to understand that TCP/IP is the practical standard that drives the internet, and that its four layer structure is the backbone of modern networking.

Views: 0

Comments

Please login to add a comment.

Don't have an account? Register now!

Where to Move

Move chapter:

  • ☰ 1. Introduction to Networking
    • ☰ 1.1. What is a Computer Network?
      • ☰ 1.2. Why Networks Matter
        • ☰ 1.3. Types of Networks
          • ☰ 1.3.1. PAN
            • ☰ 1.3.2. LAN
              • ☰ 1.3.3. MAN
                • ☰ 1.3.4. WAN
                • ☰ 1.4. Network Topologies
                  • ☰ 1.4.1. Bus
                    • ☰ 1.4.2. Star
                      • ☰ 1.4.3. Ring
                        • ☰ 1.4.4. Mesh
                        • ☰ 1.5. Network Components
                          • ☰ 1.5.1. Hosts
                            • ☰ 1.5.2. Clients / Servers
                              • ☰ 1.5.3. NICs
                                • ☰ 1.5.4. Switches
                                  • ☰ 1.5.5. Routers
                                    • ☰ 1.5.6. Modems
                                    • ☰ 1.6. Bandwidth, Latency, Throughput
                                    • ☰ 2. Binary and Networking Fundamentals
                                      • ☰ 2.1. Binary Numbers
                                        • ☰ 2.2. Bits vs Bytes
                                          • ☰ 2.3. Decimal ↔ Binary Conversion
                                            • ☰ 2.4. Hexadecimal Basics
                                              • ☰ 2.5. Data Units (Kbps, Mbps, Gbps)
                                                • ☰ 2.6. Encapsulation
                                                • ☰ 3. OSI Model
                                                  • ☰ 3.1. Why Layering?
                                                    • ☰ 3.2. Overview of 7 Layers
                                                      • ☰ 3.3. Physical Layer
                                                        • ☰ 3.4. Data Link Layer
                                                          • ☰ 3.5. Network Layer
                                                            • ☰ 3.6. Transport Layer
                                                              • ☰ 3.7. Session Layer
                                                                • ☰ 3.8. Presentation Layer
                                                                  • ☰ 3.9. Application Layer
                                                                    • ☰ 3.10. Encapsulation & Decapsulation
                                                                      • ☰ 3.11. Packet Journey
                                                                      • ☰ 4. TCP/IP Model
                                                                        • ☰ 4.1. TCP/IP vs OSI
                                                                          • ☰ 4.2. Internet Layer
                                                                            • ☰ 4.3. Transport Layer
                                                                              • ☰ 4.3.1. Ports & Sockets
                                                                                • ☰ 4.3.2. TCP Overview
                                                                                  • ☰ 4.3.3. Three-Way Handshake
                                                                                    • ☰ 4.3.4. Reliable Transmission
                                                                                      • ☰ 4.3.5. Flow Control
                                                                                        • ☰ 4.3.6. Congestion Control
                                                                                          • ☰ 4.3.7. UDP
                                                                                            • ☰ 4.3.8. TCP vs UDP
                                                                                            • ☰ 4.4. Application Layer
                                                                                              • ☰ 4.5. Packet Flow
                                                                                              • ☰ 5. Physical Layer & Transmission Media
                                                                                                • ☰ 5.1. Electrical Signals
                                                                                                  • ☰ 5.2. Copper Cables
                                                                                                    • ☰ 5.2.1. Twisted Pair
                                                                                                      • ☰ 5.2.2. Coaxial
                                                                                                      • ☰ 5.3. Fiber Optics
                                                                                                        • ☰ 5.4. Wireless Transmission
                                                                                                          • ☰ 5.5. Duplex Modes
                                                                                                            • ☰ 5.6. Signal Loss
                                                                                                              • ☰ 5.7. Error Detection
                                                                                                              • ☰ 6. Ethernet and Switching
                                                                                                                • ☰ 6.1. Ethernet Basics
                                                                                                                  • ☰ 6.2. MAC Addresses
                                                                                                                    • ☰ 6.3. Ethernet Frames
                                                                                                                      • ☰ 6.4. Collision Domains
                                                                                                                        • ☰ 6.5. Broadcast Domains
                                                                                                                          • ☰ 6.6. Hubs vs Switches
                                                                                                                            • ☰ 6.7. MAC Learning
                                                                                                                              • ☰ 6.8. VLANs
                                                                                                                                • ☰ 6.9. Trunking (802.1Q)
                                                                                                                                  • ☰ 6.10. Spanning Tree Protocol
                                                                                                                                  • ☰ 7. IP Addressing
                                                                                                                                    • ☰ 7.1. IPv4 Fundamentals
                                                                                                                                      • ☰ 7.2. Public vs Private IP
                                                                                                                                        • ☰ 7.3. Classful Addressing
                                                                                                                                          • ☰ 7.4. Subnet Masks
                                                                                                                                            • ☰ 7.5. CIDR
                                                                                                                                              • ☰ 7.6. Subnetting
                                                                                                                                                • ☰ 7.7. VLSM
                                                                                                                                                  • ☰ 7.8. Supernetting
                                                                                                                                                    • ☰ 7.9. IP Planning
                                                                                                                                                    • ☰ 8. IPv6
                                                                                                                                                      • ☰ 8.1. Why IPv6?
                                                                                                                                                        • ☰ 8.2. IPv6 Address Format
                                                                                                                                                          • ☰ 8.3. Address Types
                                                                                                                                                            • ☰ 8.4. IPv6 Header
                                                                                                                                                              • ☰ 8.5. SLAAC
                                                                                                                                                                • ☰ 8.6. Neighbor Discovery
                                                                                                                                                                  • ☰ 8.7. IPv4 vs IPv6
                                                                                                                                                                  • ☰ 9. Routing Fundamentals
                                                                                                                                                                    • ☰ 9.1. What is Routing?
                                                                                                                                                                      • ☰ 9.2. Static Routing
                                                                                                                                                                        • ☰ 9.3. Dynamic Routing
                                                                                                                                                                          • ☰ 9.4. Routing Tables
                                                                                                                                                                            • ☰ 9.5. Administrative Distance
                                                                                                                                                                              • ☰ 9.6. Metrics
                                                                                                                                                                                • ☰ 9.7. Default Routes
                                                                                                                                                                                  • ☰ 9.8. Route Summarization
                                                                                                                                                                                  • ☰ 10. Routing Protocols
                                                                                                                                                                                    • ☰ 10.1. Distance Vector Routing
                                                                                                                                                                                      • ☰ 10.2. Link State Routing
                                                                                                                                                                                        • ☰ 10.3. RIP
                                                                                                                                                                                          • ☰ 10.4. OSPF
                                                                                                                                                                                            • ☰ 10.5. EIGRP
                                                                                                                                                                                              • ☰ 10.6. BGP
                                                                                                                                                                                                • ☰ 10.7. Path Selection
                                                                                                                                                                                                  • ☰ 10.8. Convergence
                                                                                                                                                                                                  • ☰ 11. ARP, ICMP, and Core Protocols
                                                                                                                                                                                                    • ☰ 11.1. ARP
                                                                                                                                                                                                      • ☰ 11.2. Gratuitous ARP
                                                                                                                                                                                                        • ☰ 11.3. ICMP
                                                                                                                                                                                                          • ☰ 11.4. Ping
                                                                                                                                                                                                            • ☰ 11.5. Traceroute
                                                                                                                                                                                                              • ☰ 11.6. MTU & Fragmentation
                                                                                                                                                                                                              • ☰ 12. DNS and Name Resolution
                                                                                                                                                                                                                • ☰ 12.1. Why DNS?
                                                                                                                                                                                                                  • ☰ 12.2. Domain Hierarchy
                                                                                                                                                                                                                    • ☰ 12.3. Recursive Queries
                                                                                                                                                                                                                      • ☰ 12.4. DNS Record Types
                                                                                                                                                                                                                        • ☰ 12.4.1. A
                                                                                                                                                                                                                          • ☰ 12.4.2. AAAA
                                                                                                                                                                                                                            • ☰ 12.4.3. CNAME
                                                                                                                                                                                                                              • ☰ 12.4.4. MX
                                                                                                                                                                                                                                • ☰ 12.4.5. TXT
                                                                                                                                                                                                                                • ☰ 12.5. DNS Caching
                                                                                                                                                                                                                                  • ☰ 12.6. DNS Security
                                                                                                                                                                                                                                  • ☰ 13. Application Layer Protocols
                                                                                                                                                                                                                                    • ☰ 13.1. HTTP / HTTPS
                                                                                                                                                                                                                                      • ☰ 13.2. FTP / SFTP
                                                                                                                                                                                                                                        • ☰ 13.3. SMTP
                                                                                                                                                                                                                                          • ☰ 13.4. POP3
                                                                                                                                                                                                                                            • ☰ 13.5. IMAP
                                                                                                                                                                                                                                              • ☰ 13.6. SSH
                                                                                                                                                                                                                                                • ☰ 13.7. Telnet
                                                                                                                                                                                                                                                  • ☰ 13.8. DHCP
                                                                                                                                                                                                                                                    • ☰ 13.9. SNMP
                                                                                                                                                                                                                                                      • ☰ 13.10. NTP
                                                                                                                                                                                                                                                      • ☰ 14. Wireless Networking
                                                                                                                                                                                                                                                        • ☰ 14.1. Radio Fundamentals
                                                                                                                                                                                                                                                          • ☰ 14.2. Wi-Fi Standards
                                                                                                                                                                                                                                                            • ☰ 14.3. Frequency Bands
                                                                                                                                                                                                                                                              • ☰ 14.4. Channels
                                                                                                                                                                                                                                                                • ☰ 14.5. Roaming
                                                                                                                                                                                                                                                                  • ☰ 14.6. Interference
                                                                                                                                                                                                                                                                    • ☰ 14.7. WPA2 / WPA3
                                                                                                                                                                                                                                                                      • ☰ 14.8. Enterprise Wi-Fi
                                                                                                                                                                                                                                                                      • ☰ 15. NAT and Internet Connectivity
                                                                                                                                                                                                                                                                        • ☰ 15.1. NAT Basics
                                                                                                                                                                                                                                                                          • ☰ 15.2. PAT
                                                                                                                                                                                                                                                                            • ☰ 15.3. Port Forwarding
                                                                                                                                                                                                                                                                              • ☰ 15.4. ISP Concepts
                                                                                                                                                                                                                                                                                • ☰ 15.5. CGNAT
                                                                                                                                                                                                                                                                                  • ☰ 15.6. Internet Routing
                                                                                                                                                                                                                                                                                  • ☰ 16. Network Security Fundamentals
                                                                                                                                                                                                                                                                                    • ☰ 16.1. CIA Triad
                                                                                                                                                                                                                                                                                      • ☰ 16.2. Firewalls
                                                                                                                                                                                                                                                                                        • ☰ 16.3. ACLs
                                                                                                                                                                                                                                                                                          • ☰ 16.4. VPN
                                                                                                                                                                                                                                                                                            • ☰ 16.5. IDS / IPS
                                                                                                                                                                                                                                                                                              • ☰ 16.6. Zero Trust
                                                                                                                                                                                                                                                                                                • ☰ 16.7. DDoS
                                                                                                                                                                                                                                                                                                  • ☰ 16.8. Malware in Networks
                                                                                                                                                                                                                                                                                                    • ☰ 16.9. Security Hardening
                                                                                                                                                                                                                                                                                                    • ☰ 17. Network Services
                                                                                                                                                                                                                                                                                                      • ☰ 17.1. Load Balancing
                                                                                                                                                                                                                                                                                                        • ☰ 17.2. Reverse Proxy
                                                                                                                                                                                                                                                                                                          • ☰ 17.3. Web Hosting
                                                                                                                                                                                                                                                                                                            • ☰ 17.4. CDN
                                                                                                                                                                                                                                                                                                              • ☰ 17.5. DNS Hosting
                                                                                                                                                                                                                                                                                                              • ☰ 18. Monitoring and Troubleshooting
                                                                                                                                                                                                                                                                                                                • ☰ 18.1. Troubleshooting Methodology
                                                                                                                                                                                                                                                                                                                  • ☰ 18.2. Layer-by-Layer Debugging
                                                                                                                                                                                                                                                                                                                    • ☰ 18.3. Ping / Traceroute
                                                                                                                                                                                                                                                                                                                      • ☰ 18.4. Netstat
                                                                                                                                                                                                                                                                                                                        • ☰ 18.5. Tcpdump
                                                                                                                                                                                                                                                                                                                          • ☰ 18.6. Wireshark
                                                                                                                                                                                                                                                                                                                            • ☰ 18.7. Logs
                                                                                                                                                                                                                                                                                                                              • ☰ 18.8. Packet Analysis
                                                                                                                                                                                                                                                                                                                              • ☰ 19. Virtualization and Cloud Networking
                                                                                                                                                                                                                                                                                                                                • ☰ 19.1. Virtual Switches
                                                                                                                                                                                                                                                                                                                                  • ☰ 19.2. Hypervisors
                                                                                                                                                                                                                                                                                                                                    • ☰ 19.3. SDN
                                                                                                                                                                                                                                                                                                                                      • ☰ 19.4. Overlay Networks
                                                                                                                                                                                                                                                                                                                                        • ☰ 19.5. Containers & Networking
                                                                                                                                                                                                                                                                                                                                          • ☰ 19.6. Kubernetes Networking
                                                                                                                                                                                                                                                                                                                                            • ☰ 19.7. Cloud VPCs
                                                                                                                                                                                                                                                                                                                                            • ☰ 20. Advanced Enterprise Networking
                                                                                                                                                                                                                                                                                                                                              • ☰ 20.1. MPLS
                                                                                                                                                                                                                                                                                                                                                • ☰ 20.2. VXLAN
                                                                                                                                                                                                                                                                                                                                                  • ☰ 20.3. EVPN
                                                                                                                                                                                                                                                                                                                                                    • ☰ 20.4. SD-WAN
                                                                                                                                                                                                                                                                                                                                                      • ☰ 20.5. QoS
                                                                                                                                                                                                                                                                                                                                                        • ☰ 20.6. Traffic Engineering
                                                                                                                                                                                                                                                                                                                                                        • ☰ 21. Automation & Infrastructure as Code
                                                                                                                                                                                                                                                                                                                                                          • ☰ 21.1. Why Automation?
                                                                                                                                                                                                                                                                                                                                                            • ☰ 21.2. APIs
                                                                                                                                                                                                                                                                                                                                                              • ☰ 21.3. REST
                                                                                                                                                                                                                                                                                                                                                                • ☰ 21.4. Python for Networking
                                                                                                                                                                                                                                                                                                                                                                  • ☰ 21.5. Netmiko
                                                                                                                                                                                                                                                                                                                                                                    • ☰ 21.6. Ansible
                                                                                                                                                                                                                                                                                                                                                                      • ☰ 21.7. Terraform
                                                                                                                                                                                                                                                                                                                                                                        • ☰ 21.8. Configuration Management
                                                                                                                                                                                                                                                                                                                                                                        • ☰ 22. Network Design
                                                                                                                                                                                                                                                                                                                                                                          • ☰ 22.1. Small Office Design
                                                                                                                                                                                                                                                                                                                                                                            • ☰ 22.2. Enterprise Design
                                                                                                                                                                                                                                                                                                                                                                              • ☰ 22.3. Data Center Networks
                                                                                                                                                                                                                                                                                                                                                                                • ☰ 22.4. Redundancy
                                                                                                                                                                                                                                                                                                                                                                                  • ☰ 22.5. High Availability
                                                                                                                                                                                                                                                                                                                                                                                    • ☰ 22.6. Capacity Planning
                                                                                                                                                                                                                                                                                                                                                                                    • ☰ 23. Specialized Topics
                                                                                                                                                                                                                                                                                                                                                                                      • ☰ 23.1. IoT Networking
                                                                                                                                                                                                                                                                                                                                                                                        • ☰ 23.2. Industrial Networks
                                                                                                                                                                                                                                                                                                                                                                                          • ☰ 23.3. 5G Basics
                                                                                                                                                                                                                                                                                                                                                                                            • ☰ 23.4. Satellite Networks
                                                                                                                                                                                                                                                                                                                                                                                              • ☰ 23.5. HPC Networking (InfiniBand, RDMA)
                                                                                                                                                                                                                                                                                                                                                                                                • ☰ 23.6. Edge Computing
                                                                                                                                                                                                                                                                                                                                                                                                • ☰ 24. Capstone Projects
                                                                                                                                                                                                                                                                                                                                                                                                  • ☰ 24.1. Home Lab Project
                                                                                                                                                                                                                                                                                                                                                                                                    • ☰ 24.2. Enterprise Network Design
                                                                                                                                                                                                                                                                                                                                                                                                      • ☰ 24.3. Secure Multi-Site Network
                                                                                                                                                                                                                                                                                                                                                                                                        • ☰ 24.4. Packet Analysis Project
                                                                                                                                                                                                                                                                                                                                                                                                          • ☰ 24.5. Cloud Networking Project
                                                                                                                                                                                                                                                                                                                                                                                                          • ☰ 25. Bonus Content
                                                                                                                                                                                                                                                                                                                                                                                                            • ☰ 25.1. Certification Prep (CCNA / CCNP)
                                                                                                                                                                                                                                                                                                                                                                                                              • ☰ 25.2. Interview Questions
                                                                                                                                                                                                                                                                                                                                                                                                                • ☰ 25.3. Hands-on Labs
                                                                                                                                                                                                                                                                                                                                                                                                                  • ☰ 25.4. Real-World Case Studies
                                                                                                                                                                                                                                                                                                                                                                                                                    • ☰ 25.5. Final Exam