CA226 - Unit-4
CA226 - Unit-4
CA226
Book
Url:https://docs.google.com/file/d/0B2xtAGmXggYSeUw3RHhRUko0Y00/preview?resourcekey=0-J-Zn5
LHfvKHNp3tK33AwZw
Unit-4
TCP/IP Suite: Introduction to TCP/IP Protocol, Brief Overview of TELNET, FTP, TFTP, SMTP,
NFS, SNMP, DNS. Data Link Layer Design Issues: Services Provided to Network Layer Training:
Necessity and Techniques, Error Control Features and Review of Techniques. Flow control: Sliding
Window Protocols, Go Back N, Selective Repeat, Examples of Data Link Protocols (BSC, HDLC).
TCP/IP PROTOCOL SUITE
• The TCPIIP protocol suite was developed prior to the OSI model.
• Therefore, the layers in the TCP/IP protocol suite do not exactly match those in the OSI model.
• The original TCP/IP protocol suite was defined as having four layers: host-to-network, internet, transport,
and application.
• However, when TCP/IP is compared to OSI, we can say that the host-to-network layer is equivalent to the
combination of the physical and data link layers.
• The internet layer is equivalent to the network layer, and the application layer is equivalent to the
combination of session, presentation, and application layers.
• we assume that the TCP/IP protocol suite is made of five layers: physical, data link, network, transport, and
application.
• The first four layers provide physical standards, network interfaces, internetworking, and transport
functions that correspond to the first four layers of the OSI model.
• TCP/IP is a hierarchical protocol made up of interactive modules, each of which provides a
specific functionality;
• Whereas the OSI model specifies which functions belong to each of its layers,
• The term hierarchical means that each upper-level protocol is supported by one or more lower-
level protocols.
• At the transport layer, TCP/IP defines three protocols: Transmission Control Protocol (TCP), User
Datagram Protocol (UDP), and Stream Control Transmission Protocol (SCTP).
• At the network layer, the main protocol defined by TCP/IP is the Internetworking Protocol (IP);
there are also some other protocols that support data movement in this layer.
TELNET Protocol
• TELNET is an abbreviation for TErminaL NETwork.
• It is the standard TCP/IP protocol for virtual terminal service as proposed by the International
Organization for Standards (ISO). TELNET enables the establishment of a connection to a remote
system .
• TELNET was designed at a time when most operating systems, such as UNIX, were operating in a
timesharing environment. In such an environment, a large computer supports multiple users. The
interaction between a user and the computer occurs through a terminal, which is usually a
combination of keyboard, monitor, and mouse. Even a microcomputer can simulate a terminal
with a terminal emulator.
Drawback of TELNET
• Although TELNET requires a logging name and password, it is vulnerable to hacking because it
sends all data including the password in plaintext (not encrypted). A hacker can eavesdrop and
obtain the logging name and password. Because of this security issue, the use of TELNET has
diminished in favor of another protocol, Secure Shell (SSH),
File Transfer Protocol (FTP)
• File Transfer Protocol (FTP) is the standard protocol provided by TCP/IP for copying a file from
one host to another.
• Although transferring files from one system to another seems to be simple and straightforward,
but there are some problems that must be dealt .
• For example, two systems may use different file name conventions. Two systems may have
different ways to represent data. Two systems may have different directory structures. All of these
problems have been solved by FTP in a very simple and elegant approach. Although we can
transfer files using HTTP, but FTP is a better choice to transfer large files or to transfer files using
different formats.
Trivial File Transfer Protocol(TFTP)
• TFTP stands for Trivial File Transfer Protocol.
• TFTP is defined as a protocol that is used to transfer a file from a client to a server and from a
server to a client.
• TFTP is majorly used when no complex interactions are required by the client and server. The
service of TFTP is provided by UDP (User Datagram Protocol) .
• TFTP does not provide security features therefore it is not used in communications that take place
over the Internet.
• Therefore it is used only for the systems that are set up on the local internet.
• TFTP requires less amount of memory.
Simple Mail Transfer Protocol (SMTP)
• The Simple Mail Transfer Protocol (SMTP) is the main protocol used in electronic mail (e-mail)
service.
• In SMTP, when we send a message, we do not expect to receive a response quickly (sometimes no
response is required).
• SMTP is an application layer protocol. The client who wants to send the mail opens a TCP
connection to the SMTP server and then sends the mail across the connection.
• The SMTP server is an always-on listening mode. As soon as it listens for a TCP connection from
any client, the SMTP process initiates a connection .
• After successfully establishing a TCP connection the client process sends the mail instantly.
Network File System (NFS)
• NFS was developed by Sun Microsystems in 1984.
• Network File System (NFS) is a networking protocol for distributed file sharing. A file system
defines the way data in the form of files is stored and retrieved from storage devices, such as hard
disk drives, solid-state drives and tape drives. NFS is a network file sharing protocol that defines
the way files are stored and retrieved from storage devices across networks.
• The NFS protocol defines a network file system, originally developed for local file sharing among
Unix systems.
• NFS enables system administrators to share all or a portion of a file system on a networked server
to make it accessible to remote computer users.
Simple Network Management Protocol (SNMP)
SNMP is a framework for managing devices in an internet using the TCP/IP protocol suite.
It provides a set of fundamental operations for monitoring and maintaining an internet. SNMP uses
the concept of manager and agent.
That is, a manager, usually a host, controls and monitors a set of agents, usually routers or servers
DOMAIN NAME SYSTEM (DNS)
• DNS is a protocol that can be used in different platforms.
• In the Internet, the domain name space (tree) was originally divided into three different sections:
generic domains, country domains, and the inverse domains.
• However, due to the rapid growth of the Internet, it became extremely difficult to keep track of the
inverse domains, which could be used to find the name of a host when given the IP address.
• Figure shows how TCP/IP uses a DNS client and a DNS server to map a name to an address. A
user wants to use a file transfer client to access the corresponding file transfer server running on a
remote host. The user knows only the file transfer server name, such as afilesource.com. However,
the TCP/IP suite needs the IP address of the file transfer server to make the connection.
FLOW AND ERROR CONTROL
• The most important responsibilities of the data link layer are flow
control and error control. Collectively, these functions are known as
data link control.
Flow Control
• Flow control coordinates the amount of data that can be sent before receiving an acknowledgment
and is one of the most important duties of the data link layer.
• In most protocols, flow control is a set of procedures that tells the sender how much data it can
transmit before it must wait for an acknowledgment from the receiver.
• The flow of data must not be allowed to overwhelm the receiver.
• Flow control refers to a set of procedures used to restrict the amount of data that the sender can
send before waiting for acknowledgment.
Error Control
• Error control is both error detection and error correction. It allows the receiver to inform the
sender of any frames lost or damaged in transmission and coordinates the retransmission of those
frames by the sender.
• In the data link layer, the term error control refers primarily to methods of error detection and
retransmission.
• Error control in the data link layer is often implemented simply: Any time an error is detected in
an exchange, specified frames are retransmitted. This process is called automatic repeat request
(ARQ).
• Error control in the data link layer is based on automatic repeat request, which is the
retransmission of data.
DLC: Protocols
Go-Back-N(ARQ)
• In this protocol we can send several frames before receiving acknowledgments; we keep a copy of
these frames until the acknowledgments arrive.
• Sequence Numbers: Frames from a sending station are numbered sequentially.
• However, we need to include the sequence number of each frame in the header, we need to set a
limit.
• If the header of the frame allows m bits for the sequence number, the sequence numbers range
from 0 to 2m -1
• For example, if m is 4, the only sequence numbers are 0 through 15 inclusive. However, we can
repeat the sequence. So the sequence numbers are 0, 1,2,3,4,5,6, 7,8,9, 10, 11, 12, 13, 14, 15,0,
1,2,3,4,5,6,7,8,9,10, 11, ...
Sliding Window
• The sliding window is an abstract concept that defines the range of
sequence numbers that is the concern of the sender and receiver.
• In other words, the sender and receiver need to deal with only part
ofthe possible sequence numbers.
• The range which is the concern ofthe sender is called the send sliding
window.
• the range that is the concern of the receiver is called the receive
sliding window.
• The maximum size of the window is 2m -1
• The window at any time divides the possible sequence numbers into four regions.
• The first region, from the far left to the left wall of the window, defines the sequence numbers
belonging to frames that are already acknowledged.
• The sender does not worry about these frames and keeps no copies of them.
• The second region defines the range of sequence numbers belonging to the frames that are sent and
have an unknown status.
• The sender needs to wait to find out if these frames have been received or were lost. We call these
outstanding frames.
• The third range, defines the range of sequence numbers for frames that can be sent; however, the
corresponding data packets have not yet been received from the network layer.
• Finally, the fourth region defines sequence numbers that cannot be used until the window slides.
Receive Window
• In Go-Back-N, the size of the receive window is always 1. The receiver is always looking for the
arrival of a specific packet. Any packet arriving out of order is discarded and needs to be resent.
• Note that we need only one variable, Rn (receive window, next packet expected), to define this
abstraction. The sequence numbers to the left of the window belong to the packets already
received and acknowledged; the sequence numbers to the right of this window define the packets
that cannot be received. Any received packet with a sequence number in these two regions is
discarded. Only a packet with a sequence number matching the value of Rn is accepted and
acknowledged. The receive window also slides, but only one slot at a time. When a correct packet
is received, the window slides, (Rn=Rn+1) modulo 2m
• In short The receive window is an abstract concept defining an imaginary box of size 1 with a
single variable Rn. The window slides when a correct packet has arrived; sliding occurs one slot at
a time.
Receive Window
Selective-Repeat ARQ Protocol
• The Go-Back-N protocol simplifies the process at the receiver. The receiver keeps track of only
one variable, and there is no need to buffer out-of-order packets; they are simply discarded.
However, this protocol is inefficient if the underlying network protocol loses a lot of packets. Each
time a single packet is lost or corrupted, the sender resends all outstanding packets, even though
some of these packets may have been received safe and sound but out of order.
• If the network layer is losing many packets because of congestion in the network, the resending of
all of these outstanding packets makes the congestion worse, and eventually more packets are lost.
This has an avalanche effect that may result in the total collapse of the network.
• Another protocol, called the Selective-Repeat (SR) protocol, has been devised, which, as the name
implies, resends only selective packets, those that are actually lost.
Selective-Repeat Window
• The Selective-Repeat protocol also uses two windows: a send window and a receive window.
• However, there are differences between the windows in this protocol and the ones in Go-Back-N.
• First, the maximum size of the send window is much smaller;
• it is 2m-1
• Second, the receive window is the same size as the send window.
• For example, if m = 4, but the maximum size of the window is just 8 (it is 15 in the Go-Back-N
Protocol).
• The receive window in Selective-Repeat is totally different from the one in Go Back-N. The size
of the receive window is the same as the size of the send window (maximum 2m-1).
• The Selective-Repeat protocol allows as many packets as the size of the receive window to arrive
out of order and be kept until there is a set of consecutive packets to be delivered to the application
layer.
• Because the sizes of the send window and receive window are the same, all the packets in the send
packet can arrive out of order and be stored until they can be delivered.
• In figure Those slots inside the window that are shaded define packets that have arrived out of
order and are waiting for the earlier transmitted packet to arrive before delivery to the application
layer.
Timer
• Theoretically, Selective-Repeat uses one timer for each outstanding packet. When a timer expires,
only the corresponding packet is resent. In other words, GBN treats outstanding packets as a
group; SR treats them individually. However, most transport-layer protocols that implement SR
use only a single timer. For this reason, we use only one timer.
High-level Data Link Control (HDLC) Protocol
• High-level Data Link Control (HDLC) is a bit-oriented protocol for communication over point-to-
point and multipoint links.
• It implements the Stop-and-Wait protocol .
• Although this protocol is more a theoretical issue than practical, most of the concept defined in
this protocol is the basis for other practical protocols such as PPP .
Configurations and Transfer Modes of HDLC
• HDLC provides two common transfer modes that can be used in different configurations:
• Normal response mode (NRM) and
• Asynchronous balanced mode (ABM).
• In normal response mode (NRM), the station configuration is unbalanced. We have one primary
station and multiple secondary stations. A primary station can send commands; a secondary station
can only respond. The NRM is used for both point-to-point and multipoint links,
• In ABM, the configuration is balanced. The link is point-to-point, and each station can function as
a primary and a secondary (acting as peers). This is the common mode today.