Sunteți pe pagina 1din 21

www.csetube.

in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

Lecture plan

.in

-prepared by
S.Revathy,lect/cse

CS2302 COMPUTER NETWORKS

LTPC
3003

be

UNIT I

tu

9
Network architecture layers Physical links Channel access on links Hybrid
multiple access techniques - Issues in the data link layer - Framing Error correction
and detection Link-level Flow Control
UNIT II

se

9
Medium access CSMA Ethernet Token ring FDDI - Wireless LAN Bridges and
Switches
UNIT III

.c

9
Circuit switching vs. packet switching / Packet switched networks IP ARP RARP
DHCP ICMP Queueing discipline Routing algorithms RIP OSPF Subnetting
CIDR Interdomain routing BGP Ipv6 Multicasting Congestion avoidance in
network layer
UNIT IV

9
UDP TCP Adaptive Flow Control Adaptive Retransmission - Congestion control
Congestion avoidance QoS
UNIT V

9
Email (SMTP, MIME, IMAP, POP3) HTTP DNS- SNMP Telnet FTP Security
PGP SSH
TOTAL= 45 PERIODS
TEXT BOOK:
1. Larry L. Peterson, Bruce S. Davie, Computer Networks: A Systems Approach,

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

INTRODUCTION

.c

se

tu

be

.in

A set of computers can be indirectly connected is shown in fig, In this


situation, a set of independent networks (clouds) are interconnected to form an
internetwork.

Links, Nodes, and Clouds


Network connectivity occurs at many different levels. At the lowest level, a

network
can consist of two or more computers directly connected by some physical
medium,
such as a coaxial cable or an optical fiber. We call such a physical medium a link,
and

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

we often refer to the computers it connects as nodes. (Sometimes a node is a more


specialized piece of hardware rather than a computer, but we overlook that
distinction
for the purposes of this discussion.) As illustrated in Figure 1.2, physical links are

.in

sometimes limited to a pair of nodes (such a link is said to be point-to-point), while


in other cases, more than two nodes may share a single physical link (such a link is

.c

se

tu

be

said to be multiple access).

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks

ISSUE C REV:0.0

.c

se

tu

be

.in

Unit:I

R/TP/02

A set of nodes, each of which is attached to one or more point to-point links.
Those nodes that are attached to at least two links run software that forwards data

received on one link out on another. If organized in a systematic way, these


forwarding nodes form a switched network. There are numerous types of switched

networks,of which the two most common are circuit switched and packet switched.

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

tu

be

.in

Network Architecture

se

Layering and Protocols

Layering provides two nice features. First, it decomposes the problem of

.c

building

monolithic

a network into more manageable components. Rather than implementing a

several

piece of software that does everything you will ever want, you can implement

layers, each of which solves one part of the problem. Second, it provides a more
modular
design.

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks

ISSUE C REV:0.0

be

.in

Unit:I

R/TP/02

The abstract objects that make up the layers of a network system are called

tu

protocols. That is, a protocol provides a communication service that higher-level


objects (such as application processes, or

se

perhaps higher-level protocols) use to exchange messages.


Each protocol defines two different interfaces. First, it defines a service inter-

.c

face to the other objects on the same computer that want to use its communication
services. This service interface defines the operations that local objects can

perform

on the protocol. Second, a protocol defines a peer interface to its counterpart (peer)

on another machine. This second interface defines the form and meaning of

messages exchanged between protocol peers to implement the communication


service

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks

ISSUE C REV:0.0

se

tu

be

.in

Unit:I

R/TP/02

OSI Architecture

architecture.

.c

The ISO was one of the first organizations to formally define a common way to
connect
computers. Their architecture, called the Open Systems Interconnection (OSI)

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks

ISSUE C REV:0.0

.c

se

tu

be

.in

Unit:I

R/TP/02

Starting at the bottom and working up, the physical layer handles the

transmission of raw bits over a communications link.

The data link layer then collects a stream of bits into a larger aggregate called a
frame. Network adaptors, along with device drivers running in the nodes OS,

typically implement the data link level. This means that frames, not raw bits, are
actually delivered to hosts.
The network layer handles routing among nodes within a packet-switched
network. At this layer, the unit of data exchanged among nodes is typically called a
packet rather than a frame, although
they are fundamentally the same thing.

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

The lower three layers are implemented on all network nodes, including
switches within the network and hosts connected along the exterior of the network.
The transport layer then implements what we have up to this point been calling
a process-to-process channel. Here, the unit of data exchanged is commonly called

.in

a message rather than a packet or a frame. The transport layer and higher layers
typically run only on the end hosts and not on the intermediate switches or routers.

be

Communications Media
coaxial cables

tu

twisted pairs

line-of-sight transmission: lasers, infra-red, microwave,

se

radio

satellite links

.c

fiber optics
Power line

Network Structures

Point-to-Point Networks

each communication line connects a pair of nodes

a packet (or message) is transmitted from one node to another


intermediate nodes, in general, receive and store entire packet and
then forward to the next node
also called store-and-forward or pack-switched
some topologies: star, ring, tree

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

Broadcast Networks
have a single communication line shared by all computers on the

.in

network
packets sent by a host are received by all computers

Types of Communication Networks

tu

Local Area Networks (LANs)

be

some topologies: bus, satellite, radio

< a few km

se

high data transmission rate (at least several Mbps)


ownership usually by a single organization

.c

e. g., Ethernet, IBM Token Ring, Token Bus, FDDI, Fast


Ethernet, ATM, Gigabit Ethernet

Metropolitan Area Networks (MANs)

up to 50 km

fibre optics is a popular technology for MANs


may be private or public
may involve a number of organizations
e.g., cable TV networks (CATV), ATM networks

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

Wide Area Networks (WANs)


a few km to thousands of km
point-to-point networks (also called long-haul networks)

.in

lower data transmission rate than LANs


fiber optics is a popular technology for MANs ownership
usually by more than a single organization

be

e.g., ARPANET, MILNET (US military), CA*NET, NSFNET,


KREONET, BoraNet, KORNET, INET, Internet

tu

Data Link Layer Design Issues

se

The Data Link Layer:

This layer deals with the algorithms for achieving reliable,

.c

efficient communication between two adjacent (i.e. physically connected by


a communication channel like a wire) machines just above the physical

layer.

Data transfer data rate and error correction are the major

concerns of the data link layer.

Circuit errors, finite data rate and propagation delay have


important implications for the efficiency of the data transfer. The protocols
used for communications must take all these factors into consideration.

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

Data Link Layer Design Issues

Functions of the data link layer:


1. Providing a well-defined service interface to the network

2. Determining how the bits of the physical layer are


grouped into frames

be

3. Dealing with transmission errors

.in

layer

4. Regulating the flow of frames so that slow receivers are

tu

not swamped by fast senders.

se

Services Provided to the Network Layer


The function of the data link layer is to provide service to the
network layer.

.c

The principal service is transferring data from the network layer


on the source machine to the network layer on the destination machine.

The network layer hands some bits to the data link layer for

transmission to the destination, the job of the data link layer is to transmit
the bits to the destination machine, so they can be handed over to the

network layer on the destination machine.


The data link layer can be designed to offer various services.
Three possibilities that are commonly provided are:
1. Unacknowledged connectionless service.
2. Acknowledged connectionless service.
3. Acknowledged connection-oriented service.
Unacknowledged connectionless service consists of

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

having the source machine send independent frames to the destination


machine without having the destination machine acknowledge them. No
connection is established beforehand or released afterward. Good channels
with low eror rates, for real-time traffic, such as speech.

.in

Acknowledged connectionless service. When this service


is offered, there are still no connections used, but each frame sent is

be

individually acknowledged. This way, the sender knows whether or not a


frame has arrived safely. Good for unreliable channels, such as wireless.

tu

Connection-oriented service. With this service, the source

and destination machines establish a connection before any data are

se

transferred. Each frame sent over the connection is numbered, and the
data link layer guarantees that each frame sent is received. Furthermore, it

.c

guarantees that each frame is received exactly once and that all frames are
received in the right order.

distinct phases.

When connection-oriented service is used, transfers have three

1. In the first phase the connection is established by having

both sides initialize variable and counter need to keep track of which
frames have been received and which ones have not.
2. In the second phase, one or more frames are actually
transmitted.
3. In the third phase, the connection is released, freeing up
the variables, buffers, and other resources used to maintain the
connection.

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

Framing
In order to provide service to the network layer, the data link
layer must use the service provided to it by the physical layer.
What the physical layer does is accept raw bit stream and

.in

attempt to deliver it to the destination. This bit stream is not guaranteed to


be error free.

be

It is up to the data link layer to detect, and if necessary, correct


errors.

tu

The usual approach is for the data link layer to break the bit

stream up into discrete frames and compute the checksum for each frame.

se

When the frames arrive at the destination , the checksum is re-computed.


There are four methods of breaking up the bit stream

.c

1. Character count.

2. Starting and ending character stuffing.

3. Starting and ending flags, with bit stuffing.


4. Physical layer coding violations.

The first framing method, Character count, uses a field in the

header to specify the number of characters in the frame. when the data
link layer at the destination sees the character count, it knows how many
characters follow. Problem: count can possible be misrepresented by a
transmission error. This method is rarely used anymore.
The second framing method, Starting and ending character
stuffing, gets around the problem of resynchronization after an error by
having each frame start with the ASCII character sequence DLE STX and

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

end with the sequence DLE ETX. (DLE is Data Link Escape, STX is Start of
Text, and ETX is End of Text). Problem: a serious problem occurs with
this method when binary data, such as object programs or floating-point
numbers, are being transmitted it is possible that the DLE, STX, and ETX

.in

characters can occur, which will interfere with the framing. One way to
solve this problem is to have the sender's data link layer insert and DLE

character just before each "accidental" DLE and the data link layer on the

be

other machine removes them before it gives the data to the network layer,
this is called Character stuffing.

tu

The third method, Starting and ending flags with bit stuffing,

allows data frames to contain and arbitrary number of bits and allows

se

character codes with an arbitrary number of bits per character. Each frame
begins and ends with a special bit pattern, 01111110, called a flag byte.

.c

Whenever the sender's data link layer encounters five consecutive ones in
the data, it automatically stuffs a 0 bit into the outgoing bit stream, which

is called bit stuffing. The receiving machine destuffs the 0 bit.

The fourth method, Physical coding violations, is only


applicable to networks in which the encoding on the physical medium

contains some redundancy. For example, some LANs encode 1 bit of data
by using 2 physical bits.
Error Control

The next problem to deal with is, who to make sure all frames
are eventually delivered to the network layer at the destination, and in
proper order.
The usual way to ensure reliable delivery is to provide the

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

sender with some feedback about what is happening at he other end of the
line.
One complication with this is that the frame may vanish
completely, in which case, the receiver will not react at all, since it has no

.in

reason to react.
This possibility is dealt with by introducing timers into the data

be

link layer. When the sender transmits a frame, it generally also starts a

timer. The timer is set to go off after an interval long enough for the frame

tu

to reach the destination machine. If the frame or acknowledgment is lost


the timer will go off. The obvious solution is to transmit the frame again.

se

This creates the problem of possible sending frames multiple times. To


prevent this from happening, it is generally necessary to assign sequence

.c

numbers to outgoing frames, so that the receiver can distinguish


retransmission from originals.

The whole issue of managing the timers and sequence numbers

so as to ensure that each frame is ultimately passed to the network layer


at the destination exactly one, no more no less, is an important part of the

data link layer's duties.


Flow Control

Another important design issue that occurs in the data link


layer (and higher layers as well) is what to do with a sender that
systematically wants to transmit frames faster than a receiver can accept
them.
This situation can easily occur when the sender is running on a

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

fast computer and the receiver is running on a slow machine.


The usual solution is to introduce flow control to throttle the
sender into sending no faster than the receiver can handle the traffic.
Various flow control schemes are known, but most of them use

.in

the same basic principle.


The protocol contains well-defined rules about when a sender may transmit
the next frame.

be

HDLC - High Level Data Link Control


Protocol Overall Description:

tu

Layer 2 of the OSI model is the data link layer. One of the most common
layer 2 protocols is the HDLC protocol. In fact, many other common layer 2

se

protocols are heavily based on HDLC, particularly its framing structure:


namely, SDLC, SS#7, LAPB ,LAPD and ADCCP. The basic framing structure

.c

of the HDLC protocol is shown below:

HDLC uses zero insertion/deletion process (commonly known as bit

stuffing) to ensure that the bit pattern of the delimiter flag does not occur

in the fields between flags. The HDLC frame is synchronous and therefore
relies on the physical layer to provide method of clocking and synchronizing

the transmission and reception of frames.


The HDLC protocol is defined by ISO for use on both point-to-point and
multipoint (multidrop) data links. It supports full duplex transparent-mode
operation and is now extensively used in both multipoint and computer
networks.
HDLC Operation Modes:
HDLC has three operational modes:

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

1. Normal Response Mode (NRM)


2. Asynchronous Response Mode (ARM)
3. Asynchronous Balanced Mode (ABM)
Frame Formats:

.in

The standard frame of the HDLC protocol handles both data and control
messages. It has the following format:

The length of the address field is commonly 0,8 or 16 bits, depending on

be

the data link layer protocol.

For instance the SDLC use only 8 bit address, while SS#7 has no address

tu

field at all because it is always used in point to point links.

The 8 or 16 bit control field provides a flow control number and defines the

se

frame type (control or data). The exact use and structure of this field
depends upon the protocol using the frame.

.c

Data is transmitted in the data field , which can vary in length depending
upon the protocol using the frame. Layer 3 frames are carried in the data

field.

Error Control is implemented by appending a cyclic redundancy check


(CRC) to the frame, which is 16 bits long in most protocols.

Frame Classes:

In the HDLC protocol , three classes of frames are used :


1. Unnumbered frames - are used for link management.
Unnumbered frames are used for link management, for example they are
used to set up the logical link between the primary station and a secondary
station, and to inform the secondary station about the mode of operation
which is used

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

2. Information frames - are used to carry the actual data.


Information frames are those who carry the actual data. The Information
frames can be used to piggyback acknowledgment information relating to
the flow of Information frames in the reverse direction when the link is

3. Supervisory frames - are used for error and flow control.

.in

being operated in ABM or ARM.

Supervisory frames are use for error and flow control. They contain, send

be

and receive sequence numbers.

Frame types: Three classes of frames are used in HDLC. Some of the

tu

different types of frame in each class are described below.

Unnumbered frames are used for link management. SNRM and SABM

se

frames , for example, are used both to set up logical link between the
primary and the secondary station and to inform the secondary station of

.c

the mode of operation to be used. A logical link is subsequently cleared by


the primary station sending a DISC frame. The UA frame is used as an

acknowledgment to the other frames in this class.

There are four types of supervisory frames but only RR and RNR are used
in both NRM and ABM These frames are used both to indicate the

willingness or otherwise of a secondary station to receive an information


frame from the primary station, and for acknowledgment purposes. REJ
and SREJ frames are used only in ABM which permits simultaneous twoway
communication across a point to point link. The two frames are used
to indicate to the other station that a sequence error has occurred, that is
an information frame containing an out of sequence N(s) has been
received. the SREJ frame is used with a selective repeat transmission

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

procedure, whereas the REJ frame is used with a go back N procedure.


Protocol operation
The two basic functions in the protocol are link management and data
transfer (which includes error and flow control).

.in

Link management
. Prior to any kind of transmission (either between two stations connected
by a point to point link or between a primary and secondary station a

be

multidrop link) a logical connection between the two communication parties


must be established.

tu

Data transfer

NRM all data (information frames) if transferred under the control of

se

the primary station. The unnumbered poll frame with the P bit set to 1 is
normally used by the primary to poll a secondary. If the secondary has no

.c

data to transmit, it returns an RNR frame with the F bit set. If data is
waiting, it transmits the data, typically as a sequence of information

frames.

The two most important aspects associated with the data transfer phase
are error control and flow control. Essentially, error control uses a

with either a selective repeat or a go back N


transmission strategy, while flow controls based on a window mechanism.
For more information Email To: ofirp@eng.tau.ac.il This Document Was
written by: 1. Ziegler Alon 2. Kirshenberg Gilad 3. Paz Ofir This Document
was based on the following books: 1. Data Communications , Computer
Networks and Open Systems, by Fred Halsall 2. Data Communication ICs,
High-Level Serial Communications, by Siemens

www.csetube.in

www.csetube.in
Code&name of the sub: CS2302& computer networks
Unit:I

R/TP/02
ISSUE C REV:0.0

Synchronous Data Link Control(SDLC)


SDLC is same as HDLC . The only difference is in the format. In this case
the size of the information field is variable whereas in case of HDLC it is
multiple of byte.

.in

SLIP(Serial Line Internet Protocol)


Short for, a protocol for connection to the Internet via a dial-up

connection. Developed in the 80s when modem communications typically

be

were limited to 2400 bps, it was designed for simple communication over
serial lines. SLIP can be used on RS-232 serial ports and supports

tu

asynchronous links.
PPP(Point-to-Point Protocol)

se

A more common protocol is PPP (Point-to-Point Protocol) because it is


faster and more reliable and supports functions that SLIP does not, such as

.c

error detection, dynamic assignment of IP addresses and data


compression. Point-to-Point Protocol, a method of connecting a computer

to the Internet. PPP is more stable than the older SLIP protocol and

provides error checking features. Working in the data link layer of the OSI
model, PPP sends the computer's TCP/IP packets to a server that puts

them onto the Internet.


In general, Internet service providers offer only one protocol although
some support both protocols.

www.csetube.in

S-ar putea să vă placă și