0% found this document useful (0 votes)
53 views38 pages

CN Unit 5

The document discusses various topics related to computer networks including transport layer protocols, TCP, quality of service techniques, and application layer protocols like remote login, telnet, electronic mail, DNS, SMTP, FTP and HTTP. It provides details on TCP segments, three-way handshaking in TCP, error control, and congestion control in TCP.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views38 pages

CN Unit 5

The document discusses various topics related to computer networks including transport layer protocols, TCP, quality of service techniques, and application layer protocols like remote login, telnet, electronic mail, DNS, SMTP, FTP and HTTP. It provides details on TCP segments, three-way handshaking in TCP, error control, and congestion control in TCP.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 38

SCHOOL OF COMPUTING

DEPARTMENT OF COMPUTER SCIENCE AND


ENGINEERING
COMPUTER NETWORKS
1154CS101
INSTITUTE ELECTIVE
UNIT V Transport Layer and Application Layer

Process-to-Process Delivery: UDP – TCP - Congestion Control - Quality of Service -


Techniques to Improve QoS – Application layer protocols: REMOTE LOGGING - TELNET -
ELECTRONIC MAIL – DNS – SMTP – FTP - HTTP.
Process-to-Process Delivery
The transport transport layer is responsible responsible for process process-toprocess process
delivery delivery—the delivery delivery of a packet, packet, part of a message, message, from one
process process to another another. Two processes processes communicate communicate in a
client/server client/server relationship.
Client/Server Paradigm
Although there are several ways to achieve process-to-process communication, the most
common one is through the client/server paradigm. A process on the local host, called a
client, needs services from a process usually on the remote host, called a server. Both
processes (client and server) have the same name. For example, to get the day and time from
a remote machine, we need a Daytime client process running on the local host and a Daytime
server process running on a remote machine. For communication, we must define the
following:
 Local host
 Local process
 Remote host
 Remote process
Addressing

Whenever we need to deliver something to one specific destination among many, we need
an address. At the data link layer, we need a MAC address to choose one node among
several nodes if the connection is not point-to-point. A frame in the data link layer needs a
Destination MAC address for delivery and a source address for the next node's reply.
 The IP addresses and port numbers play different roles in selecting the final destination of
data.
 The destination IP address defines the host among the different hosts in the world.
 After the host has been selected, the port number defines one of the processes on this
particular host.
IANA Ranges
 The lANA (Internet Assigned Number Authority) has divided the port numbers into three
ranges: well known, registered, and dynamic (or private)
 Well-known ports. The ports ranging from 0 to 1023 are assigned and controlled by lANA.
These are the well-known ports.
 Registered ports. The ports ranging from 1024 to 49,151 are not assigned or controlled by
lANA. They can only be registered with lANA to prevent duplication.
 Dynamic ports. The ports ranging from 49,152 to 65,535 are neither controlled nor
registered. They can be used by any process. These are the ephemeral ports.
Socket Addresses
 Process-to-process delivery needs two identifiers, IP address and the port number, at each end
to make a connection.
 The combination of an IP address and a port number is called a socket address.
 The client socket address defines the client process uniquely just as the server socket address
defines the server process uniquely
Multiplexing and Demultiplexing
 The addressing mechanism allows multiplexing and demultiplexing by the transport layer,
Multiplexing
 At the sender site, there may be several processes that need to send packets. However, there is
only one transport layer protocol at any time. This is a many-to-one relationship and requires
multiplexing.
Demultiplexing
 At the receiver site, the relationship is one-to-many and requires demultiplexing. The transport layer
receives datagrams from the network layer. After error checking and dropping of the header, the transport
layer delivers each message to the appropriate process based on the port number.
Transmission Control Protocol
Well-known ports used by TCP
Figure: Stream delivery
Figure: Sending and receiving buffers
Figure: TCP segments
TCP FEATURES

To provide the services mentioned in the previous section, TCP has


several features that are briefly summarized in this section.

The topics discussed in this section include:

Numbering System
Flow Control Note:
Error Control
Congestion Control
The bytes of data being transferred in each connection are
numbered by TCP. The numbering starts with a randomly
generated number.
SEGMENT
A packet in TCP is called a segment

Figure: TCP segment format


Figure: Control field
Table: Description of flags in the control field
A TCP CONNECTION

TCP is connection-oriented. A connection-oriented transport protocol establishes a virtual path


between the source and destination. All of the segments belonging to a message are then sent over this
virtual path. A connection-oriented transmission requires three phases: connection establishment, data
transfer, and connection termination.
• A SYN segment
cannot carry data, but
it consumes one
sequence number.

• A SYN + ACK
segment cannot carry
data, but does
consume one
sequence number.

• An ACK segment,
if carrying no
data, consumes no
sequence number.
Figure: Connection establishment using three-way handshaking
Figure: Data transfer
Figure: Connection termination using three-way handshaking

Note:

The FIN segment


consumes one sequence
number if it does not
carry data.
Figure: Half-close
Quality of service is the ability to provide different priority to different applications,
users, or data flows, or to guarantee a certain level of performance to a data flow
it defines the quality of service as something a flow seeks to attain
 Reliability : Lack of Reliability means losing a packet or ack.
 Delay : Different applications can tolerate delay in different degrees.
 Jitter : jitter is the variation in packets belonging to same flow.
 Bandwidth : different application need different b/w
Techniques to improve the quality of service
Scheduling
 FIFO QUEUING
 PRIORITY QUEUING
 WEIGHTED FAIR QUEUING
Traffic Shaping
 LEAKY BUCKET
 TOKEN BUCKET
Resource Réservation
Admission Control
Scheduling
 Packets from different flow arrive at switch or router for processing
 A good scheduling technique treats the different flow in a fair and appropriate manner
FIFO QUEUING
Priority Queuing
 Packets are assigned to a priority class
 Each class has its own queue.
 Higher class packets are processed first
Traffic Shaping
 Is the mechanism to control the amount and the rate of the traffic sent to the network
Leaky Bucket
 The rate at which water leaks from a bucket does not depend on the rate at which the
water is input to the bucket
 The input rate varies but the o/p remains constant ,similarly ,network can smooth out
bursty traffic.
Token Bucket
 One after another
Resource Reservation
 A flow of data needs resources such as buffer, bandwidth, CPU time, and so on
 QoS can be improved if these resources are reserved beforehand.
Admission Control
 Routers or switches puts restrictions on the admission of packets from host.
 Before a router accepts the flow , it checks the flow for specifications in terms of
bandwidth , buffer size ,cpu speed etc.
Remote Login
Early Computers Used Textual Interfaces
 When the Internet was being invented, computers consisted of timesharing systems.
 Allowed many users to access the system simultaneously
 Appeared to operate the same as a personal computer
A Timesharing System Requires User
Because multiple users can interact with a timesharing computer, the system requires
each user to identify themselves when they begin
Remote login service allows a user to access a remote timesharing computer system.
–To use the service, a user:
• Invokes an application program
• Specifies the name of a remote computer
• Provides a login identification
• Specifies a password
Remote login requires three basic
components:
– Software download
– Internet connection
– Secure desktop sharing network
Remote Login using Telnet
STEP 1 Click Start - Run. Type "telnet" in the pop-up window.
STEP2 The Telnet window opens up. Click on Connect - Remote System
STEP 3 You will find three fields in the Connect window. The first lets you specify the
Host Name, the second one Port and the third, the Terminal Type
STEP 4 The program now tries to find the host and establish a link. Once a connection has
been successfully set up, a welcome message and a login prompt will be displayed in the
window.
STEP 5 Type in the login name and press enter key. You would then be asked for the
password. Type the password and press enter If the password is correct ,a prompt is
displayed on screen. The telnet window now act as a terminal of a remote machine and
you can manipulate files,execute commands on remote compu
Electronic Mail
 One of the most popular Internet services is electronic mail (e-mail).
 The designers of the Internet probably never imagined the popularity of this application
program.
 Its architecture consists of several components.
 At the beginning of the Internet era, the messages sent by electronic mail were short and
consisted of text only; they let people exchange quick memos.
First Scenario
 In the first scenario, the sender and the receiver of the e-mail are users (or application
programs) on the same system; they are directly connected to a shared system.
 The administrator has created one mailbox for each user where the received messages are
stored.
 A mailbox is part of a local hard drive, a special file with permission restrictions. Only the
owner of the mailbox has access to it.
 When Alice, a user, needs to send a message to Bob, another user, Alice runs a user agent (VA)
program to prepare the message and store it in Bob's mailbox.
 The message has the sender and recipient mailbox addresses (names of files). Bob can retrieve
and read the contents of his mailbox at his convenience, using a user agent

Second Scenario
 In the second scenario, the sender and the receiver of the e-mail are users (or application
programs) on two different systems.
 The message needs to be sent over the Internet. Here we need user agents (VAs) and message
transfer agents (MTAs)
Third Scenario
 In the third scenario, Bob, as in the second scenario, is directly connected to his system.
 Alice, however, is separated from her system.
 Either Alice is connected to the system via a point-to- point WAN, such as a dial-up modem, a DSL,
or a cable modem; or she is connected to a LAN in an organization that uses one mail server for
handling e-mails-all users need to send their messages to this mail server
Fourth Scenario
 In the fourth and most common scenario, Bob is also connected to his mail server by a WAN
or a LAN.
 After the message has arrived at Bob's mail server, Bob needs to retrieve it.

 Here, we need another set of client/server agents, which we call message access agents
(MAAs). Bob uses an MAA client to retrieve his messages.
 The client sends a request to the MAA server, which is running all the time, and requests the
transfer of the messages

Services Provided by a User Agent


 Composing Messages

 Reading Messages

 Replying to Messages

 Forwarding Messages
Domain Name System
 There are several applications in the application layer of the Internet model that follow the
client/server paradigm.
 The client/server programs can be divided into two categories: those that can be directly used by
the user, such as e-mail, and those that support other application programs.
 The Domain Name System (DNS) is a supporting program that is used by other programs such as
e-mail.
Need for DNS
 To identify an entity, TCP/IP Protocols use the IP address, which uniquely identifies the
connection of a host to an internet.
 In the case of ARPANET, a file named hosts.txt is used to list all hosts and their IP addresses, this
work suitable for small network but not for large network due to heavy load and latency.
 Therefore, people prefer to use names instead of addresses that is, we need a system that can map
a name to an address and conversely an address to a name.
 Thus, preferred system is called as Domain Name system.
DNS in the Internet
DNS is a protocol that can be used in different platforms. In the Internet, the domain name space
is divided into three sections.
1. Generic domains
2. Country domains and
3. Inverse domain
Hypertext Transfer Protocol (HTTP)
(HTTP) is a protocol used mainly to access data on the World Wide Web.
 Request type: This field is used in the request message. In version1.1of HTTP, several request
types are defined.
 Version: The most current version of HTTP is 1.1.
 Status code: This field is used in the response message. The status code field is similar to those
in the FTP and the SMTP protocols. It consists of three digits.
 Status phrase: This field is used in the response message. It explains the status code in text
form.
 Header: The header exchanges additional information between the client and the server. For
example, the client can request that the document be sent in a special format, or the server can
send extra information about the document. The header can consist of one or more header lines.
Each header line has a header name, a colon, a space, and a header value.
 Body: The body can be present in a request or response message. Usually, it contains the
document to be sent or received.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy