Business Data Communication and NetworkingUnit 78 min read
Application Layer Services: Protocols, Models & Real-World Use
Unit 7 of Business Data Communication and Networking explores the application layer—the topmost layer of the OSI/TCP/IP stack—covering protocols (HTTP/HTTPS, FTP, SMTP, DNS, DHCP), client-server models, APIs, and real-world implementations in e-commerce, banking, and cloud services. Learn how these services enable user
Key Concepts & Protocols
The application layer is where end-user services (e.g., web browsing, email, file transfer) interact with the network. It relies on lower-layer protocols (TCP/IP) but defines how applications communicate.
1. Client-Server Model
Most application-layer services use a client-server architecture, where:
- Client: Initiates requests (e.g., web browser, email client).
- Server: Responds to requests (e.g., web server, mail server).
flowchart TD
A["Client (e.g., Browser)"] -->|"Request"| B["Application Layer Protocol (HTTP)"]
B -->|"Data"| C["Transport Layer (TCP/UDP)"]
C -->|"Packets"| D["Network Layer (IP)"]
D -->|"Packets"| E["Data Link Layer"]
E -->|"Frames"| F["Physical Layer"]
F -->|"Signal"| G["Server"]
G -->|"Response"| F
F -->|"Frames"| E
E -->|"Packets"| D
D -->|"Packets"| C
C -->|"Data"| B
B -->|"Response"| AReal-World Example:
- eSewa (Nepal’s digital payment platform) uses HTTPS (HTTP + SSL/TLS) for secure transactions between your phone (client) and eSewa’s servers.
2. Major Application-Layer Protocols
| Protocol | Port | Function | Example Use Case | Security |
|---|---|---|---|---|
| HTTP/HTTPS | 80/443 | Web data transfer (text, images, etc.) | Google, Daraz, Facebook | HTTPS (encrypted) |
| FTP | 20/21 | File transfer (upload/download) | Downloading software, cloud backups | Often unencrypted |
| SMTP | 25 | Sending emails | Gmail, Hotmail | TLS/SSL supported |
| POP3/IMAP | 110/143 | Receiving emails | Email clients (Thunderbird, Outlook) | Encrypted options |
| DNS | 53 | Domain name resolution (IP lookup) | Accessing daraz.com.np → IP address |
No encryption (DNSSEC) |
| DHCP | 67/68 | Dynamic IP assignment | Home Wi-Fi, office networks | No encryption |
| SNMP | 161 | Network device management | ISPs monitoring routers/switches | Community strings |
Worked Example: How You Access Daraz
- You type
daraz.com.np→ DNS resolves it to an IP (e.g.,104.24.123.45). - Your browser sends an HTTP GET request to Daraz’s server (port 80/443).
- Daraz’s server responds with HTML/CSS/JS → your browser renders the page.
3. HTTP vs. HTTPS
| Feature | HTTP | HTTPS |
|---|---|---|
| Security | No encryption (plaintext) | Encrypted (SSL/TLS) |
| Port | 80 | 443 |
| Use Case | Internal networks (e.g., intranet) | E-commerce, banking (eSewa, Nabil Bank) |
| Performance | Faster (no encryption overhead) | Slightly slower (but negligible) |
| Trust | Vulnerable to MITM attacks | Secure (verified via certificates) |
Real-World Example:
- Nabil Bank’s online banking uses HTTPS to encrypt your login credentials and transaction data.
- WhatsApp Web uses HTTPS to ensure messages aren’t intercepted.
4. File Transfer: FTP vs. SFTP/FTPS
| Protocol | Security | Port | Use Case |
|---|---|---|---|
| FTP | No encryption | 20/21 | Legacy file transfers (risky) |
| SFTP | SSH encryption | 22 | Secure file transfer (banks, govt.) |
| FTPS | SSL/TLS | 990 | Secure alternative to FTP |
Worked Example: Uploading Files to a Cloud Server
- Unsafe: Using plain FTP → passwords/credentials can be stolen.
- Safe: Using SFTP (via FileZilla) → encrypted tunnel over SSH.
5. Email Protocols: SMTP, POP3, IMAP
sequenceDiagram
participant Client as Email Client (e.g., Gmail)
participant SMTP as SMTP Server (Port 25)
participant IMAP as IMAP Server (Port 143)
participant User as Recipient
Client->>SMTP: Sends email (SMTP)
SMTP->>User: Delivers email
User->>IMAP: Checks mailbox (IMAP/POP3)
IMAP-->>Client: Syncs emailsReal-World Example:
- When you send an email via Gmail, it uses SMTP (port 25) to reach the recipient’s server.
- When you check your email, IMAP (port 143) syncs new messages to your device.
6. DNS: The "Phonebook" of the Internet
DNS translates human-readable domain names (e.g., esewa.com.np) into IP addresses (e.g., 103.24.56.78).
flowchart TD
A["You type: esewa.com.np"] --> B["DNS Query"]
B --> C["Root DNS Server"]
C --> D["Top-Level Domain (TLD) Server (.np)"]
D --> E["Authoritative DNS Server (eSewa)"]
E --> F["Returns IP: 103.24.56.78"]
F --> G["Your browser connects to eSewa"]Real-World Example:
- When you visit Nepal Stock Exchange (NEPSE), DNS resolves
nepalstock.com.npto its server IP. - ISP-level DNS caching speeds up repeated requests (e.g., NTC’s DNS servers).
7. DHCP: Automatic IP Assignment
DHCP (Dynamic Host Configuration Protocol) assigns IP addresses, subnet masks, and gateways automatically to devices on a network.
sequenceDiagram
participant Client as Device (e.g., Laptop)
participant DHCP as DHCP Server
Client->>DHCP: DHCPDISCOVER (Broadcast)
DHCP-->>Client: DHCPOFFER (IP offer)
Client->>DHCP: DHCPREQUEST (Accept offer)
DHCP-->>Client: DHCPACK (Confirm IP)Worked Example: Home Wi-Fi Setup
- When you connect a new phone to your Ncell Wi-Fi, DHCP assigns it an IP like
192.168.1.100. - Without DHCP, you’d manually configure each device (tedious in offices/hotels).
8. APIs: Enabling Software Communication
An API (Application Programming Interface) allows different software to interact (e.g., WhatsApp API for businesses, Daraz API for order tracking).
flowchart TD
A["Your App"] -->|"API Request"| B["Third-Party Service (e.g., Daraz API)"]
B -->|"JSON/XML Response"| AReal-World Examples:
- Pathao’s API: Restaurants use it to integrate delivery options.
- Khalti API: E-commerce sites embed Khalti for payments.
- Google Maps API: Used by ride-hailing apps (Pathao, Uber) for location services.
In the Real World
eSewa & Khalti (Digital Payments)
- Use HTTPS for secure transactions.
- APIs allow merchants (e.g., Daraz sellers) to accept payments without building their own payment system.
Nabil Bank & Global IME (Online Banking)
- HTTPS encrypts login credentials and transaction data.
- SMTP sends email alerts (e.g., "Your loan payment is due").
Daraz & Amazon (E-Commerce)
- HTTP/HTTPS serves product pages.
- DNS routes users to the nearest server for faster loading.
- APIs enable order tracking, inventory updates, and third-party seller integrations.
NTC & Ncell (ISP Services)
- DHCP assigns IPs to home users.
- DNS resolves domains like
ntc.net.np. - SNMP monitors network devices for outages.
WhatsApp & Facebook Messenger
- Use HTTPS for end-to-end encrypted chats.
- APIs allow businesses to send automated messages (e.g., flight updates by Yeti Airlines).
Exam Tip
- Protocol Matching: Memorize port numbers (HTTP:80, HTTPS:443, FTP:21, SMTP:25, DNS:53).
- Client-Server vs. P2P: Know that most application-layer services (HTTP, SMTP) are client-server, while BitTorrent is P2P.
- Security Focus: Always prefer HTTPS over HTTP, SFTP over FTP, and IMAP over POP3 for security.
- DNS & DHCP: Understand the process flow (e.g., DNS resolution steps, DHCP handshake).
- APIs: Recognize that modern apps (Khalti, Daraz) rely on APIs for functionality.
- Real-World Scenarios: Expect questions like:
- "How does eSewa ensure secure transactions?" → HTTPS + SSL/TLS.
- "Why is POP3 less preferred than IMAP?" → IMAP syncs emails; POP3 downloads and deletes.
- "What protocol assigns IPs in a college network?" → DHCP.
Key Takeaway: The application layer is where businesses and users interact with networks. Mastering HTTP/HTTPS, DNS, DHCP, and APIs will help you understand how e-commerce, banking, and cloud services work under the hood. Always think: "Which protocol enables this real-world service?"
Based on the TU BIM syllabus for Business Data Communication and Networking (IT240), unit 7.
Discussion
Loading…