Module 4 - Notes
Module 4 - Notes
Transport Layer
o The transport layer is a 4th layer from the top.
o The main role of the transport layer is to provide the communication
services directly to the application processes running on different hosts.
o The transport layer provides a logical communication between application
processes running on different hosts. Although the application processes
on different hosts are not physically connected, application processes use
the logical communication provided by the transport layer to send the
messages to each other.
o The transport layer protocols are implemented in the end systems but not
in the network routers.
o A computer network provides more than one protocol to the network
applications. For example, TCP and UDP are two transport layer protocols
that provide a different set of services to the network layer.
o All transport layer protocols provide multiplexing/demultiplexing service.
It also provides other services such as reliable data transfer, bandwidth
guarantees, and delay guarantees.
o Each of the applications in the application layer has the ability to send a
message by using TCP or UDP. The application communicates by using
either of these two protocols. Both TCP and UDP will then communicate
with the internet protocol in the internet layer. The applications can read
and write to the transport layer. Therefore, we can say that communication
is a two-way process.
The services provided by the transport layer protocols can be divided into
five categories:
o End-to-end delivery
o Addressing
o Reliable delivery
o Flow control
o Multiplexing
Transport Layer
The services provided by the transport layer are similar to those of the data link
layer. The data link layer provides the services within a single network while
the transport layer provides the services across an internetwork made up of
many networks. The data link layer controls the physical layer while the
transport layer controls all the lower layers.
The services provided by the transport layer protocols can be divided into
five categories:
o End-to-end delivery
o Addressing
o Reliable delivery
o Flow control
o Multiplexing
End-to-end delivery:
The transport layer transmits the entire message to the destination. Therefore, it
ensures the end-to-end delivery of an entire message from a source to the
destination.
Reliable delivery:
The transport layer provides reliability services by retransmitting the lost and
damaged packets.
o Error control
o Sequence control
o Loss control
o Duplication control
Error Control
Loss Control
Loss Control is a third aspect of reliability. The transport layer ensures that all the
fragments of a transmission arrive at the destination, not some of them. On the
sending end, all the fragments of transmission are given sequence numbers by a
transport layer. These sequence numbers allow the receiver?s transport layer to
identify the missing segment.
Duplication Control
Flow Control
Flow control is used to prevent the sender from overwhelming the receiver. If the
receiver is overloaded with too much data, then the receiver discards the packets
and asking for the retransmission of packets. This increases network congestion
and thus, reducing the system performance. The transport layer is responsible for
flow control. It uses the sliding window protocol that makes the data transmission
more efficient as well as it controls the flow of data so that the receiver does not
become overwhelmed. Sliding window protocol is byte oriented rather than frame
oriented.
Multiplexing
Where,
o Source port address: It defines the address of the application process that
has delivered a message. The source port address is of 16 bits address.
o Destination port address: It defines the address of the application process
that will receive the message. The destination port address is of a 16-bit
address.
o Total length: It defines the total length of the user datagram in bytes. It is
a 16-bit field.
o Checksum: The checksum is a 16-bit field which is used in error detection.
TCP
o Stream data transfer: TCP protocol transfers the data in the form of
contiguous stream of bytes. TCP group the bytes in the form of TCP
segments and then passed it to the IP layer for transmission to the
destination. TCP itself segments the data and forward to the IP.
o Reliability: TCP assigns a sequence number to each byte transmitted and
expects a positive acknowledgement from the receiving TCP. If ACK is
not received within a timeout interval, then the data is retransmitted to the
destination.
The receiving TCP uses the sequence number to reassemble the segments
if they arrive out of order or to eliminate the duplicate segments.
o Flow Control: When receiving TCP sends an acknowledgement back to
the sender indicating the number the bytes it can receive without
overflowing its internal buffer. The number of bytes is sent in ACK in the
form of the highest sequence number that it can receive without any
problem. This mechanism is also referred to as a window mechanism.
o Multiplexing: Multiplexing is a process of accepting the data from
different applications and forwarding to the different applications on
different computers. At the receiving end, the data is forwarded to the
correct application. This process is known as demultiplexing. TCP
transmits the packet to the correct application by using the logical channels
known as ports.
o Logical Connections: The combination of sockets, sequence numbers,
and window sizes, is called a logical connection. Each connection is
identified by the pair of sockets used by sending and receiving processes.
o Full Duplex: TCP provides Full Duplex service, i.e., the data flow in both
the directions at the same time. To achieve Full Duplex service, each TCP
should have sending and receiving buffers so that the segments can flow in
both the directions. TCP is a connection-oriented protocol. Suppose the
process A wants to send and receive the data from process B. The following
steps occur:
o Establish a connection between two TCPs.
o Data is exchanged in both the directions.
o The Connection is terminated.
Where,
SCTP Services
Step1: The two SCTPs establish the connection with each other.
Step2: Once the connection is established, the data gets exchanged in both the
directions.
Step3: Finally, the association is terminated.
5. Reliability
SCTP uses an acknowledgement mechanism to check the arrival of data.
CONGESTION CONTROL
Congestion control refers to techniques and mechanisms that can either prevent
congestion, before it happens, or remove congestion, after it has happened. In
general, we can
1.Retransmission Policy
2.Window Policy
The type of window at the sender may also affect congestion. The Selective
Repeat window is better than the Go-Back-N window for congestion
control. In the Go-Back-N window, when the timer for a packet times out,
several packets may be resent, although some may have arrived safe and
sound at the receiver. This duplication may make the congestion worse. The
Selective Repeat window, on the other hand, tries to send the specific
packets that have been lost or corrupted.
3.Acknowledgment Policy
the acknowledgments are also part of the load in a network. Sending fewer
acknowledgments means imposing less load on the network.
4.Discarding Policy
A good discarding policy by the routers may prevent congestion and at the
same time may not harm the integrity of the transmission. For example, in
audio transmission, if the policy is to discard less sensitive packets when
congestion is likely to happen, the quality of sound is still preserved and
congestion is prevented or alleviated.
5.Admission Policy
An admission policy, which is a quality-of-service mechanism, can also prevent
congestion
1.Backpressure
source of data to slow down. This, in time, alleviates the congestion. Note that
the pressure
on node III is moved backward to the source to remove the congestion.
2.Choke Packet
Note the difference between the backpressure and choke packet methods. In
backpressure, the warning is from one node to its upstream node, although the
warning may eventually reach the source station. In the choke packet method,
the warning is from the router, which has encountered congestion, to the
source station directly. The intermediate nodes through which the packet has
travelled are not warned. We have seen
an example of this type of control in ICMP. When a router in the Internet is
overwhelmed with IP datagrams, it may discard some of them; but it informs the
source host, using a source quench ICMP message. The warning message goes
directly to the
source station; the intermediate routers, and does not take any action. Following
figure
shows the idea of a choke packet.
Choke packet:
3.Implicit Signalling
4.Explicit Signalling
The node that experiences congestion can explicitly send a signal to the source
or destination. The explicit signalling method, however, is different from the
choke packet
method. In the choke packet method, a separate packet is used for this
purpose; in the explicit signalling method, the signal is included in the
packets that carry data. Explicit signalling, as we will see in Frame Relay
congestion control, can occur in either the forward or the backward
direction.
5.Backward Signalling
A bit can be set in a packet moving in the direction opposite
to the congestion. This bit can warn the source that there is congestion and
that it needs to slow down to avoid the discarding of packets.
6.Forward Signalling
A bit can be set in a packet moving in the direction of the
congestion. This bit can warn the destination that there is congestion. The
receiver in this case can use policies, such as slowing down the
acknowledgments, to alleviate the i congestion.
o With P2P file sharing, the peer which is downloading the file is known as a
client, and the peer which is uploading the file is known as a server. However,
we have observed in some applications such as P2P file sharing; a process
can be both as a client and server. Therefore, we can say that a process can
both download and upload the files.
DNS
An application layer protocol defines how the application processes running on
different systems, pass the messages to each other.
o Each node in a tree has a domain name, and a full domain name is a
sequence of symbols specified by dots.
o DNS is a service that translates the domain name into IP addresses. This
allows the users of networks to utilize user-friendly names when looking for
other hosts instead of remembering the IP addresses.
DNS is a TCP/IP protocol used on different platforms. The domain name space is
divided into three different sections: generic domains, country domains, and inverse
domain.
Generic Domains
o It defines the registered hosts according to their generic behavior.
o Each node in a tree defines the domain name, which is an index to the DNS
database.
Label Description
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.
Working of DNS
o DNS is a client/server network communication protocol. DNS clients send
requests to the. server while DNS servers send responses to the client.
FTP
o FTP stands for File transfer protocol.
o 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.
o It is also used for downloading the files to computer from other servers.
Objectives of FTP
o It provides the sharing of files.
Why FTP?
Although transferring files from one system to another is very simple and
straightforward, but sometimes it can cause problems. For example, two systems may
have different file conventions. Two systems may have different ways to represent
text and data. Two systems may have different directory structures. FTP protocol
overcomes these problems by establishing two connections between hosts. One
connection is used for data transfer, and another connection is used for the control
connection.
Telnet
o The main task of the internet is to provide services to users. For example,
users want to run different application programs at the remote site and
transfers a result to the local site. This requires a client-server program such
as FTP, SMTP. But this would not allow us to create a specific program for
each demand.
o The better solution is to provide a general client-server program that lets the
user access any application program on a remote computer. Therefore, a
program that allows a user to log on to a remote computer. A popular client-
server program Telnet is used to meet such demands. Telnet is an
abbreviation for Terminal Network.
o When a user logs into a local computer, then it is known as local login.
Remote login
SMTP
o SMTP stands for Simple Mail Transfer Protocol.
Working of SMTP
2. Submission of Mail: After composing an email, the mail client then submits
the completed e-mail to the SMTP server by using SMTP on TCP port 25.
5. Access and Retrieval of Mail: The stored email in MDA can be retrieved by
using MUA (Mail User Agent). MUA can be accessed by using login and
password.
SNMP
o SNMP stands for Simple Network Management Protocol.
SNMP Concept
o The manager is a host that controls and monitors a set of agents such as
routers.
o The protocol designed at the application level can monitor the devices made
by different manufacturers and installed on different physical networks.
o It is used in a heterogeneous network made of different LANs and WANs
connected by routers or gateways.
o A manager is a host that runs the SNMP client program while the agent is a
router that runs the SNMP server program.
o The agent is used to keep the information in a database while the manager is
used to access the values in the database. For example, a router can store
the appropriate variables such as a number of packets received and
forwarded while the manager can compare these variables to determine
whether the router is congested or not.
HTTP
o HTTP stands for HyperText Transfer Protocol.
o It is a protocol used to access the data on the World Wide Web (www).
o The HTTP protocol can be used to transfer the data in the form of plain text,
hypertext, audio, video, and so on.
o 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.
o 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:
o 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.
o 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)
o 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).
o The Uniform Resource Locator (URL) is a standard way of specifying any kind
of information on the internet.
o The URL defines four parts: method, host computer, port, and path.
o Method: The method is the protocol used to retrieve the document from a
server. For example, HTTP.
o 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.
o 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.
o 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.