Alex

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

COMPUTER NETWORK ASSIGNMENT 2016 E.

WOLDIA UNIVERSITY
INSTITUTE OF TECHNOLOGY

SCHOOL OF ELECTRICAL AND COMPUTER ENGINEERING

STREAM: COMPUTER ENGINEERING

ADVANCED COMPUTER NETWORK INDIVIUAL ASSIGNMENT

SUBMITTED BY: ALEMAYEHU GIRMA

ID NO: 1200221

SUBMITTED TO: MR. GETASEW

SUBMISSION DATE: 14-08-16 E.C


COMPUTER NETWORK ASSIGNMENT 2016 E.C

Table of Contents
Channel Allocation Problem in Computer Network ..................................................................................... 3
Static Channel Allocation in computer network ........................................................................................... 3
Working Principle ..................................................................................................................................... 3
Advantages................................................................................................................................................ 3
Disadvantages ........................................................................................................................................... 3
Working Principle ..................................................................................................................................... 4
Dynamic Channel Allocation Schemes..................................................................................................... 4
Advantages................................................................................................................................................ 4
Disadvantages ........................................................................................................................................... 5
Random Access Protocols......................................................................................................................... 5
ALOHA .................................................................................................................................................... 5
• Pure Aloha: ................................................................................................................................... 5
• Slotted Aloha: ............................................................................................................................... 6
CSMA ....................................................................................................................................................... 6
• 1-persistent .................................................................................................................................... 6
• P-persistent:................................................................................................................................... 7
• O-persistent: .................................................................................................................................. 7
CSMA/CD ................................................................................................................................................ 7
Features of multiple access protocols: ...................................................................................................... 9
Common Application Layer Protocols: ...................................................................................................... 10
DEFINITION .......................................................................................................................................... 10
Roles in the OSI Model........................................................................................................................... 10
HTTP (Hypertext Transfer Protocol) ...................................................................................................... 11
Basics of HTTP: .................................................................................................................................. 12
Structure of HTTP Requests and Responses: ...................................................................................... 12
HTTP Request Structure: ........................................................................................................................ 12
HTTP methods (GET, POST, etc.) ..................................................................................................... 14
FTP (File Transfer Protocol) ................................................................................................................... 15
Purpose of FTP: .................................................................................................................................. 15

1
COMPUTER NETWORK ASSIGNMENT 2016 E.C

FTP Commands and Responses: ......................................................................................................... 15


Modes of FTP (active, passive)........................................................................................................... 15
SMTP (Simple Mail Transfer Protocol).................................................................................................. 17
Functionality: ...................................................................................................................................... 17
SMTP Commands: .............................................................................................................................. 19
Components of an email message. ...................................................................................................... 19
SMTP commands ................................................................................................................................ 21
DNS (Domain Name System) ................................................................................................................. 23
Role of DNS in translating domain names to IP addresses ................................................................. 23
DNS hierarchy and resolution process ................................................................................................ 25
DHCP (Dynamic Host Configuration Protocol) ..................................................................................... 27
Purpose of DHCP ................................................................................................................................ 27
DHCP message exchange. .................................................................................................................. 29
DHCP lease process ............................................................................................................................ 31
REFERENCE.............................................................................................................................................. 34

2
COMPUTER NETWORK ASSIGNMENT 2016 E.C

Channel Allocation Problem in Computer Network

Static Channel Allocation in computer network

When there is more than one user who desires to access a shared network channel, an algorithm is
deployed for channel allocation among the competing users. Static channel allocation is a
traditional method of channel allocation in which a fixed portion of the frequency channel is
allotted to each user, who may be base stations, access points or terminal equipment. This scheme
is also referred to as fixed channel allocation or fixed channel assignment.

Working Principle

Suppose that there are N competing users. Here, the total bandwidth is divided into N discrete
channels using frequency division multiplexing (FDM). In most cases, the size of the channels is
equal. Each of these channels is assigned to one user.

Advantages

Static channel allocation scheme is particularly suitable for situations where there are a small
number of fixed users having a steady flow of uniform network traffic. The allocation technique
is simple and so the additional overhead of a complex algorithm need not be incurred. Besides,
there is no interference between the users since each user is assigned a fixed channel which is not
shared with others.

Disadvantages

Most real-life network situations have a variable number of users, usually large in number with
bursty traffic. If the value of N is very large, the bandwidth available for each user will be very
less. This will reduce the throughput if the user needs to send a large volume of data once in a
while.

It is very unlikely that all the users will be communicating all the time. However, since all of them
are allocated fixed bandwidths, the bandwidth allocated to non-communicating users lies wasted.

If the number of users is more than N, then some of them will be denied service, even if there are
unused frequencies.
3
COMPUTER NETWORK ASSIGNMENT 2016 E.C

Dynamic Channel Allocation in computer network

When there is more than one user who desire to access a shared network channel, an algorithm is
deployed for channel allocation among the competing users. Dynamic channel allocation
encompasses the channel allocation schemes where channels are allotted to users dynamically as
per their requirements, from a central pool.

Working Principle

In dynamic channel allocation schemes, frequency channels are not permanently allotted to any
user. Channels are assigned to the user as needed depending upon the network environment. The
available channels are kept in a queue or a spool. The allocation of the channels is temporary.
Distribution of the channels to the contending users is based upon distribution of the users in

the network and offered traffic load. The allocation is done so that transmission interference is
minimized.

Dynamic Channel Allocation Schemes

The dynamic channel allocation schemes can be divided into three categories −

• Interference Adaptive Dynamic Channel Allocation (IA-DCA)


• Location Adaptive Dynamic Channel Allocation (LA-DCA)
• Traffic Adaptive Dynamic Channel Allocation (TA-DCA)

All these schemes evaluate the cost of using each available channel and allocates the channel with
the optimum cost.

Advantages

Dynamic channel allocation a scheme allots channels as needed. This results in optimum
utilization of network resources. There are less chances of denial of services and call blocking in
case of voice transmission. These schemes adjust bandwidth allotment according to traffic volume,
and so are particularly suitable for bursty traffic.

4
COMPUTER NETWORK ASSIGNMENT 2016 E.C

Disadvantages
Dynamic channel allocation schemes increase the computational as well as storage load on the
system.

Random Access Protocols

Random access protocols assign uniform priority to all connected nodes. Any node can send data
if the transmission channel is idle. No fixed time or fixed sequence is given for data transmission.

The four random access protocols are−

• ALOHA
• Carrier sense multiple access (CMSA)
• Carrier sense multiple access with collision detection (CMSA/CD)
• Carrier sense multiple access with collision avoidance (CMSA/CA)

1. Random Access Protocol: In this, all stations have same superiority that is no station has
more priority than another station. Any station can send data depending on medium’s state (idle
or busy). It has two features:

1. There is no fixed time for sending data

2. There is no fixed sequence of stations sending data

The Random-access protocols are further subdivided as:

ALOHA – It was designed for wireless LAN but is also applicable for shared medium. In this,
multiple stations can transmit data at the same time and can hence lead to collision and data
being garbled.

• Pure Aloha:
When a station sends data it waits for an acknowledgement. If the acknowledgement
doesn’t come within the allotted time then the station waits for a random amount of time
called back-off time (Tb) and re-sends the data. Since different stations wait for different
amount of time, the probability of further collision decreases.

5
COMPUTER NETWORK ASSIGNMENT 2016 E.C

Vulnerable Time = 2* Frame transmission time

Throughput = G exp{-2*G}

Maximum throughput = 0.184 for G=0.5

• Slotted Aloha:
It is similar to pure aloha, except that we divide time into slots and sending of data is
allowed only at the beginning of these slots. If a station misses out the allowed time, it
must wait for the next slot. This reduces the probability of collision.

Vulnerable Time = Frame transmission time

Throughput = Gexp{-*G}

Maximum throughput = 0.368 for G=1

For more information on ALOHA refer – LAN Technologies

CSMA – Carrier Sense Multiple Access ensures fewer collisions as the station is required to first
sense the medium (for idle or busy) before transmitting data. If it is idle then it sends data,
otherwise it waits till the channel becomes idle. However there is still chance of collision in
CSMA due to propagation delay. For example, if station A wants to send data, it will first sense
the medium.If it finds the channel idle, it will start sending data. However, by the time the first
bit of data is transmitted (delayed due to propagation delay) from station A, if station B requests
to send data and senses the medium it will also find it idle and will also send data. This will
result in collision of data from station A and B.

CSMA access modes-

• 1-persistent: The node senses the channel, if idle it sends the data, otherwise it
continuously keeps on checking the medium for being idle and transmits unconditionally
(with 1 probability) as soon as the channel gets idle.

• Non-Persistent: The node senses the channel, if idle it sends the data, otherwise it checks
the medium after a random amount of time (not continuously) and transmits when found
idle.

6
COMPUTER NETWORK ASSIGNMENT 2016 E.C

• P-persistent: The node senses the medium if idle it sends the data with p probability. If
the data is not transmitted ((1-p) probability) then it waits for some time and checks the
medium again, now if it is found idle then it send with p probability. This repeat
continues until the frame is sent. It is used in Wi-Fi and packet radio systems.

• O-persistent: Superiority of nodes is decided beforehand and transmission occurs in that


order. If the medium is idle, node waits for its time slot to send data.

CSMA/CD – Carrier sense multiple access with collision detection. Stations can terminate
transmission of data if collision is detected. For more details refer – Efficiency of CSMA/CD

CSMA/CA – Carrier sense multiple access with collision avoidance. The process of collisions
detection involves sender receiving acknowledgement signals. If there is just one signal (its own)
then the data is successfully sent but if there are two signals (its own and the one with which it
has collided) then it means a collision has occurred. To distinguish between these two cases,
collision must have a lot of impact on received signal. However it is not so in wired networks, so
CSMA/CA is used in this case.

CSMA/CA avoids collision by:

1. Interframe space – Station waits for medium to become idle and if found idle it does not
immediately send data (to avoid collision due to propagation delay) rather it waits for a
period of time called Interframe space or IFS. After this time it again checks the medium
for being idle. The IFS duration depends on the priority of station.

2. Contention Window – It is the amount of time divided into slots. If the sender is ready
to send data, it chooses a random number of slots as wait time which doubles every time
medium is not found idle. If the medium is found busy it does not restart the entire
process, rather it restarts the timer when the channel is found idle again.

3.Acknowledgement – The sender re-transmits the data if acknowledgement is not received


before time-out.

7
COMPUTER NETWORK ASSIGNMENT 2016 E.C

2. Controlled Access:
In this, the data is sent by that station which is approved by all other stations. For further details
refer – Controlled Access Protocols

3. Channelization:
In this, the available bandwidth of the link is shared in time, frequency and code to multiple
stations to access channel simultaneously.

• Frequency Division Multiple Access (FDMA) – The available bandwidth is divided


into equal bands so that each station can be allocated its own band. Guard bands are also
added so that no two bands overlap to avoid crosstalk and noise.

• Time Division Multiple Access (TDMA) – In this, the bandwidth is shared between
multiple stations. To avoid collision time is divided into slots and stations are allotted
these slots to transmit data. However, there is an overhead of synchronization as each
station needs to know its time slot. This is resolved by adding synchronization bits to
each slot. Another issue with TDMA is propagation delay which is resolved by addition
of guard bands.
For more details refer – Circuit Switching

• Code Division Multiple Access (CDMA) – One channel carries all transmissions
simultaneously. There is neither division of bandwidth nor division of time. For example,
if there are many people in a room all speaking at the same time, then also perfect
reception of data is possible if only two persons speak the same language. Similarly, data
from different stations can be transmitted simultaneously in different code languages.

• Orthogonal Frequency Division Multiple Access (OFDMA) – In OFDMA the


available bandwidth is divided into small subcarriers in order to increase the overall
performance, Now the data is transmitted through these small subcarriers.it is widely
used in the 5G technology.

Advantages:

• Increase in efficiency

8
COMPUTER NETWORK ASSIGNMENT 2016 E.C

• High data rates

• Good for multimedia traffic

Disadvantages:

• Complex to implement

• High peak to power ratio

• Spatial Division Multiple Access (SDMA) – SDMA uses multiple antennas at the
transmitter and receiver to separate the signals of multiple users that are located in
different spatial directions. This technique is commonly used in MIMO (Multiple-Input,
Multiple-Output) wireless communication systems.

Advantages:

• Frequency band uses effectively

• The overall signal quality will be improved

• The overall data rate will be increased

Disadvantages:

• It is complex to implement

• It requires the accurate information about the channel

Features of multiple access protocols:

Contention-based access: Multiple access protocols are typically contention-based, meaning that
multiple devices compete for access to the communication channel. This can lead to collisions if
two or more devices transmit at the same time, which can result in data loss and decreased network
performance.

Carrier Sense Multiple Access (CSMA): CSMA is a widely used multiple access protocol in
which devices listen for carrier signals on the communication channel before transmitting. If a
9
COMPUTER NETWORK ASSIGNMENT 2016 E.C

carrier signal is detected, the device waits for a random amount of time before attempting to
transmit to reduce the likelihood of collisions.

Collision Detection (CD): CD is a feature of some multiple access protocols that allows devices
to detect when a collision has occurred and take appropriate action, such as backing off and
retrying the transmission.

Collision Avoidance (CA): CA is a feature of some multiple access protocols that attempts to
avoid collisions by assigning time slots to devices for transmission.

Token passing: Token passing is a multiple access protocol in which devices pass a special token
between each other to gain access to the communication channel. Devices can only transmit data
when they hold the token, which ensures that only one device can transmit at a time.

Bandwidth utilization: Multiple access protocols can affect the overall bandwidth utilization of
a network. For example, contention-based protocols may result in lower bandwidth utilization due
to collisions, while token passing protocols may result in higher bandwidth utilization due to the
controlled access to the communication channel.

Common Application Layer Protocols:

DEFINITION

The Application Layer is a crucial component of the OSI model, serving as the interface between
user applications and the underlying network services. It facilitates various protocols for diverse
communication tasks.

Roles in the OSI Model

• User Interface: It provides the interface users interact with for these network services. So, when
you click a button to send an email or open a website, the application layer handles the
communication behind the scenes.
• Data Presentation: This layer transforms data from its raw form (binary) into a human-readable
format for applications. For instance, it displays web pages or video streams in a way users can
comprehend.

10
COMPUTER NETWORK ASSIGNMENT 2016 E.C

• Resource Sharing: It facilitates the sharing of resources on the network. This could involve
accessing remote databases, printers, or other shared services.

HTTP (Hypertext Transfer Protocol) is a cornerstone of web communication, enabling the


transfer of web pages and resources across the Internet. It operates on the application layer of the
OSI model, employing a request-response paradigm between clients (such as web browsers) and
servers. Here's a concise breakdown:

Functionality: Facilitates web browsing and resource retrieval.

Characteristics:

Text-based protocol for requests and responses.

Stateless nature ensures independent request handling.

Relies on TCP for reliable data transmission.

Request Structure: Includes method (e.g., GET, POST), resource path, and HTTP version.

Response Structure: Comprises status code, response headers, and response body.

Key Methods:

GET: Retrieves resources from the server.

POST: Submits data to the server.

PUT: Creates or updates server resources.

DELETE: Removes resources from the server.

Importance: Integral to the World Wide Web, used extensively for browsing, streaming, and
various online activities.

In this example, the client sends the username and password to authenticate with the server. The
server responds with a success message, indicating that the user has been logged in. Then, the

11
COMPUTER NETWORK ASSIGNMENT 2016 E.C

client requests the current working directory, and the server responds with the path to the current
directory.

Understanding FTP commands and responses is crucial for interacting with FTP servers,
automating file transfer processes, and troubleshooting connectivity issues during FTP sessions.

Basics of HTTP:
• HTTP is a text-based protocol, meaning that requests and responses are sent as plain text.

• HTTP is stateless, meaning that each request is treated independently and the server does not
store any information about previous requests from the same client.

• HTTP uses TCP (Transmission Control Protocol) as its transport layer protocol, which provides
reliable and ordered delivery of data.

Structure of HTTP Requests and Responses:


• Request: Contains the method (e.g., GET, POST), the resource path (e.g., /index.html), and the
HTTP version.

• Response: Contains the status code (e.g., 200 OK, 404 Not Found), the response headers (e.g.,
Content-Type, Content-Length), and the response body (e.g., the HTML code for a web page).

• Structure of HTTP requests and responses

The structure of HTTP requests and responses follows a specific format, consisting of headers and
an optional body. Understanding this structure is essential for effective communication between
clients and servers:

HTTP Request Structure:

Request Line: The request line contains the HTTP method, URI (Uniform Resource Identifier),
and HTTP version. Common HTTP methods include GET, POST, PUT, DELETE, etc.

12
COMPUTER NETWORK ASSIGNMENT 2016 E.C

Headers: Headers provide additional information about the request, such as the content type,
content length, accepted languages, cookies, and authentication credentials. Each header is a key-
value pair separated by a colon.

Body (Optional): The body carries data associated with the request, such as form data submitted
via a POST request or a file uploaded to the server. Not all requests have a body; it depends on the
HTTP method and the nature of the request.

Example of an HTTP Request:

GET /index.html HTTP/1.1

Host: www.example.com

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like


Gecko) Chrome/97.0.4692.99 Safari/537.36

Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;
q=0.8,application/signed-exchange;v=b3;q=0.9

HTTP Response Structure:

Status Line: The status line contains the HTTP version, status code, and a brief status message.
The status code indicates the outcome of the request, such as success (2xx), redirection (3xx),
client error (4xx), or server error (5xx).

Headers: Similar to request headers, response headers provide additional information about the
response, such as content type, content length, caching directives, and server information.

Body (Optional): The body carries the actual content of the response, such as HTML for a web
page, JSON data, or binary files like images or videos. Not all responses have a body; it depends
on the nature of the response and the request made.

Example of an HTTP Response:

HTTP/1.1 200 OK

13
COMPUTER NETWORK ASSIGNMENT 2016 E.C

Date: Sun, 01 May 2024 18:30:00 GMT

Content-Type: text/html; charset=UTF-8

Content-Length: 2345

<!DOCTYPE html>

<html>

<head>

<title>Welcome to Example.com</title>

</head>

<body>

<h1>Hello, World!</h1>

</body>

</html>

Understanding the structure of HTTP requests and responses is essential for building and
troubleshooting web applications, as it provides insights into how information is exchanged
between clients and servers over the web.

HTTP methods (GET, POST, etc.)


The most commonly used HTTP methods are:

1. GET: The GET method is used to retrieve data on a server.

2. POST: The POST method is used to create new resources.

3. PUT: The PUT method is used to replace an existing resource with an updated version.

4. PATCH: The PATCH method is used to update an existing resource.

5. DELETE: is used for permanently removing a resource from a server.

14
COMPUTER NETWORK ASSIGNMENT 2016 E.C

FTP (File Transfer Protocol)

Delving deeply into FTP (File Transfer Protocol) unveils its foundational principles,
functionalities, and how it facilitates efficient file transfers between clients and servers:

Purpose of FTP:

FTP is designed for the reliable and efficient transfer of files between a client and a server over a
TCP/IP-based network, such as the Internet or an intranet.

It provides a standardized protocol for accessing, transferring, and managing files on remote
servers.

FTP Commands and Responses:

FTP operates on a command-response model where the client sends commands to the server, and
the server responds accordingly.

Commands are instructions issued by the client to perform various operations, such as listing
directory contents, uploading files, or downloading files.

Responses from the server provide feedback on the success or failure of commands, along with
additional information or data requested by the client.

Modes of FTP (active, passive)

The two primary modes of FTP (File Transfer Protocol) are active mode and passive mode, each
with its own mechanism for establishing data connections between the client and server. Here's a
deeper exploration of these modes:

Active Mode:

In active mode FTP, the client initiates a connection to the server's port 21 for control information
(commands), as in both modes the control connection always starts from the client side.

When data transfer is required (e.g., downloading a file), the client sends a PORT command to the
server, specifying an IP address and port number on which it will listen for incoming data
connections.

15
COMPUTER NETWORK ASSIGNMENT 2016 E.C

The server then initiates a connection from its port 20 to the client's specified IP address and port
number to transfer data.

Active mode FTP requires the server to open an outbound connection to the client, which can
sometimes be problematic due to firewalls and network address translation (NAT) devices
blocking incoming connections.

Passive Mode:

In passive mode FTP, the client still initiates the control connection to the server's port 21 for
commands. However, when data transfer is required, the server opens a data port (usually a random
high port) and tells the client its IP address and the port number it has opened.

The client then initiates a connection to the server's IP address and the specified port to transfer
data. Passive mode FTP is more firewall-friendly than active mode because it doesn't require the
server to open an inbound connection to the client.

It's often preferred in modern FTP implementations, especially in scenarios where clients are
behind firewalls or NAT devices that block incoming connections.

Key Differences:

Data Connection Direction: In active mode, the server initiates the data connection to the client,
whereas in passive mode, the client initiates the data connection to the server.

Firewall Compatibility: Passive mode is generally more firewall-friendly because it doesn't


require the server to open inbound connections, making it suitable for clients behind firewalls or
NAT devices.

Port Usage: In active mode, the server uses port 20 for data transfer, while in passive mode, the
server opens a random high port for data transfer.

Choosing between active and passive mode depends on factors such as network topology, firewall
configurations, and security requirements. Passive mode is often preferred for its compatibility
with modern network environments and its ability to traverse firewalls and NAT devices more
easily.

16
COMPUTER NETWORK ASSIGNMENT 2016 E.C

SMTP (Simple Mail Transfer Protocol)

Delving deeply into SMTP (Simple Mail Transfer Protocol) reveals its fundamental role in
electronic mail communication, including its functionalities, mechanisms, and key components:

Functionality:
SMTP is a protocol used for sending and relaying email messages between mail servers. It operates
on the application layer of the TCP/IP protocol stack and follows a client-server model, where
email clients (mail user agents) send outgoing messages to SMTP servers (mail transfer agents),
which then route and deliver the messages to the recipients' mail servers.

SMTP servers relay email messages between mail clients and recipients' mail servers using a store-
and-forward mechanism. They perform tasks such as message validation, routing, and delivery to
ensure reliable and efficient email transmission.SMTP servers communicate with each other over
the Internet, exchanging messages using TCP/IP protocols.

Authentication and Security:

SMTP supports authentication mechanisms such as SMTP Authentication (SMTP AUTH), which
allows clients to authenticate with the server using credentials (e.g., username and password)
before sending email messages.

To enhance security and prevent unauthorized access and email spoofing, SMTP servers may
implement various security measures such as encryption (e.g., STARTTLS), access control lists,
and spam filtering.

Overall, SMTP plays a crucial role in the global email infrastructure, enabling the reliable and
efficient transmission of electronic messages across networks and ensuring seamless
communication between users worldwide. The functionality of SMTP (Simple Mail Transfer
Protocol) revolves around the reliable and efficient transmission of email messages between mail
servers. Here's a deeper look into its functionality:

17
COMPUTER NETWORK ASSIGNMENT 2016 E.C

Message Transfer: SMTP serves as the backbone for sending and relaying email messages from
the sender's email client (Mail User Agent - MUA) to the recipient's email server (Mail Transfer
Agent - MTA). It ensures that messages are delivered promptly and reliably across the Internet.

Routing and Delivery: SMTP servers receive outgoing email messages from email clients and
determine the most appropriate route for delivering them to the recipients' mail servers. This
involves looking up the recipient's domain in the Domain Name System (DNS) to find the MX
(Mail Exchange) records, which specify the mail servers responsible for receiving email for that
domain.

Message Validation: SMTP servers perform various checks and validations on outgoing email
messages to ensure compliance with email standards and prevent abuse. This includes verifying
the sender's identity, checking for proper formatting of email addresses, and scanning for spam or
malicious content.

Error Handling and Retries: SMTP includes mechanisms for handling errors and retries in case
of delivery failures. If a message cannot be delivered immediately (e.g., due to a temporary
network issue or a busy mail server), SMTP servers may queue the message for later delivery and
retry sending it at regular intervals.

Message Queuing and Forwarding: SMTP servers store outgoing email messages in queues until
they can be successfully delivered to the recipients' mail servers. If a recipient's mail server is
temporarily unavailable, SMTP servers will keep trying to deliver the message until it is accepted
or until a timeout occurs.

Authentication and Security: SMTP supports authentication mechanisms (e.g., SMTP AUTH)
to verify the identity of users and prevent unauthorized access to mail servers. It also includes
features such as encryption (e.g., STARTTLS) to secure the transmission of email messages over
the Internet and protect them from eavesdropping or tampering.

Overall, the functionality of SMTP is essential for facilitating the seamless exchange of email
messages between users and ensuring that messages are delivered reliably and securely across the
global email infrastructure.

Components of an Email Message:

18
COMPUTER NETWORK ASSIGNMENT 2016 E.C

SMTP handles the transmission of email messages, which typically consist of several components,
including:

Sender: The email address of the sender.

Recipient(s): The email address(es) of the recipient(s).

Subject: A brief summary or description of the message content.

Body: The main content of the message, which can include text, images, attachments, etc.

Headers: Additional metadata such as message ID, date, and routing information.

SMTP Commands:
SMTP uses a set of commands to control the communication between the client and server. Some
common SMTP commands include:

EHLO/HELO: Initiates an SMTP session and identifies the client to the server.

MAIL FROM: Specifies the sender's email address.

RCPT TO: Specifies the recipient's email address.

DATA: Indicates the start of the message data.

QUIT: Terminates the SMTP session.

Components of an email message.


Email messages consist of several components, each serving a specific purpose in conveying
information from the sender to the recipient(s). Here's a deeper exploration of the components of
an email message:

Sender: The sender component of an email message identifies the individual or entity responsible
for initiating the message. It typically includes the sender's email address and optionally their
display name. For example, "lexo.girma@gmail.com".

Recipient(s): The recipient component specifies the intended recipient(s) of the email message. It
can include one or more email addresses, separated by commas or semicolons. Recipients may be

19
COMPUTER NETWORK ASSIGNMENT 2016 E.C

specified in the "To", "CC" (Carbon Copy), or "BCC" (Blind Carbon Copy) fields. Each recipient
receives a copy of the message, with "To" recipients being visible to all other recipients, "CC"
recipients being visible to all recipients but not required to take action, and "BCC" recipients being
invisible to other recipients.

Subject: The subject component provides a brief summary or description of the email message's
content. It serves as the headline or title of the message and helps recipients understand the purpose
or topic of the message at a glance. A descriptive subject line increases the likelihood of the email
being read and understood.

Body: The body component contains the main content of the email message, including text,
images, links, and any other multimedia elements. It conveys the message's primary information,
such as the main message text, instructions, announcements, or attachments. Email bodies can be
formatted using HTML or plain text, with HTML allowing for richer formatting options such as
fonts, colors, and styling.

Attachments: Attachments are optional components of an email message that allow the sender to
include files, documents, images, or other multimedia content along with the message.
Attachments are commonly used to share files that cannot be easily conveyed in the email body,
such as documents, spreadsheets, presentations, or images. Most email clients support attaching
multiple files to a single message.

Headers: Email headers contain metadata about the message, including information such as the
message ID, date and time of transmission, sender's and recipient's email addresses, subject, and
routing information. Headers are not typically visible to email recipients but are used by email
servers and clients to process and route messages efficiently.

Understanding the components of an email message is essential for composing, sending, and
interpreting email messages effectively. Each component plays a crucial role in conveying
information, facilitating communication, and ensuring that messages are delivered accurately and
securely.

20
COMPUTER NETWORK ASSIGNMENT 2016 E.C

SMTP commands
SMTP (Simple Mail Transfer Protocol) operates on a command-response model, where the client
(sending server) issues commands to the server (receiving server) to transfer email messages.
Here's a deeper exploration of some common SMTP commands:

EHLO/HELO:

The EHLO (Extended Hello) or HELO (Hello) command initiates an SMTP session and identifies
the client to the server.

Syntax: EHLO domain / HELO domain

Example: EHLO example.com

MAIL FROM:

The MAIL FROM command specifies the email address of the sender (envelope sender) of the
email message being sent.

Syntax: MAIL FROM: sender@example.com

Example: MAIL FROM: sender@example.com

RCPT TO:

The RCPT TO command specifies the email address(es) of the recipient(s) (envelope recipient) of
the email message being sent.

Syntax: RCPT TO: recipient@example.com

Example: RCPT TO: recipient@example.com

DATA:

The DATA command indicates the start of the message data. It is followed by the actual content
of the email message, including headers and body.

Syntax: DATA

21
COMPUTER NETWORK ASSIGNMENT 2016 E.C

Example: DATA

QUIT:

The QUIT command terminates the SMTP session and closes the connection between the client
and the server.

Syntax: QUIT

Example: QUIT

RSET:

The RSET (Reset) command resets the current session, clearing any pending transaction state.

Syntax: RSET

Example: RSET

NOOP:

The NOOP (No Operation) command does nothing but elicits a response from the server, typically
used as a keep-alive signal to prevent the connection from timing out.

Syntax: NOOP

Example: NOOP

VRFY:

The VRFY (Verify) command requests verification of an email address or username on the server.
It is often disabled or restricted due to security and privacy concerns.

Syntax: VRFY username / VRFY username@example.com

Example: VRFY user123

EXPN:

22
COMPUTER NETWORK ASSIGNMENT 2016 E.C

The EXPN (Expand) command requests the server to expand a mailing list or alias, revealing the
list of recipients. Like VRFY, it is often disabled or restricted for security reasons.

Syntax: EXPN list

name

Example: EXPN newsletter

These are some of the fundamental SMTP commands used to transfer email messages between
SMTP servers. Each command serves a specific purpose in the SMTP transaction process,
facilitating the reliable and efficient transmission of email over the Internet.

DNS (Domain Name System)


Exploring DNS (Domain Name System) reveals its essential role in translating domain names into
IP addresses and facilitating internet communication. Here's a deeper look into DNS, including its
functionalities, components, and operation:

Functionality:

DNS is a distributed naming system that maps human-readable domain names (e.g.,
www.example.com) to numerical IP addresses (e.g., 192.0.2.1) used by computers to identify each
other on the internet.

It enables users to access websites, send emails, and perform other internet activities using domain
names instead of remembering and typing IP addresses.

Role of DNS in translating domain names to IP addresses


The role of DNS (Domain Name System) in translating domain names to IP addresses is
fundamental to the functioning of the internet. Here's a deeper exploration of this process:

Address Resolution:

DNS acts as a distributed hierarchical database that translates human-readable domain names (such
as www.example.com) into numerical IP addresses (such as 192.0.2.1) that computers use to
identify and communicate with each other over the internet.Domain names are easier for humans
to remember and use, while IP addresses are necessary for routing data packets across networks.

23
COMPUTER NETWORK ASSIGNMENT 2016 E.C

DNS Resolution Process:

When a user enters a domain name (e.g., www.example.com) into a web browser or application,
the device's DNS resolver (either a local resolver or provided by the ISP) initiates a DNS query to
find the corresponding IP address.

The DNS resolver first checks its local cache to see if it already has the IP address for the domain
name. If not, it proceeds with the resolution process.

The resolver sends a recursive DNS query to a series of DNS servers, starting with the root DNS
servers, then the top-level domain (TLD) servers, and finally the authoritative DNS servers for the
specific domain.

At each step, the DNS server provides information that helps the resolver navigate closer to the
authoritative DNS server for the domain. Eventually, the resolver reaches the authoritative DNS
server responsible for the domain name.

The authoritative DNS server responds to the resolver with the IP address associated with the
requested domain name.

The resolver caches the IP address for future use and returns it to the user's device, allowing it to
establish a connection with the desired web server or service.

Caching and Time-to-Live (TTL):

To improve performance and reduce the load on DNS servers, DNS resolvers cache DNS records
for a certain period, known as the Time-to-Live (TTL). This allows subsequent queries for the
same domain name to be resolved more quickly from the resolver's cache.

TTL values are specified in DNS records and indicate how long a resolver should consider the
cached record valid before discarding it and fetching a fresh copy from the authoritative DNS
server.

Dynamic Updates and Zone Transfers:

24
COMPUTER NETWORK ASSIGNMENT 2016 E.C

DNS supports dynamic updates, allowing authorized clients to add, modify, or delete DNS records
dynamically. This is commonly used in environments where IP addresses or hostnames change
frequently, such as in DHCP (Dynamic Host Configuration Protocol) environments.

Zone transfers enable DNS servers to synchronize DNS data with each other, ensuring consistency
and redundancy in DNS information across multiple servers.Overall, the role of DNS in translating
domain names to IP addresses is critical for internet communication, enabling users to access
websites, send emails, and connect to services using memorable domain names rather than
numerical IP addresses.

DNS hierarchy and resolution process


Understanding the DNS (Domain Name System) hierarchy and resolution process provides insight
into how domain names are translated into IP addresses. Here's a deeper exploration of these
concepts:

DNS Hierarchy:

DNS is organized hierarchically, with each level of the hierarchy responsible for managing a
specific subset of domain names. The hierarchy consists of the following levels:

Root Level: At the top of the hierarchy are the root DNS servers, denoted by a single dot (.). These
servers are responsible for delegating authority for top-level domains (TLDs) and are managed by
organizations such as ICANN (Internet Corporation for Assigned Names and Numbers).

Top-Level Domains (TLDs): Below the root level are TLDs, such as .com, .org, .net, gov.edu,
and country-code TLDs (cc TLDs) like .uk, .de, .jp, etc. Each TLD is managed by a separate
organization or registry responsible for maintaining DNS records for domain names within that
TLD.

Second-Level Domains: Below TLDs are second-level domains, which typically represent
individual organizations, businesses, or entities.

25
COMPUTER NETWORK ASSIGNMENT 2016 E.C

Examples include google.com, microsoft.com, and wikipedia.org.

Subdomains: Subdomains are subdivisions of second-level domains and can be created to


organize and structure websites or services. For example, www.google.com is a subdomain of the
google.com domain.

Hostnames: Hostnames represent individual devices or services within a domain or subdomain,


such as mail.google.com or ftp.example.com.

DNS Resolution Process:

When a user enters a domain name into a web browser or application, the DNS resolution process
begins to translate the domain name into an IP address.

The resolution process typically involves the following steps:

Local DNS Cache: The DNS resolver on the user's device checks its local cache to see if it already
has the IP address for the requested domain name. If the IP address is found and is still valid (not
expired), the resolver returns it to the user.

Recursive Query: If the IP address is not found in the local cache, the DNS resolver initiates a
recursive query to a recursive DNS server, such as one provided by the user's ISP or a public DNS
resolver like Google DNS or Cloud flare DNS.

Root DNS Servers: The recursive DNS server starts the resolution process by sending a query to
one of the root DNS servers, asking for the authoritative DNS servers responsible for the TLD of
the requested domain name.

TLD DNS Servers: The root DNS server responds with the IP addresses of the TLD DNS servers
responsible for the requested TLD (e.g., .com).

Authoritative DNS Servers: The recursive DNS server sends a query to one of the TLD DNS
servers, asking for the authoritative DNS servers responsible for the second-level domain of the
requested domain name (e.g., google.com).

26
COMPUTER NETWORK ASSIGNMENT 2016 E.C

Final Resolution: The authoritative DNS server responds with the IP address of the requested
domain name, which is then returned to the user's device by the recursive DNS server. The user's
device can now use the IP address to establish a connection with the desired web server or service.

Understanding the DNS hierarchy and resolution process is essential for managing domain names,
troubleshooting DNS issues, and ensuring efficient internet communication.

DHCP (Dynamic Host Configuration Protocol)

Delving into DHCP (Dynamic Host Configuration Protocol) reveals its crucial role in dynamically
assigning IP addresses and network configuration parameters to devices within a network. Here's
a deeper exploration of DHCP, including its functionalities, components, and operation:

Purpose of DHCP
DHCP automates the process of assigning IP addresses and network configuration settings to
devices (hosts) on a network dynamically. It allows devices to join a network and obtain necessary
network parameters such as IP address, subnet mask, default gateway, DNS server, and other
configuration options without manual intervention. DHCP conserves IP addresses by leasing them
to devices for a specific period, after which they may be reclaimed and reassigned to other devices.

The purpose of DHCP (Dynamic Host Configuration Protocol) is to automate and streamline the
process of assigning IP addresses and network configuration parameters to devices within a
network. Here's a deeper look into the purposes served by DHCP:

Dynamic IP Address Assignment:

27
COMPUTER NETWORK ASSIGNMENT 2016 E.C

DHCP allows devices to obtain IP addresses dynamically as they connect to a network, eliminating
the need for manual configuration of IP addresses on each device.With DHCP, devices are
assigned IP addresses from a pool of available addresses maintained by the DHCP server. This
dynamic allocation ensures efficient utilization of IP address resources within the network.

Simplified Network Administration:

DHCP simplifies network administration by centralizing the management of IP address allocation


and configuration settings on a DHCP server.Network administrators can configure DHCP servers
to assign IP addresses, subnet masks, default gateways, DNS server addresses, and other network
parameters to clients automatically.This centralized approach reduces the administrative burden
of manually configuring network settings on individual devices, especially in large or dynamic
network environments.

Dynamic Reconfiguration:

DHCP supports dynamic reconfiguration of network parameters, allowing devices to adapt to


changes in network configuration without manual intervention.

For example, if network settings such as DNS server addresses or DHCP lease durations need to
be updated, administrators can make changes centrally on the DHCP server, and clients will
automatically receive the updated settings upon lease renewal.

Address Conservation:

DHCP helps conserve IP address resources by leasing addresses to devices for a specific period
rather than permanently assigning them.When devices disconnect from the network or their leases
expire, their IP addresses are returned to the DHCP server's pool and made available for
reassignment to other devices.This dynamic allocation mechanism ensures that IP addresses are
efficiently utilized and prevents address exhaustion in networks with limited address space.

Support for Mobility:

DHCP facilitates mobility within a network by allowing devices to seamlessly obtain IP addresses
and network settings as they move between different network segments or access points.

28
COMPUTER NETWORK ASSIGNMENT 2016 E.C

For example, mobile devices such as laptops, smartphones, and tablets can connect to different
Wi-Fi networks or Ethernet ports and automatically receive appropriate IP configurations via
DHCP.

Overall, the purpose of DHCP is to simplify network management, improve operational efficiency,
conserve IP address resources, and support seamless connectivity for devices within a network
environment. By automating the assignment and management of network configurations, DHCP
plays a crucial role in modern networking infrastructure.

DHCP message exchange.

The DHCP (Dynamic Host Configuration Protocol) message exchange involves a series of
communications between DHCP clients and DHCP servers to dynamically allocate IP addresses
and network configuration parameters. Here's a deeper look into the DHCP message exchange
process:

DHCP Discovery:

When a device (DHCP client) connects to a network and needs to obtain an IP address, it initiates
the DHCP process by broadcasting a DHCP discovery message (DHCPDISCOVER) to discover
available DHCP servers on the network.

The DHCP discovery message is broadcasted as a UDP (User Datagram Protocol) packet with a
source IP address of 0.0.0.0 and a destination IP address of 255.255.255.255 (broadcast address),
using the destination MAC address FF:FF:FF:FF:FF:FF.

DHCP Offer:

DHCP servers on the network receive the DHCP discovery message and respond with a DHCP
offer message (DHCPOFFER) containing IP address lease offers and network configuration
parameters.The DHCP offer message is unicast from the DHCP server to the client's MAC address,
offering an available IP address lease from the DHCP server's pool of addresses.

DHCP Request:

29
COMPUTER NETWORK ASSIGNMENT 2016 E.C

Upon receiving one or more DHCP offer messages, the DHCP client selects one of the offered IP
address leases and sends a DHCP request message (DHCPREQUEST) to the chosen DHCP server,
indicating its acceptance of the offered lease.

The DHCP request message includes the selected IP address lease and other configuration
parameters offered by the DHCP server.

DHCP Acknowledgment:

The DHCP server that receives the DHCP request message from the client responds with a DHCP
acknowledgment message (DHCPACK), confirming the lease of the selected IP address and
providing the client with the requested network configuration parameters.

The DHCP acknowledgment message includes the assigned IP address lease, subnet mask, default
gateway, DNS server addresses, lease duration, and other configuration options.

If the selected IP address lease is no longer available (e.g., another client has already been assigned
that address), the DHCP server responds with a DHCP negative acknowledgment message
(DHCPNAK), prompting the client to restart the DHCP process.

DHCP Lease Renewal:

During the lease duration, the DHCP client may renew its IP address lease by sending a DHCP
request message to the DHCP server that initially assigned the lease.

The DHCP server responds with a DHCP acknowledgment message, renewing the lease if the IP
address is still available and providing updated configuration parameters if necessary.

If the lease expires without renewal, the client must initiate a new DHCP discovery process to
obtain a new IP address lease.

The DHCP message exchange process allows DHCP clients to dynamically obtain IP addresses
and network configuration parameters from DHCP servers, facilitating automated network
configuration and seamless connectivity for devices on a network.

30
COMPUTER NETWORK ASSIGNMENT 2016 E.C

DHCP lease process


The DHCP (Dynamic Host Configuration Protocol) lease process involves the allocation and
management of IP address leases between DHCP clients and DHCP servers. Here's a deeper look
into the DHCP lease process:

DHCP Client Initialization:

When a device (DHCP client) connects to a network for the first time or requests an IP address
lease renewal, it initiates the DHCP lease process by sending a DHCPDISCOVER message to
discover available DHCP servers on the network.

DHCP Server Offer:

DHCP servers on the network receive the DHCPDISCOVER message and respond with a
DHCPOFFER message, offering available IP address leases and network configuration parameters
to the client.

The DHCPOFFER message includes one or more IP address lease offers from the DHCP server's
pool of available addresses.

DHCP Client Selection:

Upon receiving one or more lease offers from DHCP servers, the DHCP client selects one of the
offered IP addresses and sends a DHCPREQUEST message to the chosen DHCP server, indicating
its acceptance of the offered lease.

DHCP Server Acknowledgment:

The DHCP server that receives the DHCPREQUEST message from the client responds with a
DHCPACK message, confirming the lease of the selected IP address and providing the client with
the requested network configuration parameters.

The DHCPACK message includes the assigned IP address lease, subnet mask, default gateway,
DNS server addresses, lease duration, and other configuration options.

DHCP Lease Allocation:

31
COMPUTER NETWORK ASSIGNMENT 2016 E.C

Upon receiving the DHCPACK message, the DHCP client configures its network interface with
the assigned IP address and network configuration parameters provided by the DHCP server.

The DHCP client can now communicate on the network using the assigned IP address and access
network resources.

Lease Duration:

The DHCP lease duration specifies the period for which the IP address lease is valid. It is defined
by the DHCP server during the lease allocation process and is typically configurable by network
administrators.

The lease duration can vary depending on network policies and requirements, ranging from
minutes to days or even longer periods.

Lease Renewal:

During the lease duration, the DHCP client may attempt to renew its IP address lease before it
expires to maintain uninterrupted network connectivity.

The client sends a DHCPREQUEST message to the DHCP server that initially assigned the lease,
requesting lease renewal.

If the DHCP server approves the lease renewal, it responds with a DHCPACK message, renewing
the lease and providing updated configuration parameters if necessary.

Lease Expiration:

When the DHCP lease duration expires without renewal, the IP address lease is released, and the
IP address is returned to the DHCP server's pool of available addresses for reassignment to other
clients.

The DHCP client must then initiate a new DHCP lease process to obtain a new IP address lease if
it wishes to continue using the network.

32
COMPUTER NETWORK ASSIGNMENT 2016 E.C

The DHCP lease process ensures efficient allocation and management of IP address leases,
allowing DHCP clients to dynamically obtain and renew IP addresses as needed while maximizing
the utilization of available IP address resources within a network.

33
COMPUTER NETWORK ASSIGNMENT 2016 E.C

REFERENCE

[1] C. Hyang Sin, etal., "Radio resource allocation scheme for device-to-device communication
in cellular networks using fractional frequency reuse," in Communications (APCC), 2011 17th
Asia-Pacific Conference on, 2011, pp. 58-62.

[2] A. Imran, et al., "A novel Self Organizing framework for adaptive Frequency Reuse and
Deployment in future cellular networks," in Personal Indoor and Mobile Radio Communications
(PIMRC), 2010 IEEE 21st International Symposium on, 2010, pp. 2354-2359.

[3] Y. H. Tam, et al., "Effective Cell Size Scheme in Multi-Hop Cellular Networks," in Global
Telecommunications Conference, 2009. GLOBECOM 2009. IEEE, 2009, pp. 1-6.

[4] Y. H. Tam, et al., "Optimal Cell Size in Multi-Hop Cellular Networks," in Global
Telecommunications Conference, 200

8. IEEE GLOBECOM 2008. IEEE, 2008, pp. 1-5.

[5] A. G. Spilling and A. R. Nix, "Performance enhancement in cellular networks with dynamic
cell sizing," in Personal, Indoor and Mobile Radio Communications, 2000. PIMRC 2000. The 11th
IEEE International Symposium on, 2000, pp. 1589-1593

34

You might also like