0% found this document useful (0 votes)
101 views46 pages

CN Notes

This document provides an overview of computer networks and the history and development of the Internet. It discusses: - The basic components of a computer network including nodes, hosts, and different network topologies. - The development of protocols to connect different computer systems and networks, leading to the creation of TCP/IP and the Internet. - How the Internet has evolved from its origins connecting a small number of research institutions to today's vast interconnected network of private and public networks run primarily by private companies. - The layered architecture model used in network design including the seven-layer OSI reference model.

Uploaded by

Rao Rao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views46 pages

CN Notes

This document provides an overview of computer networks and the history and development of the Internet. It discusses: - The basic components of a computer network including nodes, hosts, and different network topologies. - The development of protocols to connect different computer systems and networks, leading to the creation of TCP/IP and the Internet. - How the Internet has evolved from its origins connecting a small number of research institutions to today's vast interconnected network of private and public networks run primarily by private companies. - The layered architecture model used in network design including the seven-layer OSI reference model.

Uploaded by

Rao Rao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

COMPUTER NETWORKS

Data Link Layer, Protocols, Connecting Devices,


UNIT-1 Multi Access Protocols.
COMPUTER NETWORKS

A computer network is a set of connected computers. Computers on a network are called nodes.
Also a network host is a computer or other device connected to a computer network.

Networks Types:-

 Local Area Networks (LAN)


 Metropolitan Area Network (MAN).
 Wide Area Network (WAN).
 Personal-Area network (PAN)

Network topology is defined as the logical connection of various computers in the network.
The six basic network topologies are: bus, ring, star, tree, mesh and hybrid.

A protocol is a set of rules that govern data communications. A protocol defines what is communicated,
how it is communicated, and when it is communicated. The key elements of a protocol are syntax,
semantics, and timing.

o The term syntax refers to the structure or format of the data


o The word semantics refers to the meaning of each section of bits.
o The term timing refers to two characteristics: when data should be sent and how fast they can be
sent

Point-to-Point
A point-to-point connection provides a dedicated link between two devices.
Multipoint
A multipoint (also called multidrop) connection is one in which more than two specific devices share a
single link.

Page 1
COMPUTER NETWORKS

THE INTERNET
The Internet has revolutionized many aspects of our daily lives. It has affected the way we do business
as well as the way we spend our leisure time. Count the ways you've used the Internet recently. Perhaps
you've sent electronic mail (e-mail) to a business associate, paid a utility bill, read a newspaper from a
distant city, or looked up a local movie schedule-all by using the Internet. Or maybe you researched a
medical topic, booked a hotel reservation, chatted with a fellow Trekkie, or comparison-shopped for a
car. The Internet is a communication system that has brought a wealth of information to our fingertips
and organized it for our use.

A Brief History
A network is a group of connected communicating devices such as computers and printers. An internet
(note the lowercase letter i) is two or more networks that can communicate with each other. The most
notable internet is called the Internet (uppercase letter I), a collaboration of more than hundreds of
thousands of interconnected networks. Private individuals as well as various organizations such as
government agencies, schools, research facilities, corporations, and libraries in more than 100 countries
use the Internet. Millions of people are users. Yet this extraordinary communication system only came
into being in 1969. In the mid-1960s, mainframe computers in research organizations were standalone
devices. Computers from different manufacturers were unable to communicate with one another. The
Advanced Research Projects Agency (ARPA) in the Department of Defense (DoD) was interested in
finding a way to connect computers so that the researchers they funded could share their findings,
thereby reducing costs and eliminating duplication of effort. In 1967, at an Association for Computing
Machinery (ACM) meeting, ARPA presented its ideas for ARPANET, a small network of connected
computers. The idea was that each host computer (not necessarily from the same manufacturer) would
be attached to a specialized computer, called an inteiface message processor (IMP). The IMPs, in tum,
would be connected to one another. Each IMP had to be able to communicate with other IMPs as well as
with its own attached host. By 1969, ARPANET was a reality. Four nodes, at the University of
California at Los Angeles (UCLA), the University of California at Santa Barbara (UCSB), Stanford
Research Institute (SRI), and the University of Utah, were connected via the IMPs to form a network.
Software called the Network Control Protocol (NCP) provided communication between the hosts. In
1972, Vint Cerf and Bob Kahn, both of whom were part of the core ARPANET group, collaborated on
what they called the Internetting Projec1. Cerf and Kahn's landmark 1973 paper outlined the protocols to
achieve end-to-end delivery of packets. This paper on Transmission Control Protocol (TCP) included
concepts such as encapsulation, the datagram, and the functions of a gateway. Shortly thereafter,
authorities made a decision to split TCP into two protocols: Transmission Control Protocol (TCP) and
Internetworking Protocol (lP). IP would handle datagram routing while TCP would be responsible for
higher-level functions such as segmentation, reassembly, and error detection. The internetworking
protocol became known as TCP/IP

The Internet Today


The Internet has come a long way since the 1960s. The Internet today is not a simple hierarchical
structure. It is made up of many wide- and local-area networks joined by connecting devices and
switching stations. It is difficult to give an accurate representation of the Internet because it is
continually changing-new networks are being added, existing networks are adding addresses, and
networks of defunct companies are being removed. Today most end users who want Internet connection
use the services of Internet service providers (lSPs). There are international service providers, national
service providers, regional service providers, and local service providers. The Internet today is run by

Page 2
COMPUTER NETWORKS

private companies, not the government. Figure shows a conceptual (not geographic) view of the
Internet.

International Internet Service Providers:


At the top of the hierarchy are the international service providers that connect nations together.

National Internet Service Providers:


The national Internet service providers are backbone networks created and maintained by specialized
companies. There are many national ISPs operating in North America; some of the most well known are
SprintLink, PSINet, UUNet Technology, AGIS, and internet Mel. To provide connectivity between the
end users, these backbone networks are connected by complex switching stations (normally run by a
third party) called network access points (NAPs). Some national ISP networks are also connected to one
another by private switching stations called peering points. These normally operate at a high data rate
(up to 600 Mbps).

Regional Internet Service Providers:


Regional internet service providers or regional ISPs are smaller ISPs that are connected to one or more
national ISPs. They are at the third level of the hierarchy with a smaller data rate. Local Internet Service
Providers: Local Internet service providers provide direct service to the end users. The local ISPs can be

Page 3
COMPUTER NETWORKS

connected to regional ISPs or directly to national ISPs. Most end users are connected to the local ISPs.
Note that in this sense, a local ISP can be a company that just provides Internet services, a corporation
with a network that supplies services to its own employees, or a non-profit organization, such as a
college or a university that runs its own network. Each of these local ISPs can be connected to a regional
or national service provider.

Layered Architecture

A monolithic network design that uses a single large body of hardware and software to meet all network
requirements can quickly become obsolete and also is extremely difficult and expensive to modify.

Layered approach accommodates incremental changes much more rapidly. It was developed to
accommodate changes in technology. Each layer of a specific network model may be responsible for a
different function of the network. Each layer will pass information up and down to the next subsequent
layer as data is processed.

The designers identified which networking functions had related uses and collected those functions into
discrete groups that became the layers. Each layer defines a family of functions distinct from those of
the other layers. By defining and localizing functionality in this fashion, the designers created an
architecture that is both comprehensive and flexible. Most importantly, the OSI model allows complete
interoperability between otherwise incompatible systems

Each layer in layered architecture


 performs a subset of functions required for communication with another system
 relies on next lower layer relies on next lower layer to perform more primitive functions
 provides service to next higher layer provides service to next higher layer
 implements protocol for communication with peer layer peer layer in other systems

The OSI Reference Model


This model is based on a proposal developed by the International Standards Organization (ISO). The
model is called the ISO OSI (Open Systems Interconnection) Reference Model.

The OSI model has seven layers. The principles that were applied to arrive at the seven layers can be
briefly summarized as follows:
1. A layer should be created where a different abstraction is needed.
2. Each layer should perform a well-defined function.
3. The function of each layer should be chosen with an eye toward defining internationally
standardized protocols.
4. The layer boundaries should be chosen to minimize the information flow across the interfaces.
5. The number of layers should be large enough that distinct functions need not be thrown together
in the same layer out of necessity and small enough that the architecture does not become
unwieldy.

Page 4
COMPUTER NETWORKS

Fig. The OSI reference model

Q. Briefly describe the functions of each layer in the OSI model?


 The application layer is the layer at which a user and a computer interface to a network to view a
message, data request, or response. It contains a variety of commonly used protocols, such as file
transfer, virtual terminal, and email.
 The presentation layer converts incoming and outgoing data from one presentation format to
another. It manages the syntax and semantics of the information transmitted between two
computers.
 The session layer manages the establishment of a continuing series of requests and responses
between the applications at each end. It establishes and manages sessions, conversions, and
dialogues between two computers.
 The transport layer manages the end-to-end control and error checking.
 The network layer handles the routing of the data. It controls the operation of a packet from one
network to another.
 The data link layer provides error control and synchronization for the physical level
 The physical layer conveys the bit stream through the network at the electrical and mechanical
level. It physically transmits signals across a communication medium.

Page 5
COMPUTER NETWORKS

Why did OSI Model Fail in Practice?

 Bad Timing Bad Timing


o although essential elements of OSI model were in place quickly, final standard (model +
protocols) was not published until 1984
o by the time it took to develop OSI protocol standards, TCP/IP network architecture emerged
as an alternative for open system interconnection
o free distribution of TCP/IP as part of Berkeley UNIX system ensured widespread use and
development of numerous applications at various academic institutions

 Complexity and Inefficiency Complexity and Inefficiency


o 7-layer OSI model was specified before there was much experience in designing large-scale
OSI networks – some design choices were made in absence of concrete evidence of their
effectiveness

o some functions, e.g. error control, appear in several layers (data link, transport, application)
⇒ overall efficiency reduced

INTERNET STANDARDS
An Internet standard is a thoroughly tested specification that is useful to and adhered to by those who
work with the Internet. It is a formalized regulation that must be followed. There is a strict procedure by
which a specification attains Internet standard status. A specification begins as an Internet draft. An
Internet draft is a working document (a work in progress) with no official status and a six-month
lifetime. Upon recommendation from the Internet authorities, a draft may be published as a Request for
Comment (RFC). Each RFC is edited, assigned a number, and made available to all interested parties.
RFCs go through maturity levels and are categorized according to their requirement level.

Page 6
COMPUTER NETWORKS

Maturity Levels
An RFC, during its lifetime, falls into one of six maturity levels: proposed standard, draft standard,
Internet standard, historic, experimental, and informational. Proposed Standard. A proposed standard is
a specification that is stable, well understood, and of sufficient interest to the Internet community. At
this level, the specification is usually tested and implemented by several different groups.

Draft Standard. A proposed standard is elevated to draft standard status after at least two successful
independent and interoperable implementations. Barring difficulties, a draft standard, with modifications
if specific problems are encountered, normally becomes an Internet standard.
Internet Standard. A draft standard reaches Internet standard status after demonstrations of successful
implementation.
Historic The historic RFCs are significant from a historical perspective. They either have been
superseded by later specifications or have never passed the necessary maturity levels to become an
Internet standard.
Experimental An RFC classified as experimental describes work related to an experimental situation
that does not affect the operation of the Internet. Such an RFC should not be implemented in any
functional Internet service.
Informational An RFC classified as informational contains general, historical, or tutorial information
related to the Internet. It is usually written by someone in a non-Internet organization, such as a vendor.
Requirement Levels RFCs are classified into five requirement levels: required, recommended, elective,
limited use, and not recommended.
Required An RFC is labeled required if it must be implemented by all Internets systems to achieve
minimum conformance. For example, IF and ICMP are required protocols.
Recommended An RFC labeled recommended is not required for minimum conformance; it is
recommended because of its usefulness. For example, FTP and TELNET are recommended protocols.
Elective An RFC labeled elective is not required and not recommended. However, a system can use it
for its own benefit.
Limited Use An RFC labeled limited use should be used only in limited situations. Most of the
experimental RFCs fall under this category.
Not Recommended An RFC labeled not recommended is inappropriate for general use. Normally a
historic (deprecated) RFC may fall under this category.

INTERNET ADMINISTRATION

The Internet, with its roots primarily in the research domain, has evolved and gained a broader user base
with significant commercial activity. Various groups that coordinate Internet issues have guided this
growth and development. Fig shows the general organization of Internet administration.

The Internet Society (ISOC) is an international, nonprofit organization formed in 1992 to provide
support for the Internet standards process. ISOC accomplishes this through maintaining and supporting
other Internet administrative bodies such as lAB, IETF,IRTF, and IANA (see the following sections).
ISOC also promotes research and other scholarly activities relating to the Internet.

The Internet Architecture Board (IAB) is the technical advisor to the ISOC. The main purposes of the
lAB are to oversee the continuing development of the TCP/IP Protocol Suite and to serve in a technical

Page 7
COMPUTER NETWORKS

advisory capacity to research members of the Internet community. IAB accomplishes this through its
two primary components, the Internet Engineering Task Force (IETF) and the Internet Research Task
Force (IRTF). Another responsibility of the IAB is the editorial management of the RFCs, described
earlier. lAB is also the external liaison between the Internet and other standards organizations and
forums

The Internet Engineering Task Force (IETF) is a forum of working groups managed by the Internet
Engineering Steering Group (IESG). IETF is responsible for identifying operational problems and
proposing solutions to these problems. IETF also develops and reviews specifications intended as
Internet standards. The working groups are collected into areas, and each area concentrates on a specific
topic. Currently nine areas have been defined. The areas include applications, protocols, routing,
network management next generation, and security.

The Internet Research Task Force (IRTF) is a forum of working groups managed by the Internet
Research Steering Group (IRSG). IRTF focuses on long-term research topics related to Internet
protocols, applications, architecture, and technology

COMPARISION OF OSI AND TCP/IP REFERENCE MODEL


The two layers, session and presentation, are missing from the TCP/IP protocol suite. The application
layer in the suite is usually considered to be the combination of three layers in the OSI model.

The OSI model appeared after the TCP/IP protocol suite. Most experts were at first excited and thought
that the TCP/IP protocol would be fully replaced by the OSI model . This did not happen due various
reasons.

Three most accepted reasons are First, OSI was completed when TCP/IP was fully in place and a lot of
time and money had been spent on the suite; changing it would cost a lot. Second, some layers in the
OSI model were never fully defined. For example, although the services provided by the presentation
and the session layers were listed in the document, actual protocols for these two layers were not fully
defined, nor were they fully described, and the corresponding software was not fully developed. Third,

Page 8
COMPUTER NETWORKS

when OSI was implemented by an organization in a different application, it did not show a high enough
level of performance to entice the Internet authority to switch from the TCP/IP protocol suite to the OSI
model.

Guided Vs Unguided Media

The transmission media is broadly classified into two categories that are guided (Twisted pair cables,
coaxial cable, and optical fibre) and unguided media (radio waves, microwave, and infrared waves).

The basic difference between guided and unguided media is that in the guided media, the signal travels
through a physical medium whereas, in unguided media, the signal travel through the air.

Advantages and Disadvantages of Guided Media.

Advantages
 The cost of guided media is very low (inexpensive) and easily available.
 This is very Flexible and Lightweight.
 Very easy to set up and install.

Disadvantages
 Bandwidth is very low in guided media.
 Susceptible to interference and noise- (Noise is an electrical disturbance that can degrade
communication)

Page 9
COMPUTER NETWORKS

The most popular types of guided media are the following-


o Twisted pair cable
o Coaxial cable
o optical Fibre

Twisted pair cable


Twisted pair cables consist of two insulated copper wires twisted together. Twisting grant each wire to
have just about] the same noise environment.

Types of twisted pair cable


 Unshielded Twisted pair(UTP) cable
 Shielded Twisted pair(STP) cable

Unshielded Twisted pair(UTP) cable


Nowadays UTP cable is the most common type of telecommunication medium. Although most familiar
with its use in the telephones system, its frequency range is suitable for transmitting both data and voice.
A twisted pair consists of two conductors(usually copper), is with its own colored plastic insulation.
A twisted pair consists of two conductors is surrounded by an insulating material.

Advantages of Unshielded Twisted pair(UTP) cable


o Inexpensive.
o widely used.
o supports many network types.

Disadvantages of Unshielded Twisted pair(UTP) cable


o Distance Limitation
o susceptible to interference
o prone to damage during installation

Page 10
COMPUTER NETWORKS

Shielded Twisted pair(STP) cable


STP cable has a Metal foil or braided-mesh covering that encases each pair of the insulated conductors.
The metal casing prevents the penetration of electromagnetic noise. It also can eliminate a phenomenon
called cross-talk, which is the undesired effect of one circuit (or channel) on other circuits (or channel).

It takes place when one line (acting as a kind of receiving antenna) picks up some of the signals
travelling down another line (acting as a kind of sending antenna). this effect can be felt during
telephone discussion when one can hear other discussions in the background.

Advantages of shielded twisted pair(STP) cable


o Faster than UTP and Coaxial
o Shielded

Disadvantages of shielded twisted pair(STP) cable


o More expensive than UTP and coaxial
o Cause difficulty in Installation.

Coaxial cable
Coaxial cable (or coax) carries signals of higher frequency ranges than twisted-pair cable, in part
because the two media are constructed quite differently. rather than of having two wires, coax has a
central core conductor of solid or standard wire (usually copper) surrounded in an Insulating sheath,
which is, in turn, encased in an outer conductor of metal foil, braid, or a fusion of the two (also usually
copper).

The outer metallic enfold serves both as a shield against noise and as the second conductor, Which
completes the circuit. This outer conductor is also surrounded by an insulating sheath, and the entire
cable is secured by a plastic cover.

Advantages of Coaxial cables


o They are the most common means of data communication over short distances.
o Cheap to install
o Good Bandwidth
o Great channel capacity

Disadvantages of Coaxial cables


o Bulky
o Very expensive over long distances
o They do not support high-speed transmission; this is another disadvantage of coaxial cable.

Optical Fibre
Up until this point, we have discussed conductive (metal) cables that transmit signals in the form of
current. Optical fibre, on the other hand, is made of glass or plastic and transmits signals in the form of
light. If we want to know and understand optical fibre, we first need to explore the nature of light.

Page 11
COMPUTER NETWORKS

Advantages of Optical fibre


o Noise resistance
o Less signal attenuation
o Higher bandwidth
o Disadvantages of Optical fibre

They are very expensive


o hard to install and maintained
o Fragility(easily broken)

Data Link Layer Design Issues


The data link layer in the OSI (Open System Interconnections) Model, is in between the physical layer
and the network layer. This layer converts the raw transmission facility provided by the physical layer to
a reliable and error-free link.

The main functions and the design issues of this layer are
o Providing services to the network layer
o Framing
o Error Control
o Flow Control

Services to the Network Layer


In the OSI Model, each layer uses the services of the layer below it and provides services to the layer
above it. The data link layer uses the services offered by the physical layer.The primary function of this
layer is to provide a well defined service interface to network layer above it.

Framing
The data link layer encapsulates each data packet from the network layer into frames that are then
transmitted.
A frame has three parts, namely −
o Frame Header
o Payload field that contains the data packet from network layer
o Trailer

Error Control
The data link layer ensures error free link for data transmission. The issues it caters to with respect to
error control are –

Dealing with transmission errors


o Sending acknowledgement frames in reliable connections
o Retransmitting lost frames
o Identifying duplicate frames and deleting them
o Controlling access to shared channels in case of broadcasting

Page 12
COMPUTER NETWORKS

Flow Control
The data link layer regulates flow control so that a fast sender does not drown a slow receiver. When the
sender sends frames at very high speeds, a slow receiver may not be able to handle it. There will be
frame losses even if the transmission is error-free.

The two common approaches for flow control are −


o Feedback based flow control
o Rate based flow control

Descriptive Questions

1. What are the advantages of having layered architecture? Mention the layers of ISO-OSI
reference model?
2. What is Internet? Mention some of the applications of Internet?
3. Explain problems of the TCP/IP model and protocols?
4. With a neat diagram explain ARPANET design?
5. Write the advantages of optical fibre over twisted-pair and coaxial cables.
6. What are the advantages of having layered architecture?
7. Compare and contrast the OSI and TCP/IP reference models.
8. Discuss about the various transmission media available at the physical layer.
9. What is the use of data link layer?
10. Explain about various transmission media in physical layer with a neat sketch
11. Elaborate on the design issues of data link layer.
12. List Various Components in Network
13. List and define Network topologies
14. With neat diagram explain OSI reference model explain the functions performed at each layer.
15. How Internet is administered.
16. What are the issues in data link layer?
17. Compare OSI and TCP/IP reference model.
18. Discuss about Internet standards.
19. What is meant by protocol
20. Write any four reasons for using layered protocols.
21. Explain the functionality of each layer in OSI reference model.
22. Explain in brief about the design issues in the data link layer.

OBJECTIVE QUESTIONS

1. OSI model consists Of ______ layers


2. The ______________ layer is responsible for translation, compression, and encryption.
3. The _________________ layer is responsible for dialog control and synchronization.
4. ____________ layer does logical Addressing
5. The communication Link Management between source and destination is done by ___________
layer
6. ____________layer handles Mechanical Properties

Page 13
COMPUTER NETWORKS

7. The___________ layer is responsible for the delivery of individual packets from the source host
to the destination host.
8. The ____________ layer is responsible for the delivery of a message from one process to
another
9. The _________ layer is responsible for moving frames from one hop (node) to the another
hop(Node). i.e. hop-to-hop delivery or node-to-node delivery

10. The ___________ layer is responsible for movements of individual bits from one node to the
next node.

11. The __________layer is responsible for translation, compression, and encryption

12. TCP/IP is a hierarchical protocol . The term hierarchical means that each upper-level protocol is
supported by one or more lower-level protocols. [True / False]

13. The structure or format of data is called ___________

14. Communication between a computer and a keyboard involves ______________ transmission.

15. The first Network was called ________

16. Which of this is not a network edge device?


a) PC b) Smartphones c) Servers d) Switch

17. A _________ set of rules that governs data communication


a) Protocols b) Standards c) RFCs d) Servers

18. Three or more devices share a link in ________ connection.


a) Unipoint b) Multipoint c) Point to point d) Simplex

19. Bluetooth is an example of __________


a) personal area network b) local area network c) virtual private network d) wide area
network
20. The acronym OSI stands for __________ _________ __________ in computer networking.

21. How many layers are present in the Internet protocol stack (TCP/IP model)? _______

22. Which layer is used to link the network support layers and user support layers?
a) session layer b) data link layer c) transport layer d) network layer

23. The upper three layers, _______________ , ______________, ______________ are called user
support layers.

Page 14
COMPUTER NETWORKS

24. The lower three layers, _______________ , ______________, ______________ are called
network support layers.

Page 15
COMPUTER NETWORKS

COMPUTER NETWORKS

Data Link Layer, Protocols, Connecting


UNIT-2 Devices, Multi Access Protocols.

Page 16
COMPUTER NETWORKS

The Data Link Layer is the second layer of the OSI Model, its function is to transmit data within a
physical network link. It is considered a Reliable System to transmit data from one node to another
node.
 Services to the Network Layer
The types of services provided can be of three types.
1. Unacknowledged connectionless service
2. Acknowledged connectionless service
3. Acknowledged connection - oriented service

The main functions and the design issues of this layer.


 Framing
 Error Control
 Error Detection Code
 Error Correcting Code
 Flow Control

1. Framing
The data link layer takes packages from the network layer and divides them into a few frames. Then it
bit by bit sends all these frames to the hardware. The data link layer then takes the signals from the
hardware and converts them into frames.
The Frame Contains
 Frame Header
 Payload field for holding packet
 Frame Trailer

2. Error Control
Error Control is a process when the receiver's information does not match the information of the sender.
Then this process occurs. At the time of transmission, whenever a sender goes from Sender to receiver,
Digital Signal encounters the problem of Nodes which shows the error in Binary Bits. This means that 0
Bit will be converted into 1 Bit and 1 Bit will be converted to 0 Bit. The Data Link Layer uses two
methods to control the error.

1. Error Detecting Code


Whenever a message is transmitted, the data gets corrupted many times due to noise. To remove
this problem, we use the Error Detection Code. In this process, it sends a digital data with
Message so that it can understand if there is an error in this Message. With the help of
Redundancy Bit, we can easily understand error detection because extra bits are inserted in this
process so that we can understand the error.

Page 17
COMPUTER NETWORKS

2. Error Correction Code


We use this Process to remove the correct Massage from the corrupt Message. We know such
code by the name of Error Correcting Code. It also works to identify the correct location of
corrupt Bit. Parity check is very useful for us in this process because it is very helpful in
correcting the error. As soon as we get to know the location of corrupt Bit, it changes the value
and gives us the right Massage.

3. Flow Control
Flow control is a technique. Which allows the two stations to communicate with each other and work at
different speeds? The data link layer regulates the flow control so that when a fast sender sends a data, a
slow receiver can receive the data at the same speed. For this, we use flow control. There are 2 common
approaches to control flow, even if the transmission is error free.

1. Feedback Based Flow Control: Sender transmits frame to receiver, sender transmits more frames after
it has received acknowledgments from receiver.

2. Rate Based Flow Control: When sender sends data at faster speed to receiver and receiver is not being
able to receive data at the speed, a built-in mechanism in protocol will just limit overall rate at which
data is being transferred by the sender without any acknowledgment from receiver.

What is Stop and Wait protocol?


While sending the data from the sender to the receiver the flow of data needs to be controlled. Suppose a
situation where the sender is sending the data at a rate higher than the receiver is able to receive and
process it, then the data will get lost. The Flow-control methods will help in ensuring that the data
doesn't get lost. The flow control method will keep a check that the senders send the data only at a rate
that the receiver is able to receive and process. There are mainly two ways in which this can be achieved
i.e. using Stop-and-wait protocol or sliding window protocol

Stop and Wait Protocol


It is the simplest flow control method. In this, the sender will send one frame at a time to the receiver.
The sender will stop and wait for the acknowledgment from the receiver. This time(i.e. the time between
message sending and acknowledgement receiving) is the waiting time for the sender and the sender is
totally idle during this time. When the sender gets the acknowledgment (ACK), then it will send the next
data packet to the receiver and wait for the acknowledgment again and this process will continue as long
as the sender has the data to send. This can be understood by the diagram below:

Page 18
COMPUTER NETWORKS

Situation 1
Suppose if any frame sent is not received by the receiver and is lost. So the receiver will not send any
acknowledgment as it has not received any frame. So a deadlock situation arises here. To avoid any such
situation there is a time-out timer. The sender waits for this fixed amount of time for the
acknowledgment and if the acknowledgment is not received then it will send the frame again.

Situation 2
Consider a situation where the receiver has received the data and sent the acknowledgment but the ACK
is lost. So, again the sender might wait till infinite time if there is no system of time-out timer. So, in this
case also, the time-out timer will be used and the sender will wait for a fixed amount of time for the
acknowledgment and then send the frame again if the acknowledgement is not received.

There are two types of delays while sending these frames:

Transmission Delay: Time taken by the sender to send all the bits of the frame onto the wire is called
transmission delay. This is calculated by dividing the data size(D) which has to be sent by the
bandwidth(B) of the link.
Td = D / B
Propagation Delay: Time taken by the last bit of the frame to reach from one side to the other side is
called propagation delay. It is calculated by dividing the distance between the sender and receiver by the
wave propagation speed.
Tp = d / s ; where d = distance between sender and receiver, s = wave propagation speed

Page 19
COMPUTER NETWORKS

The propagation delay for sending the data frame and the acknowledgment frame is the same as distance
and speed will remain the same for both frames. Hence, the total time required to send a frame is:

Total time= Td(Transmission Delay) + Tp(Propagation Delay for data frame) + Tp(Propagation Delay
for acknowledgment frame)
Total time=Td+ 2Tp
The sender is doing work only for Td time (useful time)and for the rest 2Tp time the sender is waiting
for the acknowledgment.

Efficiency
Efficiency = Useful Time/ Total Time

η = Td / (Td+2*Tp)
η = 1/(1+2a) →(1)
where a=Tp / Td
Throughput
The number of bits that a receiver can accept in total time duration (i.e. transmission time(Td) + 2 *
propagation delay(Tp)). It is also called effective bandwidth or bandwidth utilization.

In Stop and Wait, in the total duration, the receiver can accept only one frame. One frame is of data size
D i.e. D bits in one frame.

Page 20
COMPUTER NETWORKS

Therefore, Throughput= D / (Td + 2Tp)


Throughput = D / Td(1+2a) →(2)
where a= Tp / Td

From the definition of Transmission delay,


Td=D/B

Cross multiplying B and Td, we get


B = D/Td → (3)

Now putting the value of equation 3 in equation 2, we get,


Throughput= B /(1+2a) → (4)
Now, putting the value of equation 1 in equation 4, we get,
Throughput= η * B

Advantages of Stop and Wait Protocol


1. It is very simple to implement.
2. The main advantage of this protocol is the accuracy. The next frame is sent only when the first
frame is acknowledged. So, there is no chance of any frame being lost.

Disadvantages of Stop and Wait Protocol


1. We can send only one packet at a time.
2. If the distance between the sender and the receiver is large then the propagation delay would be
more than the transmission delay. Hence, efficiency would become very low.
3. After every transmission, the sender has to wait for the acknowledgment and this time will
increase the total transmission time. This makes the transmission process slow.

Page 21
COMPUTER NETWORKS

Point–to–Point Protocol (PPP) is a Communication Protocol of the Data Link Layer, which is used to
transmit Multi Protocol data between two Directly Connected (Point-to-Point) computers. It is a Byte -
Oriented Protocol widely used in Broadband Communications with heavy loads and high speed. Since it
is a data link layer protocol, the data is transmitted to the frame. It is also known as RFC 1661. PPP was
created by IETF (Internet Engineering Task Force). The main purpose of this was to create a data link
protocol for point to point links. This protocol can be used by anyone with Dial Up or ISDN.

Point to point is the non proprietary version of the HDLC protocol. You can also configure the Point to
Point protocol on Routers of Different Vendors. Point to Point Protocol is the most commonly used Data
Link Layer Protocol. This protocol connects your personal computer and ISP (Internet Service Provide

Services Provided by PPP


o Define the frame format of the data to be transmitted.
o Defining the procedure for identifying links between data exchanges.
o Explaining the Method of Encapsulation of Network Layer Data in Frame.
o Describe the Authentication rules of Communicating Device.
o Provide Address for Network Communication.
o Provide Connection on Multiple Links.
o It facilitates auto-configuration.
o Supporting various Network Layer Protocols by providing Range os Services.

Components of PPP
The Point-to-Point Protocol is a Layered Protocol consisting of 4 components.

1. Encapsulation Component
It encapsulates the datagram so that it can be transmitted to the Specified Physica Layer.

2. Link Control Protocol (LCP)


It is responsible for Configuring, Testing, Maintaining and Terminating, Establishing the Link for
Communication. It provides the mechanism of negotiation between two endpoints.

3. Authentication Protocols (AP)


These protocols authenticate endpoints for use with Services. It is used in dial-up links of PPP where it
is necessary to verify the identity of the user. Point to Point Protocol has two Authentication Protocols.

Password Authentication Protocol (PAP): It has two-steps of the authentication process.


1. The user who wants to access a system sends a Valid Identification (username or password) to
the system near the User System.
2. The system checks the user's identification and password and accepts or rejects the user.

Page 22
COMPUTER NETWORKS

4. Network Control Protocols (NCPs)


After establishing the link and authenticating the user, the PPP connects to the network layer, this
connection is established by the NCP. There is one NCPs for each higher-layer protocol supported by
PPP. Some NCPs of PPP are as follows.

o Internet Protocol Control Protocol (IPCP)


o OSI Network Layer Control Protocol (OSINLCP)
o Internetwork Packet Exchange Control Protocol (IPXCP)
o DECnet Phase IV Control Protocol (DNCP)
o NetBIOS Frames Control Protocol (NBFCP)
o IPv6 Control Protocol (IPV6CP)

PPP Frame
PPP is a Byte Oriented Protocol where each field of the frame contains one or more Bytes.

1. Flag Field: 1 byte that marks the beginning and the end of the frame.
2. Address Field: The address field is always set in this protocol. Its value is always 11111111.
3. Control Field: This field has a Fix Value set at 11000000. PPP does not provide flow control
service. Therefore, there is no need for this field.
4. Protocol Field: The Protocol field defines it. What type of data is placed in the data field.
5. Data Field: This is a length variable. It stores user data and other information. It carries data from
the network layer. The maximum length of a Data Field is 1500 Bytes. However, it may be
negotiated between endpoints of communication.
6. FCS Field: This is the frame check sequence. This is 2 Byte or 4 Byte Standard CRC (cyclic
redundancy code). It contains checksum.

Page 23
COMPUTER NETWORKS

Routers, Hubs, Switches, Bridges:


Routers, Hubs, Switches, and Bridges are all network connecting devices. A network connecting device
is a device that connects two or more devices together that are present in the same or different networks.

A network connecting device can be a repeater, hub, bridge, switch, router, or gateway. But in this blog,
we'll focus on hubs, switches, routers, and gateways. We'll also learn about their features, advantages,
and disadvantages in networking.

All these connecting devices operate in some specific layers of the OSI(Open System Interconnection)
Model.

1. Hub
Hub is a very simple network connecting device. In Star/hierarchical topology, a Repeater is called Hub.
It is also known as a Multiport Repeater Device.

A Hub is a layer-1 device and operates only in the physical network of the OSI Model. Since it works in
the physical layer, it mainly deals with the data in the form of bits or electrical signals. A Hub is mainly
used to create a network and connect devices on the same network only.

Page 24
COMPUTER NETWORKS

A Hub is not an intelligent device, it forwards the incoming messages to other devices without checking
for any errors or processing it. It does not maintain any address table for connected devices. It only
knows that a device is connected to one of its ports.

When a data packet arrives at one of the ports of a Hub, it simply copies the data to every port. In other
words, a hub broadcasts the incoming data packets in the network. Due to this, there are various security
issues in the hub. Broadcasting also leads to unnecessary data traffic on the channel.

A Hub uses a half-duplex mode of communication. It shares the bandwidth of its channel with the
connecting devices. It has only one collision domain, so there are more chances of collision and traffic
on the channel. A hub is connected in limited network size. If the network size is increased, the speed of
the network will slow down. Also, a hub can only connect the devices in the same network with the
same data rates and format only.

There are mainly two types of Hub, they are:


Active Hub: An Active hub is also known as Concentrator. It requires a power supply and can work as a
repeater. Thus, it can analyze the data packets and can amplify the transmission signals, if needed.
Passive Hub: A passive hub does not need any power supply to operate. It only provides
communication between the networking devices and does not amplify the transmission signals. In other
words, it just forwards the data as it is.

Following are the advantages of using a Hub:


1. It is simple to implement.
2. The implementation cost is low.
3. It does not require any special system administration configuration. We can just plug and play it.

Following are the disadvantages of using a Hub:


1. It can connect devices of the same network only.
2. It uses a half-duplex mode of communication.
3. It is less secure, as it broadcasts the data packets.
4. It can be used in a limited network size only.
5. Broadcasting induces unnecessary traffic on the channel.

2. Bridge
A bridge is a layer-2 network connecting device, i.e., it works on the physical and data-link layer of the
OSI model. It interprets data in the form of data frames. In the physical layer, the bridge acts as a
Repeater which regenerates the weak signals, while in the data-link layer, it checks the MAC(Media
Access Control) address of the data frames for its transmission.

Page 25
COMPUTER NETWORKS

A bridge connects the devices which are present in the same network. It is mainly used to segment a
network to allow a large network size. It has two types of port - incoming and outgoing. It uses the
incoming port to receive the data frames and outgoing port to send the data frames to other devices. It
has two collision domains, so there is still a chance of collision and traffic in the data transmission
channel.

A Bridge has filtering capacity. It means that it can discard the faulty data frames and will allow only the
errorless data frames in the network. Also, it can check the destination MAC address of a frame and
decides the port from which the frame should be sent out. For this, it maintains a table containing the
physical(MAC) addresses of all the devices in the network. Whenever a data frame arrives at the
incoming port of the bridge, it first checks the data frame for any kind of errors. If the frame is errorless,
it directs the data frame to the specified MAC address(taking instance from the address table) using its
outgoing port. It does not change the physical(MAC Address) of the frames during transmission. In
other words, a Bridge is a Repeater with filtering capability.

There are mainly two types of Bridge, they are:


Transparent Bridge: Transparent bridge simply works as a transmission medium between two devices.
They are actually transparent(they are present but are not functionally visible to the devices) to the
networking devices.
Routing Bridge: Routing bridges have their unique identity, they can be easily identified by the
network devices. The source station or the sender can send the data packets through specific
bridges(using the unique identity of bridges).

Following are the advantages of using a Bridge:


1. It is not so complex to implement.
2. The implementation cost is medium.
3. It does not require any special system administration configuration. We can just plug and play it.
4. Improves security by limiting the scope of data frames.
5. It has the filtering capability.
6. It can be used in a large network.

Following are the disadvantages of using a Bridge:


1. It can connect devices of the same network only.
2. There is a delay in forwarding the frames due to error checking.
3. There is a need to maintain an Address table.

3. Switch
A switch is a layer-2 network connecting device, i.e., it works on the physical and data-link layer of the
OSI model. It interprets data in the form of data frames. A switch acts as a multiport bridge in the
network. It provides the bridging functionality with greater efficiency.

Page 26
COMPUTER NETWORKS

A switch maintains a Switch table which has the MAC addresses of all the devices connected to it. It is
preferred more over the hub, as it reduces any kind of unnecessary traffic in the transmission channel. A
switch can connect the devices only in the same network. It uses the full-duplex mode of communication
and saves bandwidth. The switch table keeps on updating every few seconds for better processing.

A Switch is an intelligent device with filtering capabilities. It can discard the faulty data frames and will
allow only the errorless data frames in the network. Also, it will forward the data frames to the specific
node based on the MAC address(taken from the Switch table). A Switch has multiple collision domains,
so it has least or no collisions in the transmission channel. In fact, every port of switch has a separate
collision domain.

When a data frame arrives at the Switch, it first checks for any kind of error in the data frame. If the
frame is error-free, it will search the MAC address of the destination in the Switch table. If the address is
available in the switch table, it will forward the data frame to that specific node, else switch will register
the MAC address in the switch table. If the destination address is not specified, it will broadcast the data
frame to each node in the network.

A Switch can have 8/6/24/48 ports. The data transmission speed is slow in a switch(around 10-100
Mbps). Also, it has only one broadcasting domain.

There are mainly four types of Switches, they are:


Store and Forward Switch: It is the most widely and commonly used switch. It does not forward the data
frames unless the frames are errorless and completely received in the switch buffer. It is reliable in
nature.
Cut-through Switch: Cut-through switches have no error checking. Also, it starts sending the data frame
to the destination node when it starts receiving it. It is unreliable in nature.
Fragment-Free Switch: It is a combination of store and forward, and cut-through switch. It checks only
the starting 64 bytes(header information) of the data frame before transmitting the frame.
Adaptive Switch: It is the most advanced kind of switch which automatically chooses any of the above
three switches as per the need.

Following are the advantages of using a Switch:


1. The implementation cost is medium.
2. It does not require any special system administration configuration. We can just plug and play it.
3. Improves security by limiting the scope of data frames.
4. It has the filtering capability.
5. It can be used in a large network.
6. It uses full-duplex mode of communication
7. It has multiple collision domains, so there are least or no collisions in the channel.

Page 27
COMPUTER NETWORKS

Following are the disadvantages of using a Switch:


1. It can connect devices of the same network only.
2. There is a delay in forwarding the frames due to error checking.
3. There is a need to maintain a Switch table.

4. Router
A Router is a layer-3 network connecting device, i.e., it works on the physical, data-link and network
layer of the OSI model. It interprets data in the form of data packets. It is mainly an internetworking
device, which can connect devices of different networks(implementing the same architecture and
protocols). In other words, it can connect two physically and logically different network devices with
each other. A Router is used to connect the networks or it routes traffic between the networks. In other
words, a Router is the Gateway of a network.

Since, connecting two devices of different networks, the connecting device should implement an
Internet Protocol (IP) address. So, the Router has a physical and logical (Internet Protocol) address for
each of its interfaces. It routes or forwards the data packets from one network to another based on their
IP addresses. It changes the physical address of the data packet(both source and destination) when it
forwards the data packets.

A router maintains a routing table using the routing algorithms. When a data packet is received at the
router, it first checks the IP address. If the IP address is the same as the network's IP address, it receives
the data packet, else it forwards the data packet to the destination IP address using the routing table.

A router does not perform addressing. It can have 2/4/8 ports for connecting the devices. It can control
both the collision domain(inside the network) and the broadcast domain(outside the network). It has a
fast data transmission speed(up to 1 Gbps). A Router can be a Wireless Router, Core Routers, Edge
Routers, Virtual Routers, etc.

There are mainly two types of routing performed by Routers, they are:
Static Routing: In Static Routing, the path for the data packets is manually set. It is generally used for
small networks.
Dynamic Routing: In Dynamic Routing, various routing algorithms are used to find the best and shortest
path for the data packets.

Page 28
COMPUTER NETWORKS

Following are the advantages of using a Router:


1. It can connect devices and provides routing facilities over different networks implementing the
same protocol and structure.
2. Improves security by limiting the scope of data packets.
3. It has the filtering capability.
4. It can be used in a large network.
5. It uses full-duplex mode of communication
6. It has control over both the collision and broadcast domain.

Following are the disadvantages of using a Router:


1. It is very complex to implement.
2. The implementation cost is quite high.
3. There is a need to maintain a Routing table.
4. There is a delay in forwarding the packets due to error checking.
5. It requires a special system administration configuration.

Following are the advantages of using a Gateway:


1. It can connect the devices of two different networks having dissimilar structures.
2. It is an intelligent device with filtering capabilities.
3. It has control over both collisions as well as a broadcast domain.
4. It uses a full-duplex mode of communication.
5. It has the fastest data transmission speed amongst all network connecting devices.
6. It can perform data translation and protocol conversion of the data packet as per the destination
network's need.
7. It can encapsulate and decapsulate the data packets.
8. It has improved security than any other network connecting device.

Following are the disadvantages of using a Gateway:


1. It is complex to design and implement.
2. The implementation cost is very high.
3. It requires a special system administration configuration.

Page 29
COMPUTER NETWORKS

ALOHA is a system for coordinating and arbitrating access to a shared communication Networks
channel. It was developed in the 1970s by Norman Abramson and his colleagues at the University of
Hawaii. The original system used for ground based radio broadcasting, but the system has been
implemented in satellite communication systems.

A shared communication system like ALOHA requires a method of handling collisions that occur when
two or more systems attempt to transmit on the channel at the same time. In the ALOHA system, a node
transmits whenever data is available to send. If another node transmits at the same time, a collision
occurs, and the frames that were transmitted are lost. However, a node can listen to broadcasts on the
medium, even its own, and determine whether the frames were transmitted.

Aloha means “Hello”. Aloha is a multiple access protocol at the data-link layer and proposes how
multiple terminals access the medium without interference or collision. In 1972 Roberts developed a
protocol that would increase the capacity of aloha two fold. The Slotted Aloha protocol involves
dividing the time interval into discrete slots and each slot interval corresponds to the time period of one
frame. This method requires synchronization between the sending nodes to prevent collisions.

There are two different versions of ALOHA

Pure ALOHA

 In pure ALOHA, the stations transmit frames whenever they have data to send. When two or
more stations transmit simultaneously, there is collision and the frames are destroyed.
 In pure ALOHA, whenever any station transmits a frame, it expects the acknowledgement from
the receiver.
 If acknowledgement is not received within specified time, the station assumes that the frame (or
acknowledgement) has been destroyed.
 If the frame is destroyed because of collision the station waits for a random amount of time and
sends it again. This waiting time must be random otherwise same frames will collide again and
again.

Page 30
COMPUTER NETWORKS

 Therefore pure ALOHA dictates that when time-out period passes, each station must wait for a
random amount of time before re-sending its frame. This randomness will help avoid more
collisions.

In fig there are four stations that .contended with one another for access to shared channel. All these
stations are transmitting frames. Some of these frames collide because multiple frames are in contention
for the shared channel. Only two frames, frame 1.1 and frame 2.2 survive. All other frames are
destroyed.

Whenever two frames try to occupy the channel at the same time, there will be a collision and both will
be damaged. If first bit of a new frame overlaps with just the last bit of a frame almost finished, both
frames will be totally destroyed and both will have to be retransmitted.

Slotted ALOHA

 Slotted ALOHA was invented to improve the efficiency of pure ALOHA as chances of collision
in pure ALOHA are very high.
 In slotted ALOHA, the time of the shared channel is divided into discrete intervals called slots.
 The stations can send a frame only at the beginning of the slot and only one frame is sent in each
slot.
 In slotted ALOHA, if any station is not able to place the frame onto the channel at the beginning
of the slot i.e. it misses the time slot then the station has to wait until the beginning of the next
time slot.

Page 31
COMPUTER NETWORKS

 In slotted ALOHA, there is still a possibility of collision if two stations try to send at the
beginning of the same time slot as shown in fig.
 Slotted ALOHA still has an edge over pure ALOHA as chances of collision are reduced to one-
half.

Types of Multiple –access protocol

Carrier Sensed Multiple Access (CSMA): CSMA is a network access method used on shared network
topologies such as Ethernet to control access to the network. Devices attached to the network cable
listen (carrier sense) before transmitting. If the channel is in use, devices wait before transmitting. MA
(Multiple Access) indicates that many devices can connect to and share the same network. All devices
have equal access to use the network when it is clear.

In other words, a station that wants to communicate “listen” first on the media communication and
awaits a “silence” of a preset time (called the Distributed Inter Frame Space or DIFS). After this
compulsory period, the station starts a countdown for a random period considered. The maximum
duration of this countdown is called the collision window (Window Collision, CW). If no equipment
speaks before the end of the countdown, the station simply delivers its package. However, if it is
overtaken by another station, it stops immediately its countdown and waits for the next silence. She then
continued his account countdown where it left off. This is summarized in Figure. The waiting time
random has the advantage of allowing a statistically equitable distribution of speaking time between the
various network equipment, while making little unlikely (but not impossible) that both devices speak
exactly the same time. The countdown system prevents a station waiting too long before issuing its
package. It‟s a bit what place in a meeting room when no master session (and all the World‟s polite)

Page 32
COMPUTER NETWORKS

expected a silence, then a few moments before speaking, to allow time for someone else to speak. The
time is and randomly assigned, that is to say, more or less equally.

Again, this is what we do naturally in a meeting room if many people speak exactly the same time, they
are realizing account immediately (as they listen at the same time they speak), and they interrupt without
completing their sentence. After a while, one of them speaks again. If a new collision occurs, the two are
interrupted again and tend to wait a little longer before speaking again.

CSMA protocol was developed to overcome the problem found in ALOHA i.e. to minimize the chances
of collision, so as to improve the performance. CSMA protocol is based on the principle of „carrier
sense‟. The station senses the carrier or channel before transmitting a frame. It means the station checks
the state of channel, whether it is idle or busy.

Even though devices attempt to sense whether the network is in use, there is a good chance that two
stations will attempt to access it at the same time. On large networks, the transmission time between one
end of the cable and another is enough that one station may access the cable even though another has
already just accessed it.

The chances of collision still exist because of propagation delay. The frame transmitted by one station
takes some time to reach other stations. In the meantime, other stations may sense the channel to be idle
and transmit their frames. This results in the collision.

There Are Three Different Type of CSMA Protocols


i. I-persistent CSMA
ii. Non- Persistent CSMA
iii. p-persistent CSMA

Page 33
COMPUTER NETWORKS

I-persistent CSMA

 In this method, station that wants to transmit data continuously senses the channel to check
whether the channel is idle or busy.
 If the channel is busy, the station waits until it becomes idle.
 When the station detects an idle-channel, it immediately transmits the frame with probability 1.
Hence it is called I-persistent CSMA.
 This method has the highest chance of collision because two or more stations may find channel
to be idle at the same time and transmit their frames.
 When the collision occurs, the stations wait a random amount of time and start allover again.

Drawback of I-persistent
The propagation delay time greatly affects this protocol. Let us suppose, just after the station I begins its
transmission, station 2 also became ready to send its data and senses the channel. If the station I signal
has not yet reached station 2, station 2 will sense the channel to be idle and will begin its transmission.
This will result in collision.1 Persistent CSMA

Even if propagation delay time is zero, collision will still occur. If two stations became .ready in the
middle of third station‟s transmission, both stations will wait until the transmission of first station ends
and then both will begin their transmission exactly simultaneously. This will also result in collision.

ii. Non-persistent CSMA

 In this scheme, if a station wants to transmit a frame and it finds that the channel is busy (some
other station is transmitting) then it will wait for fixed interval oftime.
 After this time, it again checks the status of the channel and if the channel is.free it will transmit.
 A station that has a frame to send senses the channel.
 If the channel is idle, it sends immediately.
 If the channel is busy, it waits a random amount of time and then senses the channel again.
 In non-persistent CSMA the station does not continuously sense the channel for the purpose of
capturing it when it detects the end of previous transmission.

Page 34
COMPUTER NETWORKS

Advantage of non-persistent
 It reduces the chance of collision because the stations wait a random amount of time. It is
unlikely that two or more stations will wait for same amount of time and will retransmit at the
same time.

Disadvantage of non-persistent

 It reduces the efficiency of network because the channel remains idle when there may be stations
with frames to send. This is due to the fact that the stations wait a random amount of time after
the collision.

iii. p-persistent CSMA

 This method is used when channel has time slots such that the time slot duration is equal to or
greater than the maximum propagation delay time.
 Whenever a station becomes ready to send, it senses the channel.
 If channel is busy, station waits until next slot.
 If channel is idle, it transmits with a probability p.
 With the probability q=l-p, the station then waits for the beginning of the next time slot.
 If the next slot is also idle, it either transmits or waits again with probabilities p and q.
 This process is repeated till either frame has been transmitted or another station has begun
transmitting.
 In case of the transmission by another station, the station acts as though a collision has occurred
and it waits a random amount of time and starts again.

Page 35
COMPUTER NETWORKS

Advantage of p-persistent
 It reduces the chance of collision and improves the efficiency of the network.

Carrier Sense Multiple Access with Collision Detection (CSMA/CD)


To reduce the impact of collisions on the network performance, Ethernet uses an algorithm called
CSMA with Collision Detection (CSMA / CD): CSMA/CD is a protocol in which the station senses the
carrier or channel before transmitting frame just as in persistent and non-persistent CSMA. If the
channel is busy, the station waits. it listens at the same time on communication media to ensure that
there is no collision with a packet sent by another station. In a collision, the issuer immediately cancel
the sending of the package. This allows to limit the duration of collisions: we do not waste time to send
a packet complete if it detects a collision. After a collision, the transmitter waits again silence and again,
he continued his hold for a random number; but this time the random number is nearly double the
previous one: it is this called back-off (that is to say, the “decline”) exponential. In fact, the window
collision is simply doubled (unless it has already reached a maximum). From a packet is transmitted
successfully, the window will return to its original size.

Again, this is what we do naturally in a meeting room if many people speak exactly the same time, they
are realizing account immediately (as they listen at the same time they speak), and they interrupt without
completing their sentence. After a while, one of them speaks again. If a new collision occurs, the two are
interrupted again and tend to wait a little longer before speaking again.

Page 36
COMPUTER NETWORKS

The entire scheme of CSMA/CD is depicted in the fig

1. Frame format of CSMA/CD


2. CSMA/CD Procedure:
3. The CSMA/CD Based LAN

Frame format of CSMA/CD


The frame format specified by IEEE 802.3 standard contains following fields.

1. Preamble: It is seven bytes (56 bits) that provides bit synchronization. It consists of
alternating Os and 1s. The purpose is to provide alert and timing pulse.

Page 37
COMPUTER NETWORKS

2. Start Frame Delimiter (SFD): It is one byte field with unique pattern: 10 10 1011. It
marks the beginning of frame.
3. Destination Address (DA): It is six byte field that contains physical address of packet‟s
destination.
4. Source Address (SA): It is also a six byte field and contains the physical address of
source or last device to forward the packet (most recent router to receiver).
5. Length: This two byte field specifies the length or number of bytes in data field.
6. Data: It can be of 46 to 1500 bytes, depending upon the type of frame and the length of
the information field.
7. Frame Check Sequence (FCS): This for byte field contains CRC for error detection.

Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA):


CSMA/CA protocol is used in wireless networks because they cannot detect the collision so the only
solution is collision avoidance.

CSMA/CA avoids the collisions using three basic techniques.


 Interframe space
 Contention window
 Acknowledgements.

Interframe Space (IFS)


 Whenever the channel is found idle, the station does not transmit immediately. It waits for a
period of time called interframe space (IFS).
 When channel is sensed to be idle, it may be possible that same distant station may have
already started transmitting and the signal of that distant station has not yet reached other
stations.
 Therefore the purpose of IFS time is to allow this transmitted signal to reach other stations.
 If after this IFS time, the channel is still idle, the station can send, but it still needs to wait a
time equal to contention time.
 IFS variable can also be used to define the priority of a station or a frame.

Contention Window:
 Contention window is an amount of time divided into slots.
 A station that is ready to send chooses a random number of slots as its wait time.
 The number of slots in the window changes according to the binary exponential back-off
strategy. It means that it is set of one slot the first time and then doubles each time the station
cannot detect an idle channel after the IFS time.

Page 38
COMPUTER NETWORKS

 This is very similar to the p-persistent method except that a random outcome defines the number
of slots taken by the waiting station.
 In contention window the station needs to sense the channel after each time slot.
 If the station finds the channel busy, it does not restart the process. It just stops the timer &
restarts it when the channel is sensed as idle.

Acknowledgement
 Despite all the precautions, collisions may occur and destroy the data.
 The positive acknowledgment and the time-out timer can help guarantee that receiver has
received the frame.

Controlled Access Protocols


In controlled access, the stations consult one another to find which station has the right to send. A station
cannot send unless it has been authorized by other stations. The three popular controlled-access methods
are as follows.

1. Reservation:
In the reservation method, a station needs to make a reservation before sending data. Time is divided
into intervals. In each interval, a reservation frame precedes the data frames sent in that interval.

If there are N stations in the system, there are exactly N reservation minislots in the reservation frame.
Each minislot belongs to a station. When a station needs to send a data frame, it makes a reservation in
its own minislot. The stations that have made reservations can send their data frames after the
reservation frame.

The following figure shows a situation with five stations and a five-minislot reservation frame. In the
first interval, only stations 1, 3, and 4 have made reservations. In the second interval, only station 1 has
made a reservation.

Page 39
COMPUTER NETWORKS

2. Polling:
Polling works with topologies in which one device is designated as a primary station and the other
devices are secondary stations. All data exchanges must be made through the primary device even when
the ultimate destination is a secondary device.

The primary device controls the link; the secondary devices follow its instructions. It is up to the
primary device to determine which device is allowed to use the channel at a given time. The primary
device, therefore, is always the initiator of a session. Consider the following figure.

If the primary wants to receive data, it asks the secondaries if they have anything to send, this is called
poll function. If the primary wants to send data, it tells the secondary to get ready to receive; this is
called select function.

Select:
The select function is used whenever the primary device has something to send. If it has something to
send, the primary device sends it. It has to know whether the target device is prepared to receive or not.
So the primary must alert the secondary to the upcoming transmission and wait for an acknowledgment
of the secondary's ready status. Before sending data, the primary creates and transmits a select (SEL)
frame, one field of which includes the address of the intended secondary.

Poll:
The poll function is used by the primary device to solicit transmissions from the secondary devices.
When the primary is ready to receive data, it must ask (poll) each device in turn if it has anything to
send. When the first secondary is approached, it responds either with a NAK frame if it has nothing to
send or with data (in the form of a data frame) if it does. If the response is negative (a NAK frame), then
the primary polls the next secondary in the same manner until it finds one with data to send. When the
response is positive (a data frame), the primary reads the frame and returns an acknowledgment (ACK
frame), verifying its receipt.

Page 40
COMPUTER NETWORKS

3. Token Passing:

In the token-passing method, the stations in a network are organized in a logical ring. In other words, for
each station, there is a predecessor and a successor. The predecessor is the station which is logically
before the station in the ring; the successor is the station which is after the station in the ring. The
current station is the one that is accessing the channel now. The right to this access has been passed from
the predecessor to the current station. The right will be passed to the successor when the current station
has no more data to send.

In this method, a special packet called a token circulates through the ring. The possession of the token
gives the station the right to access the channel and send its data. When a station has some data to send,
it waits until it receives the token from its predecessor. It then holds the token and sends its data. When
the station has no more data to send, it releases the token, passing it to the next logical station in the ring.
The station cannot send data until it receives the token again in the next round.

Token management is needed for this access method. Stations must be limited in the time they can have
possession of the token. The token must be monitored to ensure it has not been lost or destroyed. For
example, if a station that is holding the token fails, the token will disappear from the network. Another
function of token management is to assign priorities to the stations and to the types of data being
transmitted. And finally, token management is needed to make low- priority stations release the token to
high priority stations.

Logical Ring:

In a token-passing network, stations do not have to be physically connected in a ring; the ring can be a
logical one. The following figure show four different physical topologies that can create a logical ring.

In the physical ring topology, when a station sends the token to its successor, the token cannot be seen
by other stations; the successor is the next one in line. This means that the token does not have to have
the address of the next successor. The problem with this topology is that if one of the links-the medium
between two adjacent stations fails, the whole system fails.

The dual ring topology uses a second (auxiliary) ring which operates in the reverse direction compared
with the main ring. The second ring is for emergencies only. If one of the links in the main ring fails, the
system automatically combines the two rings to form a temporary ring. After the failed link is restored,
the auxiliary ring becomes idle again.

In the bus ring topology, also called a token bus, the stations are connected to a single cable called a bus.
They, however, make a logical ring, because each station knows the address of its successor (and also
predecessor for token management purposes). When a station has finished sending its data, it releases
the token and inserts the address of its successor in the token. Only the station with the address matching

Page 41
COMPUTER NETWORKS

the destination address of the token gets the token to access the shared media. The Token Bus LAN,
standardized by IEEE, uses this topology.

In a star ring topology, the physical topology is a star. There is a hub, however, that acts as the
connector. The wiring inside the hub makes the ring; the stations are connected to this ring through the
two wire connections. This topology makes the network less prone to failure because if a link goes
down, it will be bypassed by the hub and the rest of the stations can operate. Also adding and removing
stations from the ring is easier. This topology is still used in the Token Ring LAN designed by IBM.

Channelization

Channelization is a multiple-access method in which the available bandwidth of a link is shared in time,
frequency, or through code, between different stations. The three channelization protocols are FDMA,
TDMA, and CDMA.

Frequency-Division Multiple Access (FDMA)

In frequency-division multiple access (FDMA), the available bandwidth is divided into frequency bands.
Each station is allocated a band to send its data. In other words, each band is reserved for a specific
station, and it belongs to the station all the time. Each station also uses a bandpass filter to confine the
transmitter frequencies. To prevent station interferences, the allocated bands are separated from one
another by small guard bands.

FDMA specifies a predetermined frequency band for the entire period of communication. This means
that stream data (a continuous flow of data that may not be packetized) can easily be used with FDMA.
We will see in Chapter 16 how this feature can be used in cellular telephone systems.

We need to emphasize that although FDMA and FDM conceptually seem similar, there are differences
between them. FDM, as we saw in Chapter 6, is a physical layer technique that combines the loads from
low-bandwidth channels and transmits them by using a high-bandwidth channel. The channels that are
combined are low-pass. The multiplexer modulates the signals, combines them, and creates a bandpass
signal. The bandwidth of each channel is shifted by the multiplexer.

FDMA, on the other hand, is an access method in the data link layer. The data link layer in each station
tells its physical layer to make a bandpass signal from the data passed to it. The signal must be created in
the allocated band. There is no physical multiplexer at the physical layer. The signals created at each
station are automatically bandpass-filtered. They are mixed when they are sent to the common channel.

Time-Division Multiple Access (TDMA)

Page 42
COMPUTER NETWORKS

In time-division multiple access (TDMA), the stations share the bandwidth of the channel in time. Each
station is allocated a time slot during which it can send data. Each station transmits its data in is assigned
time slot. Figure 12.22 shows the idea behind TDMA.

The main problem with TDMA lies in achieving synchronization between the different stations. Each
station needs to know the beginning of its slot and the location of its slot. This may be difficult because
of propagation delays introduced in the system if the stations are spread over a large area. To
compensate for the delays, we can insert guard times. Synchronization is normally accomplished by
having some synchronization bits (normally referred to as preamble bits) at the beginning of each slot.

In TDMA, the bandwidth is just one channel that is timeshared between different stations.

We also need to emphasize that although TDMA and TDM conceptually seem the same, there are
differences between them. TDM, is a physical layer technique that combines the data from slower
channels and transmits them by using a faster channel. The process uses a physical multiplexer that
interleaves data units from each channel. TDMA, on the other hand, is an access method in the data link
layer. The data link layer in each station tells its physical layer to use the allocated time slot. There is no
physical multiplexer at the physical layer.

Code-Division Multiple Access (CDMA)

Code-division multiple access (CDMA) was conceived several decades ago. Recent advances in
electronic technology have finally made its implementation possible. CDMA differs from FDMA
because only one channel occupies the entire bandwidth of the link. It differs from TDMA because all
stations can send data simultaneously; there is no timesharing.

A channel access method or multiple access method allows several terminals connected to the same
multi-point transmission medium to transmit over it and to share its capacity. Examples of shared
physical media are wireless networks, bus networks, ring networks and half-duplex point-to-point links.

A channel-access scheme is based on a multiplexing method, that allows several data streams or signals
to share the same communication channel or physical medium. Multiplexing is in this context provided
by the physical layer. Note that multiplexing also may be used in full-duplex point-to-point
communication between nodes in a switched network, which should not be considered as multiple
accesses

(Reference material)

A channel-access scheme is also based on a multiple access protocol and control mechanism, also
known as media access control (MAC). This protocol deals with issues such as addressing, assigning
multiplex channels to different users, and avoiding collisions. The MAC-layer is a sub-layer in Layer 2
(Data Link Layer) of the OSI model and a component of the Link Layer of the TCP/IP model.

Page 43
COMPUTER NETWORKS

Frequency Division Multiple Access (FDMA)

The frequency-division multiple access (FDMA) channel-access scheme is based on the frequency-
division multiplexing (FDM) scheme, which provides different frequency bands to different data-
streams. In the FDMA case, the data streams are allocated to different nodes or devices. An example of
FDMA systems were the first-generation (1G) cell-phone systems, where each phone call was assigned
to a specific uplink frequency channel, and another downlink frequency channel. Each message signal
(each phone call) is modulated on a specific carrier frequency.

A related technique is wavelength division multiple access (WDMA), based on wavelength-division


multiplexing (WDM), where different data streams get different colors in fiber-optical communications.
In the WDMA case, different network nodes in a bus or hub network get a different color.

An advanced form of FDMA is the orthogonal frequency-division multiple access (OFDMA) scheme, for
example used in 4G cellular communication systems. In OFDMA, each node may use several sub-
carriers, making it possible to provide different quality of service (different data rates) to different users.
The assignment of sub-carriers to users may be changed dynamically, based on the current radio
channel conditions and traffic load. Time division multiple access (TDMA)

The time division multiple access (TDMA) channel access scheme is based on the time-division
multiplexing (TDM) scheme, which provides different time-slots to different data-streams (in the TDMA
case to different transmitters) in a cyclically repetitive frame structure. For example, node 1 may use
time slot 1, node 2 time slot 2, etc. until the last transmitter. Then it starts all over again, in a repetitive
pattern, until a connection is ended and that slot becomes free or assigned to another node. An
advanced form is Dynamic TDMA (DTDMA), where a scheduling may give different time sometimes but
some times node 1 may use time slot 1 in first frame and use another time slot in next frame.

As an example, 2G cellular systems are based on a combination of TDMA and FDMA. Each frequency
channel is divided into eight timeslots, of which seven are used for seven phone calls, and one for
signaling data. Code division multiple access (CDMA)/Spread spectrum multiple access (SSMA) The
code division multiple access (CDMA) scheme is based on spread spectrum, meaning that a wider radio
spectrum in Hertz is used than the data rate of each of the transferred bit streams, and several message
signals are transferred simultaneously over the same carrier frequency, utilizing different spreading
codes. The wide bandwidth makes it possible to send with a very poor signal-to-noise ratio of much less
than 1 (less than 0 dB) according to the Shannon-Heartly formula, meaning that the transmission power
can be reduced to a level below the level of the noise and co-channel interference (cross talk) from other
message signals sharing the same frequency. One form is direct sequence spread spectrum (DS-CDMA),

Page 44
COMPUTER NETWORKS

used for example in 3G cell phone systems. Each information bit (or each symbol) is represented by a
long code sequence of several pulses, called chips. The sequence is the spreading code, and each
message signal (for example each phone call) use different spreading code.

Another form is frequency-hopping (FH-CDMA), where the channel frequency is changing very rapidly
according to a sequence that constitutes the spreading code. As an example, the Bluetooth
communication system is based on a combination of frequency-hopping and either CSMA/CA packet
mode communication (for data communication applications) or TDMA (for audio transmission). All
nodes belonging to the same user (to the same virtual private area network or picante) use the same
frequency hopping sequences synchronously, meaning that they send on the same frequency channel, but
CDMA/CA or TDMA is used to avoid collisions within the VPAN. Frequency-hopping is used to reduce
the cross-talk and collision probability between nodes in different VPAN’s.

Page 45

You might also like