Unit-3 CN (NEP)
Unit-3 CN (NEP)
Unit-3
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.
SHWETHA RANI R S 1
2
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
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
o The data link layer also provides the error handling mechanism, but it
ensures only node-to-node error-free delivery. However, node-to-node
reliability does not ensure the end-to-end reliability.
o The data link layer checks for the error between each network. If an error
is introduced inside one of the routers, then this error will not be caught
by the data link layer. It only detects those errors that have been
SHWETHA RANI R S 2
3
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
introduced between the beginning and end of the link. Therefore, the
transport layer performs the checking for the errors end-to-end to ensure
that the packet has arrived correctly.
Sequence Control
o On the sending end, the transport layer is responsible for ensuring that
the packets received from the upper layers can be used by the lower
layers. On the receiving end, it ensures that the various segments of a
transmission can be correctly reassembled.
Loss Control
Loss Control is a third aspect of reliability. The transport layer ensures that all
the segments of a transmission arrive at the destination, not some of them. On
the sending end, all the segments of transmission are given sequence numbers
by a transport layer. transport layer to identify the missing segment.
Duplication Control
SHWETHA RANI R S 3
4
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
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
SHWETHA RANI R S 4
5
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
Addressing
o According to the layered model, the transport layer interacts with the
functions of the session layer. Many protocols combine session,
presentation, and application layer protocols into a single layer known
as the application layer. In these cases, delivery to the session layer
means the delivery to the application layer. Data generated by an
application on one machine must be transmitted to the correct
application on another machine. In this case, addressing is provided by
the transport layer.
SHWETHA RANI R S 5
6
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
SHWETHA RANI R S 6
7
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
Application processes, both clients and servers, can attach themselves to a local TSAP to
establish a connection to a remote TSAP. These connections run through NSAPs on each host.
2 CONNECTION ESTABLISHMENT:
With packet lifetimes bounded, it is possible to devise a fool proof way to establish connections
safely. Packet lifetime can be bounded to a known maximum using one of the following
techniques:
• Restricted subnet design
• Putting a hop counter in each packet
• Time stamping in each packet
Using a 3-way hand shake, a connection can be established. This establishment protocol doesn’t
require both sides to begin sending with the same sequence number.
SHWETHA RANI R S 7
8
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
• The first technique includes any method that prevents packets from looping, combined
with some way of bounding delay including congestion over the longest possible path. It
is difficult, given that internets may range from a single city to international in scope.
• The second method consists of having the hop count initialized to some appropriate value
and decremented each time the packet is forwarded. The network protocol simply
discards any packet whose hop counter becomes zero.
• The third method requires each packet to bear the time it was created, with the routers
agreeing to discard any packet older than some agreed-upon time.
CONNECTION RELEASE:
A connection is released using either asymmetric or symmetric variant. But, the improved
protocol for
releasing a connection is a 3-way handshake protocol.
There are two styles of terminating a connection:
1) Asymmetric release and
2) Symmetric release.
SHWETHA RANI R S 8
9
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
Asymmetric release is the way the telephone system works: when one party hangs up, the
connection is broken. Symmetric release treats the connection as two separate unidirectional
connections and requires each one to be released separately.
SHWETHA RANI R S 9
10
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
SHWETHA RANI R S 10
11
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
• If the buffer size is chosen equal to the largest possible TPDU, space will be wasted
whenever a short TPDU arrives.
• If the buffer size is chosen less than the maximum TPDU size, multiple buffers will be
needed for long TPDUs.
To overcome these problems, we employ variable-size buffers.
(c). One large Circular Buffer per Connection:
A single large circular buffer per connection is dedicated when all connections are heavily
loaded.
1. Source Buffering is used for low band width bursty traffic
2. Destination Buffering is used for high band width smooth traffic.
3. Dynamic Buffering is used if the traffic pattern changes randomly.
MULTIPLEXING:
In networks that use virtual circuits within the subnet, each open connection consumes some
table space in the routers for the entire duration of the connection. If buffers are dedicated to the
virtual circuit in each router as well, a user who left a terminal logged into a remote machine,
there is need for multiplexing. There are 2 kinds of multiplexing
SHWETHA RANI R S 11
12
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
o The IP protocol in the network layer delivers a datagram from a source host to the
destination host.
o An IP protocol is a host-to-host protocol used to deliver a packet from source host to the
destination host while transport layer protocols are port-to-port protocols that work on the
top of the IP protocols to deliver the packet from the originating port to the IP services, and
from IP services to the destination port.
SHWETHA RANI R S 12
13
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
UDP
o UDP stands for User Datagram Protocol.
o This type of protocol is used when reliability and security are less important than speed
and size.
SHWETHA RANI R S 13
14
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
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 It does not provide any sequencing or reordering functions and does not specify the
damaged packet when reporting an error.
o UDP can discover that an error has occurred, but it does not specify which packet has been
lost as it does not contain an ID or sequencing number of a particular data segment.
TCP
o TCP stands for Transmission Control Protocol.
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.
SHWETHA RANI R S 14
15
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
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 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:
SHWETHA RANI R S 15
16
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
Where,
o Source port address: It is used to define the address of the application program in a source
computer. It is a 16-bit field.
o Destination port address: It is used to define the address of the application program in a
destination computer. It is a 16-bit field.
o Sequence number: A stream of data is divided into two or more TCP segments. The 32-
bit sequence number field represents the position of the data in an original data stream.
o Header Length (HLEN): It specifies the size of the TCP header in 32-bit words. The
minimum size of the header is 5 words, and the maximum size of the header is 15 words.
Therefore, the maximum size of the TCP header is 60 bytes, and the minimum size of the
TCP header is 20 bytes.
o Control bits: Each bit of a control field functions individually and independently. A
control bit defines the use of a segment or serves as a validity check for other fields.
o URG: The URG field indicates that the data in a segment is urgent.
SHWETHA RANI R S 16
17
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
o ACK: When ACK field is set, then it validates the acknowledgement number.
o PSH: The PSH field is used to inform the sender that higher throughput is needed so if
possible, data must be pushed with higher throughput.
o RST: The reset bit is used to reset the TCP connection when there is any confusion occurs
in the sequence numbers.
o SYN: The SYN field is used to synchronize the sequence numbers in three types of
segments: connection request, connection confirmation ( with the ACK bit set ), and
confirmation acknowledgement.
o FIN: The FIN field is used to inform the receiving TCP module that the sender has finished
sending data. It is used in connection termination in three types of segments: termination
request, termination confirmation, and acknowledgement of termination confirmation.
o Window Size: The window is a 16-bit field that defines the size of the window.
o Urgent pointer: If URG flag is set to 1, then this 16-bit field is an offset from the
sequence number indicating that it is a last urgent data byte.
o Options and padding: It defines the optional fields that convey the additional
information to the receiver
SHWETHA RANI R S 17
18
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
ready to receive or
not.
SHWETHA RANI R S 18
19
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
• Apple Filing Protocol (AFP): Apple Filing Protocol is the proprietary network protocol
(communications protocol) that offers services to macOS or the classic macOS. This is
basically the network file control protocol specifically designed for Mac-based
platforms.
• Lightweight Presentation Protocol (LPP): Lightweight Presentation Protocol is that
protocol which is used to provide ISO presentation services on the top of TCP/IP based
protocol stacks.
• NetWare Core Protocol (NCP): NetWare Core Protocol is the network protocol which
is used to access file, print, directory, clock synchronization, messaging, remote
command execution and other network service functions.
• Network Data Representation (NDR): Network Data Representation is basically the
implementation of the presentation layer in the OSI model, which provides or defines
various primitive data types, constructed data types and also several types of data
representations.
• External Data Representation (XDR): External Data Representation (XDR) is the
standard for the description and encoding of data. It is useful for transferring data
between computer architectures and has been used to communicate data between very
diverse machines. Converting from local representation to XDR is called encoding,
whereas converting XDR into local representation is called decoding.
• Secure Socket Layer (SSL): The Secure Socket Layer protocol provides security to the
data that is being transferred between the web browser and the server. SSL encrypts
the link between a web server and a browser, which ensures that all data passed
between them remains private and free from attacks.
Requirement: Every host is identified by the IP address but remembering numbers is very
difficult for the people also the IP addresses are not static therefore a mapping is required to change
the domain name to the IP address. So DNS is used to convert the domain name of the websites to
their numerical IP address.
SHWETHA RANI R S 19
20
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
Organization of Domain:
It is very difficult to find out the ip address associated to a website because there are millions of
websites and with all those websites we should be able to generate the ip address immediately,
there should not be a lot of delay for that to happen organization of database is very important.
Namespace: Set of possible names, flat or hierarchical. The naming system maintains a collection
of bindings of names to values – given a name, a resolution mechanism returns the corresponding
value.
Name server: It is an implementation of the resolution mechanism. DNS (Domain Name System)
= Name service in Internet – Zone is an administrative unit, domain is a subtree.
The host requests the DNS name server to resolve the domain name. And the name server returns
the IP address corresponding to that domain name to the host so that the host can future connect
to that IP address.
SHWETHA RANI R S 20
21
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
Hierarchy of Name Servers Root name servers: It is contacted by name servers that can not
resolve the name. It contacts authoritative name server if name mapping is not known. It then gets
the mapping and returns the IP address to the host.
Top level domain (TLD) server: It is responsible for com, org, edu etc and all top level country
domains like uk, fr, ca, in etc. They have info about authoritative domain servers and know the
names and IP addresses of each authoritative name server for the second-level domains.
Authoritative name servers are the organization’s DNS server, providing authoritative hostName
to IP mapping for organization servers. It can be maintained by an organization or service provider.
In order to reach cse.dtu.in we have to ask the root DNS server, then it will point out to the top
level domain server and then to authoritative domain name server which actually contains the IP
address. So the authoritative domain server will return the associative ip address.
The client machine sends a request to the local name server, which , if root does not find the
address in its database, sends a request to the root name server , which in turn, will route the query
to an top-level domain (TLD) or authoritative name server. The root name server can also contain
some hostName to IP address mappings. The Top-level domain (TLD) server always knows who
the authoritative name server is. So finally the IP address is returned to the local name server which
in turn returns the IP address to the host.
Electronic Mail
Electronic Mail (e-mail) is one of most widely used services of Internet. This service allows an
Internet user to send a message in formatted manner (mail) to the other Internet user in any
SHWETHA RANI R S 21
22
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
part of world. Message in mail not only contain text, but it also contains images, audio and
videos data. The person who is sending mail is called sender and person who receives mail is
called recipient. It is just like postal mail service. Components of E-Mail System : The basic
components of an email system are : User Agent (UA), Message Transfer Agent (MTA), Mail
Box, and Spool file. These are explained as following below.
1. User Agent (UA) : The UA is normally a program which is used to send and receive
mail. Sometimes, it is called as mail reader. It accepts variety of commands for
composing, receiving and replying to messages as well as for manipulation of the
mailboxes.
2. Message Transfer Agent (MTA) : MTA is actually responsible for transfer of mail
from one system to another. To send a mail, a system must have client MTA and
system MTA. It transfer mail to mailboxes of recipients if they are connected in the
same machine. It delivers mail to peer MTA if destination mailbox is in another
machine. The delivery from one MTA to another MTA is done by Simple Mail
Transfer
Protocol.
3. Mailbox : It is a file on local hard drive to collect mails. Delivered mails are present in
this file. The user can read it delete it according to his/her requirement. To use e-mail
system each user must have a mailbox . Access to mailbox is only to owner of
mailbox.
4. Spool file : This file contains mails that are to be sent. User agent appends outgoing
mails in this file using SMTP. MTA extracts pending mail from spool file for their
delivery. E-mail allows one name, an alias, to represent several different e-mail
addresses. It is known as mailing list, Whenever user have to sent a message, system
checks recipient’s name against alias database. If mailing list is present for defined
SHWETHA RANI R S 22
23
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
alias, separate messages, one for each entry in the list, must be prepared and handed to
MTA. If for defined alias, there is no such mailing list is present, name itself becomes
naming address and a single message is delivered to mail transfer entity.
• Composition – The composition refer to process that creates messages and answers. For
composition any kind of text editor can be used.
• Transfer – Transfer means sending procedure of mail i.e. from the sender to recipient.
• Reporting – Reporting refers to confirmation for delivery of mail. It help user to check
whether their mail is delivered, lost or rejected.
• Displaying – It refers to present mail in form that is understand by the user.
• Disposition – This step concern with recipient that what will recipient do after receiving
mail i.e save mail, delete before reading or delete after reading.
Components of WWW
1. Structural Components
2. Semantic Components
SHWETHA RANI R S 23
24
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
Architecture of WWW
The WWW is mainly a distributed client/server service where a client using the browser can
access the service using a server. The Service that is provided is distributed over many different
locations commonly known as sites/websites.
• Each website holds one or more documents that are generally referred to as web pages.
• Where each web page contains a link to other pages on the same site or at other sites.
• These pages can be retrieved and viewed by using browsers.
In the above case, the client sends some information that belongs to site A. It generally sends a
request through its browser (It is a program that is used to fetch the documents on the web).and
also the request generally contains other information like the address of the site, web page(URL).
The server at site A finds the document then sends it to the client. after that when the user or say
the client finds the reference to another document that includes the web page at site B.
The reference generally contains the URL of site B. And the client is interested to take a look at
this document too. Then after the client sends the request to the new site and then the new page is
retrieved.
SHWETHA RANI R S 24
25
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
1.Client/Browser
The Client/Web browser is basically a program that is used to communicate with the webserver
on the Internet.
2.Server
The Computer that is mainly available for the network resources and in order to provide services
to the other computer upon request is generally known as the server.
SHWETHA RANI R S 25
26
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
3.URL
• It is basically a standard used for specifying any kind of information on the Internet.
• In order to access any page the client generally needs an address.
• To facilitate the access of the documents throughout the world HTTP generally makes
use of Locators.
4.HTML
5.XML
XML is an abbreviation of Extensible Markup Language. It mainly helps in order to define the
common syntax in the semantic web.
Features of WWW
Given below are some of the features provided by the World Wide Web:
SHWETHA RANI R S 26
27
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
• Mainly makes the use of Web Browser in order to provide a single interface for many
services.
• Dynamic
• Interactive
• Cross-Platform
Advantages of WWW
Disadvantages of WWW
There are some drawbacks of the WWW and these are as follows;
SHWETHA RANI R S 27
28
CC CCCO COMPUTER NETWORKS(NEP 3RD SEM)
SHWETHA RANI R S 28