Unit 2
Unit 2
control
MAC
Time Division Multiple Access (TDMA) – With TDMA the time axis is
divided into time slots of a fixed length. Each user is allocated a fixed
set of time slots at which it can transmit. TDMA requires that users be
synchronized to a common clock. Typically extra overhead bits are
required for synchronization.
The farthest
station
Station B
receives
the first
bit of the
frame at
time t= tp
1 2 3 3 2
Time
Collision
Node 3
Packet
The stations on a wireless ALOHA network are a maximum of 600 km apart. If we assume that
8
signals propagate at 3 × 10 m/s, we find
5 8
Max. Propogation Time Tp = (600 × 10 ) / (3 × 10 ) = 2 ms.
K.
TB = R X Tp
A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is the
Solution
This means no station should send later than 1 ms before this station starts transmission and no
station should start sending during the one 1-ms period that this station is sending.
A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is the
Solution
In this case -
−2 G
S = G× e or S = 0.135 (13.5 percent). This means
In this
−2G
case S = G × e or S = 0.184 (18.4 percent). This
0.18
0.16
0.14
Throughput (S)
0.12
0.1
0.08
0.06
0.04
0.02
0
0 1 2 3 4 5
Average Number of frames per unit time (G)
0.35
0.3
Throughput (S)
0.25
0.2
0.15
0.1
0.05
0
0 1 2 3 4 5
Average Number of frames per unit time (G)
35
Question
A slotted ALOHA network transmits 200-bit frames on a shared
channel of 200 kbps.
What is the throughput if the system (all stations together)
produces
a. 1000 frames per second b. 500 frames per second
c. 250 frames per second.
Solution
The frame transmission time is 200/200 kbps or 1 ms.
a. If the system creates 1000 frames per second, this is 1
frame per millisecond. The load is 1. In this case
S = G× e−G or S = 0.368 (36.8 percent). This means
that the throughput is 1000 × 0.0368 = 368 frames.
Only 386 frames out of 1000 will probably survive.
Computer Networks - DR. PRASHANT KUMAR MISHRA, CSE Department, PSIT
(continued)
c. If the system creates 250 frames per second, this Is (1/4) frame per millisecond. The load is (1/4).
−G
In this case S = G × e or S = 0.195 (19.5 percent). This means that the throughput is 250 × 0.195 =
49. Only 49
• When two stations both begin transmitting at exactly the same time, how long will it
take them to realize that there has been a collision ?
The minimum time to detect the collision is the time it takes the signal to
propagate from one station to the other.
• How long could the transmitting station be sure it has seized the network ?
• It is worth noting that no MAC-sublayer protocol guarantees reliable delivery. Even
in the absence of collisions, the receiver may not have copied the frame correctly
due to various reasons (e.g., lack of buffer space or a missed interrupt).
Computer Networks - DR. PRASHANT KUMAR MISHRA, CSE Department, PSIT
Collision and abortion in CSMA/CD
3. 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.
0 1 2 3 4 5 6 7 8 9
G
Computer Networks - DR. PRASHANT KUMAR MISHRA, CSE Department, PSIT
CONTROLLED ACCESS METHODS
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. We discuss three popular controlled-access
methods.
Reservation
Polling
Token Passing
Computer Networks - DR. PRASHANT KUMAR MISHRA, CSE Department, PSIT
RESERVATION ACCESS METHOD
Chip sequences
Walsh codes are the most common orthogonal codes used in CDMA
applications. A set of Walsh codes of length n consists of the n rows
of an n×n Walsh matrix. The matrix is defined recursively in
previous diagram where n is the dimension of the matrix and the
overscore denotes the logical NOT of the bits in the matrix. The
Walsh matrix has the property that every row is orthogonal
to every other row and to the logical NOT of every other row.
Solution
Solution
The number of sequences needs to be 2m.
We need to choose m = 7
and
N (Number of Stations) = 27 or 128.
All terminals are active for Every terminal has All terminals can be active at
Terminals short periods of time on its own frequency the same place at the same
same frequency. uninterrupted moment uninterrupted.
Transmission
Discontinuous Continuous Continuous
scheme
Flexible, less frequency
Established fully digital, Simple, established,
Advantages planning needed, soft
flexible robust
handover
Computer Networks 79
- DR. PRASHANT KUMAR MISHRA, CSE Department, PSIT
Notable IEEE Standards formats
IEEE 802 LAN/MAN
IEEE 802.1 Standards for LAN/MAN bridging and management and
remote media access control (MAC) bridging.
IEEE 802.2 Standards for Logical Link Control (LLC) standards for
connectivity.
IEEE 802.3 Ethernet Standards for Carrier Sense Multiple Access with
Collision Detection (CSMA/CD).
IEEE 802.4 Standards for token passing bus access.
IEEE 802.5 Standards for token ring access and for communications
between LANs and MANs
IEEE 802.6 Standards for information exchange between systems.
IEEE 802.7 Standards for broadband LAN cabling.
IEEE 802.8 Fiber optic connection.
The least significant bit of the first byte defines the type of address.
If the bit is 0, the address is unicast; otherwise, it is multicast.
The broadcast destination address is a special case of the multicast address
in which all bits are 1s.
Solution
To find the type of the address, we need to look at the
second hexadecimal digit from the left. If it is even, the
address is unicast. If it is odd, the address is multicast. If all
digits are F’s, the address is broadcast. Therefore, we have
the following:
a. This is a unicast address because A in binary is 1010.
b. This is a multicast address because 7 in binary is 0111.
c. This is a broadcast address because all digits are F’s.
Computer Networks - DR. PRASHANT KUMAR MISHRA, CSE Department, PSIT
Categories of Standard Ethernet (802.3)
Term Used:
A transceiver is a device comprising both a transmitter and a receiver that are
combined and share common circuitry or a single housing.
Computer Networks - DR. PRASHANT KUMAR MISHRA, CSE Department, PSIT
10Base5 implementation
Term Used:
A transceiver is a device comprising both a transmitter and a receiver that are
combined and share common circuitry or a single housing.
varies from
Maximum
500 m 185 m 400 m to 100m
segment length
2000 m
stations/cable
100 30 N/A 2(NIC, repeater)
segment
Maximum 5 5 5 5 segments
Computer Networks - DR. PRASHANT KUMAR MISHRA, CSE Department, PSIT
Fast Ethernet-802.3u
The ethernet working at the speed of 100Mbps is referred as
fast ethernet. IEEE standard 802.3u fast ethernet/100BASE-T
specified in May1995. The features of this type of fast ethernet
are as follows:
• Includes multiple Physical layers.
• It uses original ethernet MAC but operates at 10 times higher speed.
• It needs star wired configuration with central hub.
The MAC parameters are same as described for ethernet
above. There are three physical layers for fast ethernet.
• 100BASE-TX: Needs 2 pairs of cat.5 UTP/Type1 STP cables
• 100BASE-FX: Needs 2 strands of multimode fiber
• 100BASE-T4: Needs 4 pairs of cat.3
Multimode or single
cabling UTP cat.5 or STP UTP cat.3/4/5
mode fiber
Full duplex
Yes Yes No
capabilities
The ending delimiter contains an E bit which is set if any interface detects an
error.
Computer Networks - DR. PRASHANT KUMAR MISHRA, CSE Department, PSIT
Question:
A 8-Mbps token ring has a token holding timer value of
10 msec. What is the longest frame (assume header bits
are negligible) that can be sent on this ring?
Answer:
At 8 Mbps, a station can transmit 80,000 bits or 10,000 bytes in 10
msec.
This is an upper bound on frame length.
From this amount, some overhead must be subtracted, giving a
slightly lower limit for the data portion.
The base version of the standard was released in 1997, and has had subsequent
amendments. The standard and amendments provide the basis for wireless
network products using the Wi-Fi brand. While each amendment is officially
revoked when it is incorporated in the latest version of the standard, the corporate
world tends to market to the revisions because they concisely denote capabilities
of their products. As a result, in the marketplace, each revision tends to become its
own standard.
Framing
• Group the physical layer bit stream into units called frames. Frames are
nothing more than "packets" or "messages". By convention, we use the
term "frames" when discussing DLL.
Flow Control
• Prevent a fast sender from overwhelming a slower receiver.
Error Control
• Sender checksums the frame and transmits checksum together with
data. Receiver re-computes the checksum and compares it with the
received value.
• The data link layer can be designed to offer various services. The
actual services offered can vary from system to system. Three
reasonable possibilities that are commonly provided are-
• Other benefits of HDLC are that the control information is always in the
same position, and specific bit patterns used for control differ
dramatically from those in representing data, which reduces the chance
of errors. It has also led to many subsets.
• Two subsets widely in use are Synchronous Data Link Control (SDLC) and
Link Access Procedure-Balanced (LAP-B).
• Secondary Station
The secondary station is under the control of the primary station. It
has no ability, or direct responsibility for controlling the link. It is only
activated when requested by the primary station. It can only send
response frames when requested by the primary station.
• Combined Station
A combined station is a combination of a primary and secondary
station. On the link, all combined stations are able to send and receive
commands and responses without any permission from any other
stations on the link.
Disadvantage –
If the count is corrupted by a transmission error, the destination will lose synchronization and will
be unable to locate the start of the next frame. So, this method is rarely used.
Concept Adds an extra byte to the data when Adds an extra bit to the data when a
a special byte is found. special bit pattern is found.
Insertion Extra byte is inserted after each Extra bit is inserted after each
occurrence of the flag byte. occurrence of the flag bit pattern
135
Framing – Physical layer coding violations
• The final framing method is physical layer coding
violations and is applicable to networks in which the
encoding on the physical medium contains some
redundancy.
• Example:
10 bit is a high-low pair and a 01 bit is a low-high pair. The
combinations of 00 low-low and 11 high-high which are not
used for data may be used for marking frame boundaries.
Cases of Operations:
1.Normal operation
2.The frame is lost
3.The Acknowledgment (ACK) is lost
4.The Ack is delayed
Importance of frame
numbering
In Stop and-Wait ARQ, numbering frames prevents the retaining of
duplicate frames.
Computer Networks - DR. PRASHANT KUMAR MISHRA, CSE Department, PSIT
Stop-and-Wait ARQ
4. Delayed ACK and lost frame
Importance of frame
numbering
Firstly, if the receiver had the capacity to accept more than one frame,
its resources are being underutilized.
Secondly, if the receiver was busy and did not wish to receive any more
packets, it may delay the acknowledgement. However, the timer on the
sender's side may go off and cause an unnecessary retransmission. These
drawbacks are overcome by the sliding window protocols.
The sequence numbers within the sender's window represent the frames sent
or can be sent but as yet not acknowledged. Whenever a new packet arrives
from the network layer, the upper edge of the window is advanced by one. When
an acknowledgement arrives from the receiver the lower edge is advanced by
one.
The receiver's window corresponds to the frames that the receiver's data link
layer may accept. When a frame with sequence number equal to the lower edge
of the window is received, it is passed to the network layer, an acknowledgement
is generated and the window is rotated by one. If however, a frame falling outside
the window is received, the receiver's data link layer has two options. It may
either discard this frame and all subsequent frames until the desired frame is
received or it may accept these frames and buffer them until the appropriate
frame is received and then pass the frames -to
Computer Networks
the network layer in sequence.
DR. PRASHANT KUMAR MISHRA, CSE Department, PSIT
Sliding Window Protocol
Sliding window protocols apply Pipelining :
Go-Back-N ARQ
Allowing the sender to transmit multiple contiguous frames
Selective Repeat ARQ (say up to frames) before it receives an acknowledgement.
W
If m = 3;
sequence numbers = 8 and
window size =7
Acknowledged frames
Computer Networks - DR. PRASHANT KUMAR MISHRA, CSE Department, PSIT
Go_Back _N ARQ Sliding Window Protocol
Receiver sliding window
The receive window is an abstract concept defining
an imaginary box of size 1 with one single variable
Rn.
The window slides when a correct frame has arrived;
sliding occurs one slot at a time.
What is the
disadvantage of this?
Solution:
Selective Repeat ARQ protocol : resend only the damaged frame
It defines a negative Acknowlgement (NAK) that report the
sequence number of a damaged frame before the timer expires
It is more efficient for noisy link, but the processing at the
receiver is more complex
In Selective Repeat ARQ, the size of the sender and receiver
window must be at most one-half of 2m.
Computer Networks - DR. PRASHANT KUMAR MISHRA, CSE Department, PSIT
Selective Repeat ARQ
It is given that
Frame=1000 bits, Channel data rate = 1Mbps, Propagation delay t prop = 270ms
(a) Maximum link utilization with stop-and-wait flow control:
U = 1/(1+2a) where a=tprop/tframe
Since tprop=270ms, in order to find the value of U we need to calculate tframe.
Since frame = 1000 bits and Max bit rate = channel data rate = 1Mbps,
the tframe= 1000/106=1 ms.
(c) Maximum link utilization with window flow control of window size 127:
Since W=127 then (2a+1)=541, which means that W<2a+1
So, U=W/(2a+1)= 127/541
= 0.235 = 23.5%
(d) Maximum link utilization with window flow control of window size 255:
Since W=255 then (2a+1)=541, which means that W<2a+1
So, U=W/(2a+1)= 255/541
= 0.471 = 47.1%
2. Burst error : It means two or more bits in data unit are changed from 1 to 0
from 0 to 1. In burst error, it is not necessary that only consecutive bits are
changed. The length of burst error is measured from first changed bit to last
changed bit.
• Receiving
1. Receive F’(x)
2. Divide F’(x) by P(x)
3. Accept if remainder is 0, reject otherwise
Computer Networks 192 - DR. PRASHANT KUMAR MISHRA, CSE Department, PSIT
Practice Question)
For a pattern of, 10101001 00111001 00011101 Find out whether any
transmission errors have occurred or not
The number of redundant bits can be calculated using the following formula:
2^r > m + r + 1 where, r = redundant bit, m = data bit
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