CN Merged

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

EMAIL (SMTP, MIME, IMAP, POP)

 One of the most popular Internet services is electronic mail (E-mail).


 Email is one of the oldest network applications.
 The three main components of an Email are
1. User Agent (UA)
2. Messsage Transfer Agent (MTA) – SMTP
3. Messsage Access Agent (MAA) - IMAP , POP
 When the sender and the receiver of an e-mail are on the same system, we need only
two User Agents and no Message Transfer Agent
 When the sender and the receiver of an e-mail are on different system, we need two
UA, two pairs of MTA (client and server), and two MAA (client and server).

USER AGENT (UA)

 The first component of an electronic mail system is the user agent (UA).
 It provides service to the user to make the process of sending and receiving a message easier.
A user agent is a software package that perform.

MESSAGE TRANSFER AGENT (MTA)

The actual mail transfer is done through message transfer agents (MTA).

To send mail, a system must have the client MTA, and to receive mail, a system must have a server
MTA.
MESSAGE ACCESS AGENT (MAA)
 MAA is a software that pulls messages out of a mailbox.
 POP3 and IMAP4 are examples of MAA.

ADDRESS FORMAT OF EMAIL


E-mail address is userid @ domai

MESSAGE FORMAT OF EMAIL


 Email message consists of two parts namely header and body
 Some header contents are:
1. From: identifier sender of the message.
2. To: mail address of the recipient(s).
3. Subject: says about purpose of the message.
4. Date: timestamp of when the message was transmitted.
 Body contains the actual message.
 This extended version is known as MIME(Multipurpose Mail Extension)
1. SMTP - Simple Mail Transfer Protocol

2. SMTP is a set of communication guidelines that allow software to transmit an


electronic mail over the internet is called Simple Mail Transfer Protocol.
3. It is a program used for sending messages to other computer users based on
e-mail addresses.
4. It provides a mail exchange between users on the same or different computers,
and it also supports:
a. It can send a single message to one or more recipients.
b. Sending message can include text, voice, video or graphics.
5. The main purpose of SMTP is used to set up communication rules between
servers.
6. They also have a way of handling the errors such as incorrect email address. For
example, if the recipient address is wrong, then receiving server reply with an
error message of some kind.

SMTP clients and servers have two main components o


 User Agents(UA) – Prepares the message, encloses it in an envelope.
 Mail Transfer Agent (MTA) – Transfers the mail across the internet
 SMTP also allows the use of Relays allowing other MTAs to relay the mail.
SMTP COMMANDS AND RESPONSES
 The operation of SMTP consists of a series of commands and responses exchanged between
the SMTP sender and SMTP receiver.
 The initiative is with the SMTP sender, who establishes the TCP connection. Once the
connection is established, the SMTP sender sends commands over the connection to the
receiver.
 The command is from an MTA client to an MTA server; the response is from an MTA server to
the MTA client

Format of an email
1. Mail is a text file
2. Envelope –
sender address,receiver address
3. Message –
a. Mail Header – defines the sender, the receiver, the subject of
the message, and other information
b. Mail Body – Contains the actual information in the message

SMTP OPERATIONS
Basic SMTP operation occurs in three phases:

1. Connection Setup

2. Mail Transfer

3. Connection Termination

Connection Setup
An SMTP sender will attempt to set up a TCP connection with a target host when it has one or more
mail messages to deliver to that host

Mail Transfer
Once a connection has been established, the SMTP sender may send one or more messages to the
SMTP receiver.
Connection Termination

Limitations in SMTP
Only uses NVT 7 bit ASCII format
How to represent other data types?
No authentication mechanisms
Messages are sent un-encrypted
Susceptible to misuse (Spamming,faking sender address)
MIME Protocol
MIME stands for Multipurpose Internet Mail Extensions. It is used to extend the
capabilities of Internet e-mail protocols such as SMTP.

Email system was designed to send messages only in ASCII format The MIME protocol
allows the users to exchange various types of digital content such as pictures, audio,
video, and various types of documents and files in the e-mail.

MIME is an e-mail extension protocol, i.e., it does not operate independently, but it
helps to extend the capabilities of e-mail in collaboration with other protocols such
as SMTP.

MIME is a protocol that converts non-ASCII data to 7-bit NVT(Network Virtual Terminal)
ASCII and vice-versa.

MIME HEADERS
 Using headers, MIME describes the type of message content and the encoding used.
 Headers defined in MIME are:
1. MIME-Version- current version, i.e., 1.1
2. Content-Type - message type (text/html, image/jpeg, application/pdf)
3. Content-Transfer-Encoding - message encoding scheme (eg base64).
4. Content-Id - unique identifier for the message.
5. Content-Description - describes type of the message body.
MIME CONTENT TYPES
 There are seven different major types of content and a total of 14 subtypes.
 In general, a content type specifies the type of data,
subtype specifies a particular format for that type of data.
 MIME also defines a multipart type that says how a message carrying more than one data
type is structured.
 One possible multipart subtype is mixed, which says that the message contains a set of
independent data pieces in a specified order

 MIME has both base types (e.g., integers and floats) and compound types (e.g., structures and
arrays)

MESSAGE TRANSFER IN MIME


1. MTA is used to send an email.
2. Mail passes through a sequence of gateways before it reaches the recipient mail server.  Each
gateway stores and forwards the mail using SMTP.
3. SMTP defines communication between MTAs over TCP on port 25.
4. In an SMTP session, sending MTA is client and receiver is server. In each exchange:Client posts a
command Server responds with a code.
5. Client forwards message to server, if server is willing to accept.
6. Eventually client terminates the connection

MIME Messages
• MIME information is contained in the mail header using standard
RFC 2822 format.
• MIME header specifies version, data type, encoding used to convert
the data to ASCII.
• Example:
• From: [email protected]
• To: [email protected]
• MIME-Version: 1.0
• Content-Type: image/jpeg
• Content-Transfer-Encoding: base64
• ..data for the image..

MIME Multipart Messages

MIME multipart messages within the Content-Type adds


considerable flexibility.
• There are four subtypes for a multipart message. The four
subtypes are:
– mixed: allows a single message to contain multiple,
independent sub-messages each having its independent type
and encoding.
– alternative: allows a single message include multiple
representations of the same data.
– parallel: allows a single message to include subparts that
should be viewed together. (such as video and audio subparts)
– digest: allows a single message to contain a set of other
messages.
• To summarize, a multipart message can contain both a short text
explaining the purpose of the message and some non-textual
information
Example:
From: [email protected]
To: [email protected]
MIME-Version: 1.0
Content-Type: Multipart/Mixed; Boundary=StartOfNextPart
--StartOfNextPart
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
John,
Here is the photo of the carrier pigeons I saw last
week.
Sincerely,
Carrie Erpigeons
--StartOfNextPart
Content-Type: image/gif
Content-Transfer-Encoding: base64
..data for the image..

IMAP (INTERNET MAIL ACCESS PROTOCOL


 Allows the user to obtain a list of their Emails Users can retrieve their
emails Users can either delete or keep the email on their system.
 Simple, Minimizes server resources
 Post Office Protocol, version 3 (POP3) is simple and limited in
functionality.
 The client POP3 software is installed on the recipient computer;
the server POP3 software is installed on the mail server.
• Mail access starts with the client when the user needs to download
e-mail from the mailbox on the mail server.
• The client opens a connection to the server on TCP port 110. It then
sends its user name and password to access the mailbox.
• The user can then list and retrieve the mail messages, one by one.
• Figure shows an example of downloading using POP3. POP3 has two
modes: the delete mode and the keep mode.
• In the delete mode, the mail is deleted from the mailbox after each
retrieval. In the keep mode, the mail remains in the mailbox after
retrieval.
CS19541 – CN Unit V RAJALAKSHMI ENGINEERING COLLEGE PAGE 12 • The delete mode
is normally used when the user is working at her
permanent computer and can save and organize the received mail
after reading or replying.
• The keep mode is normally used when the user accesses her mail
away from her primary computer (e.g., a laptop). The mail is read
but kept in the system for later retrieval and organizing
Internet
Message Access Protocol (IMAP)
 Internet Message Access Protocol (IMAP) is an application layer protocol
that operates as a contract for receiving emails from the mail server. the
current version of IMAP is IMAP4.
 It is used as the most commonly used protocol for retrieving emails. This term
is also known as Internet mail access protocol, Interactive mail access
protocol, and Interim mail access protocol
Features of IMAP :
 It is capable of managing multiple mailboxes and organizing them into
various categories.
 Provides adding of message flags to keep track of which messages are
being seen.
 It is capable of deciding whether to retrieve email from a mail server
before downloading.
 It makes it easy to download media when multiple files are attached.
Working of IMAP :
IMAP follows Client-server Architecture and is the most commonly used email
protocol. It is a combination of client and server process running on other computers
that are connected through a network. This protocol resides over the TCP/IP
protocol for communication. Once the communication is set up the server listens on
port 143 by default which is non-encrypted. For the secure encrypted
communication port, 993 is used.

Internet Mail Access Protocol v4


• Similar to POP3 but as more features than it.
• User can check the email header before downloading
• Emails can be accessed from any location
• Can search the email for a specific string of characters before
downloading
• User can download parts of an email
• User can create, delete, or rename mailboxes on a server
• It defines an abstraction known as a MAILBOX. Mailboxes are
located on the same computer as a server.
• IMAP4 is a method for accessing electronic mail messages that are
kept on a mail server. It permits a client e-mail program to view and
manipulate those messages.
• Electronic mail stored on an IMAP server can be viewed or
manipulated from a desktop computer at home,a notebook computer,
or at a workstation. We can also say that mail messages can be
accessed from multiple locations.
CS19541 – CN Unit V RAJALAKSHMI ENGINEERING COLLEGE PAGE 15 Functions of
IMAP4
• IMAP provides extended functionality for message retrieval and
processing.
• Users can obtain information about a message or examine header
fields without retrieving the entire message.
• Users can search for a specified string and retrieve portions of a
message. This is useful for slow-speed dialup connections since they
wont need to download useless information.

Pop vs IMAP
Similarities
Mail delivered to a shared, constanly connected server
New mail accessible anywhere in network on a variety of platforms
For access only, Need SMTP to send mail
Differences
POP simpler and more established (more clients and servers that
support it)
IMAP is stateful protocol with more features
TRANSMISSION CONTROL PROTOCOL (TCP)

TCP is a reliable, connection-oriented, byte-stream protocol

Transmission Control Protocol (TCP) is probably the most widely used protocol.

It is a more sophisticated transport protocol is one that offers a reliable, connection-oriented, byte-
stream service.

TCP includes a flow-control mechanism for each of these byte streams that allow the receiver to limit
how much data the sender can transmit at a given time.

TCP also implements congestion-control mechanism. The idea of this mechanism is to prevent
sender from overloading the network.
Flow control is an end to end issue, whereas congestion control is concerned with how host and
network interact.

TCP is suited for applications that require high reliability, and transmission time is relatively less
critical.

TCP supports a demultiplexing mechanism

Use by other protocols like HTTP, HTTPs, FTP, SMTP, Telnet

TCP SERVICES
Process-to-Process Communication:
TCP provides process-to-process communication using port numbers.

Stream Delivery Service:


TCP is a stream-oriented protocol.
TCP allows the sending process to deliver data as a stream of bytes and allows the receiving
process to obtain data as a stream of bytes.
TCP creates an environment in which the two processes seem to be connected by an
imaginary “tube” that carries their bytes across the Internet.
The sending process produces (writes to) the stream and the receiving process consumes
(reads from) it.

Full-Duplex Communication:  TCP offers full-duplex service, where data can flow in both directions
at the same time.  Each TCP endpoint then has its own sending and receiving buffer, and segments
move in both directions.
Multiplexing and Demultiplexing:
 TCP performs multiplexing at the sender and demultiplexing at the receiver.

Connection-Oriented Service :
 TCP is a connection-oriented protocol.

 A connection needs to be established for each pair of processes.

 When a process at site A wants to send to and receive data from another process at site B,
the following three phases occur:

1. The two TCP’s establish a logical connection between them.

2. Data are exchanged in both directions.

3. The connection is terminated.

Reliable Service :
 TCP is a reliable transport protocol.

 It uses an acknowledgment mechanism to check the safe and sound arrival of data.

 A packet in TCP is called a segment.


 Data unit exchanged between TCP peers are called segments.
 A TCP segment encapsulates the data received from the application layer.
 The TCP segment is encapsulated in an IP datagram, which in turn is encapsulated in
 a frame at the data-link layer.

 TCP is a byte-oriented protocol, which means that the sender writes bytes into a TCP connection
and the receiver reads bytes out of the TCP connection.

 TCP does not, itself, transmit individual bytes over the Internet.

 TCP on the source host buffers enough bytes from the sending process to fill a reasonably sized
packet and then sends this packet to its peer on the destination host.

 TCP on the destination host then empties the contents of the packet into a receive buffer, and the
receiving process reads from this buffer at its leisure.

 TCP connection supports byte streams flowing in both directions.


TCP header

The packets exchanged between TCP peers are called segments.

Each TCP segment contains the header plus the data.

The segment consists of a header of 20 to 60 bytes, followed by data

 SrcPort and DstPort―port number of source and destination process.


 SequenceNum―contains sequence number, i.e. first byte of data segment.
 Acknowledgment― byte number of segment, the receiver expects next.
 HdrLen―Length of TCP header as 4-byte words.
 Flags― contains six control bits known as flags.

URG — segment contains urgent data.

ACK — value of acknowledgment field is valid.

PUSH — sender has invoked the push operation.

RESET — receiver wants to abort the connection.

SYN — synchronize sequence numbers during connection establishment.

 Advertised Window―defines receiver’s window size and acts as flow control.


 Checksum―It is computed over TCP header, Data, and pseudo header containing IP fields
(Length, SourceAddr & DestinationAddr).
 UrgPtr ― used when the segment contains urgent data. It defines a value that must be added
to the sequence number. Options - There can be up to 40 bytes of optional information in the
TCP header.

FIN — terminates the TCP connection


Connection Establishment and Termination
 TCP is connection-oriented A connection-oriented transport protocol establishes a logical path
between the source and destination.

 All of the segments belonging to a message are then sent over this logical path.

 In TCP, connection-oriented transmission requires three phases: Connection Establishment, Data


Transfer and Connection Termination.

Notice that while connection setup is an asymmetric activity (oneside does a passive open and the
other side does an active open),

Connection teardown is symmetric (each side has to close theconnection independently).


Therefore, it is possible for one side to have done a close, meaning thatit can no longer send data but
for the other side to keep the other half of the bidirectional connection open and to continue
sending data.

Connection Establishment
While opening a TCP connection the two nodes(client and server) want to agree on a set of
parameters. ( The parameters are the starting sequence numbers )

Connection establishment in TCP is a three-way handshaking.

1. Client sends a SYN segment to the server containing its initial sequence number

(Flags = SYN, SequenceNum = x)


2. Server responds with a segment that acknowledges client’s segment and specifies its initial
sequence number (Flags = SYN + ACK, ACK = x + 1 SequenceNum = y).

3. Finally, client responds with a segment that acknowledges server’s sequence num

(Flags = ACK, ACK = y + 1).

Data Transfer
 After connection is established, bidirectional data transfer can take place.

 The client and server can send data and acknowledgments in both directions
Adaptive Retransmission
tcp dynamically adjust the retransmission timeout based on the observed round-trip time (RTT)
between the sender and receiver. This helps TCP adapt to changes in network conditions and ensures
efficient and reliable data delivery.

1. Record Time: When TCP sends a data segment, it records the current time.

2. Calculate SampleRTT: When an acknowledgment (ACK) for that segment arrives, TCP
calculates the SampleRTT by taking the difference between the current time and the
recorded time.

3. Update EstimatedRTT: TCP updates the EstimatedRTT using a weighted average of the
previous estimate and the new SampleRTT. The formula is

EstimatedRTT = α × EstimatedRTT + (1 − α) × SampleRTT


Here, α is a smoothing factor (recommended between 0.8 and 0.9) that determines how
much weight is given to the new SampleRTT compared to the previous estimate.

4. Compute Timeout: TCP then uses the EstimatedRTT to compute the retransmission timeout
(TimeOut) in a conservative way:

TimeOut = 2 × EstimatedRTT

Karn/Partridge Algorithm

• Whenever a segment is retransmitted and then an ACK arrives at the sender, it is impossible
to determine if this ACK should be associated with the first or the second transmission of the
segment for the purpose of measuring the sample RTT.
• It is necessary to know which transmission to associate it with so as to compute an accurate
SampleRTT. In the figure a: if you assume that the ACK is for the original transmission but it was
really for the second, then the SampleRTT is too large.
In the figure b: if you assume that the ACK is for the second transmission but it was actually for the
first then the SampleRTT is too small.

The solution is surprisingly simple. Whenever TCP retransmits a segment, it stops taking samples of
the RTT; it only measures SampleRTT for segments that have been sent only once. This solution is
known as the Karn/Partridge algorithm, after its inventors.

The Karn/Partridge algorithm


The Karn/Partridge algorithm was introduced at a time when the Internet was suffering from high
levels of network congestion. Their approach was designed to fix some of the causes of that
congestion, and although it was an improvement, the congestion was not eliminated.

The main problem with the original computation is that it does not take the variance of the sample
RTTs into account.
if the variation among samples is small, then the EstimatedRTT can be better trusted and there is no
reason for multiplying this estimate by 2 to compute the timeout.

On the other hand, a large variance in the samples suggests that the timeout value should not be too
tightly coupled to the EstimatedRTT

In the new approach, the sender measures a new SampleRTT as before. It then folds this new sample
into the timeout calculation as follows:

Difference = SampleRTT − EstimatedRTT

EstimatedRTT = EstimatedRTT + (δ × Difference)

Deviation = Deviation + δ(|Difference| − Deviation) where δ is a fraction between 0 and 1.

where δ is a fraction between 0 and 1.

TCP then computes the timeout value as a function of both EstimatedRTT and Deviation as follows:
TimeOut = µ × EstimatedRTT + φ × Deviation

where based on experience, µ is typically set to 1 and φ is set to 4. Thus, when the variance is small,
TimeOut is close to EstimatedRTT; a large variance causes the Deviation term to dominate the
calculation
TCP CONGESTION CONTROL
Congestion occurs if load (number of packets sent) is greater than capacity of the network (number
of packets a network can handle).

When load is less than network capacity, throughput increases proportionally.

When load exceeds capacity, queues become full and the routers discard some packets and
throughput declines sharply.

When too many packets are contending for the same link

o The queue overflows

o Packets get dropped

o Network is congested

Network should provide a congestion control mechanism to deal with such a situation.

TCP maintains a variable called CongestionWindow for each connection.

TCP Congestion Control mechanisms are:

1. Additive Increase / Multiplicative Decrease (AIMD)

2. Slow Start

3. Fast Retransmit and Fast Recovery

Additive Increase / Multiplicative Decrease (AIMD)


 TCP source initializes CongestionWindow based on congestion level in the network.

 Source increases CongestionWindow when level of congestion goes down and decreases the same
when level of congestion goes up.

 TCP interprets timeouts as a sign of congestion and reduces the rate of transmission.

 On timeout, source reduces its CongestionWindow by half, i.e., multiplicative decrease. For
example, if CongestionWindow = 16 packets, after timeout it is 8.

 Value of CongestionWindow is never less than maximum segment size (MSS)

 When ACK arrives CongestionWindow is incremented marginally, i.e., additive increase.

Increment = MSS × (MSS/CongestionWindow)

CongestionWindow += Increment

 For example, when ACK arrives for 1 packet, 2 packets are sent. When ACK for both packets arrive,
3 packets are sent and so on.

 CongestionWindow increases and decreases throughout lifetime of the connection.


 When CongestionWindow is plotted as a function of time, a saw-tooth pattern results.

Slow Start
Slow start is used to increase CongestionWindow exponentially from a cold start.

Source TCP initializes CongestionWindow to one packet.

TCP doubles the number of packets sent every RTT on successful transmission.

When ACK arrives for first packet TCP adds 1 packet to CongestionWindow and sends two packets.

When two ACKs arrive, TCP increments CongestionWindow by 2 packets and sends four packets
and so on.

Instead of sending entire permissible packets at once (bursty traffic), packets are sent

in a phased manner, i.e., slow start.

Initially TCP has no idea about congestion, henceforth it increases CongestionWindow rapidly until
there is a timeout.

On timeout:

CongestionThreshold = CongestionWindow/ 2

CongestionWindow = 1
Slow start is repeated until CongestionWindow reaches CongestionThreshold and thereafter 1
packet per RTT.
Fast Retransmit And Fast Recovery
TCP timeouts led to long periods of time during which the connection went dead while waiting for
a timer to expire.

Fast retransmit is a heuristic approach that triggers retransmission of a dropped packet sooner
than the regular timeout mechanism. It does not replace regular timeouts.

When a packet arrives out of order, receiving TCP resends the same acknowledgment (duplicate
ACK) it sent last time.

When three duplicate ACK arrives at the sender, it infers that corresponding packet may be lost due
to congestion and retransmits that packet. This is called fast

retransmit before regular timeout.

When packet loss is detected using fast retransmit, the slow start phase is replaced by additive
increase, multiplicative decrease method. This is known as fast recovery.

Instead of setting CongestionWindow to one packet, this method uses the ACKs that are still in pipe
to clock the sending of packets.
Slow start is only used at the beginning of a connection and after regular timeout. At other times, it
follows a pure AIMD pattern.

For example, packets 1 and 2 are received whereas packet 3 gets lost.

o Receiver sends a duplicate ACK for packet 2 when packet 4 arrives.

o Sender receives 3 duplicate ACKs after sending packet 6 retransmits packet 3.

o When packet 3 is received, receiver sends cumulative ACK up to packet 6.


FUNCTIONS OF THE OSI LAYERS

1. PHYSICAL LAYER

The physical layer coordinates the functions required to transmit a bit stream over a
physical medium.
The physical layer is concerned with the following functions:
➢ Physical characteristics of interfaces and media - The physical layer defines
the characteristics of the interface between the devices and the transmission
medium.
➢ Representation of bits - To transmit the stream of bits, it must be encoded to
signals. The physical layer defines the type of encoding.
➢ Signals: It determines the type of the signal used for transmitting the information.
➢ Data Rate or Transmission rate - The number of bits sent each second –is also
defined by the physical layer.
➢ Synchronization of bits - The sender and receiver must be synchronized at the
bit level. Their clocks must be synchronized.
➢ Line Configuration - In a point-to-point configuration, two devices are
connected together through a dedicated link. In a multipoint configuration, a link
is shared between several devices.
➢ Physical Topology - The physical topology defines how devices are connected to
make a network. Devices can be connected using a mesh, bus, star or ring
topology.
➢ Transmission Mode - The physical layer also defines the direction of
transmission between two devices: simplex, half-duplex or full-duplex.

2. DATA LINK LAYER

It is responsible for transmitting frames from one node to the next node.
The other responsibilities of this layer are
➢ Framing - Divides the stream of bits received into data units called frames.
➢ Physical addressing – If frames are to be distributed to different systems on the
network , data link layer adds a header to the frame to define the sender and
receiver.
➢ Flow control- If the rate at which the data are absorbed by the receiver is less
than the rate produced in the sender ,the Data link layer imposes a flow ctrl
mechanism.
➢ Error control- Used for detecting and retransmitting damaged or lost frames and
to prevent duplication of frames. This is achieved through a trailer added at the
end of the frame.
➢ Medium Access control -Used to determine which device has control over the
link at any given time.

3. NETWORK LAYER
This layer is responsible for the delivery of packets from source to destination.
It determines the best path to move data from source to the destination based on the
network conditions, the priority of service, and other factors.
The other responsibilities of this layer are
➢ Logical addressing - If a packet passes the network boundary, we need another
addressing system for source and destination called logical address. This
addressing is used to identify the device on the internet.
➢ Routing – Routing is the major component of the network layer, and it
determines the best optimal path out of the multiple paths from source to the
destination.

4. TRANSPORT LAYER

It is responsible for Process to Process delivery. That is responsible for source-to


destination (end-to-end) delivery of the entire message, It also ensures whether the
message arrives in order or not.
The other responsibilities of this layer are
➢ Port addressing / Service Point addressing - The header includes an address
called port address / service point address. This layer gets the entire message to
the correct process on that computer.
➢ Segmentation and reassembly - The message is divided into segments and each
segment is assigned a sequence number. These numbers are arranged correctly on
the arrival side by this layer.
➢ Connection control - This can either be connectionless or connection oriented.
• The connectionless treats each segment as an individual packet and
delivers to the destination.
• The connection-oriented makes connection on the destination side before
the delivery. After the delivery the termination will be terminated.
➢ Flow control - The transport layer also responsible for flow control but it is
performed end-to-end rather than across a single link.
➢ Error Control - Error control is performed end-to-end rather than across the
single link..

5. SESSION LAYER

This layer establishes, manages and terminates connections between applications.


The other responsibilities of this layer are
➢ Dialog control - Session layer acts as a dialog controller that creates a dialog
between two processes or we can say that it allows the communication between
two processes which can be either half-duplex or full-duplex.
➢ Synchronization- Session layer adds some checkpoints when transmitting the
data in a sequence. If some error occurs in the middle of the transmission of data,
then the transmission will take place again from the checkpoint. This process is
known as Synchronization and recovery.
6. PRESENTATION LAYER

It is concerned with the syntax and semantics of information exchanged between


two
systems.
The other responsibilities of this layer are
➢ Translation – Different computers use different encoding system, this layer is
responsible for interoperability between these different encoding methods. It will
change the message into some common format.
➢ Encryption and decryption-It means that sender transforms the original
information to another form and sends the resulting message over the n/w. and
vice versa.
➢ Compression and expansion-Compression reduces the number of bits contained
in the information particularly in text, audio and video.

7. APPLICATION LAYER

This layer enables the user to access the network. It handles issues such as network
transparency, resource allocation, etc. This allows the user to log on to remote user.
The other responsibilities of this layer are
➢ FTAM (File Transfer, Access, Management) - Allows user to access files in a
remote host.
➢ Mail services - Provides email forwarding and storage.
➢ Directory services - Provides database sources to access information about
various sources and objects.
Tcp architecture

▪ The TCP/IP architecture is also called as Internet architecture.


▪ It is developed by the US Defense Advanced Research Project Agency (DARPA)
for its packet switched network (ARPANET).
▪ TCP/IP is a protocol suite used in the Internet today.
▪ It is a 4-layer model. The layers of TCP/IP are
1. Application layer
2. Transport Layer (TCP/UDP)
3. Internet Layer
4. Network Interface Layer
APPLICATION LAYER

▪ An application layer incorporates the function of top three OSI layers. An


application layer is the topmost layer in the TCP/IP model.
▪ It is responsible for handling high-level protocols, issues of representation.
▪ This layer allows the user to interact with the application.
▪ When one application layer protocol wants to communicate with another
application layer, it forwards its data to the transport layer.
▪ Protocols such as FTP, HTTP, SMTP, POP3, etc running in the application layer
provides service to other program running on top of application layer

TRANSPORT LAYER

▪ The transport layer is responsible for the reliability, flow control, and correction
of data which is being sent over the network.
▪ The two protocols used in the transport layer are User Datagram protocol and
Transmission control protocol.
o UDP – UDP provides connectionless service and end-to-end delivery of
transmission. It is an unreliable protocol as it discovers the errors but not
specify the error.
o TCP – TCP provides a full transport layer services to applications. TCP is
a reliable protocol as it detects the error and retransmits the damaged
frames.

INTERNET LAYER

▪ The internet layer is the second layer of the TCP/IP model.


▪ An internet layer is also known as the network layer.
▪ The main responsibility of the internet layer is to send the packets from any
network, and they arrive at the destination irrespective of the route they take.
▪ Internet layer handle the transfer of information across multiple networks through
router and gateway .
▪ IP protocol is used in this layer, and it is the most significant part of the entire
TCP/IP suite.
NETWORK INTERFACE LAYER

▪ The network interface layer is the lowest layer of the TCP/IP model.
▪ This layer is the combination of the Physical layer and Data Link layer defined in
the OSI reference model.
▪ It defines how the data should be sent physically through the network.
▪ This layer is mainly responsible for the transmission of the data between two
devices on the same network.
▪ The functions carried out by this layer are encapsulating the IP datagram into
frames transmitted by the network and mapping of IP addresses into physical
addresses.
▪ The protocols used by this layer are Ethernet, token ring, FDDI, X.25, frame
relay.

You might also like