Unit 5
Unit 5
1. Introduction to DNS
2. Purpose of DNS
Humans can remember domain names more easily than numeric IP addresses.
DNS provides an automatic lookup system, so users don’t need to memorize long IP
addresses.
It allows users to access resources using familiar URLs while the underlying
communication is conducted through IP addresses.
3. DNS Architecture
Example: www.example.com.
o TLD (Top-Level Domain): This is the last part of the domain name, like
.com, .org, or .edu.
o Second-Level Domain: This is the domain directly below the TLD, like
example in example.com.
o Subdomains: These are parts of the domain that precede the second-level
domain, such as www in www.example.com.
DNS Servers:
1. Root Name Servers: These are the top-level DNS servers that know where to
find the authoritative servers for each TLD (like .com, .org, etc.).
2. TLD Servers: These servers maintain information for all the domain names
within a specific top-level domain (e.g., .com TLD servers know all the
domains registered under .com).
3. Authoritative Name Servers: These servers contain the actual mapping of
domain names to IP addresses for specific domains (e.g., example.com has its
IP address mapped here).
4. Recursive Resolvers: These servers act as intermediaries that query other
DNS servers on behalf of the client, caching responses to improve efficiency.
When a user types a domain name into a web browser, the browser (or operating
system) queries the local DNS resolver.
If the resolver has the domain cached, it returns the IP address. If not, it performs a
recursive query:
1. It first contacts a root server.
2. The root server directs it to the TLD server (e.g., .com).
3. The TLD server points it to the authoritative server for the domain.
4. The authoritative server returns the IP address, which the resolver passes back
to the client, and the client can then communicate with the host using the IP
address.
5. DNS Records
DNS resolvers cache DNS responses to reduce the load on DNS servers and improve
performance.
TTL (Time to Live) is a value set in the DNS records that indicates how long the
cache should retain the information before it must be discarded and re-queried from
authoritative servers.
DNSSEC (DNS Security Extensions) is a set of protocols that add security to DNS
by enabling DNS responses to be authenticated.
DNS by itself is vulnerable to attacks like DNS spoofing or cache poisoning, where
false DNS responses are provided to mislead users to malicious websites.
DNSSEC uses digital signatures to ensure that DNS responses come from trusted
sources.
8. Types of DNS Queries
Recursive Query: A query where the DNS client expects the DNS server to respond
with either the requested IP address or an error (e.g., domain not found).
Iterative Query: A query where the DNS server may respond with the best answer it
can provide, such as a referral to another DNS server (not the final answer).
BIND (Berkeley Internet Name Domain): The most widely used DNS software on
the internet.
Unbound: A validating, recursive, caching DNS resolver.
Google DNS: A popular public DNS service offered by Google (8.8.8.8).
Cloudflare DNS: A secure and privacy-focused DNS service (1.1.1.1).
DNS is an integral part of how the internet functions. It allows users to interact with websites
and online services using human-readable domain names, while managing the complexities
of translating these names into the IP addresses that computers use to communicate.
Understanding DNS is key to managing and troubleshooting network operations, securing
domain-related services, and optimizing web performance.
1. Introduction to Email
Electronic Mail (Email) is one of the oldest and most widely used applications in
computer networks.
It allows users to send and receive messages over a network, primarily the Internet.
Email operates at the Application Layer of the OSI model, providing end-to-end
communication services directly to user applications.
2. Email Components
5. Email Security
9. Emerging Trends
Email Archiving: Solutions for storing and managing historical email data.
Integrated Communication Platforms: Combining email with other forms of
communication like chat and video conferencing.
Email is a foundational service in the Application Layer that enables communication between
users over the internet. Understanding its protocols, security measures, and system
components is essential for managing and troubleshooting email systems effectively.
Definition: The application layer is the topmost layer (Layer 7) of the OSI model, responsible
for providing network services directly to end-users and applications.
Function: It facilitates communication between software applications and lower layers of the
network. Protocols at this layer enable applications to interact over a network.
2. What is HTTP?
3. HTTP Basics
Client-Server Model: HTTP operates on a client-server model where the client (usually a web
browser) sends requests to the server, which then responds with the requested resources.
Stateless Protocol: HTTP is stateless, meaning each request from a client to a server is
independent, and the server does not retain any information about previous requests.
4. HTTP Methods
Request Line: Contains the HTTP method, resource URL, and HTTP version (e.g., GET
/index.html HTTP/1.1).
Headers: Provide metadata such as the content type, content length, and user-agent.
Body: Contains data sent with the request (optional for methods like GET).
6. HTTP Response Structure
Status Line: Contains the HTTP version, status code, and reason phrase (e.g., HTTP/1.1
200 OK).
Headers: Provide metadata such as content type and length, server information, etc.
Body: Contains the data sent back to the client (e.g., HTML content, images).
HTTP/1.0: Introduced in 1996, supports basic features with one request per connection.
HTTP/1.1: Introduced in 1999, supports persistent connections (multiple requests per
connection) and additional features like chunked transfer encoding.
HTTP/2: Introduced in 2015, provides improved performance with features like multiplexing
(multiple requests and responses over a single connection), header compression, and server
push.
9. Security Considerations
HTTPS: Secure version of HTTP, using SSL/TLS to encrypt data transferred between client and
server, ensuring confidentiality and integrity.
HTTP/3: Uses QUIC protocol over UDP, offering improvements in speed and security
compared to HTTP/2.
HTTP is crucial for web communication, defining how requests and responses are structured
and transmitted over the web. Its evolution from HTTP/1.0 to HTTP/3 highlights ongoing
efforts to improve performance, security, and efficiency.
Definition: The application layer is Layer 7 of the OSI model, responsible for network
services directly accessible by end-user applications.
Function: Provides a range of services to applications, enabling network communication and
data exchange.
Purpose: Facilitates the transfer of hypertext (web pages) between clients (web browsers)
and servers.
Characteristics: Stateless, text-based, uses TCP (Transmission Control Protocol) on port 80
by default.
Use Cases: Web browsing, accessing web applications.
Purpose: Secure version of HTTP, encrypting data using SSL/TLS to ensure confidentiality and
integrity.
Characteristics: Uses TCP on port 443, provides secure communication over the internet.
Use Cases: Secure web browsing, online transactions.
Purpose: Provides secure file transfer capabilities over SSH (Secure Shell).
Characteristics: Uses TCP on port 22, encrypts data for security.
Use Cases: Secure file transfers, accessing remote files.
Purpose: Sends email messages from clients to mail servers and between servers.
Characteristics: Uses TCP on port 25, supports basic email sending functions.
Use Cases: Email transmission, outbound email services.
Data Exchange: Protocols define how data is formatted, transmitted, and processed
between applications.
Service-Specific Functions: Each protocol provides specific functions tailored to its
application, such as secure communication (HTTPS), file transfer (FTP), or email handling
(SMTP).
Interoperability: Protocols ensure different applications and systems can communicate
effectively, despite potential differences in underlying technologies.
4. Protocol Evolution
Legacy to Modern Protocols: Many protocols have evolved or been supplemented with
more secure and efficient versions (e.g., HTTP to HTTPS, FTP to SFTP).
Integration and Compatibility: New protocols often maintain compatibility with older ones
while introducing improvements in security, performance, or functionality.
Application layer protocols are crucial for enabling various types of communication and
services over a network. Understanding these protocols is essential for designing, managing,
and troubleshooting networked applications.
1. Overview
1. Managed Devices
Definition: Network devices (such as routers, switches, servers, and printers) that are
monitored and managed using SNMP.
Characteristics: Equipped with SNMP agents that collect and report information.
2. SNMP Agents
Definition: Software components that reside on managed devices, responsible for gathering
and sending data to the SNMP manager.
Function: Collects and stores information about the device’s status, configuration, and
performance, and responds to queries from the SNMP manager.
3. SNMP Managers
Definition: Systems that interact with SNMP agents, querying and receiving information
from them.
Function: Collects data from SNMP agents, processes this data, and may perform
management tasks like configuring devices or generating alerts.
3. SNMP Operations
1. SNMP Messages
2. SNMP Versions
SNMPv1: The original version, providing basic functionality and security (community strings).
SNMPv2c: Introduced improvements in performance and added new features, but retained
similar security mechanisms as SNMPv1.
SNMPv3: Introduced significant security enhancements, including authentication,
encryption, and access control mechanisms.
UDP: SNMP primarily uses UDP (User Datagram Protocol) on port 161 for requests and
responses. For receiving traps, it uses port 162.
Community Strings: In SNMPv1 and SNMPv2c, community strings are used for basic
authentication and access control (e.g., "public" for read-only access, "private" for read-
write access).
1. Data Collection
Polling: The SNMP manager regularly polls SNMP agents to collect data on various
performance and status metrics.
Traps: SNMP agents can send asynchronous notifications (traps) to the manager when
specific events or thresholds are met.
2. Data Interpretation
MIB Representation: SNMP managers use the MIB to interpret the data collected from
agents. Each MIB object has a unique identifier (OID) that defines the type of information it
represents.
3. Configuration Management
Setting Parameters: SNMP can be used to configure devices by sending SET requests to
change settings or parameters.
5. Security Considerations
SNMPv1/v2c Security: Limited security based on community strings, which can be easily
intercepted or spoofed.
SNMPv3 Security: Enhanced security features, including:
o Authentication: Verifies the identity of SNMP managers and agents.
o Encryption: Ensures that SNMP messages are confidential and protected from
unauthorized access.
o Access Control: Restricts access to SNMP data based on user roles and permissions.
Network Monitoring: Provides real-time monitoring and alerting for network performance
and health.
Configuration Management: Facilitates remote configuration and management of network
devices.
Fault Detection: Helps in identifying and diagnosing network issues and failures.
SNMP is a critical protocol for managing and monitoring network devices. Its design allows
for efficient communication between network management systems and devices, providing
valuable insights and control over network operations.
1. Overview
Definition: File Transfer Protocol (FTP) is a standard network protocol used for transferring
files between a client and a server over a TCP/IP network.
Purpose: It provides a reliable method for uploading, downloading, and managing files
between a local and remote system.
Role in the Application Layer: FTP operates at the application layer (Layer 7) of the OSI
model, providing end-to-end communication for file transfers.
2. FTP Architecture
1. Client-Server Model
Client: The system that requests a file transfer. Users interact with an FTP client software
(e.g., FileZilla, WinSCP).
Server: The system that stores and provides files to clients upon request.
Control Channel (Port 21): Used for sending commands and receiving responses between
the client and server.
Data Channel (Port 20 or dynamic): Used for transferring files between the client and
server.
1. Active Mode
Client Role: The client opens a port and waits for the server to connect for data transfer.
Server Role: The server initiates the connection from its data port (usually port 20) to the
client’s designated port.
Challenges: Active mode can be problematic with firewalls, as the client needs to allow
incoming connections from the server.
Client Role: The client initiates both the control and data connections. The server provides a
port for the client to connect to for data transfer.
Server Role: The server opens a passive port for the data transfer and waits for the client to
connect.
Advantages: This mode is firewall-friendly since the client initiates all connections.
4. FTP Commands
Control Commands: The FTP control connection uses ASCII commands to manage
communication.
o USER: Identifies the user to the FTP server.
o PASS: Sends the password for user authentication.
o LIST: Lists the contents of a directory.
o RETR: Retrieves (downloads) a file from the server.
o STOR: Stores (uploads) a file to the server.
o CWD: Changes the working directory on the server.
o QUIT: Closes the connection between the client and server.
FTP servers reply with numerical response codes, often followed by a textual message.
1xx: Positive Preliminary Reply (e.g., "125 Data connection already open").
2xx: Positive Completion Reply (e.g., "200 Command OK", "226 Transfer complete").
3xx: Positive Intermediate Reply (e.g., "331 User name OK, need password").
4xx: Transient Negative Completion Reply (e.g., "421 Service not available").
5xx: Permanent Negative Completion Reply (e.g., "550 Requested action not taken - file
unavailable").
Plaintext Transmission: FTP transmits both control commands and data in plaintext, making
it vulnerable to packet sniffing and man-in-the-middle attacks.
No Built-In Encryption: User credentials (username and password) are sent unencrypted,
exposing them to potential eavesdropping.
FTPS (FTP Secure): FTP over SSL/TLS, which provides encryption for both the control and
data channels.
SFTP (SSH File Transfer Protocol): A completely different protocol that runs over the Secure
Shell (SSH) protocol to offer secure file transfer. It encrypts both commands and data.
1. Website Maintenance
Web administrators use FTP to upload and manage files on web servers. FTP clients allow for
easy file transfers between local machines and remote web servers.
2. File Sharing
FTP is commonly used to exchange files in environments where large data sets are regularly
transferred between systems.
3. Remote Backup
FTP is often used to back up data from one system to another, such as scheduling file
uploads to a remote backup server.
FTP facilitates file access and sharing among teams working remotely on a project, allowing
them to upload, download, and manage files in a shared server.
Active mode can cause problems with firewalls since the server attempts to connect back to
the client, which firewalls may block.
Passive mode helps resolve this issue as the client initiates all connections, making it easier
to pass through firewalls.
Passive mode is often preferred in networks using NAT because it avoids the complexities of
having the server connect back to the client.
FTP remains a foundational protocol for file transfers in various applications, from website
management to data sharing. However, due to its security vulnerabilities, secure alternatives
like FTPS and SFTP are becoming more widely adopted.
1. Overview
Definition: Simple Mail Transfer Protocol (SMTP) is an application layer protocol used for
sending, receiving, and relaying email messages between email servers and clients.
Purpose: SMTP ensures reliable and efficient email transmission across networks, primarily
for sending emails from a client to a mail server or between servers.
Role in the Application Layer: SMTP operates at Layer 7 (Application Layer) of the OSI
model, facilitating email services over the internet.
2. SMTP Architecture
1. Client-Server Model
Client (SMTP Sender): The system or application that sends the email, typically an email
client like Outlook or a web-based email application.
Server (SMTP Receiver): The mail server that receives the email from the sender and either
delivers it locally or forwards it to another mail server for further delivery.
2. SMTP Process
Mail User Agent (MUA): The client software (e.g., Thunderbird, Outlook) used by end-users
to send and receive emails.
Mail Transfer Agent (MTA): The server-side software responsible for transferring emails
between servers using SMTP.
3. SMTP Commands
SMTP uses a series of text-based commands for communication between the client and
server. Some of the key commands include:
HELO/EHLO: Initiates the communication between the client and server, where EHLO is an
extended version used in modern SMTP.
MAIL FROM: Specifies the sender’s email address.
RCPT TO: Specifies the recipient’s email address.
DATA: Indicates the start of the email content (body and header), followed by the actual
message.
QUIT: Terminates the SMTP session.
RSET: Resets the session, cancelling the current mail transaction.
SMTP servers respond to commands using numerical response codes to indicate the status of
the request:
2xx: Success (e.g., 250 OK, indicating that the requested action was successful).
3xx: Redirection (e.g., 354 Start mail input, indicating that the server is ready to
receive the message).
4xx: Temporary failure (e.g., 421 Service not available, indicating that the server is
temporarily unavailable).
5xx: Permanent failure (e.g., 550 Requested action not taken, indicating an issue
such as an invalid recipient).
Step 1: Email Client to Server: The client (MUA) sends the email to the SMTP server (MTA)
using SMTP commands over port 25 (standard) or 587 (secure transmission).
Step 2: Server to Server Communication: If the recipient is on a different domain, the
sender’s SMTP server forwards the email to the recipient's domain SMTP server using SMTP.
Step 3: Recipient's Mail Server: The recipient's SMTP server forwards the email to a Mail
Delivery Agent (MDA), which stores the email.
Step 4: Email Retrieval: The recipient retrieves the email from their mail server using
protocols like IMAP or POP3.
Port 25: The default port used by SMTP for email transmission between mail servers.
However, it is often blocked by ISPs due to spam and security concerns.
Port 587: The recommended port for sending email securely from an email client to an SMTP
server using STARTTLS (to encrypt communication).
Port 465: An alternate port for SMTP over SSL/TLS, offering encrypted communication.
Plaintext Transmission: SMTP was originally designed without encryption, meaning emails
and credentials are sent as plaintext, making them vulnerable to interception.
Spoofing and Phishing: SMTP's simplicity allows for email header spoofing, enabling
attackers to forge sender addresses, a common tactic in phishing attacks.
DKIM (DomainKeys Identified Mail): Adds a digital signature to emails to verify the sender’s
domain and prevent email tampering.
SPF (Sender Policy Framework): Helps prevent email spoofing by specifying which mail
servers are authorized to send emails on behalf of a domain.
DMARC (Domain-based Message Authentication, Reporting, and Conformance): Works
with SPF and DKIM to enforce policies and report on unauthorized email activities.
SMTP is primarily used for sending emails from clients (MUAs) to mail servers (MTAs) and
from one mail server to another.
2. Email Relaying
Relaying: SMTP servers often relay emails between different domains. For example, an email
sent from a Gmail user to a Yahoo user will be transferred through several SMTP servers
before it reaches its destination.
SMTP is used by companies and organizations to send bulk emails (e.g., newsletters,
promotional emails) via specialized email services.
SMTP is the backbone of email communication, providing a standard way for messages to be
transmitted between clients and servers. While its simplicity and ubiquity make it essential,
its lack of inherent security requires the use of modern encryption methods and authentication
protocols to ensure secure email delivery in today’s internet landscape.
1. Overview
1. Client-Server Architecture
Telnet Client: A program that initiates the connection to the remote device (the server).
Users interact with this client using command-line input.
Telnet Server: A remote machine or server that responds to the client's requests and allows
the user to execute commands as if they were physically present at the server.
2. Communication Protocol
Port: By default, Telnet uses TCP port 23 to establish a connection between the client and
the server.
Text-Based Interaction: Telnet transmits data in plain text, allowing users to interact with
remote devices through simple text commands.
3. Telnet Process
Step 1: Connection Setup: The Telnet client establishes a TCP connection to the remote
Telnet server using port 23.
Step 2: Authentication: The server typically prompts the client for a username and password
for authentication.
Step 3: Command Execution: After authentication, the user can enter commands on the
client, which are executed on the server.
Step 4: Response: The server sends the output of the commands back to the client for
display.
Step 5: Termination: The connection is closed when the user logs out or terminates the
session.
1. Remote Access
Remote Command Execution: Telnet allows users to run commands on a remote machine as
if they were physically present.
CLI Access: Users interact with the remote server through a command-line interface, making
it suitable for managing systems without graphical interfaces.
2. Bidirectional Communication
Telnet facilitates a two-way communication between the client and the server, where
commands are sent by the client and responses are received from the server.
3. Lack of Encryption
Telnet transmits data in plaintext, including sensitive information like usernames and
passwords, making it highly vulnerable to eavesdropping and man-in-the-middle attacks.
4. Telnet Commands
1. No Encryption
Plaintext Transmission: All data exchanged between the client and server, including login
credentials, is transmitted without encryption. This makes Telnet highly insecure for use
over the internet or public networks.
Vulnerability to Sniffing: Attackers can easily capture Telnet traffic using packet-sniffing
tools, leading to exposure of sensitive information.
Due to the lack of encryption, Telnet has largely been replaced by SSH (Secure Shell), which
provides encrypted and secure remote login capabilities.
SSH operates over TCP port 22 and uses encryption to protect data, making it a more secure
alternative to Telnet.
6. Use Cases of Telnet
Telnet is used for managing servers and devices that do not have a graphical user interface
(GUI). Network administrators can connect to remote systems and execute commands to
configure or troubleshoot devices.
Telnet can be used to test network services like SMTP, POP3, or HTTP by connecting to the
specific port of a remote server and manually entering commands.
3. Legacy Systems
Some older or legacy systems, particularly those developed before the widespread use of
SSH, may still rely on Telnet for remote management.
4. Educational Purposes
7. Telnet Alternatives
Purpose: SSH is a secure alternative to Telnet, offering encrypted communication for remote
login and command execution.
Features: SSH uses public key cryptography, provides secure authentication, and ensures
data confidentiality and integrity during transmission.
Ports: SSH operates on TCP port 22 by default.
Advantages: Encryption, secure key-based authentication, and protection against
eavesdropping and attacks.
Purpose: RDP provides graphical remote desktop access, allowing users to control a remote
machine with a GUI.
Use Cases: Managing Windows servers and machines remotely.
Port: RDP typically uses TCP port 3389.
Firewalls may block Telnet traffic due to its use of plaintext transmission, and port 23 is often
restricted on modern networks for security reasons.
Telnet was a revolutionary protocol for remote access and management during the early days
of networking. However, its inherent lack of security, particularly the transmission of
unencrypted data, has led to its replacement by more secure protocols like SSH. Telnet is still
used in specialized cases, but for most applications, it is now considered obsolete and
insecure.
1. Overview:
RTP is used for delivering real-time data, such as audio, video, or simulation data, over
unicast or multicast network services.
It is commonly paired with RTCP (Real-time Control Protocol) to provide quality feedback
and synchronization information.
RTP is an application-layer protocol but typically works with UDP (User Datagram Protocol)
in the transport layer to ensure low-latency and efficient data transmission.
2. Key Characteristics:
RTCP is the companion protocol to RTP, used for quality control and reporting statistics, such
as packet loss, jitter, and round-trip delay.
RTCP provides feedback to all participants about the quality of the data distribution.
Voice over IP (VoIP): RTP is heavily used in VoIP applications to carry audio data between
participants.
Video Conferencing: RTP is used to stream real-time video during conferences.
Streaming Media Services: Audio and video streams from online media services use RTP to
ensure smooth delivery of real-time content.
Online Gaming: Some real-time multiplayer games rely on RTP for low-latency data transfer.
RTP does not provide any guarantees about delivery, timing, or quality by itself, but it is
often used in conjunction with QoS mechanisms at lower layers (such as IP's Differentiated
Services).
RTP can support applications that tolerate packet loss but have strict timing constraints,
such as multimedia streams.
RTP typically operates over UDP rather than TCP because UDP offers low-latency,
connectionless communication, which is crucial for real-time applications.
RTP relies on the application to handle issues like out-of-order packets, jitter buffering, and
packet loss recovery.
8. Session Establishment:
Session Description Protocol (SDP) is often used to establish and describe RTP sessions by
negotiating parameters like media type, format, codec, and port numbers between
endpoints.
RTP is often part of a larger multimedia protocol stack used in real-time communications:
o RTP/UDP/IP: The basic stack for real-time media over the internet.
o RTP over RTSP (Real-Time Streaming Protocol): Used for controlling streaming
media servers.
o SIP (Session Initiation Protocol) + RTP: SIP is used to set up, modify, and terminate
multimedia sessions that utilize RTP for media transport.
Synchronization: RTP uses sequence numbers and timestamps in the header to ensure
proper reassembly of media frames, even if packets arrive out of order.
Jitter Handling: The variation in packet arrival time (jitter) is handled using jitter buffers in
the application to smooth out packet reception and playback.
11. RTP Payload Types:
RTP supports various payload types that define the format of the media being carried. Some
common RTP payload types include:
o Audio: G.711, G.722, MP3, Opus
o Video: H.264, H.265, VP8, VP9
Secure RTP (SRTP): A version of RTP that provides encryption, message authentication, and
integrity, ensuring that the media stream is secure from eavesdropping and tampering.
RTP is commonly used in conjunction with WebRTC (Web Real-Time Communication) for
browser-based real-time audio and video communications.
RTP is designed for scenarios where timely delivery is more important than reliable delivery,
so it is less suited for non-real-time applications where packet loss is unacceptable.
RTP is a vital protocol at the application layer for handling real-time data delivery, such as
audio and video streams, in many real-world applications. Its lightweight, efficient nature
allows it to meet the demands of low-latency environments like VoIP and video
conferencing, making it an essential part of modern communication systems.