Unit 2
Unit 2
• Suppose the number of data bits is 7, then the number of redundant bits can be calculated
using: = 2^4 ≥ 7 + 4 + 1 Thus, the number of redundant bits= 4 Parity bits.
• A parity bit is a bit appended to a data of binary bits to ensure that the total number of 1’s in
the data is even or odd.
• Parity bits are used for error detection.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
1.The binary data is first augmented by adding k-1 zeros in the end of the data
2.Use modulo-2 binary division to divide binary data by the key and store remainder of
division.
3.Append the remainder at the end of the data to form the encoded data and send the same
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
• acknowledgement also.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
Aloha
• Aloha is a type of Random access protocol it was developed at the
University of Hawaii in early 1970, it is a LAN-based protocol
because there are more chances of occurrence of collisions during
the transmission of data from any source to the destination, Aloha
has two types one Pure Aloha and another Slotted Aloha.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
Aloha
Pure Aloha
• Pure Aloha can be termed as the main Aloha or the original Aloha.
• Whenever any frame is available, each station sends it, and due to the
presence of only one channel for communication, it can lead to the chance of
collision.
• In the case of the pure aloha, the user transmits the frame and waits till the
receiver acknowledges it, if the receiver does not send the acknowledgment,
the sender will assume that it has not been received and sender resends the
acknowledgment.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
Aloha
Pure Aloha
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
Aloha
Slotted Aloha
• Slotted Aloha is simply an advanced version of pure Aloha that helps in
improving the communication network.
• A station is required to wait for the beginning of the next slot to transmit.
• The vulnerable period is halved as opposed to Pure Aloha.
• Slotted Aloha helps in reducing the number of collisions by properly utilizing
the channel and this basically results in the somehow delay of the users.
• In Slotted Aloha, the channel time is separated into particular time slots.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
Aloha
Slotted Aloha
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
• In Carrier Sense Multiple Access (CSMA) protocol, the station will
sense the channel before the transmission of data.
• CSMA reduces the chances of collision in the network but it does
not eliminate the collision from the channel.
• 1-Persistent, Non-Persistent, P-Persistent, and O-Persistent are the
three access methods of CSMA.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
• CSMA stands for Carrier Sense Multiple Access (CSMA).
• CSMA is one of the network protocols which works on the principle of ‘carrier
sense’.
• CSMA is a protocol developed to increase the performance of the network and
reduce the chance of collision in the network.
• If any device wants to send data then the device first senses or listens to the
network medium to check whether the shared network is free or not.
• If the channel is found idle then the device will transmit its data.
• This sense reduces the chance of collision in the network but this method is not
able to eliminate the collision.
• CSMA is used in Ethernet networks where two or more network devices are
connected.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
• CSMA works on the principle of "Listen before Talking" or "Sense before
Transmit".
• When the device on the shared medium wants to transmit a data frame, then
the device first detects the channel to check the presence of any carrier signal
from other connected devices on the network.
• In this situation, if the device senses any carrier signal on the shared medium,
then this means that there is another transmission on the channel.
• The device will wait until the channel becomes idle and the transmission that is
in progress is currently completed.
• When the channel becomes idle the station starts its transmission.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
• All other stations connected in the network receive the transmission of the
station.
• In CSMA, the station senses or detects the channel before the transmission of
data so it reduces the chance of collision in the transmission.
• But there may be a situation where two stations detected the channel idle at
the same time and they both start data transmission simultaneously so in this,
there is a chance of collision.
• So CSMA reduces the chance of collision in data transmission but it does not
eliminate the collision.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
Types of CSMA Access Modes
1-Persistent
• This method is considered the straightforward and simplest method of CSMA.
• In this method, if the station finds the medium idle then the station will
immediately send the data frame with 1- probability.
• In this, if the station wants to transmit the data. Then the station first senses the
medium.
• If the medium is busy then the station waits until the channel becomes idle, and
the station continuously senses the channel until the medium becomes idle.
• If the station detects the channel as idle then the station will immediately send
the data frame with 1 probability that’s why the name of this method is
1-persistent.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
Types of CSMA Access Modes
1-Persistent
• In this method, there is a high possibility of collision as two or more station
senses the channel idle at the same time and transmits data simultaneously
which may lead to a collision.
• This is one of the most straightforward methods.
• In this method, once the station finds that the medium is idle then it
immediately sends the frame.
• By using this method there are higher chances for collision because it is possible
that two or more stations find the shared medium idle at the same time and
then they send their frames immediately.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
Types of CSMA Access Modes
Non-Persistent
• In this method of CSMA, if the station finds the channel busy then it will wait for
a random amount of time before sensing the channel again.
• If the station wants to transmit the data then first of all it will sense the
medium.
• If the medium is idle then the station will immediately send the data.
• Otherwise, if the medium is busy then the station waits for a random amount of
time and then again senses the channel after waiting for a random amount of
time.
• In Non-persistent there is less chance of collision in comparison to the
1-persistent method as this station will not continuously sense the channel but
since the channel after waiting for a random amount of time.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
Types of CSMA Access Modes
Non-Persistent
• So the random amount of time is unlikely to be the same for two stations that’s
why this method reduces the chance of collision.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
Types of CSMA Access Modes
P-Persistent
• The p-persistent method of CSMA is used when the channel is divided into
multiple time slots and the duration of time slots is greater than or equal to the
maximum propagation time.
• This method is designed as a combination of the advantages of 1-Persistent and
Non-Persistent CSMA.
• The p-persistent method of CSMA reduces the chance of collision in the
network and there is an increment in the efficiency of the network.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
Types of CSMA Access Modes
O-Persistent
• In this method of CSMA supervisory node assigns a transmission order to each
node in the network.
• When the channel is idle instead of immediately sending the data channel will
wait for its transmission order assigned to them.
• This mode of CSMA defines the superiority of the station before data
transmission in the medium.
• In this mode, if the channel is inactive then all stations will wait to transmit the
data for its turn.
• Every station in the channel transmits the data in its turn.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
Types of CSMA Access Modes
O-Persistent
• In this method of CSMA supervisory node assigns a transmission order to each
node in the network.
• When the channel is idle instead of immediately sending the data channel will
wait for its transmission order assigned to them.
• This mode of CSMA defines the superiority of the station before data
transmission in the medium.
• In this mode, if the channel is inactive then all stations will wait to transmit the
data for its turn.
• Every station in the channel transmits the data in its turn.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
Variations of CSMA Protocol
Carrier Sense Multiple Access with Collision Detection (CSMA/CD)
• Carrier sense multiple access/ collision detection is one of the network
protocols for transmission.
• CSMA/CD protocol works with the medium access control layer of the network.
• The station senses the channel before transmission of data and if the station
finds the channel idle then the station transmits its data frames to check
whether data transmission is successful in the network or not.
• If the station sent successfully the data frame then it will again send the next
frame.
• If the station detects a collision in the network, then in CSMA/CD the station will
send the stop/jam signal to all the stations connected in the network to
terminate their transmission of data. Then the station waits for a random
amount of time for the transmission of data.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
Variations of CSMA Protocol
Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA)
• Carrier sense multiple access/collision avoidance is one of the network
protocols for data frame transmission.
• When the station sends the data frame on the channel it receives the
acknowledgment in response to the sent data frame to test whether the
channel is idle or not.
• When the station receives a single signal i.e. its signal this means that there is
no collision and data has been successfully received by the receiver.
• But in case of collision, the station receives two signals: its signal and the second
signal sent by the other station
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
Variations of CSMA Protocol
Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA)
• In CSMA/CA collision is avoided by using the following three strategies.
• Interframe space
• Contention window
• Acknowledgement
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
Variations of CSMA Protocol
Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA)
• Interframe Space or IFS:
• If the station wants to transmit the data then it waits until the channel
becomes idle and when the channel becomes idle station does not
immediately send the data but waits for some time.
• This period is known as the Interframe Space or IFS.
• IFS can also define the priority of the frame or station.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
Variations of CSMA Protocol
Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA)
• Acknowledgement:
• There may be a chance of collision or data may be corrupted during the
transmission.
• Positive acknowledgment and time-out are used in addition to ensuring that
the receiver has successfully received the data.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
Advantages of CSMA:
1. Increased efficiency: CSMA ensures that only one device communicates on the
network at a time, reducing collisions and improving network efficiency.
2. Simplicity: CSMA is a simple protocol that is easy to implement and does not
require complex hardware or software.
3. Flexibility: CSMA is a flexible protocol that can be used in a wide range of
network environments, including wired and wireless networks.
4. Low cost: CSMA does not require expensive hardware or software, making it a
cost-effective solution for network communication.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
CSMA
Disadvantages of CSMA:
1. Limited scalability: CSMA is not a scalable protocol and can become inefficient
as the number of devices on the network increases.
2. Delay: In busy networks, the requirement to sense the medium and wait for an
available channel can result in delays and increased latency.
3. Limited reliability: CSMA can be affected by interference, noise, and other
factors, resulting in unreliable communication.
4. Vulnerability to attacks: CSMA can be vulnerable to certain types of attacks,
such as jamming and denial-of-service attacks, which can disrupt network
communication.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
Advantages:
IEEE 802.3 and Ethernet
Simple format: The Ethernet frame format is simple and easy to understand, making it easy to
implement and troubleshoot Ethernet networks.
Flexibility: The Ethernet frame format is flexible and can accommodate different data sizes and
network topologies, making it suitable for a wide range of network applications.
Widely adopted: The Ethernet frame format is widely adopted and supported by a large number
of vendors and network devices, ensuring compatibility and interoperability.
Error detection: The Ethernet frame format includes a cyclic redundancy check (CRC) field for
error detection, which helps to ensure data integrity during transmission.
Support for VLANs: The Ethernet frame format supports virtual local area networks (VLANs),
which allows network administrators to logically partition a physical LAN into multiple smaller
virtual LANs for improved network management and security.
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
802.5)
• In a token ring, a special bit pattern, known as a token, circulates around the ring when all the
stations are idle. Token Ring is formed by the nodes connected in ring format.
Token Ring Network (IEEE Standard
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
802.5)
• The principle used in the token ring network is that a token is circulating in the ring, and
whichever node grabs that token will have the right to transmit the data.
• Whenever a station wants to transmit a frame, it inverts a single bit of the 3-byte token, which
instantaneously changes it into a normal data packet.
• As there is only one token, there can be only one transmission at a time.
• Since the token rotates in the ring, it is guaranteed that every node gets the token within some
specified time.
• So there is an upper bound on the time of waiting to grab the token so that starvation is
avoided.
• There is also an upper limit of 250 on the number of nodes in the network.
Token Ring Network (IEEE Standard
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
802.5)
Modes of Operation
There are various modes of operations which are as follows −
• Listen Mode − In the listen mode, the incoming bits are simply transmitted to the output line
with no further action taken.
• Talk or Transmit Node − The ring interface is set to the talk or transmit node when the station
connected to the ring interface has acquired a token. The direct input to output connection
through the single bit buffer is disconnected.
• By-pass Mode − This mode reaches when the node is down. Any data is just bypassed. There is
no one-bit delay in this mode.
Token Ring Network (IEEE Standard
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
802.5)
• Handling Breakage
• The main problem with a ring network is that the network goes down when the ring cable
breaks down or gets tempered.
• The solution to this problem is the use of a wire Centre, as shown in the figure.
• This wire center bypasses the terminals that have gone down from the ring.
• This is done by connecting the bypass relay for that station.
• These relays are generally controlled by the software that operates automatically in case of
station failure.
• The use of a wire center improves the reliability and maintainability of the ring network.
Token Ring Network (IEEE Standard
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
802.5)
• Handling Breakage
Token Ring Network (IEEE Standard
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
802.5)
Token Ring Frame Formats
• There are three types of frame formats that are supported on a Token Ring network such as
token, abort, and frame.
• The token format is the mechanism by which access to the ring is passed from one computer
attached to the network to another device connected to the network.
• Here, the token format consists of three bytes, of which the starting and ending delimiters are
used to indicate the beginning and end of a token frame. The middle byte of a token frame is
an access control byte.
• Three bits are used as a priority indicator, three bits are used as a reservation indicator, while
one bit is used for the token bit, and another bit position functions as the monitor bit.
Token Ring Network (IEEE Standard
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
802.5)
Token Ring Frame Formats
Token Ring Network (IEEE Standard
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
802.5)
Token Ring Frame Formats
The components of the Token Ring Frame Format are as follows −
• Start Delimiter (SD) − The first field of the data/command frame, SD, is one byte long and is
used to alert the receiving station to the arrival of a frame as well as to allow it to synchronize
its retrieval timing.
• Access Control (AC) − The AC field is one byte long and includes four subfields. The first three
bits are the priority field. The fourth bit is called the token bit.
• Frame Control (FC) −The FC field is one byte long and contains two fields. The first is a one-bit
field used to indicate the type of information contained in the Protocol Data Unit (PDU).
Token Ring Network (IEEE Standard
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
802.5)
Token Ring Frame Formats
• Destination Address (DA) −The two-to-six-byte DA field contains the physical address of the
frame’s next destination. If its ultimate destination is another network, the DA is the address
of the router to the next LAN on its path.
• Source Address (SA) − The SA field is also two to six bytes long and contains the physical
address of the sending station. If the ultimate destination of the packet is a station on the
same network as the originating station, the SA is that of the originating station.
• Data −The sixth field, data, is allotted 4500 bytes and contains the PDU. A token ring frame
does not include a PDU length or type field.
• Checksum −The checksum field is 4 bytes long. The checksum field is used to cross-check the
data at the sending station. This field contains the total number of bytes in the frame. The
number is checked at the receiver end after counting the bytes in the received frame.
Token Ring Network (IEEE Standard
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
802.5)
Token Ring Frame Formats
• End Delimiter (ED) −The ED is a second flag field of one byte and indicates the end of the
sender’s data and control information.
• Frame Status −The last byte of the frame is the FS field. It can be set by the receiver to indicate
that the frame has been read or by the monitor to indicate that the frame has already been
around the ring.
Token Ring Network (IEEE Standard
2^r ≥ m + r + 1 where, r = redundant bit, m = data bit
Result is zero, it means no error.
802.5)
S.No. IEEE 802.3 IEEE 802.4 IEEE 802.5
Topology used in IEEE 802.3 is Bus Topology used in IEEE 802.4 is Bus or Topology used in IEEE 802.5 is Ring
1
Topology. Tree Topology. Topology.
Size of the frame format in IEEE 802.3 Size of the frame format in IEEE 802.4 Frame format in IEEE 802.5 standard is
2
standard is 1572 bytes. standard is 8202 bytes. of the variable size.
There is no priority given in this
3 It supports priorities to stations. In IEEE 802.5 priorities are possible
standard.
4 Size of the data field is 0 to 1500 bytes. Size of the data field is 0 to 8182 bytes. No limit is on the size of the data field.
5 Minimum frame required is 64 bytes. It can handle short minimum frames. It supports both short and large frames.
Efficiency decreases when speed
Throughput & efficiency at very high Throughput & efficiency at very high
6 increases and throughput is affected by
loads are outstanding. loads are outstanding.
the collision.
Like IEEE 802.4, modems are also
7 Modems are not required. Modems are required in this standard.
required in it.
8 Protocol is very simple. Protocol is extremely complex. Protocol is moderately complex.
It can be applied for Real time
It is not applicable on Real time
applications and interactive
9 applications, interactive Applications and It is applicable to Real time traffic.
applications because there is no
Client-Server applications.
limitation on the size of data.