CN Week 10
CN Week 10
CN Week 10
Multiple stations place their data packets on the link and starts transmitting simultaneously.
Such a situation gives rise to a collision among the data packets.
Collision of data packets causes the data to get corrupt.
To prevent the occurrence of collision or if the collision occurs, to deal with it.
Here,
ü Two stations A and D starts transmitting their
data packets simultaneously.
ü This situation gives rise to a collision between
the data packets transmitted by them.
ü Thus, to prevent the collision or to deal with it,
access control is needed.
Ø Access control methods are the methods used for providing access control.
Ø They prevent the collision or deal with it and ensures smooth flow of traffic on the network.
Ø They are implemented at the data link layer of the OSI reference model.
In Random Access Protocol, all stations have same superiority
that is no station has more priority than another station.
q It allows the stations to transmit data at any time whenever they want.
q After transmitting the data packet, station waits for some time.
Case-01:
Transmitting station receives an acknowledgement from the receiving station.
In this case, transmitting station assumes that the transmission is successful.
Case-02:
Transmitting station does not receive any acknowledgement within specified time from the receiving station.
In this case, transmitting station assumes that the transmission is unsuccessful.
Then,
Transmitting station uses a Back Off Strategy and waits for some
random amount of time. After back off time, it transmits the data
packet again. It keeps trying until the back off limit is reached after
which it aborts the transmission.
The maximum efficiency of
Pure Aloha is very less due to
large number of collisions.
Slotted Aloha-
q Slotted Aloha divides the time of shared channel into discrete intervals called as time slots.
q Any station can transmit its data in any time slot.
q The only condition is that station must start its transmission from the beginning of the time slot.
q If the beginning of the slot is missed, then station has to wait until the beginning of the next time slot.
q A collision may occur if two or more stations try to transmit data at the beginning of the same time slot.
A group of N stations share 100 Kbps slotted ALOHA channel. Each station output a 500 bits frame on an average of
5000 ms even if previous one has not been sent. What is the required value of N?
CSMA / CD
CSMA / CD stands for Carrier Sense Multiple Access / Collision Detection
In CSMA / CD,
Each station must transmit the data packet of size whose transmission delay is at least twice its propagation delay.
If the size of data packet is smaller, then collision detection would not be possible.
Step-03: Releasing Jam Signal
v After the collision, the transmitting station waits for some random amount of time called as back off time.
v After back off time, it tries transmitting the data packet again.
v If again the collision occurs, then station again waits for some random back off time and then tries again.
v The station keeps trying until the back off time reaches its limit.
v After the limit is reached, station aborts the transmission.
v Back off time is calculated using Back Off Algorithm.
Important Notes
Note-01:
CSMA / CD is used in wired LANs.
CSMA / CD is standardized in IEEE 802.3
Note-02:
CSMA / CD only minimizes the recovery time.
It does not take any steps to prevent the collision until it has taken place.
Important Formulas-
Condition to detect collision: Transmission delay >= 2 x Propagation delay
Minimum length of data packets in CSMA / CD = 2 x Bandwidth x Distance / Speed
Efficiency of CSMA / CD = 1 / (1 + 6.44 x a) where a = Tp / Tt
We have discussed-
A 2 km long broadcast LAN has 107 bps bandwidth and uses CSMA / CD. The signal travels along the wire at 2 x 108
m/sec. What is the minimum packet size that can be used on this network?
50 B
100 B
200 B
None of the above
Polling
In this access control method,
Ø A polling is conducted in which all the stations willing to send data participates.
Ø The polling algorithm chooses one of the stations to send the data.
Ø The chosen station sends the data to the destination.
Ø After the chosen station has sent the data, the cycle repeats.
Time Division
Multiplexing
In Time Division Multiplexing (TDM),
v Time of the link is divided into fixed size intervals called as time slots or time slices.
v Time slots are allocated to the stations in Round Robin manner.
v Each station transmit its data during the time slot allocated to it.
v In case, station does not have any data to send, its time slot goes waste.
v The size of each time slot is kept such that each station gets sufficient time for the following tasks-
To put its data packet on to the transmission link
Last bit of the packet is able to get out of the transmission link
If transmission delay and propagation delay of a packet in Time Division Multiplexing is 1 msec each at 4 Mbps
bandwidth, then-
ü Find the efficiency.
ü Find the effective bandwidth.
ü How many maximum stations can be connected to the network if each station requires 2 Kbps bandwidth?
Ethernet
q A Local Area Network (LAN) is a network of computers.
q It is confined to a small area which may be a room, building or a group of buildings.
q A LAN may be wired, wireless or a combination of the two.
• Ethernet is one of the standard LAN technologies used for building wired LANs.
• It is defined under IEEE 802.3.
Characteristics-
v Ethernet uses bus topology.
v In bus topology, all the stations are connected to a single half duplex link.
v Ethernet uses CSMA / CD as access control method to deal with the collisions.
v Ethernet uses Manchester Encoding Technique for converting data bits into signals.
Fast Ethernet: As the term suggests, this is quite a high-speed internet, and can transmit or
receive data at about 100 Mbps. This type of network is usually supported by a twisted pair or
CAT5 cable. If a laptop, camera, or any other device is connected to a network, they operate at
10/100Base Ethernet and 100Base on the fiber side of the link.
Gigabit Ethernet: This type of network transfers data at an even higher speed of about 1000
Mbps or 1Gbps. Gigabit speed is an upgrade from Fast Ethernet which is slowly being phased
out. In this type of network, all the four pairs in the twisted pair cable contribute to the data
transfer speed. VERSITRON manufactures Gigabit Ethernet Media Converters that can handle
10/100/1000Base speeds on the Ethernet side and 1000Base Gigabit speed on the fiber side
by using Fiber SFP modules.
10-Gigabit Ethernet: This is an even more advanced and high speed network type with a data
transfer rate of 10 Gigabit/second. It is supported by CAT6a or CAT7 twisted pair cables, as
well as fiber optic cables. By using a fiber optic cable, this network area can be extended up to
around 10,000 meters.
Switch Ethernet: This type of network requires a switch or hub. Also, instead of a twisted pair
cable, a normal network cable is used in this case. Network switches are used for data transfer
from one device to the other, without interrupting any other devices in the network.
Preamble- The following three fields collectively
represents the Ethernet Header–
It is a 7 byte field that contains a pattern of alternating 0’s and 1’s.
It alerts the stations that a frame is going to start. ü Destination Address (6 bytes)
It also enables the sender and receiver to establish bit synchronization. ü Source Address (6 bytes)
ü Length (2 bytes)
Start Frame Delimiter (SFD)- Thus, Ethernet Header Size = 14 bytes.
Destination Address-
It is a 6 byte field that contains the MAC address of the destination for which the data is destined.
Source Address-
It is a 6 byte field that contains the MAC address of the source which is sending the data.
Length-
It is a 2 byte field which specifies the length (number of bytes) of the data field.
This field is required because Ethernet uses variable sized frames.
Data-
It is a 4 byte field that contains the CRC code for error detection.
v It is not much costly to form an Ethernet network. As compared to other systems of connecting computers,
it is relatively inexpensive.
v Ethernet network provides high security for data as it uses firewalls in terms of data security.
v Also, the Gigabit network allows the users to transmit data at a speed of 1-100Gbps.
v In this network, the quality of the data transfer does maintain.
v In this network, administration and maintenance are easier.
v The latest version of gigabit ethernet and wireless ethernet have the potential to transmit data at the
speed of 1-100Gbps.
Disadvantages of Using Ethernet-
Point-01:
Point-02:
Point-03:
Burst Error: The two or more bits are changed from 0 to 1 or from 1 to 0 is known as Burst Error.
Single Parity Check-
In this technique, one extra bit called as parity bit is sent along with the original data bits. Parity bit helps to
check if any error occurred in the data during the transmission.
Step-1:
Step-3:
At sender side,
v To t a l n u m b e r o f 1 ’s i n t h e d a t a u n i t t o b e At receiver side,
transmitted is counted. v Receiver receives the transmitted code word.
v The total number of 1’s in the data unit is made v The total number of 1’s in the received code word is counted.
even in case of even parity.
v The total number of 1’s in the data unit is made odd Then, following cases are possible-
in case of odd parity. ü If total number of 1’s is even and even parity is used, then
v This is done by adding an extra bit called as parity receiver assumes that no error occurred.
bit. ü If total number of 1’s is even and odd parity is used, then
receiver assumes that error occurred.
ü If total number of 1’s is odd and odd parity is used, then
Step-2: receiver assumes that no error occurred.
ü If total number of 1’s is odd and even parity is used, then
v The newly formed code word (Original data + parity receiver assumes that error occurred.
bit) is transmitted to the receiver.
Consider the data unit to be transmitted is 1001001 and even parity is used.
At Sender Side-
At Receiver Side-
q After receiving the code word, total number of 1’s in the code word is counted.
q Consider receiver receives the correct code word = 10010011.
q Even parity is used and total number of 1’s is even.
q So, receiver assumes that no error occurred in the data during the transmission.
Advantage-
• This technique is guaranteed to detect an odd number of bit errors (one, three, five and so on).
• If odd number of bits flip during transmission, then receiver can detect by counting the number of 1’s.
Disadvantage-
• This technique can not detect an even number of bit errors (two, four, six and so on).
• If even number of bits flip during transmission, then receiver can not catch the error.
EXAMPLE:
Ø Consider the data unit to be transmitted is 10010001 and even parity is used.
Ø Then, code word transmitted to the receiver = 100100011
Ø Consider during transmission, code word modifies as 101100111. (2 bits flip)
Ø On receiving the modified code word, receiver finds the number of 1’s is even and even parity is used.
Ø So, receiver assumes that no error occurred in the data during transmission though the data is corrupted.
Cyclic Redundancy Check-
Cyclic Redundancy Check (CRC) is an error detection method. It is based on binary division.
Rule-01:
It should not be divisible by x.
This condition guarantees that all the burst errors of length
equal to the length of polynomial are detected.
If the CRC generator is chosen according to
the above rules, then-
Rule-02:
It should be divisible by x+1.
v CRC can detect all single-bit errors
This condition guarantees that all the burst errors affecting
v CRC can detect all double-bit errors provided the divisor
an odd number of bits are detected.
contains at least three logic 1’s.
v CRC can detect any odd number of errors provided the
divisor is a factor of x+1.
v CRC can detect all burst error of length less than the
degree of the polynomial.
v CRC can detect most of the larger burst errors with a high
probability.
Step-1: Calculation Of CRC At Sender Step-3: Transmission To Receiver-
Side-
v The newly formed code word (Original data + CRC) is
transmitted to the receiver.
At sender side,
v A string of n 0’s is appended to the data unit to be Step-4: Checking at Receiver Side-
transmitted.
v Here, n is one less than the number of bits in CRC At receiver side,
generator. v The transmitted code word is received.
v Binary division is performed of the resultant string v The received code word is divided with the same
with the CRC generator. CRC generator.
v After division, the remainder so obtained is called as v On division, the remainder so obtained is checked.
CRC.
v It may be noted that CRC also consists of n bits.
Case-01: Remainder = 0
If the remainder is zero, receiver assumes that no error
Step-2: Appending CRC To Data Unit- occurred in the data during the transmission. Receiver
accepts the data.
At sender side,
v The CRC is obtained after the binary division. Case-02: Remainder ≠ 0
v The string of n 0’s appended to the data unit earlier If the remainder is non-zero, receiver assumes that some
is replaced by the CRC remainder. error occurred in the data during the transmission. Receiver
rejects the data and asks the sender for retransmission.
A bit stream 1101011011 is transmitted using the
CRC method. The generator polynomial is
x4+x+1. What is the actual bit string
transmittitted?
• The generator polynomial G(x) = x4 + x + 1 is
encoded as 10011.
• Clearly, the generator polynomial consists of
5 bits.
• So, a string of 4 zeroes is appended to the bit
stream to be transmitted.
• The resulting bit stream is 11010110110000.
Now,
The code word to be transmitted is obtained by replacing
the last 4 zeroes of 11010110110000 with the CRC.
Thus, the code word transmitted to the receiver =
11010110111110.
A bit stream 10011101 is transmitted using the
standard CRC method. The generator
polynomial is x3+1.
a. What is the actual bit string transmitted?
b. Suppose the third bit from the left is
inverted during transmission. How will
receiver detect this error?
• The generator polynomial G(x) = x 3 + 1 is
encoded as 1001.
• Clearly, the generator polynomial consists of
4 bits.
• So, a string of 3 zeroes is appended to the bit
stream to be transmitted.
• The resulting bit stream is 10011101000.
Now,
The code word to be transmitted is obtained by replacing
the last 3 zeroes of 10011101000 with the CRC.
Thus, the code word transmitted to the receiver =
10011101100.
According to the question,
Third bit from the left gets inverted
during transmission. So, the bit stream
received by the receiver = 10111101100.
Now,
Receiver receives the bit stream =
10111101100. Receiver performs the
binary division with the same generator
polynomial as-
From here,