0% found this document useful (0 votes)
46 views22 pages

Transport Layer Notes

The transport layer is responsible for process-to-process delivery between computers. It establishes connections, handles addressing with port numbers, and provides both reliable and unreliable data transfer through protocols like TCP and UDP.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views22 pages

Transport Layer Notes

The transport layer is responsible for process-to-process delivery between computers. It establishes connections, handles addressing with port numbers, and provides both reliable and unreliable data transfer through protocols like TCP and UDP.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Transport Layer

The transport layer is the fourth layer from the bottom in the OSI reference model.It is responsible for message delivery
from process running in source computer to the process running in the destination computer. Transport layer does not
perform any function in the intermediate nodes. It is active only in the end systems
Transport Layer Design Issues
The transport layer delivers the message from one process to another process running on two different hosts. Thus, it has
to perform number of functions to ensure the accurate delivery of message
The various functions of transport layer are:
 Establishing, Maintaining & Releasing Connection:
The transport layer establishes, maintains & releases end-to-end transport connection on the request of upper layers.
Establishing a connection involves allocation of buffers for storing user data, synchronizing the sequence numbers of
packets etc. A connection is released at the request of upper layer.
 Addressing:
In order to deliver the message from one process to another, an addressing scheme is required. Several process may be
running on a system at a time. In order to identify the correct process out of the various running processes, transport
layer uses an addressing scheme called port number. Each process has a specific port number.
 Data Transfer:
Transport layer breaks user data into smaller units and attaches a transport layer header to each unit forming a TPDU
(TransPort Layer Data Unit). The TPDU is handed over to the network layer for its delivery to destination. The TPDU
header contains port number, sequence number, acknowledgement number, checksum and other fields.
 Flow Control:
Like data link layer, transport layer also performs flow control. However, flow control at transport layer is performed
end-to-end rather than node-to-node. Transport Layer uses a sliding window protocol to perform flow control.
 Error Control:
Transport layer also provides end-to-end error control facility. Transport layer deals with several different types of
errors such as error due to damaged bits,error due to non delivery of TPDUs,error due to duplicate delivery of
TPDUs,error due to delivery of TPDU to a wrong destination etc.
 Congestion Control:
Transport layer also handles congestion in the networks. Several different congestion control algorithms are used to
avoid congestion.
Transport Layer Services
Transport layer protocols can provide two types of services:
 Connection Oriented Service
In connection oriented service, a connection is first established between sender and the receiver. Then, transfer of
user data takes place. At the end, connection is released. The connection oriented service is generally reliable.
Transport layer protocols that provide connection oriented service are TCP and SCTP (Stream Control Transmission
Protocol).
 Connectionless Service
In the service, the packets are sent from sender to receiver without the establishment of connection. In such
service, packets are not numbered. The packets may be lost, corrupted, delayed or disordered. Connectionless service
is unreliable. Transport layer protocol that provides this service is UDP.
Elements of Transport Protocols
Addressing:
in order to deliver data from a process running on source to process running on destination, transport layer defines the
Service Point Address or Port Numbers.
 Port Numbers:
Each communicating process is assigned a specific port number. In order to select among multiple processes running
on a destination host, a port number is required. The port numbers are 16-bit integers between 0 and 65,535. Port
numbers are assigned by Internet Assigned Number Authority (IANA). IANA has divided the port numbers in three
categories: Well Known Ports: The ports ranging from 0 to 1023. For e.g.: HTTP: 80, SMTP: 25, FTP: 21.
Registered Ports: The ports ranging from 1024 to 49,151.These are not controlled by IANA. Dynamic Ports: The
ports ranging from 49,152 to 65,535. These can be used by any process.
 Socket Address:
Socket address is a combination of IP address and port number. In order to provide communication between two
different processes on different networks, both IP address and port number, i.e. socket address is required
Transmission Control Protocol
Transmission Control Protocol (TCP) is a connection oriented protocol that provides reliable services between processes
on different hosts. It uses the services of lower layer which provide connectionless and unreliable service.
The basic features of TCP are:
 It provides efficient method for numbering different bytes of data.
 It provides stream data transfer.
 It offers reliability.
 It provides efficient flow control.
 It provides full duplex operation.
 It provides multiplexing.
 It provides connection oriented service.
TCP Segment
TCP segment is the unit of data transferred between two processes. Each TCP segment consists of two parts: Header Part
and Data Part
Format of TCP Segment
Source Port:
It indicates the port number of a source
process. It is of 2 bytes.
Destination Port:
It indicates the port number of
destination process. It is also 2 bytes.
Sequence Number:
It specifies the number assigned to the
current message. It is of 4 bytes.
Acknowledgement Number:
It indicates the sequence number of the
next byte of data. It is of 4 bytes.
Checksum: This 16-bit field contains the
checksum.
Header Length: It indicates number of words in the TCP header. It is a 4 bit field.
Reserved: This 6 bit field is reserved for future use.
Flags: This 6 bit field consists of 6 different flags:
 UGR (Urgent Pointer)  RST (Reset the Connection)
 ACK (Acknowledgement)  SYN (Synchronize)
 PSH (Request for Push)  FIN (Final or Terminate the Connection)
Window: It specifies the size of sender’s receiving window, i.e., the buffer space available for incoming data. It is of 2
bytes.
Urgent Pointer: This 16-bit field is valid only if urgent pointer in flags is set to 1.
Options: It contains the optional information in the TCP header. It is of 32 bytes.
Data: This field contains the upper layer information. It is of variable size.

UDP Datagram
A datagram is the unit of data transferred between two processes. Each UDP datagram consists of two parts: Header Part
and Data Part
Format of UDP Datagram
Source Port: It indicates the port number of source process.
It is of 16 bits.
Destination Port: This 16 bit field specifies the port
number of destination process.
Length: It specifies the total length of the user
datagram (header + data). It is of 16 bits.
Checksum: The contains the checksum, and is
optional. It is also of 16 bits.

Process to process delivery

The transport layer is responsible for process-to-process delivery—the delivery of a packet, part of a message, from one
process to another. Two processes communicate in a client/server relationship.

Types of data deliveries

 Data Link Layer is responsible for delivery of frames between two neighboring nodes over a link.
This is called node-to-node delivery.
 Network Layer is responsible for delivery of datagrams between two hosts.
This is called host-to-host delivery.
 Transport Layer is responsible for delivery of entire message from one process running on source to another
process running on destination.
This is called process-to process delivery.
Transport Layer Design Issues

 The transport layer delivers the message from one process to another process running on two different hosts.
 Thus, it has to perform number of functions to ensure the accurate delivery of message.
 The various functions of transport layer are:
 Establishing, Maintaining & Releasing Connection
 Addressing
 Data Transfer
 Flow Control
 Error Control
 Congestion Control
 Establishing, Maintaining & Releasing Connection:
 The transport layer establishes, maintains & releases end-to-end transport connection on the request of
upper layers.
 Establishing a connection involves allocation of buffers for storing user data, synchronizing the sequence
numbers of packets etc.
 A connection is released at the request of upper layer.
 Addressing:
 In order to deliver the message from one process to another, an addressing scheme is required.
 Several process may be running on a system at a time.
 In order to identify the correct process out of the various running processes, transport layer uses an addressing
scheme called port number.
 Each process has a specific port number.
 Data Transfer:
 Transport layer breaks user data into smaller units and attaches a transport layer header to each unit forming a
TPDU (TransPort Layer Data Unit).
 The TPDU is handed over to the network layer for its delivery to destination.
 The TPDU header contains port number, sequence number, acknowledgement number, checksum and other
fields.
 Flow Control:
 Like data link layer, transport layer also performs flow control.
 However, flow control at transport layer is performed end-to-end rather than node-to-node.
 Transport Layer uses a sliding window protocol to perform flow control.
 Error Control:
 Transport layer also provides end-to-end error control facility.
 Transport layer deals with several different types of errors:
 Error due to damaged bits.
 Error due to non-delivery of TPDUs.
 Error due to duplicate delivery of TPDUs.
 Error due to delivery of TPDU to a wrong destination.
 Congestion Control:
 Transport layer also handles congestion in the networks.
 Several different congestion control algorithms are used to avoid congestion.
Transport Layer Services
Transport layer protocols can provide two types of services:
1. Connection Oriented Service
2. Connectionless Service
 Connection Oriented Service:
 In connection oriented service, a connection is first established between sender and the receiver.
 Then, transfer of user data takes place.
 At the end, connection is released.
 The connection oriented service is generally reliable.
 Transport layer protocols that provide connection oriented service are TCP and SCTP (Stream Control
Transmission Protocol).
 Connectionless Service:
 In the service, the packets are sent from sender to receiver without the establishment of connection.
 In such service, packets are not numbered.
 The packets may be lost, corrupted, delayed or disordered.
 Connectionless service is unreliable.
 Transport layer protocol that provides this service is UDP.
Elements of Transport Protocols
 Addressing:
 In order to deliver data from one process to another, address is required.
 In order to deliver data from one node to another, MAC address is required.Such an address is
implemented at Data Link Layer and is called Physical Addressing
 In order to deliver data from one network to another, IP address is required.
 Such an address is implemented at Network Layer and is called Logical Addressing.
 Similarly, in order to deliver data from a process running on source to process running on destination,
transport layer defines the Service Point Address or Port Numbers.
 Port Numbers:
 Each communicating process is assigned a specific port number.
 In order to select among multiple processes running on a destination host, a port number is required.
 The port numbers are 16-bit integers between 0 and 65,535.
 Port numbers are assigned by Internet Assigned Number Authority (IANA).
 IANA has divided the port numbers in three categories:
 Well Known Ports: The ports ranging from 0 to 1023. For e.g.: HTTP: 80, SMTP: 25, FTP:
21.
 Registered Ports: The ports ranging from 1024 to 49,151.These are not controlled by IANA.
 Dynamic Ports: The ports ranging from 49,152 to 65,535. These can be used by any process.
 Socket Address:
 Socket address is a combination of IP address and port number.
 In order to provide communication between two different processes on different networks, both IP
address and port number, i.e. socket address is required
 Connection Establishment:
 Before communicating, the source device must first determine the availability of the other to exchange
data.
 Path must be found through the network by which the data can be sent. This is called Connection
Establishment
 Connection establishment involves Three-Way Handshaking mechanism:
 The source sends a connection request packet to the destination.
 The destination returns a confirmation packet back to the source.
 The source returns a packet acknowledging the confirmation.
 Connection Release:
 Once all of the data has been transferred, the connection must be released.
 It also requires a Three-Way Handshaking mechanism:
 The source sends a disconnect request packet to the destination.
 The destination returns a confirmation packet back to the source.
 The source returns a packet acknowledging the confirmation.
Transport Layer Protocols
 Transport layer provides two types of services:
 Connection Oriented Service
 Connectionless Service
 For this, transport layer defines two different protocols:
 Transmission Control Protocol (TCP)
 User Datagram Protocol (UDP)
Transmission Control Protocol
 Transmission Control Protocol (TCP) is a connection oriented protocol that provides reliable services between
processes on different hosts.
 It uses the services of lower layer which provide connectionless and unreliable service.
The basic features of TCP are:
 It provides efficient method for numbering different bytes of data.
 It provides stream data transfer.
 It offers reliability.
 It provides efficient flow control.
 It provides full duplex operation.
 It provides multiplexing.
 It provides connection oriented service.
TCP Segment
 TCP segment is the unit of data transferred between two processes.
 Each TCP segment consists of two parts:
 Header Part
 Data Part
Format of TCP Segment

 Source Port:
 It indicates the port number of a source process. It is of 2 bytes.
 Destination Port:
 It indicates the port number of destination process. It is also 2 bytes.
 Sequence Number:
 It specifies the number assigned to the current message. It is of 4 bytes.
 Acknowledgement Number:
 It indicates the sequence number of the next byte of data. It is of 4 bytes.
 Header Length:
 It indicates number of words in the TCP header. It is a 4 bit field.
 Reserved:
 This 6 bit field is reserved for future use.
 Flags:
 This 6 bit field consists of 6 different flags:
 UGR (Urgent Pointer)
 ACK (Acknowledgement)
 PSH (Request for Push)
 RST (Reset the Connection)
 SYN (Synchronize)
 FIN (Final or Terminate the Connection)
 Window:
 It specifies the size of sender’s receiving window, i.e., the buffer space available for incoming data. It is
of 2 bytes.
 Checksum:
 This 16-bit field contains the checksum.
 Urgent Pointer:
 This 16-bit field is valid only if urgent pointer in flags is set to 1.
 Options:
 It contains the optional information in the TCP header. It is of 32 bytes.
 Data:
 This field contains the upper layer information. It is of variable size.
User Datagram Protocol
 User Datagram Protocol (UDP) is a connectionless, unreliable transport protocol.
 Like TCP, UDP also provides process-to-process communication.
 Unlike TCP, it does not provide flow control and error control mechanisms.
 It is connectionless, therefore, it transfers data without establishing a connection.
 The various features of UDP are:
 It provides connectionless transport service.
 It is unreliable.
 It does not provide flow control and error control.
 It is less complex and is simple than TCP, and easy to implement.
 User datagrams (packets) are not numbered.
UDP Datagram
 A datagram is the unit of data transferred between two processes.
 Each UDP datagram consists of two parts:
 Header Part
 Data Part.
Format of UDP Datagram

 Source Port:
 It indicates the port number of source process. It is of 16 bits.
 Destination Port:
 This 16 bit field specifies the port number of destination process.
 Length:
 It specifies the total length of the user datagram (header + data). It is of 16 bits.
 Checksum:
 Contains the checksum, and is optional. It is also of 16 bits.
Congestion Control
Congestion is a situation in Communication Networks in which too many packets are present in a part of the subnet,
performance degrades.

Congestion in a network may occur if the load on the network-the number of packets send to the network-is greater than
the capacity of the network

Causing of Congestion:
 The various causes of congestion in a subnet are:
 The input traffic rate exceeds the capacity of the output lines.

 The routers are too slow to perform bookkeeping tasks


 The routers' buffer is too limited.
 if the processors are slow
 Congestion is also caused by slow links
How to correct the Congestion Problem
Congestion Control refers to techniques and mechanisms that can either prevent congestion, before it happens, or remove
congestion, after it has happened.
Congestion Control refers to techniques and mechanisms to control the congestion and keep the load below the capacity.
Types of congestion control

Categories of congestion control


Open Loop Congestion Control
 In this method, policies are used to prevent the congestion before it happens.
 Congestion control is handled either by the source or by the destination.
 The various methods used for open loop congestion control are:
 Retransmission Policy
 Window Policy
 Acknowledgement Policy
 Discarding Policy
 Admission Policy
Retransmission Policy
 The sender retransmits a packet, if it feels that the packet it has sent is lost or corrupted.
 However retransmission in general may increase the congestion in the network. But we need to implement good
retransmission policy to prevent congestion.
 The retransmission policy and the retransmission timers need to be designed to optimize efficiency and at the
same time prevent the congestion.
Window Policy
 To implement window policy, selective reject window method is used for congestion control.
 Selective Reject method is preferred over Go-back-n window as in Go-back-n method, when timer for a packet
times out, several packets are resent, although some may have arrived safely at the receiver. Thus, this duplication
may make congestion worse.
 Selective reject method sends only the specific lost or damaged packets.
Acknowledgement Policy
 The acknowledgement policy imposed by the receiver may also affect congestion.
 If the receiver does not acknowledge every packet it receives it may slow down the sender and help prevent
congestion.
 Acknowledgments also add to the traffic load on the network. Thus, by sending fewer acknowledgements we can
reduce load on the network.
 To implement it, several approaches can be used:
 A receiver may send an acknowledgement only if it has a packet to be sent.
 2. A receiver may send an acknowledgement when a timer expires.
 3. A receiver may also decide to acknowledge only N packets at a time.
Discarding Policy
 A router may discard less sensitive packets when congestion is likely to happen.
 Such a discarding policy may prevent congestion and at the same time may not harm the integrity of the
transmission.
Admission Policy
 An admission policy, which is a quality-of-service mechanism, can also prevent congestion in virtual circuit
networks.
 Switches in a flow first check the resource requirement of a flow before admitting it to the network.
 A router can deny establishing a virtual circuit connection if there is congestion in the "network or if there is a
possibility of future congestion.
Closed Loop Congestion Control
 Closed loop congestion control mechanisms try to remove the congestion after it happens.
 The various methods used for closed loop congestion control are:
 Backpressure
 Choke Packet
 Implicit Signaling
 Explicit Signaling
Backpressure
 Backpressure is a node-to-node congestion control that starts with a node and propagates, in the opposite direction
of data flow.

 The backpressure technique can be applied only to virtual circuit networks. In such virtual circuit each node
knows the upstream node from which a data flow is coming.
 In this method of congestion control, the congested node stops receiving data from the immediate upstream node
or nodes.
 This may cause the upstream node on nodes to become congested, and they, in turn, reject data from their
upstream node or nodes.
 As shown in fig node 3 is congested and it stops receiving packets and informs its upstream node 2 to slow down.
Node 2 in turns may be congested and informs node 1 to slow down. Now node 1 may create congestion and
informs the source node to slow down. In this way the congestion is alleviated. Thus, the pressure on node 3 is
moved backward to the source to remove the congestion.
Choke Packet
 In this method of congestion control, congested router or node sends a special type of packet called choke packet
to the source to inform it about the congestion.
 Here, congested node does not inform its upstream node about the congestion as in backpressure method.
 In choke packet method, congested node sends a warning directly to the source station i.e. the intermediate nodes
through which the packet has traveled are not warned.

Implicit Signaling

 In implicit signaling, there is no communication between the congested node or nodes and the source.
 The source guesses that there is congestion somewhere in the network when it does not receive any
acknowledgment. Therefore the delay in receiving an acknowledgment is interpreted as congestion in the
network.
 On sensing this congestion, the source slows down.
 This type of congestion control policy is used by TCP.
Explicit Signaling
 The congested nodes explicitly send a signal to the source or destination to inform about the congestion.
 It differs with choke packet method as the signal is included in the packets that carry data.
 It can occur in either the forward direction or the backward direction.
 In backward signaling, a bit is set in a packet moving in the direction opposite to the congestion. This bit
warns the source about the congestion and informs the source to slow down.
 In forward signaling, a bit is set in a packet moving in the direction of congestion. This bit warns the
destination about the congestion. The receiver in this case uses policies such as slowing down the
acknowledgements to remove the congestion.
Congestion control algorithms
 Leaky Bucket Algorithm
 Token bucket Algorithm
Leaky Bucket Algorithm
 It is a traffic shaping mechanism that controls the amount and the rate of the traffic sent to the network.
 A leaky bucket algorithm shapes bursty traffic into fixed rate traffic by averaging the data rate.
 Concept is similar to a bucket with a small hole at the bottom.
 Consider that data is coming from the source at variable speeds. Suppose that a source sends data at 12
Mbps for 4 seconds. Then there is no data for 3 seconds. The source again transmits data at a rate of 10
Mbps for 2 seconds. Thus, in a time span of 9 seconds, 68 Mb data has been transmitted.
 If a leaky bucket algorithm is used, the data flow will be 8 Mbps for 9 seconds. Thus constant flow is
maintained.

Token bucket Algorithm


 The leaky bucket algorithm allows only an average (constant) rate of data flow
 A token bucket algorithm is a modification of leaky bucket in which leaky bucket contains tokens
 In this algorithm, a token(s) are generated at every clock tick. For a packet to be transmitted, system must remove
token(s) from the bucket.
 Thus, a token bucket algorithm allows idle hosts to accumulate credit for the future in form of tokens
 For example, if a system generates 100 tokens in one clock tick and the host is idle for 100 ticks. The
bucket will contain 10,000 tokens.
 Now, if the host wants to send bursty data, it can consume all 10,000 tokens at once for sending 10,000
cells or bytes.
 Thus a host can send bursty data as long as bucket is not empty.
Application Layer
In the Open Systems Interconnection (OSI) communications model, the application layer provides services for
an application program to ensure that effective communication with another application program in a network is possible.

FUNCTIONS OF APPLICATION LAYER


 Mail Services :
This layer provides the basis for E-mail forwarding and storage.
 Network Virtual Terminal :
It allows a user to log on to a remote host.
 Directory Services :
This layer provides access for global information about various services.
 File Transfer, Access and Management (FTAM) :
It is a standard mechanism to access files and manages it.
Protocols and networks
Protocols
 DNS – Matches domain names with IP addresses
 HTTP – Used to transfer data between clients/servers using a web browser
 SMTP & POP3 – used to send email messages from clients to servers over the internet
 FTP – allows the download/upload of files between a client/server
 Telnet – allows users to login to a host from a remote location and take control as if they were sitting at the
machine (virtual connection)
 DHCP – assigns IP addresses, subnet masks, default gateways, DNS servers, etc. To users as they login the
network
Domain Name System (DNS)
DNS is a hierarchical decentralized naming system for computers, services, or any resource connected to the Internet or a
private network. It associates various information with domain names assigned to each of the participating entities.
DNS services
 hostname to IP address translation
 host aliasing
 Canonical, alias names
 mail server aliasing
 load distribution
 replicated Web servers: set of IP addresses for one canonical name

DNS Servers resolve names to IP addresses. It would be difficult to remember the IP


address of every website we like to visit, but we can remember names

Why not centralize DNS?

 single point of failure

 traffic volume

 distant centralized database

 Maintenance
The DNS Name Space

A portion of the Internet domain name space.

Generic Domains

It defines the registered hosts according to their generic behavior.

Each node in a tree defines the domain name, which is an index to the DNS database.

It uses three-character labels, and these labels describe the organization type.

Generic top-level domains

• Country Domain

The format of country domain is same as a generic domain, but it uses two-character country abbreviations (e.g., us for
the United States) in place of three character organizational abbreviations.
Eg: .in (india) .us .uk

• Inverse Domain

The inverse domain is used for mapping an address to a name. When the server has received a request from the client, and
the server contains the files of only authorized clients. To determine whether the client is on the authorized list or not, it
sends a query to the DNS server and ask for mapping an address to the name.

TLD and Authoritative Servers

 Top-level domain (TLD) servers:

 Responsible for com, org, net, edu, etc, and all top-level country domains uk, fr, ca, jp.

 Network Solutions maintains servers for com TLD

 Authoritative DNS servers:

 Organization’s DNS servers, providing authoritative hostname to IP mappings for organization’s servers
(e.g., Web, mail).

 can be maintained by organization or service provider

Local Name Server

 does not strictly belong to hierarchy

 Each ISP (residential ISP, company, university) has one.

 also called “default name server”

 when host makes DNS query, query is sent to its local DNS server

 acts as proxy, forwards query into hierarchy

Resolver looking up a remote name in 10 steps


DNS records

DNS records are basically mapping files that tell the DNS server which IP address each domain is associated with, and
how to handle requests sent to each domain. When someone visits a web site, a request is sent to the DNS server and then
forwarded to the web server provided by a web hosting company, which contain the data contained on the site

Electronic Mail
 E-mail is the most popular network service.

 It became known to public after 1990

 The 1st email system consisted of file transfer protocols

 As years progressed, more elaborated email systems were proposed

 Three major components:

 user agents

 mail servers/message transfer agent

 simple mail transfer protocol: SMTP

 User Agent

 mail reader

 composing, editing, reading mail messages

 e.g., Eudora, Outlook, elm, Mozilla Thunderbird

 outgoing, incoming messages stored on server

 Mail Servers

 Mailbox contains incoming messages for user

 message queue of outgoing (to be sent) mail messages

 SMTP protocol between mail servers to send email messages


 client: sending mail server

 “server”: receiving mail server

Electronic Mail: SMTP

o uses TCP to reliably transfer email message from client to server, port 25

o direct transfer: sending server to receiving server

o three phases of transfer

 handshaking (greeting)

 transfer of messages

 closure

o command/response interaction

 commands: ASCII text

 response: status code and phrase

o messages must be in 7-bit ASCII

FTP
 FTP stands for File transfer protocol.
 FTP is a standard internet protocol provided by TCP/IP used for transmitting the files from one host to another.
 It is mainly used for transferring the web page files from their creator to the computer that acts as a server for
other computers on the internet.
 It is also used for downloading the files to computer from other servers.
Objectives of FTP

 It provides the sharing of files.


 It is used to encourage the use of remote computers.
 It transfers the data more reliably and efficiently.

Mechanism of FTP

The above figure shows the basic model of the FTP. The FTP client has three components: the user interface, control
process, and data transfer process. The server has two components: the server control process and the server data transfer
process.

There are two types of connections in FTP:

 Control Connection: The control connection uses very simple rules for communication. Through control
connection, we can transfer a line of command or line of response at a time. The control connection is made
between the control processes. The control connection remains connected during the entire interactive FTP
session.
 Data Connection: The Data Connection uses very complex rules as data types may vary. The data connection is
made between data transfer processes. The data connection opens when a command comes for transferring the
files and closes when the file is transferred.

World Wide Web


 The World Wide Web is a way of exchanging information between computers on the
Internet.

 The World Wide Web is the network of pages of images, texts and sounds on the Internet which can be viewed
using browser software

 The World Wide Web, or Web, consists of a worldwide collection of electronic documents (Web
pages)
 A Web site is a collection of related Web pages and associated items

 A Web server is a computer that delivers requested Web pages to your computer
HISTORY
 1989 – 1990 Tim Berners Lee invents the
 World Wide Web (www) at Cern .
 Published in 1992
 Means for transferring text and graphics simultaneously
 Text markup language
WWW COMPONENTS
Structural Components:

o Clients/browsers – to dominant implementations


o Servers – run on sophisticated hardware
o Caches – many interesting implementations
o Internet – the global infrastructure which facilitates data transfer

Semantic Components:

o Hyper Text Transfer Protocol (HTTP)


o Hyper Text Markup Language (HTML)
o Extensible Markup Language (XML)
o Uniform Resource Identifiers (URIs)

Architecture of the Web.

Architectural Overview
Steps that occur when link is selected:
1. Browser determines the URL
2. Browser asks DNS for the IP address of the server
3. DNS replies
4. The browser makes a TCP connection
5. Sends HTTP request for the page
6. Server sends the page as HTTP response
7. Browser fetches other URLs as needed
8. The browser displays the page
9. The TCP connections are released

HTTP
 HTTP stands for HyperText Transfer Protocol.
 It is a protocol used to access the data on the World Wide Web (www).
 The HTTP protocol can be used to transfer the data in the form of plain text, hypertext, audio, video, and so on.
 This protocol is known as HyperText Transfer Protocol because of its efficiency that allows us to use in a
hypertext environment where there are rapid jumps from one document to another document.
 HTTP is similar to the FTP as it also transfers the files from one host to another host. But, HTTP is simpler than
FTP as HTTP uses only one connection, i.e., no control connection to transfer the files.
 HTTP is used to carry the data in the form of MIME-like format.
 HTTP is similar to SMTP as the data is transferred between client and server. The HTTP differs from the SMTP
in the way the messages are sent from the client to the server and from server to the client. SMTP messages are
stored and forwarded while HTTP messages are delivered immediately.

Features of HTTP:

 Connectionless protocol: HTTP is a connectionless protocol. HTTP client initiates a request and waits for a
response from the server. When the server receives the request, the server processes the request and sends back
the response to the HTTP client after which the client disconnects the connection. The connection between client
and server exist only during the current request and response time only.
 Media independent: HTTP protocol is a media independent as data can be sent as long as both the client and
server know how to handle the data content. It is required for both the client and server to specify the content type
in MIME-type header.
 Stateless: HTTP is a stateless protocol as both the client and server know each other only during the current
request. Due to this nature of the protocol, both the client and server do not retain the information between various
requests of the web pages.

HTTP Transactions
The above figure shows the HTTP transaction between client and server. The client initiates a transaction by sending a
request message to the server. The server replies to the request message by sending a response message.

Messages

HTTP messages are of two types: request and response. Both the message types follow the same message
format.

Request Message: The request message is sent by the client that consists of a request line, headers, and sometimes a
body.

Response Message: The response message is sent by the server to the client that consists of a status line, headers, and
sometimes a body.

Uniform Resource Locator (URL)

 A client that wants to access the document in an internet needs an address and to facilitate the access of
documents, the HTTP uses the concept of Uniform Resource Locator (URL).
 The Uniform Resource Locator (URL) is a standard way of specifying any kind of information on the internet.
 The URL defines four parts: method, host computer, port, and path.
 Method: The method is the protocol used to retrieve the document from a server. For example, HTTP.
 Host: The host is the computer where the information is stored, and the computer is given an alias name. Web
pages are mainly stored in the computers and the computers are given an alias name that begins with the
characters "www". This field is not mandatory.
 Port: The URL can also contain the port number of the server, but it's an optional field. If the port number is
included, then it must come between the host and path and it should be separated from the host by a colon.
 Path: Path is the pathname of the file where the information is stored. The path itself contain slashes that separate
the directories from the subdirectories and files.

You might also like