Está en la página 1de 14

[Notes on Unit-II]: Computer Networks

[By: ROHIT KUMAR]

Syllabus:-Unit-II
• Medium access sub layer:
• Medium Access sub layer - Channel Allocations,
• LAN protocols - ALOHA protocols - Overview of IEEE standards –
• FDDI
• Data Link Layer
• Elementary Data Link Protocols,
• Sliding Window protocols,
• Error Handling

Possible Conceptual Questions:

Question No-(1) What are two sub-layers of Data Link Layer? What are various channel allocation schemes?
Answer: Data Link Layer: Data link layer is the second layer i.e. next to Physical Layer. Data link layer is responsible
to accept packets from Network layer and to divide into frames, ensure error control during the transmission of frames
flow control and contention resolution in case multiple stations are competing for single channel.

Tasks of Data Link Layer are divided into categories – first category called channel allocation is the responsibility of the
first sub layer named as MAC (Medium Access Control)-sub layer of data link layer. LAN topologies are basically bus
topology configured differently. LANs usually have multipoint line configuration. When packets are deployed on a LAN,
the entire capacity of the line is usually used for that transmission. Because of this, some form of traffic regulation must
take place for the nodes attached to a LAN.This sub-layer is responsible to ensure effective channel allocation to the
stations if multiple stations are requesting same channel.

Second sub layer called LLC(Logical Link Control)-sub layer is responsible for all other duties of the Data Link Layer viz.
Framing, accepting packets from upper layer, error control etc.

Various Channel Allocation Schemes: Channel Allocation schemes can be categories into two categories:-
a) Static Channel Allocation Schemes: In this category a fixed dedicated portion of the bandwidth or time or
wavelength etc is assigned to a particular station.
Following are the examples of the Static Channel Allocation schemes:-
1) Time Division Multiplexing
2) Frequency Division Multiplexing.
3) Wavelength Division Multiplexing.
4) Code Division Multiplexing.

b) Dynamic Channel Allocation Schemes:- Static channel allocation schemes can work only for a small number of
the stations, In case number of stations is large, dedicated allocation of the resources is not effective. Thus
dynamic channel allocation schemes are the only option in cases when a large number of stations are
competing for the single channel.
Following are the examples of Dynamic Channel Allocation Schemes:-
1) ALOHA 2) Slotted ALOHA 3) CSMA 4)CSMA/CD.
Question No-(2) What do you understand by ALOHA techniques? Derive an expression between Offered Load
and throughput for ALOHA and Slotted ALOHA?
Answer: ALOHA: Aloha was the first example of dynamic channel allocation techniques. ALOHA was a technique
which states a free-for-all style of transmission. When a node has something to send, it simply drops the packet onto the
network. Nodes utilizing the ALOHA technique would send a packet and wait for an acknowledgement. The amount of
time the node waits for a response is double that of the amount of time it takes to send a frame between the two
extremes of the line. If an acknowledgement is received, then it’ll continue; otherwise, it’ll resend.
After a few resends, the node will give up and report an error. Obviously, the amount of data errors increase
exponentially along with the number of nodes.
It is meant for small networks where the probability of two nodes transmitting at the same time would be very small.
The simple system of ALOHA is not very useful for large networks, as the maximum utilization would only reach about
18%. As the amount of nodes increase in a network, signals would experience collision. Collisions happen when two or
more signals exists on a shared medium at the same time. Two or more signals existing at once on a medium would
transform them into noise.

SLOTTED ALOHA:- Slotted Aloha is an improvement over pure Aloha technique. In slotted aloha, time is divided into
discrete interval slots. In slotted Aloha any system is not allowed to start transmition whenever it wants to transit rather
system needs to wait for next slot to start. Thus continuous pure aloha is turned into discrete or slotted aloha.Since
collision possibility is reduced to only at the beginning of the slots not during the transmission thus maximum utilization
will reach up to 36%.
Derivation of the expression between Offered Load and Throughput for ALOHA techniques:-
Before deriving the expression we must understand following terms:-
1) Offered Load:-The number of frames offered to the channel per second is termed as Offered Load. Offered
load is represented as G. Obviously all frames cannot successfully transmitted through the channel, few frames
will be dropped out in first attempt due to collisions.
2) Throughput: - The number of frames successfully transmitted and reached at other end of the channel per
second is termed as Throughput. Throughput is represented as S.
3) Vulnerable Time:- Vulnerable time refers to the time during which no other station can start transmission when
a station is already transmitting the frame. Vulnerable time is an important factor in derivation of the expression
between S(Throughput) & G(Offered load).

to to+t to+2t to+3t

--------------------------------Vulnerable Time----------------------
------------------------------------------Vulnerable Time……………>
According to Poisson distribution the probability that k frames per second will reach the destination successfully from G
frames per second is given by:-

k
P [K] = G e-t
------------- -----------------------------( I )

K!
Where t is vulnerable time.
Analysis for pure-Aloha:-
According to above diagram when a frame is in the channel, second frame can not start entering in the channel,
similarly no other frame can completely enter in the channel unless first frame is completely out from the channel.

Thus the minimum time gap between two frames transmission will be 2t, where t is the length of the frame. In case G
frames are being offered per second thus vulnerable time for the channel will be 2G.

Therefore the throughput S can be given as:-


S = G P[o] -----------------------(II)
Where P[o] is the probability of no other packet transmission when G packets per second are being transmitted
successfully.

P[o] = G0 e-2G
------------- = e-2G -----------------------------------(III)

0!

Putting in equation II

S = G e-2G
The maximum value of S is 0.18 possible when G=0.5

Analysis for s-Aloha:-


According to slotted aloha collisions are possible only at the beginning of the slot, once the frame transmission has
been started and other frames will compete only after completion of current slot. Thus only waiting time or vulnerable
time is half than that of pure aloha.

-G
Thus analyzing similar to above S = G e .
The maximum value of S is 0.36 possible when G=1

Question No-(3) What do you understand by CSMA and CSMA/CD? What are three types of CSMS? What is
binary- exponential back-off algorithm?
Answer CSMA: Being nearly useless for modern networking needs, carrier sense was introduced to the multiple
access mechanism. CSMA simply checks for any voltages on a line before deploying its packet.

If there is a voltage on the shared line, the node would not transmit until a time interval has passed until it checks again.
Although this tremendously reduces collisions, the propagation delay for a signal would still cause collisions.

While carrier sense provides an adequate mechanism to reduce collision, it has no provisions should it happen.
A CSMA system still follows the same procedures as ALOHA in that it would await acknowledgement when a packet is
sent. This causes inefficiency in line use.

CSMA/CD
The addition of collision detection to the existing CSMA increases the usage of the line.
CSMA/CD now focuses on providing a plan for the nodes should a collision occur on the shared media.
The CSMA/CD would continually monitor the line after it has sent the packet for abnormally high voltages.
Should a high voltage be detected, it would assume that a collision has occurred and it would stop any further packets
and wait for a predetermined time before resuming.
Types of CSMA- CSMA can be of three types:-
• 1-persistent CSMA: When a station has to send it first listens the channel to see if anyone else is transmitting
at the moment. If the channel is busy, the station waits until it become idle. When the station detects the
channel idle it transmits the frame. If a collision occurs, the station waits for a random time and try again.
This is termed as 1-persistent because the station transmits with a probability of 1 when it finds the channel idle.

• non-persistent CSMA: A Second carrier sense protocol is non-persistent CSMA. In this protocol, a conscious
attempt is made to be less greedy than in the previous one. Before sending, a station senses the channel. If no
one else is sending, the station begins doing so itself. However, If the channel is already in use, the station
does not continually sense it for the purpose of seizing it immediately upon detecting the end of the previous
transmission. Instead it waits a random period of time and then repeats the algorithm. Consequently this
algorithm leads to better channel utilization but longer delay than 1-persistent.

• p-persistent CSMA: The last protocol is p-persistent CSMA. It applies to slotted channels and works as
follows. When a station becomes ready to send, It senses the channel. If it is idle, It transmit with a probability
p. With a probability of q = 1- p, It defers until the next slot.

Binary exponential Back-Off Algorithm:- In dynamic channel allocation schemes if two frames are collided than both
stations are supposed to wait for random time and repeat the efforts to compete for the channel. It is assumed that their
random waiting times will be different automatically. But in some cases random waiting times may be exactly same also.
In such cases frames will collide again and again as they will try for the channel at exactly same times again and again.

To avoid such kind of situations Binary exponential Back-Off Algorithms was invented. According to Binary exponential
back off algorithm after collisions both the stations are assigned different random waiting times. Waiting times are
assigned considering various factors such as priority, age etc of the frames.

Thus binary exponential back off algorithm will avoid the repeated collisions.

Question No-(4) Explain various techniques of Framing techniques?


Answer:- Framing:- Framing refers to accepting packets from Network layer and to divide into frames. Framing is one
of the important responsibilities of the Data Link Layer protocol:-
Following are the various techniques of the framing:-
 Character Count
 Flag bytes with byte stuffing
 Special Characters
 Physical Layer code violation.

Character Count:- This method 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 follows and hence where the
end of the frame is.

5321323145
Frame 1:-> 3 2 1 2 3
Frame 2:-> 1 4 5

The problem with this method is the count can be garbled by a transmission error. Even if error in one count entire
transmission will fail to interpret the correct meaning.

Flag bytes with byte stuffing: The second method gets around the problem of resynchronization after an error by
having each frame start and end with special bytes.

The problem with this method is that if the flag already exist as message bits in the message, wrong interpretation is
possible at receiver side. In such cases additional bit or bit or flags may be inserted in the message to disturb the flag
sequence that exists in the message. These additional inserted bits are termed as stuffed bits and are ignored by the
receivers.

Special Characters: Another method to deal with the problem of existence of flag bits in message is stuffing of special
works or characters at beginning and end of the frames. These special words are based on the concept that these
otherwise carry no dictionary meaning.
e.g. DLE STX at beginning and DLE ETX at end of the frames. More combinations are possible.

Physcial Layer code violation:- This is another method of framing that is developed to deal with the problem of noise.
In this method it is assumed that if the physical layer coding style is robust , change of one bit due to noise will not affect
the meaning a lot at least will not interpret wrongly.

e.g. In case if were representing 5 Volt as 1 and 2 Volt as 0 in coding style. If 1 was changed to 0 the receiver will
understand it as 2 volt signal was transmitted.

But we are using 00 to represent 5 Volt and 11 to represent as 2 Volt. If 00 was transmitted and one bit is changed the
receiver will say I have received 01 that has no meaning perhaps there is some error in transmission.

Question No-(5) What are various types of Errors possible during the transmission?
Answer: Error: - When information is transmitted via an electromagnetic signal, interference from external sources
would corrupt the signal. A key component of a network is reliability. But errors can affect the reliability of the network.
Errors can be of following types:-

Single Bit Error:- A bit in the stream that arrived at it destination is different than that which was at its point of origin.

Multiple Bit Error:- Multiple bits are changed in such errors.

Burst Error:- A burst error is when a sequence of bits are corrupted during transmission
Errors happen in transmission regularly. A reliable network component should be able to distinguish what is corrupted
and what is not. The simplest and most effective method would be to send every data stream twice.
The chances of the error replicating itself on both the streams is very small)

Question No-(6): What do you understand by Redundancy? What are various techniques of error detection?
Explain CRC with suitable example
Answer:- Redundancy: This method of introducing extra bits to verify the integrity of the stream is called redundancy.
These bits are appended to the stream, and once integrity has been verified, they are discarded.
Any system which uses the addition of redundancy bits to the stream would use the same model

Error Detection methods can be of following types:-

Vertical Redundancy Check


The simplest amongst all the redundancy checks is the VRC, also known as the parity check.
The VRC operates on the simple basis of adding together all the 1s in a stream and determine whether the total is an
even or odd number. An even-parity checker would check for even numbers if the parity bit is 1, and the odd-parity is
the other way around.
Longitude Redundancy Check: LRC works in that way- it organizes the stream into an array. It would then calculate
the parity bit for each column and append the stream of redundant bits onto the original data stream.
LRC is more effective in detecting multiple-bit and burst-error than VRC. However, a weakness to the system remains.
Should error occur at two exact locations of the data streams, LRC would not be able to locate it.
Simply treat each column as a VRC-checked data stream.

Cyclic Redundancy Check:-


CRC is the most effective of the redundancy checks, which also makes it the most complex.
CRC does not work on addition, but on binary division. The logic of the system is that a data stream is divided through a
predetermined divisor, and the CRC bits are appended to the data stream. On the receiving device, the same division
occurs.

CRC Generator
The CRC generator at the sending station is responsible for appending the CRC to the data stream
A series of steps is done to determine the CRC:
• A string of zeros appended to the data stream.
• The modified stream is divided by a divisor. The remainder of this division is the CRC
• CRC replaces all the previous appended zeros.

The string of zeros is always one less than the amount of bits in the divisor.When the left-most bit is the remainder, a
zero has to be used in the quotient. This is to ensure that the result of the subtraction would be zero. The remainder is
the CRC bits which will replace the zeros previously appended.

CRC Checker:- The CRC checker(receiver) will function exactly like the generator.
It will subject the data stream (data+CRC) to the same divisionary process. If the remainder of the equation is zero, the
CRC would be removed from the stream and the data accepted. Otherwise, the entire stream is discarded and it is
resent.

CRC Divisor:-
The CRC divisor is not randomly chosen, nor is it represented by a string of 1s and 0s. A polynomial is a short algebraic
equation used to represent its corresponding binary string.

A polynomial is chosen must, at least, not be divisible by x and be divisible by x+1.


The reason is such that all burst errors and all odd errors are detected. There are standard CRC generation protocols in
use today. The number corresponds to the size of the remainder(CRC bits) and thus their divisors are one bit larger.
Question No-(6) Explain IEEE-Ethernet standards?
Answer: IEEE-Ethernet - Project 802 was developed by IEEE(Institution of Electrical & Electronics Engineers) as a
standard for LANs. Ethernets come under the subset 802.3 where it utilizes the CSMA/CD standards.

The 802.3 standards focus on the implementation of LANs at a very low level.

The 1st of the implementation of the 802.3 project is

Thick Ethernet (or Thicknet) is called 10Base5:-


Thicknets are used on a bus topology with a limited range of 500 meters per segment. Each node is to be separated by
its neighbor by a distance of 2.5 meters, accounting for 200 stations per segment.

Thicknets connections are limited to a maximum of 5 segments, connected via a variety of internetworking devices.
The reasons why Thicknets are limited to 5 segments is the amount of collisions is too high should there be more nodes
on the network. A signal cannot be reliably reconstructed after going through so many regenerations

The connector used to connect system and bus is transceiver that is having in-built module of AUI.

10Base2 Also known as cheapnet and thinnet.


Thinnet is named such due to the size of the coaxial cable used, which is thinner than thicknet Thinnets are used in
small organizations where distance and the amount of nodes available on the line is relatively small.
Connectors used in this are BNC-Connectors.

10BaseT or Legacy Ethernet:-


The 10BaseT network uses UTP cables and a hub to connect its network together. The chief advantage of 10BaseT
networks is the flexibility it offers. Nodes can be removed and added without much hassle and the cables themselves
are relatively easy to install.

There are many other types of Ethernet networks These range from the slow 1Base5 StarLAN to 100Base-TX to Gigabit
Ethernets. All the Ethernet networks uses the CSMA/CD protocol to transmit their packets.
Question No-(7) What do you understand by Token Ring? What is FDDI? What are various timining parameters of
used in FDDI?
Answer: CSMA/CD mechanism basically puts the decision to transmit in the hands of the transmitting node. Because of
this ability for the nodes to freely transmit information, collision occurs very frequently in a CSMA/CD network. An
optimal network would have no collision. This can be achieved by having a centralized controller to monitor traffic.
Where CSMA/CD is primarily concerned with bus and star topologies, the ring topology provides an alternative was to
resolve collisions.

CSMA/CD is unable to predict collisions or the amount of delay each node is having. As an infinite circuit, a ring
topology provides a way to resolve collisions altogether.

Token Access
Instead of allowing each individual node to send information as and when it pleases, a token can be used to allow
access. Whenever a node is idle, its job is simply to circulate a three byte token to the next node along the ring.

This token is circulated around the network, where each station would take the token and regenerate it before passing it
to the next node. This happens until the token reaches a station which needs to transmit.
When a station needs to transmit information, it would absorb the token, makes a note in the NIC and sends one data
packet. The packet would be passed along in the same way until it reaches its destination The sink would copy the data
packet and modify four bits in the last byte of the frame and sends the modified packet on its way.

When the source receives the packet, it would recognize itself in the source address. When this happens, the station
would absorb the packet and release the token to the next node. And the cycle continues.
Token Ring There are a few problems with Token Ring.
If a packet is addressed to a station which is non existent, how would token ring guard against an infinitely circulating
packet?If the token is corrupted or destroyed in the process of transmission, how would the next node know about it?
Where does the 1st token of the network originate from? If a node in the ring is down, how would the network continue
functioning?

Priority
To ensure that nodes with priority have information to transmit, a priority code can be set on the nodes themselves.
When a busy token passes by, the priority nodes have the ability to modify the fields on the token itself to reserve it for
transmission. When the token is free, it will be passed to the station that reserved it, regardless of whether or not it is
next in line.
If there are 2 or more stations with the same priority reserving the token, it would resort to first-come-first-served basis.
Monitor Station. Each token ring network usually identifies a node as a monitoring station. The task of the monitoring
station is, simply, to monitor the status of the token.

Every time a token is passed to the monitoring station, it is removed from the network and a new token is transmitted.
A time limit is set on the monitoring station itself so as to ensure that the token is still intact and travelling in the network
If the token did not return to the monitor station within a specified time, a new token is transmitted.

In the case of the infinitely circulating packet, each packet is tagged whenever it passes the monitoring station. If it
receives a tagged packet, the station would know that it has been around the network once and it should be removed. In
this case, a new token is reintroduced into the network. The originator of the 1st token is also the monitoring station.
If this important node in the network fail, there is usually a mirror node ready to back it up.

Token Ring Implementation


The token ring network itself should be designed to be robust. But should a node be disabled for any reason, the entire
network would be incapacitated. To bypass this problem, automatic switches are introduced into the network itself.
Should a node be disabled, the switch would automatically establish a circuit to connect the network While token ring
eliminates collisions on the network, it is still not suitable for a network. Traffic on a network is often bursty in nature and
nodes require a lot of bandwidth in a short time and is idle for the rest. The nature of fair play introduced in token ring is
often not suitable for a typical network.

FDDI (fibre distributed data interface):-


Instead of simply allowing one packet to be sent at a time, FDDI expands the token ring concept to allow each node a
time interval to send the information. Whenever a token is captured, it would have a time allotment to send 2 types of
packets, synchronous (real-time) and asynchronous. Priority is given to sync packets 1st.

The media used is Optical Fibre and double wires are used in ring. In case disconnection is found in the ring is
connected automatically through these two wires.

There are mainly two timing parameters in FDDI:-


THT:- (Token Holding Time) :- This is the time within which one station must get the token. This is decided based on
the importance of the station.
TRT:- (Token Releasing Time) :- This is the time within which one station must release the token. This is decided based
on the importance and workload of the station.

Question No-(8) What are elementary Data Link Layer protocols? Explain Sliding Window Protocols in detail?
Answer:- Elementary Data Link Layer Protocol:- Data Link Layer protocols are responsible for error free node to
node delivery of the frames. Following are the three main Data Link Layer Protocols.

1) Utopia or Simplex Unrestricted Protocol:- This is the simplest possible data link layer protocol. In this
protocol sender sends the data until buffer of the receiver fill completely and respective message is dispatched
back to the sender. This is protocol is not reliable as well simplex i.e communication is possible only in one
direction at a time.

2) Stop & Wait Protocol:- In this method acknowledgement is expected after every frame transmission.
Acknowledgement is necessary for previous frame before starting transmission of next frame.
This is reliable protocol but the problem is of delay as acknowledgements will consume half of the bandwidth.
Sliding-Window Protocol:- Sliding Windows are the most important data link layer protocols. In this method.
A trade-off is made between delay and reliability.
Acknowledgements are requested after transmission of a number of frames not after every frame.
The number of frames after which acknowledgements are needed refers to the Window size.

The Window size for any communication can be found using following formula.

2 n= N [ Where n = Window Size and N= Number of frames of one Packet]

e.g. If there are 8 frame in a Packet. Then Window size will be 3.

Types of Sliding Window protocols:- Sliding Window protocols may be categories into two categories:-

a) Go Back N- Sliding Window protocol:- In this Sliding window protocol, if error is occurred in nth frame, all
remaining frames are ignored and from n-frame onward re-transmission is required.

1 2 3 4 5 6 7 8 3 4 5 6 7 8

1 2 D D D D D D 3 4 5 6 7 8

Error was occurred in 3rd Frame thus re-transmission is required from 3rd onward frame.

b) Selective Repeat-Sliding Window protocol:- In this Sliding window protocol, if error is occurred in nth frame,
remaining frames are continued to transmit and only nth-frame re-transmission is required at last of that frame
series.

[This notes are only to provide help in collecting theory content, students must also practice exhaustively on
numerical exercises discussed in the classes]

También podría gustarte