You are on page 1of 5

CHAPTER-27

MIDDLEWARE EXAMPLES AND


APPLICATION LAYER SOFTWARE EXAMPLES

27.1 Middleware Examples

1) Point-to-Point Protocol (PPP) in data link layer middleware


2) Internet Protocol (IP) in internet layer middleware
3) User Datagram Protocol (UDP) in transport layer middleware
27.1.1 Point-to-Point Protocol (PPP):

It is an OSI data-link (or network access layer under the TCP/IP model) protocol

that can encapsulate and transmit data to higher layer protocols.


It supports both asynchronous and synchronous serial communication.

When receiving data from a lower layer protocol, PPP reads the bit fields of these frames
to ensure that entire frames are received, whether frames received are error free, and
frame is meant for a particular device and to determine where this frame came from. If
the data is meant for the device, then PPP strips all data-link layer headers from the
frame, and the remaining data field, called a Datagram is passed up to a higher layer.

In general, PPP software is defined as a combination of four submechanisms:

The PPP encapsulation mechanism such as the high-level data-link control


(HDLC) framing the link control protocol (LCP) framing defined to process (i.e.,

demultiplex, create, verify checksum, etc.).


Data-link protocol handshaking, such as the link control protocol (LCP)
handshaking responsible for establishing, configuring, and testing the data link

connection.
Authentication protocols, such as PAP (PPP authentication protocol) used to

manage security after the PPP link is established.


Network control protocols (NCP), such as IPCP (Internet protocol control
protocol) in that establish and configure upper-layer protocol settings.

27.1.2 Internet Protocol (IP):

The networking layer protocol called Internet Protocol (IP) and is responsible for

implementing addressing and fragmentation functionality.


IP layer receives data as packets from upper layers and frames from lower layers.
The entire IP datagram is received from lower layers. The last field (data field)
within the datagram is the packet that is sent to upper layers after processing by
IP.

The remaining fields are stripped or appended, depending on the direction the data is
going, to the data field after IP is finished processing. The source and destination IP
address fields are referred to as the Internet or IP address, processed by the IP layer. IP
addresses are 32 bits long, in dotted-decimal notation, divided by dots into four
octets (four 8-bit decimal numbers between the ranges of 0-255 for a total of 32 bits).

27.1.3

User Datagram Protocol (UDP):


It is a transport layer protocol.
Transport layer protocols, such as UDP (user datagram protocol) are responsible

for establishing and dissolving communication between two specific devices.


Protocols at this layer allow for multiple higher-layer applications running on the

device to connect point-to-point to other devices.


There are several types of sockets that a transport protocol can use, such as
stream, datagram, raw, and sequenced packet, to name a few.

Figure 27.3: UDP diagram


There is a socket on each end of a point-to-point communication channel, and
every application on a device wanting to establish communication to another

device does so by establishing a socket.


The two devices (client and server) then send and receive data via their sockets.
In general, on the server side a server application is running, listening to the

socket, and waiting for a client to request a connection.


The client essentially communicates to the IP address and port number from the
received packet server through its port.

27.2 Application Layer Software Examples


1) File Transfer Protocol (FTP) client

2) Simple Mail Transfer Protocol (SMTP) and E-Mail


3) Hypertext Transfer Protocol (HTTP) client and server
27.2.1 File Transfer Protocol (FTP) Client:

File Transfer Protocol (FTP) is one of the simplest protocols used to securely

exchange files over a network.


FTP is a standalone application dedicated for transferring files between

networked devices such as browsers and MP3 applications.


FTP protocol defines the communication mechanisms between the device
initiating the transfer, called the FTP client or user-protocol interpreter (user PI),
and the device receiving the FTP connection, called the FTP Server or FTP Site.

Figure 27.4: FTP network


Two types of connections can exist between FTP client and servers:
The control connection in which commands are transmitted
between the devices.
The data connection in which the files are transmitted.
An FTP session starts with the FTP client initiating a control connection by
establishing a TCP connection to port 21 of the destination device.

27.2.2 Simple Mail Transfer Protocol (SMTP) and E-Mail:

Simple Mail Transfer Protocol (SMTP) is an application-layer ASCII protocol


that is implemented within an

e-mail (electronic mail) application for sending

mail messages efficiently and reliably between devices.


SMTP was initially created in 1982 by ARPANET to replace file transfer
protocols, which were too limited, used in e-mail systems of that time.
e-mail applications are typically made up of two major components:
Mail User Agent (MUA), which is the interface to the

user that generates the e-mail.


Mail Transfer Agent (MTA), which handles the
underlying SMTP exchange of e-mails.

The SMTP protocol specifically defines two main mechanisms relative to

sending e-mails:
The e-mail message format.
The transmission protocol.
According to this protocol, an e-mail is made up of three parts:

1) Header 2) body 3) envelope.


An e-mails header, the format of which includes fields such as: Reply-To, Date.
The body is the actual content of the message being sent.
The contents of the envelope, which includes the addresses of the sender and

recipients.
After an e-mail is written and the send button is hit, the MTU adds a few

additional headers, and then passes the content to the MTA.


The MTA also adds headers of its own, incorporates the envelope, and then
begins the procedure of transmitting the e-mail to the MTA on another device.

27.2.3 Hypertext Transfer Protocol (HTTP) Client and server:

HTTP is the most widely used application layer protocol.


It is used to transmit all types of data over the Internet.
In this HTTP, the data is identifiable by its URL (Uniform Resource Locator).
HTTP is a based upon the client-server model that requires its underlying

transport protocol to be a reliable, ordered data stream channel, such as TCP.


The HTTP transaction starts with the HTTP client opening a connection to an

HTTP server by establishing a TCP connection to default port of the server.


The HTTP client then sends a request message for a particular resource to the
HTTP Server. The HTTP Server responds by sending a response message to the
HTTP client with its requested resource.

You might also like