TCP/IP model
Introduction
TCP/IP (Transmission Control Protocol / Internet Protocol) is the foundational model for communication across computer networks, including the Internet.
It is a practical model widely used in real-world networking, whereas the OSI model is more theoretical and detailed, often used for teaching.
Key Networking Concepts
What is a Network?
Definition: The movement of data from one computer to another.
In business communication: movement of information from one application on a computer to another application on a different computer using electrical or optical transmission systems, i.e., networks.
Circuit Switching
Dedicated path between two stations.
Phases: Establish → Transfer → Disconnect.
Requirements: Switching capacity, channel capacity, and routing intelligence.
Issues:
Inefficient: channel is tied up even if no data is being sent.
Vulnerable: a single failure (power outage, cut cable) can stop communication.
Designed for voice traffic, less efficient for data traffic.
Setup takes time.
Packet Switching
Breaks data into packets (small segments) for transmission.
Each packet = data + overhead (addressing, order info, error-checking).
Benefits:
More efficient use of resources.
Can reroute if part of the network fails (originally designed for military resilience).
Enables modern Internet and data communication.
Challenges:
Complexity of segmentation, addressing, reassembly, and error detection.
Requires protocols for ensuring correct delivery (e.g., TCP).
Troubleshooting with TCP/IP
Example: Mom cannot connect to Facebook.
Key questions (mapped to layers):
Which layer sends the electrical signals? → Physical Layer.
Which layer connects her computer to the Wi-Fi router? → Data Link Layer.
Which layer ensures connection between her computer and Facebook’s servers? → Network Layer.
Which layer ensures the page is delivered in full, without missing data? → Transport Layer.
Which layer requests/responds with the Facebook HTML page? → Application Layer.
Useful Commands
ifconfig
(Mac/Linux) /ipconfig
(Windows) → check IP and MAC addresses.ping 8.8.8.8
→ test connectivity to Google’s public DNS.nslookup www.facebook.com
→ check DNS resolution.ping www.facebook.com
→ test connectivity to specific website.
The TCP/IP Model (5 Layers)
Layer 1: Physical Layer
Deals with hardware and signals (cables, fiber optics, Wi-Fi radio signals).
Converts data into electrical, optical, or radio signals for transmission.
Example: Technician checking cables and fiber optic lines.
Layer 2: Data Link Layer
Responsible for direct connection between devices (e.g., laptop ↔ router).
Uses MAC addresses for identification.
Ensures error detection on a local link.
Layer 3: Network Layer
Handles logical addressing (IP addresses) and routing.
Ensures packets reach the correct destination across networks.
Example: Routing an email across multiple networks to a friend in another country.
Layer 4: Transport Layer
Provides end-to-end communication and reliability.
Ensures data arrives in order, without errors or missing pieces.
Protocols: TCP (reliable, ordered) and UDP (fast, no guarantee).
Example: Downloading a large file without corruption.
Layer 5: Application Layer
Closest to the user: provides services such as HTTP (web), SMTP (email), FTP (file transfer).
Handles requests and responses (e.g., Facebook HTML page).
Circuit vs. Packet Switching Summary
Circuit Switching:
Simple, dedicated path, predictable.
Inefficient for modern data traffic.
Packet Switching:
Efficient, fault-tolerant, basis of the Internet.
More complex but supports diverse traffic types (voice, video, data).
Key Functions in Networking
User needs: Get web pages, download files, send messages.
Segmentation and reassembly: Breaking data into packets, then reassembling them.
Identifying destination: IP/MAC addresses for locating devices.
Error control: Ensure correct and complete data transfer.
Signaling: Converting data into transmittable signals (0s and 1s).