0% found this document useful (0 votes)
35 views26 pages

Week 4

The document discusses reliable data transfer protocols for transmitting data over unreliable networks. It describes the stop-and-wait automatic repeat request (ARQ) protocol, where the sender transmits one frame at a time and waits for an acknowledgment before sending the next frame. This results in low throughput. It then introduces the Go-Back-N ARQ protocol, which allows the sender to transmit multiple frames without waiting for acknowledgments, up to a maximum number N of unacknowledged frames, improving throughput.

Uploaded by

AKANKSHA RAJ
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views26 pages

Week 4

The document discusses reliable data transfer protocols for transmitting data over unreliable networks. It describes the stop-and-wait automatic repeat request (ARQ) protocol, where the sender transmits one frame at a time and waits for an acknowledgment before sending the next frame. This results in low throughput. It then introduces the Go-Back-N ARQ protocol, which allows the sender to transmit multiple frames without waiting for acknowledgments, up to a maximum number N of unacknowledged frames, improving throughput.

Uploaded by

AKANKSHA RAJ
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Jon Postel proposed a Mail Transfer Protocol in 1980

Electronic mail service: Email


As with ordinary postal mail, e-mail is an asynchronous
communication
medium—people send and read messages when it is convenient
for them, without
having to coordinate with other people’s schedules.

SMTP is the principal application-layer protocol for Internet


electronic mail. It
uses the reliable data transfer service of TCP to transfer mail
from the sender’s mail
server to the recipient’s mail server.

As with most application-layer protocols,


SMTP has two sides: a client side, which executes on the
sender’s mail server, and a
server side, which executes on the recipient’s mail server. Both
the client and server
sides of SMTP run on every mail server.
SMTP: RFC 5321
SMTP is much older than HTTP. (The original
SMTP RFC
dates back to 1982,

telnet serverName
25/465/587

The first Web Mail implementation was developed


at CERN in 1993 by Phillip Hallam-Baker
Mail Access Protocols [POP3 : Post Office
Protocol]
POP3 is an extremely simple mail access protocol. It is defined
in [RFC 1939], which
is short and quite readable.

POP3 begins when the user agent (the client) opens a TCP
connection
to the mail server (the server) on port 110.

POP3 progresses through three phases: authorization,


transaction, and update.
During the first phase, authorization, the user agent sends a
username and a password
(in the clear) to authenticate the user. During the second phase,
transaction, the user
agent retrieves messages; also during this phase, the user agent
can mark messages
for deletion, remove deletion marks, and obtain mail statistics.
Mail Access Protocols [IMAP- Internet
Message Access Protocol]
Logging in to Remote IMAP Server Check out the sent box
IMAP allow the user to do operations
remotely on the mailbox. This was not telnet imap.servername.com 143 A EXAMINE INBOX.Sent
possible in POP3 as the mails are
downloaded to the client machine and Login Create a New Folder in Inbox
doing all remote operations such as moving
mail from one to other folder, creating A1 LOGIN username password A CREATE INBOX.NEW
remote folder, retrieving components of a
message etc. are not possible. Displaying remote folder list Check Status of an INBOX

IMAP provides additional functionalities to A2 LIST “” * A STATUS INBOX (MESSAGES)


the email access clients
Examine a specific folder contents Check Flags of Specific Message

A3 EXAMINE INBOX A FETCH 1 FLAGS

Select a specific message from INBOX Copy and email from one to another

A FETCH 1 BODY[] A COPY 1 INBOX.Trash


The most striking difference is that FTP uses two parallel TCP
FTP File Transfer Protocol connections to transfer a file, a control connection and a data
connection.

The control connection is used for sending control information


between the two hosts—information such as user identification,
password, commands to change remote directory, and
commands to “put” and “get” files.

The data connection is used to actually send a file.

When the server side receives a command for a file transfer over
the control connection (either to, or from, the remote host), the
server side initiates a TCP data connection to the client side.

FTP sends exactly one file over the data connection and then
closes the data connection. If, during the same session, the user
wants to transfer another file, FTP opens another data connection.
Transport Layer Services
• Transport Layer provides process to
process delivery by multiplexing and
demultiplexing.
• It provides a logical connection
between processes running on two
end systems
Transport Layer Services

• Transport Layer Protocol run in end systems and is responsible for


moving messages from applications to network layer.
• Different Transport Layer Protocols provide different set of services to
the applications.
• Transport layer services are constrained by services provided by
network layer. Like Transport layer has not much to commit on delay
and bandwidth if lower layers do not provide any commitments.
• Though it can add some services: such as reliability
Transport Layer Protocols: UDP and TCP
• Always remember that protocol used at network layer or IP is
unreliable and best effort delivery service. [we will come back to it in
the Network Layer]
• User Datagram Protocol provides the minimal services expected from
a transport layer protocol that includes:
• Process to process data delivery
• Error checking
• Transmission Control Protocol provides additional services that
includes:
• Reliable data transfer between two processes
• Congestion control: Fair share of network resources to communicating
applications.
Transport Layer Services
• The job of gathering data chunks at the source
host from different sockets, encapsulating
each data chunk with header information (that
will later be used in demultiplexing) to create
segments, and passing the segments to the
network layer is called multiplexing.
• Job of delivering the data in a transport-layer
segment to the correct socket is called
demultiplexing.
• A process (as part of a network application)
can have one or more sockets, doors through
which data passes from the network to the
process and through which data passes from
the process to the network.
Transport Layer Services
• source port number field and the destination
port number field help in process to process
delivery between two hosts.
• Applications open socket which are uniquely
identified by transport layer protocol, port
numbers and IP addresses.
• Transport layer while reading the segment
headers [having destination port number field]
passes the segment data to the appropriate
socket attached to the given port number in
the end system.
• Each port number is a 16-bit number, ranging
from 0 to 65535. The port numbers ranging
from 0 to 1023 are called well-known port
numbers and are restricted
Transport Layer: Connectionless UDP
the source port number serves as part of
a “return address”—when B wants to send
a segment back to A, the destination port
in the B-to-A segment will take its value
You may be wondering now, what is the purpose from the source port value of the A-to-B
of the source port number in the segment header ? segment.
It is important to note that a UDP socket
is fully identified by a two-tuple
consisting of a destination IP address
and a destination port number.
Transport Layer: Connection Oriented TCP
The TCP server application has a “welcoming socket,” that waits
for connection establishment requests from TCP clients
TCP: Concurrent

https://www.cs.dartmouth.edu/~ca
mpbell/cs50/socketprogramming.ht
ml
Transport Layer: Connection Oriented TCP
Underlying Transport Layer Protocol [UDP/TCP]
User Datagram Protocol [RFC 768]
UDP is said to be connectionless as no handshaking is performed between the communicating processes.

the host-side UDP adds header fields to the message and passes the resulting segment to the network
layer. The network layer encapsulates the UDP segment into a datagram and sends the datagram

UDP provides
1. Finer application layer control
2. No connection establishment
3. No connection state
4. Small packet overhead
Principles of Reliable Data Transfer [TCP]
Principles of Reliable Data Transfer: Stop and Wait ARQ
Automatic Repeat ReQuest (ARQ) is a group of error – control protocols for
transmission of data over noisy or unreliable communication network.
Principles of Reliable Data Transfer: Stop and Wait ARQ

the sender was able to send only 1,000 bytes in 30.008 milliseconds, an
effective throughput of only 267 kbps—even though a 1 Gbps link was
available!
Reliable Data Transfer: Go Back N ARQ
To improve the performance if the sender is allowed to transmit In a Go-Back-N (GBN) protocol, the sender is allowed to
three packets before having to wait for acknowledgments, the transmit multiple packets (when available) without waiting for
utilization of the sender is essentially tripled. Since the many an acknowledgment, but is constrained to have no more than
in-transit sender-to receiver packets can be visualized as filling a some maximum allowable number, N, of unacknowledged
pipeline, this technique is known as pipelining packets in the pipeline
Principles of Reliable Data Transfer: Go Back N
ARQ

The GBN sender must respond to three types of events:


• Invocation from above, Receipt of an ACK, A timeout event
Principles of Reliable Data Transfer: Go Back N
ARQ
Principles of Reliable Data Transfer: Go Back N
ARQ
The advantage of this approach is the simplicity of receiver
buffering—the receiver need not buffer any out-of-order packets.
Thus, while the sender must maintain the upper and lower
bounds of its window and the position of nextseqnum within
this window, the only piece of information the receiver need
maintain is the sequence number of the next in-order packet.
This value is held in the variable expectedseqnum
Principles of Reliable Data Transfer: Selective Repeat ARQ
A single packet error can cause GBN to retransmit a large number of packets, many unnecessarily

As the name suggests, selective-repeat protocols avoid unnecessary retransmissions by having the sender retransmit
only those packets that it suspects were received in error (that is, were lost or corrupted) at the receiver. This individual,
as needed, retransmission will require that the receiver individually acknowledge correctly received packets
Principles of Reliable Data Transfer: Selective Repeat ARQ
Selective Repeat ARQ: Window size
and Sequence Number Space

You might also like