DHCP (Dynamic Host Configuration Protocol)
Automatically assigns IP addresses and network configuration to devices when they connect.
DORA Process
| Step | Packet | Direction | Description |
|---|---|---|---|
| Discover | DHCP Discover | Client → Broadcast | ”Is there a DHCP server?” |
| Offer | DHCP Offer | Server → Client | ”Here’s IP 192.168.1.10 for you” |
| Request | DHCP Request | Client → Broadcast | ”I’ll take 192.168.1.10” |
| Acknowledge | DHCP ACK | Server → Client | ”Confirmed. Here’s your lease.” |
DHCP assigns: IP address, subnet mask, default gateway, DNS server(s). Leases have a TTL (typically hours to days) and can be renewed.
FTP (File Transfer Protocol)
Used for transferring files between client and server.
| Port | Purpose |
|---|---|
| 21 | Control — commands (ls, cd, get, put) |
| 20 | Data — the actual file transfer |
FTP has two modes: Active (server connects to client’s data port) and Passive (client connects to server’s data port — works through firewalls). FTP is unencrypted; use SFTP (SSH File Transfer Protocol) or FTPS (FTP over TLS) for security.
Telnet vs SSH
| Telnet (Port 23) | SSH (Port 22) | |
|---|---|---|
| Encryption | None (plain text) | Full encryption |
| Authentication | Password sent in clear | Key-based or password |
| Integrity | None | Message authentication |
| Use | Legacy, debugging | Production, administration |
Never use Telnet in production — everything including your password is visible on the wire. SSH provides encryption, integrity, and key-based authentication.
Telnet is still useful for debugging: telnet smtp.gmail.com 25 to manually test an SMTP connection.
Q: What is the DORA process in DHCP?
A: Discover (client broadcast: “is there a server?”), Offer (server: “here’s an IP”), Request (client: “I’ll take it”), Acknowledge (server: “confirmed”). After DORA, the client has a leased IP configuration.
Q: Why should you never use Telnet?
A: Telnet sends all data — including passwords — in plain text. Anyone on the network can capture it with a packet sniffer. Always use SSH for encrypted remote access.
Q: Why does FTP use two ports?
A: Port 21 is the control channel for commands (ls, cd, get, put). Port 20 is the data channel for the actual file transfer. Separating control and data allows you to browse directories while a file transfers.
Q: What is the difference between active and passive FTP?
A: In active mode, the server connects back to the client’s data port. In passive mode, the client connects to the server’s data port. Passive works through firewalls/NAT; active often doesn’t.
Premium Content
Unlock DHCP, FTP & Remote Access and all premium lessons with a subscription.
From ₹199.99/year — See plans