Learn TCP/IP with following methods
An Internet device or network is connected via TCP/IP, a set of communication protocols. Also, TCP/IP can be used for managing a private computer network (such as an intranet or extranet).
To see another IP address
http://whatismyip.com/tools/ip-address-lookup.asp
What is TCP/IP?
TCP/IP is the universal language of the internet. It stands for Transmission Control Protocol / Internet Protocol.
Whenever your browser loads a webpage, your email client sends a message, or a cloud server syncs data, TCP/IP is working behind the scenes. It defines exactly how electronic devices should connect to the internet and how data should be securely and reliably transmitted between them.
Your device’s IP address (e.g., 192.168.10.14 or a modern IPv6 address like 2001:0db8::1) and your domain name (e.g., google.com) are both fundamental components of the TCP/IP standard.
The 5 Layers of the TCP/IP Model
While the OSI model has 7 layers, the modern hybrid TCP/IP model is commonly taught in 5 layers to bridge theoretical networking with practical implementation:
1. Application Layer (Layer 5)
The highest level, enabling user-facing network services. It includes protocols that applications use to communicate.
- HTTP/HTTPS: Web browsing and secure data transfer.
- DNS: Resolves human-readable domain names to IP addresses.
- SMTP/IMAP/POP3: Email transmission and retrieval.
- FTP/SFTP: File transfers.
2. Transport Layer (Layer 4)
- Provides end-to-end communication between systems, ensuring data is delivered accurately and in the correct order.
- TCP (Transmission Control Protocol): Connection-oriented, reliable, and guarantees delivery (e.g., web browsing, email).
- UDP (User Datagram Protocol): Connectionless, faster, but does not guarantee delivery (e.g., video streaming, VoIP, DNS queries).
3. Internet Layer (Layer 3)
- Responsible for logical addressing and routing packets across multiple, disparate networks.
- IP (Internet Protocol): Handles addressing, fragmenting, and reassembling packets.
- ICMP: Used for diagnostics and error reporting (e.g., the ping command).
4. Link Layer (Layer 2)
- Manages communication between devices on the same local network segment.
- ARP (Address Resolution Protocol): Resolves IP addresses to physical MAC addresses.
- Ethernet / Wi-Fi (802.11): Framing data for local transmission.
5. Physical Layer (Layer 1)
- The lowest level, responsible for transmitting raw bits of data over a physical medium. This includes specifications for copper cables (Cat6), fiber optics, radio waves, and network interface cards (NICs).
TCP vs. IP: How They Work Together
Feature
|
Feature
|
TCP (Transmission Control Protocol)
|
IP (Internet Protocol)
|
|---|---|---|
|
Primary Role
|
Application-to-application communication
|
Computer-to-computer communication
|
|
Connection Type
|
Connection-oriented (requires a 3-way handshake)
|
Connectionless (no dedicated path)
|
|
Reliability
|
High (guarantees delivery, order, and error-checking)
|
Low (best-effort delivery, no guarantees)
|
|
Analogy
|
A registered mail service that requires a signature.
|
Dropping postcards in a mailbox; each finds its own route.
|
How they collaborate: TCP breaks application data into smaller segments and hands them to IP. IP wraps these segments in “packets” with source and destination addresses, routing them across the internet. When they arrive, TCP reassembles them in the correct order.
Essential TCP/IP Protocols Cheat Sheet
Web & Directory
- HTTP/HTTPS: Transfers web content. Modern HTTPS uses TLS 1.3 (the successor to SSL) to encrypt sensitive data like credit card transactions.
- DNS (Domain Name System): The “phonebook of the internet,” translating hackersonlineclub.com into an IP address.
Email Protocols
- SMTP (Simple Mail Transfer Protocol): Pushes outgoing emails from your client to a mail server, and between mail servers. (Note: SMTP only handles text; it relies on MIME to encode attachments like images into text).
- POP3 (Post Office Protocol): Downloads emails from the server to a local device, typically deleting them from the server afterward.
- IMAP (Internet Message Access Protocol): Syncs emails across multiple devices, leaving messages on the server. Ideal for modern multi-device users.
Network Management & Infrastructure
- DHCP (Dynamic Host Configuration Protocol): Automatically assigns IP addresses to devices joining a network.
- NTP (Network Time Protocol): Synchronizes clocks across networked computers (critical for security logging and encryption).
- SNMP (Simple Network Management Protocol): Monitors and manages network devices like routers and switches.
- LDAP (Lightweight Directory Access Protocol): Queries directory services for user authentication and email addresses.
Security Focus: IP Spoofing & Modern Mitigation
What is IP Spoofing?
IP spoofing is a cyberattack where an attacker creates IP packets with a forged (spoofed) source IP address. The goal is to conceal the attacker’s identity or impersonate a trusted system to bypass network authentication.
Why it Works:
Historically, many network services relied solely on IP address-based trust. Furthermore, because IP is connectionless, it does not inherently verify the source of a packet. Attackers also exploit weaknesses in TCP sequence number prediction to hijack sessions.
How to Prevent IP Spoofing?
- Ingress/Egress Filtering (BCP38): Configure edge routers to drop incoming packets with internal source IPs, and block outgoing packets with external source IPs.
- Disable IP-Based Authentication: Never rely solely on IP addresses for trust. Use strong cryptographic authentication (e.g., Mutual TLS, API keys, or Zero Trust Network Access).
- Implement SAVI (Source Address Validation Improvement): Modern network standards that validate source addresses at the access layer to prevent spoofed traffic from entering the network.
Frequently Asked Questions (FAQ)
1. What is the main difference between TCP and UDP?
TCP is connection-oriented and guarantees reliable, ordered delivery of data, making it ideal for web browsing and email. UDP is connectionless and faster but does not guarantee delivery, making it better for real-time applications like video streaming and online gaming.
2. Is SSL still used in TCP/IP?
SSL (Secure Sockets Layer) is deprecated and considered insecure. Modern TCP/IP communications use TLS (Transport Layer Security), specifically TLS 1.2 or 1.3, to encrypt data between clients and servers (visible as HTTPS in your browser).
3. How does DNS relate to TCP/IP?
DNS is an Application Layer protocol within the TCP/IP suite. It primarily uses UDP on port 53 for fast queries, but falls back to TCP on port 53 for larger responses (like DNSSEC records or zone transfers).