Data Communication and Networking

Application Layer Protocols; DNS — Domain Name System; DHCP — Dynamic Host Configuration Protocol

C-CAT

Application Layer Protocols

TELNET

TELNET: A network protocol that allows a user on one computer to log into another computer that is part of the same network.

  • Establishes connection from one computer to another
  • Login into a remote computer using a telnet program
  • Insecure — data transmitted in plaintext
  • Port: 23
telnet 192.168.1.5   # Connect to remote host

Replacement: SSH (Secure Shell) — encrypts the connection

FTP — File Transfer Protocol

FTP: An Internet tool provided by TCP/IP for transferring files between computers.

  • Helps transfer files from one computer to another
  • Provides access to directories/folders on remote computers
  • Allows software, data, text files to be transferred
  • Ports: 20 (data), 21 (control)

Active vs Passive FTP:

  • Active FTP: Server initiates data connection to client

Passive FTP: Client initiates data connection (works better with firewalls)

Secure alternative: SFTP (SSH File Transfer Protocol) on port 22

URL — Uniform Resource Locator

URL: A web address — reference to a web resource specifying its location on a computer network and a mechanism for retrieving it.

https://www.example.com:443/path/page.html?query=value#anchor
|──────| |──────────────| |───| |──────────| |─────────| |──────|
Scheme      Domain        Port    Path         Query      Fragment

URL Components:

ComponentDescriptionExample
SchemeProtocolhttp, https, ftp
DomainServer namewww.google.com
PortPort number80, 443
PathResource location/search/results
QueryAdditional parameters?q=hello
FragmentAnchor within page#section1

DNS — Domain Name System

What is DNS?

DNS (Domain Name System) translates human-readable domain names to IP addresses.

Why needed?

  • Humans remember names (google.com) not IP addresses
  • IP addresses can change (DNS allows transparent redirect)

DNS Resolution Process

Browser asks: "What is the IP of www.google.com?"

Step 1: Check local DNS cache → not found
Step 2: Check /etc/hosts file → not found
Step 3: Query Recursive DNS Resolver (usually ISP's DNS)
Step 4: Resolver queries Root DNS Server (.) 
Step 5: Root refers to TLD Server (.com)
Step 6: TLD Server refers to Google's Authoritative DNS
Step 7: Authoritative DNS returns IP: 142.250.x.x
Step 8: Resolver returns IP to browser
Step 9: Browser connects to 142.250.x.x

DNS Record Types

RecordPurposeExample
AIPv4 addressexample.com → 192.0.2.1
AAAAIPv6 addressexample.com → 2001:db8::1
CNAMEAlias (canonical name)www.example.com → example.com
MXMail serverexample.com → mail.example.com
NSName serverexample.com → ns1.example.com
TXTText recordsSPF, DKIM, verification
PTRReverse DNS (IP to name)192.0.2.1 → example.com
SOAStart of authorityZone information

DNS Hierarchy

. (Root)
├── com
│   ├── google.com
│   │   ├── www.google.com
│   │   └── mail.google.com
│   └── microsoft.com
├── org
│   └── wikipedia.org
├── in
│   └── gov.in
└── edu
    └── mit.edu

DHCP — Dynamic Host Configuration Protocol

What is DHCP?

DHCP automatically assigns IP configuration to devices joining a network.

DORA Process:

D → DHCP Discover  (Client broadcasts: "Any DHCP server?")
O → DHCP Offer     (Server responds: "I offer you 192.168.1.100 for 8 hours")
R → DHCP Request   (Client: "I'll take 192.168.1.100")
A → DHCP Acknowledge (Server: "It's yours! Here's all config info")

DHCP provides:

  • IP address
  • Subnet mask
  • Default gateway
  • DNS server addresses

Lease time

Continue learning

Related notes

Put this topic into timed practice

Open mock tests when you want full-exam pacing, or keep drilling in practice mode.