Menu

Earn Premium with Referrals

Invite your friends and earn Premium rewards through our referral program.

See how it works and start inviting friends.

DHCP, FTP & Remote Access
CN

DHCP, FTP & Remote Access

From automatic IP assignment to secure remote shells: Master the utility protocols of the Internet.

DHCP (Dynamic Host Configuration Protocol)

Automatically assigns IP addresses and network configuration to devices when they connect.

DORA Process

StepPacketDirectionDescription
DiscoverDHCP DiscoverClient → Broadcast”Is there a DHCP server?”
OfferDHCP OfferServer → Client”Here’s IP 192.168.1.10 for you”
RequestDHCP RequestClient → Broadcast”I’ll take 192.168.1.10”
AcknowledgeDHCP ACKServer → 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.

PortPurpose
21Control — commands (ls, cd, get, put)
20Data — 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)
EncryptionNone (plain text)Full encryption
AuthenticationPassword sent in clearKey-based or password
IntegrityNoneMessage authentication
UseLegacy, debuggingProduction, 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.

My Private Notes

Notes are auto-saved locally to this device.