Sie sind auf Seite 1von 4

Reg. No.

-171302064

ASSIGNMENT-2
OF
COMPUTER NETWORKS
B.Tech (5th Semester)
Computer Science and Engineering
Faculty of Engineering & Technology

(SGT University, Gurugram)

Submitted to: Submitted by:


Mrs. Neha Gehlot Jasjeet Singh
(Asst Prof.), CSE Reg no: - 171302064
Date-15/09/2019
Reg. No.-171302064
Q1. Explain sliding window protocol in detail?
Ans-Sliding window protocols are data link layer protocols for reliable and sequential delivery of data frames.
The sliding window is also used in Transmission Control Protocol.

Sliding Window Protocol-

 Sliding window protocol is a flow control protocol.


 It allows the sender to send multiple frames before needing the acknowledgements.
 Sender slides its window on receiving the acknowledgements for the sent frames.
 This allows the sender to send more frames.
 It is called so because it involves sliding of sender’s window.

Working Principle
In these protocols, the sender has a buffer called the sending window and the receiver has buffer called the receiving
window.
The size of the sending window determines the sequence number of the outbound frames. If the sequence number of
the frames is an n-bit field, then the range of sequence numbers that can be assigned is 0 to 2𝑛−1. Consequently, the size
of the sending window is 2𝑛−1. Thus in order to accommodate a sending window size of 2𝑛−1, a n-bit sequence number
is chosen.
The sequence numbers are numbered as modulo-n. For example, if the sending window size is 4, then the sequence
numbers will be 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, and so on. The number of bits in the sequence number is 2 to generate the
binary sequence 00, 01, 10, 11.
The size of the receiving window is the maximum number of frames that the receiver can accept at a time. It determines
the maximum number of frames that the sender can send before receiving acknowledgment.
Reg. No.-171302064

Types of Sliding Window Protocol


The Sliding Window ARQ (Automatic Repeat reQuest) protocols are of two categories –

Go – Back – N ARQ
Go – Back – N ARQ provides for sending multiple frames before receiving the acknowledgment for the first frame. It uses
the concept of sliding window, and so is also called sliding window protocol. The frames are sequentially numbered and
a finite number of frames are sent. If the acknowledgment of a frame is not received within the time period, all frames
starting from that frame are retransmitted.

Selective Repeat ARQ


This protocol also provides for sending multiple frames before receiving the acknowledgment for the first frame.
However, here only the erroneous or lost frames are retransmitted, while the good frames are received and buffered.

Q2. Explain Routing in detail? How does a router work?


Ans- A router is a networking device that forwards data packets between computer networks. Routers perform the
traffic directing functions on the Internet. Data sent through the internet, such as a web page or email, is in the form of
data packets. A packet is typically forwarded from one router to another router through the networks that constitute an
internetwork (e.g. the Internet) until it reaches its destination node.

A router is connected to two or more data lines from different IP networks. When a data packet comes in on one of the
lines, the router reads the network address information in the packet header to determine the ultimate destination.
Then, using information in its routing table or routing policy, it directs the packet to the next network on its journey.

WORKING OF A ROUTER
A router will have at least two network cards (NICs), one physically connected to one network and the other physically
connected to another network. A router can connect any number of networks together providing it has a dedicated NIC
for each network.Having two networks with one router is extremely simple and easy to configure. Once we move onto
bigger networks with multiple routers however, things get a little more complicated. For example, if we have just 3
networks we can connect them in two different ways; one way is to daisy chain
them together using only 2 routers. The other way would be to connect them
directly to each other using 3 routers. In configuration 1 if router A or B went down
no machines from subnet A would be able to communicate with subnet C as there
is only one path to it. But, if we add an additional router between subnets A and C
we now have two routes to Subnet C which makes our network more
efficient.Routers don’t just route traffic to other networks, they learn which are the
fastest routes and use them first. Using configuration 2 from above subnet A has
two routes to subnet C; one directly through Router C (1 hop) and one through
Router A then B (2 hops). When sending traffic from subnet A to C we obviously
want it to try going directly through Router C first. This is the quickest and most
efficient route but how does the router know this? It knows by using something
called a metric value. Each route the router knows of has a metric value assigned to
it. A metric value is basically a preference number. If there are two routes to the
same destination then the one with the lowest metric is assumed to be the most
efficient. Routers will always use this route first until it fails, in which case it will
then try the route with the next lowest metric and so on. Routers store all this information in a routing table .
Reg. No.-171302064
Q3. Explain Terminal handling in Networking?
Ans-A computer terminal is an electromechanical or electronic hardware device which is used for entering data into, and
displaying data from a computing system or computer. The early terminals were inexpensive but slower than punched
cards or paper tape for input. Video displays were introduced with the advancement in technology. Time sharing systems
also developed.Multiple users could work on the same machine at their own terminals.A smart terminal has a significant
local programmable data processing capability. A terminal which depends on the host computer for its processing power
is known as a thin client. A personal computer can run software which emulates the function of a terminal and can
sometimes allow concurrent use of local programs and access to a distant terminal host system.

Capabilities:-

Text terminals:- A text terminal, or often just terminal (sometimes text console) is a serial computer interface for text
entry and display. Information is presented as an array of pre-selected formed characters. When such devices use a video
display such as a cathode-ray tube, they are called a "video display unit" or "visual display unit" (VDU) or "video display
terminal" (VDT). The System console is a text terminal used to operate a computer. Modern computers have a
built-in keyboard and display for the console. Some Unix-like operating systems such as Linux and FreeBSD have virtual
consoles to provide several text terminals on a single computer. The fundamental type of application running on a text
terminal is a command line interpreter or shell, which prompts for commands from the user and executes each command
after a press of Enter. This includes Unix shells and some interactive programming environments. In a shell, most of the
commands are small applications themselves.

Dumb terminals:- Dumb terminals are those that can interpret a limited number of control codes (CR, LF, etc.) but
do not have the ability to process special escape sequences that perform functions such as clearing a line, clearing the
screen, or controlling cursor position. In this context dumb terminals are sometimes dubbed glass Teletypes, for they
essentially have the same limited functionality as does a mechanical Teletype. This type of dumb terminal is still
supported on modern Unix like systems by setting the environment variable TERM to dumb. Smart or intelligent
terminals are those that also have the ability to process escape sequences, in particular
the VT52, VT100 or ANSI escape sequences.

Graphical terminals:- A graphical terminal can display images as well as text. Graphical terminals are divided into
vector-mode terminals, and raster mode. A vector-mode display directly draws lines on the face of a cathode-ray tube
under control of the host computer system. The lines are continuously formed, but since the speed of electronics is
limited, the number of concurrent lines that can be displayed at one time is limited. Vector-mode displays were
historically important but are no longer used. Practically all modern graphic displays are raster-mode, descended from the
picture scanning techniques used for television, in which the visual elements are a rectangular array of pixels. Since the
raster image is only perceptible to the human eye as a whole for a very short time, the raster must be refreshed many times
per second to give the appearance of a persistent display. The electronic demands of refreshing display memory meant
that graphic terminals were developed much later than text terminals, and initially cost much more. Most terminals today
are graphical, that is, they can show images on the screen. The modern term for graphical terminal is "thin client". A thin
client typically uses a protocol like X11 for Unix-terminals, or RDP for Microsoft Windows. The bandwidth needed
depends on the protocol used, the resolution, and the color depth.Modern graphic terminals allow display of images in
color, and of text in varying sizes, colors, and fonts (type faces).

Emulation:- A terminal emulator is a piece of software that emulates a text terminal. In the past, before the
widespread use of local area networking and broadband internet access, many computers would use a serial access
program to communicate with other computers via telephone line or serial device. When the first Macintosh was released,
a program called MacTerminal was used to communicate with many computers, including the IBM PC. Dec Terminal was
one of the first terminal programs for the popular Altair. The Win32 console on Windows does not emulate a physical
terminal that supports escape sequences so SSH and Telnet programs (for logging in textually to remote computers) for
Windows, including the Telnet program bundled with some versions of Windows, often incorporate their own code to
process escape sequences. The terminal emulators on most Unix-like systems, such as, for example, gnome-terminal,
qterminal, xterm, terminal.app, do emulate physical terminals including support for escape sequences; e.g. xterm can
emulate the VT220 and Tektronix 4010 hardware terminals.

Das könnte Ihnen auch gefallen