Sie sind auf Seite 1von 92

MAC Sublayer

Pronaya Bhattacharya
THE MEDIUM ACCESS CONTROL SUBLAYER

 In the OSI protocol stack, channel allocation is addressed in the


Medium access control (MAC) sublayer. This is a sublayer of the Data
Link Layer - considered to be below the Logical Link Control (LLC)
sub-layer.

 MAC layer provides an unreliable connectionless service; if required,


the LLC layer can convert this into a reliable service by using an ARQ
(Automatic repeat request) protocol.

 The protocols used to determine who goes next on a multiaccess


channel belong to a sublayer of the data link layer called the MAC
(Medium Access Control) sublayer.

 The MAC sublayer is especially important in LANs, particularly


wireless ones because wireless is naturally a broadcast channel.
THE CHANNEL ALLOCATION PROBLEM:
 Links are classified as either broadcast or point-to-
point. With a broadcast link, more than two users
share the same transmission media.
 A broadcast link is also called a multiaccess
channel. In such a channel,
 1. A transmitter can be heard by multiple receivers
 2. A receiver can hear multiple transmitters.
 In any broadcast network, the key issue is how to
determine who gets to use the channel when there
is competition for it.
 When only a single channel is available, it is much
harder to determine who should go next.
How to share a common medium among the many
users? how to allocate a single broadcast channel
among competing users. The channel might be a
portion of the wireless spectrum in a geographic
region, or a single wire or optical fiber to which
multiple nodes are connected.

In both cases, the channel connects each user to all


other users and any user who makes full use of the
channel interferes with other users who also wish to use
the channel.
 When two or more nodes transmit at the same
time, their frames will collide and the link
bandwidth is wasted during collision.
CHANNEL ALLOCATION APPROACHES:

 How to allocate a multiaccess channel among competing users.


In other words, we need a set of rules (i.e. a protocol) to allow
each user to communicate and avoid interference. There are a
variety of solutions to this problem that are used in practice.
These solutions can be classified as either static or dynamic.
 With a static approach, the channel's capacity is essentially
divided into fixed portions; each user is then allocated a portion
for all time. If the user has no traffic to use in its portion, then it
goes unused.
 With a dynamic approach, the allocation of the channel changes
based on the traffic generated by the users. Generally, a static
allocation performs better when the traffic is predictable. A
dynamic channel allocation tries to get better utilization and
lower delay on a channel when the traffic is unpredictable.
TAXONOMY OF CHANNEL ALLOCATION
STATIC CHANNEL ALLOCATION TECHNIQUES :

 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.

 Frequency Division Multiple Access (FDMA) – With FDMA the


available frequency bandwidth is divided into disjoint frequency
bands. A fixed band is allocated to each user. FDMA requires a
guard band between user frequency bands to avoid cross-talk.

 Another static allocation technique is Code Division Multiple


Access (CDMA), this technique is used in many wireless
networks
PROBLEMS WITH STATIC ALLOCATION
• When the number of senders is large and varying or the traffic is bursty, FDM
presents some problems.
• If the spectrum is cut up into N regions and fewer than N users are currently
interested in communicating, a large piece of valuable spectrum will be wasted.
And if more than N users want to communicate, some of them will be denied
permission for lack of bandwidth, even if some of the users who have been
assigned a frequency band hardly ever transmit or receive anything.
• The poor performance of static FDM can easily be seen with a simple queueing
theory calculation. Let us start by finding the mean time delay, T, to send a frame
onto a channel of capacity C bps. We assume that the frames arrive randomly
with an average arrival rate of λ frames/sec, and that the frames vary in length
with an average length of 1/μ bits. With these parameters, the service rate of
the channel is μC frames/sec. A standard queueing theory result is

T = 1/μC − λ
• In our example, if C is 100 Mbps, the mean frame length, 1/μ, is 10,000 bits, and
the frame arrival rate, λ, is 5000 frames/sec, then T = 200 μsec.
• Now let us divide the single channel into N independent subchannels, each with
8
capacity C /N bps. The mean input rate on each of the subchannels will now be
DYNAMIC CHANNEL ALLOCATION TECHNIQUES :
Many different dynamic allocation strategies have been developed. They
can be broadly classified as:
 Contention resolution approaches(Random
Access/Contention based) - users transmit a packet when they
have data to send- if multiple users transmit at the same time a collision
occurs and the packets must be retransmitted according to some rule.
 Perfectly scheduled approaches(Controlled
Access/Contention Free) - Users transmit contention free
according to a schedule that is dynamically formed based on which
users have data to send, e.g. polling, reservations. Various combinations
of these approaches also exist. beginning with a basic contention
resolution approach.
 As we look at different approaches keep in mind the following two
performance criteria:
1. The delay at low load.
2. The throughput (channel efficiency) at high load.
Dynamic Channel Allocation in LANs and MANs-ASSUMPTIONS
1.Station Model.
• Independent stations for generating frames.
• Once a frame has been generated, the station is blocked until the frame
has been transmitted.
2.Single Channel Assumption. A single channel for all communication (send
and receive), and all stations are equivalent.
3.Collision Assumption. If the transmission of two frames overlap in time, a
collision occurs. All stations can detect collisions. A collided frame must be
retransmitted.
4.Time assumption.
(a) Continuous Time- Frame transmission can begin at any instant.
(b) Slotted Time-Frame Transmission begins at start of Slot. 0-Idle slot, 1-transmitting,>1-collision.

5.Sense assumption. (a)


Carrier sense. Stations can tell if the channel is in use before trying to use it.

(b) No carrier sense. Stations cannot sense the channel before trying to use 10
it.
ALOHA Protocol
• ALOHA is developed in the 1970s at the University of Hawaii for
wireless LAN and can be used for any shared medium.

It has two variants:


• PURE ALOHA
• SLOTTED ALOHA

• The basic idea is simple:


• Let users transmit whenever they have data to be sent.

• If two or more users send their frames at the same time, a


collision occurs and the frames are destroyed.
ALOHA Network
Pure ALOHA
How the channel know that there is a collision:
- Due to the feedback property of broadcasting, a
sender can always find out whether its frame was
destroyed by listening to the channel, the same way
other users do.
- With a LAN, the feedback is immediate; with a
satellite, there is a delay of 270 msec before the
sender knows if the transmission was successful.
- If listening while transmitting is not possible for some
reason, acknowledgements are needed.

13
Pure ALOHA

In pure ALOHA, frames are transmitted at completely


arbitrary times(continuous time).
The throughput of ALOHA systems is maximized by having a
uniform frame size rather than by allowing variable length
frames.
Maximum propagation delay (tp):
• The time it takes for a bit of a frame to travel between the
two most widely separated stations.

The farthest
station

Station B
receives
the first
bit of the
frame at
time t= tp
Binary Exponential Back-Off Algorithm

The stations on a wireless ALOHA network are a


maximum of 600 km apart. If we assume that signals
propagate at 3 × 108 m/s, we find
Tp = (600 × 105 ) / (3 × 108 ) = 2 ms.
Now we can find the value of TB for different values of
K.

a. For K = 1, the range is {0, 1}. The station needs to|


generate a random number with a value of 0 or 1. This
means that TB is either 0 ms (0 × 2) or 2 ms (1 × 2),
based on the outcome of the random variable.

12.16
Example 12.1 (continued)

b. For K = 2, the range is {0, 1, 2, 3}. This means that T B


can be 0, 2, 4, or 6 ms, based on the outcome of the
random variable.

c. For K = 3, the range is {0, 1, 2, 3, 4, 5, 6, 7}. This


means that TB can be 0, 2, 4, . . . , 14 ms, based on the
outcome of the random variable.

d. We need to mention that if K > 10, it is normally set to


10.

12.17
Slotted ALOHA
• Time is divided into slots equal to a frame transmission time (Tfr)
• A station can transmit at the beginning of a slot only
• If a station misses the beginning of a slot, it has to wait until the beginning
of the next time slot.
• A central clock or station informs all stations about the start of a each slot
• VUNERALBLE TIME = Tfr
VUNERABLE TIME FOR PURE ALOHA
and SLOTTED ALOHA
• Vunerable time for PURE ALOHA: 2 * Tfr, where Tfr denotes the
average frame transmission time.
• Vunerable time for SLOTTED ALOHA: Tfr, where Tfr denotes the
average frame transmission time.
PROBLEM: An ALOHA network transmits 200-bit frames on a shared
channel of 200 kbps. What is the requirement to make this frame
collision-free?
ANS: Average frame transmission time Tfr is 200 bits/200 kbps or 1 ms.

Pure : 2*1ms=2ms, Slotted=1ms. 20


Throughput for PURE AND SLOTTED

ALOHA
Throughput(Efficiency):
The number of frames successfully transmitted through the channel per frame time.

What is the throughput of an ALOHA channel?


SOME ASSUMPTIONS
• Infinite population of users
• New frames are generated according to a Poisson distribution with mean S frames per
packet time.
• Probability that k frames are generated during a given frame time:
S k eS
Pr[ k ] 
k!
• In addition to the new frames, the stations also generate retransmissions of frames that
previously suffered collisions.

• Assume that the frame (new + retransmitted) generated is also


Poisson with mean G per frame time where G = Average
Relation between G and S
With G, the Poisson formula now
k G
becomes:
G e
Pr[ k ] 
k!
• At low load, few collisions: G>=S AND at high load, many collisions: G>S.
• Also if G>1- frames are generated at a higher rate then channel can handle(overloaded
channel).
• If G<0- frames are not generated at all.(Underloaded Channel).
• If 0<G<1- frames are normally generated .(Normal Channel)

Under all loads, S=GP0, where P0 is the probability that a frame does not
suffer a collision.

How to Compute G:
• If we let ns to be the number of stations and nfs to be the number
of frames a station can send per second then G = ns × nfs × Tfr.
• For Slotted ALOHA, as a frame can be sent in a beginning of a slot,
Throughput for PURE
• Vulnerable period:ALOHA
Interval that will be 2 * T two fr,
frame time long(2G) so -
• Probability of no other frame is generated
2 G during
the vulnerable period is:
P0  e
• Using S = GP0, we get 2 G
S  Ge
• Maximum efficiency can be obtained by computing
maxima – at G=1/2, i.e S=(1/2)*e-2*(1/2) = S= (½)*e-1 =
1/2e =1/2*2.718= 1/5.346= 0.1839.
i.e S = 0.1839 at G =1/2.
max max
Throughput for Slotted
• Vulnerable period: Interval ALOHA
that will be T one frame time long(G) so,
fr,

• Probability of no other frame is generated during the vulnerable period is:


• P0= e-G
Hence, S = GP0=G e-G
Now here Smax = 1/e = 0.368 at Gmax = 1
• So, Maximum channel utilization is 36.8%.
SOME IMPORTANT FORMULAE(SLOTTED ALOHA) WRITE THE

FORMULAS FOR
• Probability of no collision: P0=e-G.
PURE ALOHA
• Probability of frame suffering a collision: 1-P0=1-e-G YOURSELF.

• Probability of a Transmission requiring exactly k attempts


k-1 attempts unsuccessful + 1 successful

P = e-G.(1-e-G)k-1
Performance Comparison of
ALOHA
 Slotted ALOHA can double the throughput
of pure ALOHA

Throughput versus offered traffic for ALOHA systems


NUMERICALS
A pure ALOHA and 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
PURE ALOHA:
CALCULATE G
The frame transmission time Tfr is 200/200 kbps or 1 ms.
No. of Frames all station generates/sec.= No. of Frames a station generates/sec X Total no of stations
Channel load G= Frame Transmission Time X No. of Frames all station generates/sec.G= 10 -3 X
1000=1.
a)S= G*e-2G = 0.135(13.5%).i.e 135/1000
b)G= 10-3 * 500= 1/2 . S= 0.184(18.4% i.e 92/500)
c) G= 10-3 * 250 = 1/4. S= 0.152(38/250)
SLOTTED ALOHA
a) G=1. S= G*e-G = 0.368.(36.8% i.e 368/1000)
b) G= 1/2 . S= 0.303(151/500)
c) G=1/4 S= 0.195(49/250).
12.26
PRACTICE PROBLEMS(DO YOURSELF)
1.A group of N stations share a 56-kbps pure ALOHA channel. Each
station outputs a 1000-bit frame on average once every 100 sec,
even if the previous one has not yet been sent (e.g., the stations can
buffer outgoing frames). What is the maximum value of N?
ANS:With pure ALOHA the usable bandwidth is 0.184 × 56 kbps
= 10.3 kbps.Each station requires 10 bps, so N  10300/10 
1030large
2.A stations.
population of ALOHA users manages to generate 50
requests/sec, including both originals and retransmissions. Time is
slotted in units of 40 msec.
(a) What is the chance of success on the first attempt?
(Ans: e-2)
(b) What is the probability of exactly k collisions and then a success?
(Ans: 0.136 * (0.865)k )
(c) What is the expected number of transmission attempts needed?
(Ans: e2 )
3. Measurements of a SLOTTED ALOHA channel with an infinite number
of users show that 90% of the slots are occupied.
a. Calculate the Channel Load.
(Ans: 2.3)
b. Calculate Throughput
(S= 0.23)
c. Is the channel overloaded or underloaded. 27
CSMA (Carrier-Sense Multiple-Access )

The poor efficiency of the ALOHA scheme can be attributed to


the fact that a node start transmission without paying any
attention to what others are doing.
In situations where propagation delay of the signal between two
nodes is small compared to the transmission time of a packet,
all other nodes will know very quickly when a node starts
transmission. This observation is the basis of the carrier-sense
multiple-access (CSMA) protocol.
In this scheme, a node having data to transmit first listens to the
medium to check whether another transmission is in progress or
not. The node starts sending only when the channel is free, that
is there is no carrier. That is why the scheme is also known as
listen-beforetalk.
Vulnerable time in CSMA
Carrier sense multiple access with collision detection (CSMA/CD) adds on to the CSMA algorithm to deal with
the collision. In CSMA/CD, the size of a frame must be large enough so that collision can be detected by
sender while sending the frame. So, the frame transmission delay must be at least two times the maximum
propagation delay i.e. Tf >= 2*Tp
Contention slots are those slot which are not able to transmit their journey due to the collision. Suppose A station
transmitted data but collide and worst case time wasted is 2Tp and then some station B found out a way to transmit the
data so it took.
Now we don’t know how many contention slot, so we consider the worst case to be of n contention slots.
Efficiency = Tf / ( C*2*Tp + Tf + Tp)
In CSMA/CD, for success, only 1 station should transmit while others shouldn’t. Let p be the probability to transmit data
successfully.
P(success) = nC1 * p * (1-p)n-1 (by using Binomial distribution)
For max P(success), differentiate with respect to p and equate to zero (to get maxima and minima).
We get P(max) = 1/e
Number of times we need to try before getting 1st success
1/P(MAX) = 1/(1/e) = e
Here number of times we need to try (C) = e.
Put a = Tf/Tp and divide by T in Efficiency = Tf/ (C* 2 * Tp + Tf + Tp)
Efficiency = 1/( 1 + 6.44a)=1/(1+6.44(mv/dB)) e->increases, if m,
and v increases.
30
Behavior of three persistence methods

There are three variations of this basic scheme as outlined below.


(i) 1-persistent CSMA: In this case, a node having data to send,
start sending, if the channel is sensed free. If the medium is busy,
the node continues to monitor until the channel is idle. Then it
starts sending data.
(ii) Non-persistent CSMA: If the channel is sensed free, the node
starts sending the packet. Otherwise, the node waits for a random
amount of time and then monitors the channel.
(iii) p-persistent CSMA: If the channel is free, a node starts
sending the packet. Otherwise the node continues to monitor
until the channel is free and then it sends with probability p.
Behavior of three persistence methods
CSMA with Collision Detection
(CSMA /CD)
Persistent and non-persistent CSMA protocols improve ALOHA by ensuring
that no station begins to transmit when it senses the channel busy.

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


protocol further improves ALOHA by aborting transmissions as
soon as a collision is detected.

The conceptual model:


• To send data, a station first listens to the channel to see if anyone
else is transmitting.
• If so, the station waits until the end of the transmission (1-
persistent) or wait a random period of time and repeats the
algorithm (non-persistent). Otherwise, it transmits a frame.
• If a collision occurs, the station will detect the collision, abort its
transmission, waits a random amount of time, and starts all over
CSMA/CD can be in one of three
states:
contention, transmission, or idle

• 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).
Collision and abortion in CSMA/CD
Flow diagram for the CSMA/CD
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.
(i) Interframe space
(ii) Contention window
(iii) Acknowledgements

1. 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.
2. 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.
• 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.
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.
Timing in CSMA/CA
Flow diagram for CSMA/CA
Ques. 1 A network has a bandwidth of 10 Mbps. The maximum propagation time is 25.6 micro sec , what is the
minimum frame size to avoid collision.
Ans: Fmin= 512 bits or 64 bytes
Ques. 2 Consider Building a CSMA/CD network running at 1 Gbps over a 1 km cable with no repeaters. The
signal speed in the cable is 200000Km/sec. What is the minimum frame size to avoid collision.
Ans: Fmin= 10,000 bits
Ques. 3 What is the baud rate of IEEE 802.3 10 Mbps CSMA/CD LAN.
Ans: 5 Mbaud
Ques.4 A 1-km-long, 10-Mbps CSMA/CD LAN (not 802.3) has a propagation speed of 200 m/μsec. Repeaters are
not allowed in this system. Data frames are 256 bits long, including 32 bits of header, checksum, and other
overhead. The first bit slot after a successful transmission is reserved for the receiver to capture the channel in
order to send a 32-bit acknowledgement frame. What is the effective data rate, excluding overhead, assuming
that there are no collisions?
Ans: Channel capture time= 2*Tp
Effective Tf= (256-32)/Tp+Tf(with header)+channel capture time+Tfack+Tp ack
=224/(0.0002+0.000256+0.0004+0.000032+0.0002)=3.8 Mbps

41
1.0 0.01-persistent CSMA
0.9 Non-persistent CSMA
0.8
0.7
0.1-persistent CSMA
0.6
0.5-persistent CSMA
0.5
S

0.4 1-persistent CSMA


0.3
0.2 Slotted Aloha
0.1 Aloha
0

0 1 2 3 4 5 6 7 8 9

G
CONTROLLED ACCESS
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
Collision- Free Protocols during contention period
Almost collisions can be avoided in CSMA/CD, but they can still occur during the
contention period.
The collision during contention period adversely affects the system performance, this
happens when the cable is long and length of packet are short. This problem becomes
serious as fiber optics network come into use. Here we shall discuss some protocols that
resolve the collision during the contention period.
 Bit-map Protocol
 Binary Countdown
 Limited Contention Protocols
 The Adaptive Tree Walk Protocol

Collision Free Protocols:


Pay constant overhead to achieve performance guarantee
Good when network load is high
44
Reservation (Bit-Map Protocol)-
 Contention period is N slots.
 If a station has a frame to transmit, it transmits a bit 1 in the respective slot.
In this way, each station has complete knowledge of which station wishes to transmit. There will never be any collisions
because everyone agrees on who goes next.
Performance-
For analyzing the performance of this protocol, we will measure time in units of the contention bits slot, with a data
frame consisting of d time units.
Low-load: The bitmap will simply be repeated over and over, for lack of data frames.
High-Load: All the stations have something to send all the time at high load, the N bit contention period is prorated
over N frames, yielding an overhead of only 1 bit per frame.
Wait-Time:
Higher numbered stations have to wait for half scan before starting to transmit(N/2 bit slots).
Low-numbered stations have to wait an average of (3/2N) slots before starting to transmit.

Ex: DAMA (Demand Assigned Multiple Access)


Two phases- Reservation and Transmission 45
Binary Countdown Protocols-

46
POLLING
Select and poll functions in polling access method

To impose order on a network of independent users to establish one station in the


network as a controller that periodically polls all other stations is called polling.
POLLING
There are two types of polling policies –
(a) Round robin order
(b) Priority order
Polling works with topologies having Primary Station and Secondary Stations.
•The Primary Station controls the link whereas the secondary station follows its instructions.
•The exchange of data occurs only and only through the primary device even when the final destination of transmission is
secondary.
SEL frame: Whenever primary Station has something to send, it sends the message to each node.
•Before sending the data, it creates and transmits a Select (SEL) Frame. One field of SEL Frame includes the address of the
intended secondary station. While sending, the primary station should know whether the target device is ready to receive or
not. Hence, it alerts the secondary station for upcoming transmission and wait for an acknowledgement (ACK) of secondary
station’s status.
•Poll Function: When the primary is ready to receive data, it must ask (poll) each device if it has anything to send.
If the secondary has data to transmit, it sends the data frame. Else, it sends a negative acknowledgement (NAK).
The primary station then polls the next secondary.
When the response is positive (a data frame), the primary station reads the frame and returns an acknowledgement (ACK).
There are two possibilities to terminate the transmission –
(a) either the secondary sends all data, finishing with an EOT frame.
(b) or, the primary station shows the timer up signal. 48
Advantage Of Polling
– No state is ever wasted
Disadvantage Of Polling
– No fair sharing.

49
Logical ring and physical topology in Token-passing Access Method
Efficiency of Token Ring Protocol-

Ring Latency –
The time taken by a single bit to travel around the ring is known as ring latency.
RL= d/v+N*b
d-length of the ring
v- velocity of data in the ring
N-no.of stations in the ring
b-time taken by each station to hold the bit before transmitting it(bit-delay is in bits)
Cycle Time –
The time taken by the token to complete one revolution of the ring is known as cycle time.
Cycle time = Tp + (THT*N)
Where, THT - Token Holding Time (max. time a token frame can be held by a station)
Tp - Propagation delay(d/v)

51
THT = Tf + Ring latency
= Tf + Tp + N*b (In most cases, bit delay is 0)
THT = Tf
So, THT = Tf + Tp
where Tt = transmission delay
where Tf = transmission delay
Tp = propagation delay
Tp = propagation delay

Delayed Token Reinsertion Early Token Reinsertion


52
Efficiency –
Efficiency, e = useful time/ total time

useful time = N*Tf


total time = cycle time = Tp + (THT*N) So, e = (N*Tf)/(Tp + (THT*N))

1. Delayed token reinsertion –


In this case, THT = Tf + Tp
So, cycle time = Tp + N*(Tf + Tp)

Efficiency, e = (N*Tt)/(Tp + N*(Tf + Tp))


e = 1/(1 + a*((N+1)/N))
where a = Tp/Tf

2. Early token reinsertion –


In this case, THT = Tf
So, cycle time = Tp + N*(Tf)
Efficiency, e = (N*Tf)/(Tp + N*(Tf))
e = 1/(1 + a*(1/N))
where a = Tp/Tf 53
Limited Contention Protocols- •Slot-0: C*, E*, F*, H* (all nodes under node 0 can try
Collision based protocols (pure and slotted ALOHA, CSMA/CD) which are going to send), conflict
are good when the network load is low. Collision free protocols •Slot-1: C* (all nodes under node 1can try}, C sends
(bitmap, binary Countdown) are good when load is high. •Slot-2: E*, F*, H*(all nodes under node 2 can try},
How about combining their advantages conflict
Behave like the ALOHA scheme under light load •Slot-3: E*, F* (all nodes under node 5 can try to
Behave like the bitmap scheme under heavy load. send), conflict
(A) Adaptive Tree Walk Protocol: Partition the group of station •Slot-4: E* (all nodes under E can try), E sends
and limit the contention for each slot. •Slot-5: F* (all nodes under F can try), F sends
Under light load, everyone can try for each slot like aloha •Slot-6: H* (all nodes under node 6 can try to send),
Under heavy load, only a group can try for each slot H sends.
How do we do it: Treat every stations as the leaf of a
binary tree
first slot (after successful transmission), all stations
can try to get the slot(under the root node).
if no conflict, fine
in case of conflict, only nodes under a subtree get to
try for the next one. (depth first search)
DFS Traversal: 0,1,4,C,2,5,E,F,6,H(only sending nodes)

54
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.

 Frequency-Division Multiple Access (FDMA)


 Time-Division Multiple Access (TDMA)
 Code-Division Multiple Access (CDMA)
In FDMA, the available bandwidth
of the common channel is divided into
bands that are separated by guard
bands.
Frequency-division multiple access (FDMA)
In TDMA, the bandwidth is just one
channel that is timeshared between
different stations.
Time-division multiple access (TDMA)
In CDMA, one channel carries all
transmissions simultaneously.
Simple idea of communication with code
IEEE Project 802

In 1985, the Computer Society of the IEEE started a


project, called Project 802, to set standards to enable
intercommunication among equipment from a variety
of manufacturers. Project 802 is a way of specifying
functions of the physical layer and the data-link layer
of major LAN protocols.

 Logical Link Control (LLC)

 Media Access Control (MAC)

5.62
Notable IEEE Standards
IEEE 802
formats LAN/MAN
Standards for LAN/MAN bridging and
IEEE 802.1 management and remote media access
control (MAC) bridging.
Standards for Logical Link Control (LLC)
IEEE 802.2
standards for connectivity.
Ethernet Standards for Carrier Sense
IEEE 802.3 Multiple Access with Collision Detection
(CSMA/CD).
IEEE 802.4 Standards for token passing bus access.
Standards for token ring access and for
IEEE 802.5 communications between LANs and
MANs
IEEE 802.11 Wireless LAN
IEEE 802.15.1 Bluetooth
IEEE 802.16 Wireless MAN-WIMAX
What is Ethernet?
Ethernet is a family of computer networking technologies for local
area networks (LANs) and metropolitan area networks (MANs). It was
commercially introduced in 1980 and first standardized in 1983 as IEEE
802.3,[1] and has since been refined to support higher bit rates and
longer link distances.
Over time, Ethernet has largely replaced competing wired LAN
technologies such as token ring, FDDI, and ARCNET
Figure 5.54: IEEE standard for LANs

5.65
SOME IMPORTANT CONCEPT REGARDING MAC ADDRESSES
Show how the address 47:20:1B:2E:08:EE is sent out on transmission line.
Solution
The address is sent left to right, byte by byte; for each byte, it is sent right to left, bit
by bit, as shown below:

Define the type of the following destination addresses:


a. 4A:30:10:21:10:1A
b. 47:20:1B:2E:08:EE
c. FF:FF:FF:FF:FF:FF

Solution
a. Unicast(4A= 0100 1010)
b. Multicast(47=0100 0111)
c. Broadcast(FF= 1111 1111)
Ethernet frame
 PREAMBLE:The first field of the 802.3 frame contains 7 bytes(56bits )of
alternating 0s and 1s that alerts the receiving system to coming frame and
enables it to synchronize its input timing.
 START FRAME DELIMITER(SFD):The second field (1byte:10101011)signals
the beginning of the frame . The SFD warns the station that this is the last
chance for synchronization . The last 2 bits is11 and alerts the receive that the
next field is the destination address.
 DESTINATION ADDRESS(DA):The DA field is 6bytes and contain the
physical address of the destination station to receive the packet
 SOURCE ADDRESS : The SA field is also 6 bytes and contains the physical
address of the sender of the packet.
 LENGTH/TYPE : This field is defined as a type field or length field.Theoriginal
Ethernet used this field as the type field to define the upper –layer protocol
using the MAC frame.
 DATA : This field carries data encapsulated from the upper –layer protocols.It is
a minimum of 46 and a maximum of 1500 bytes.
 CRC : The last filed contains error detection information,in this case a CRC-32.
Ethernet Cabling
The most common kinds of Ethernet cabling.
Ethernet Cabling (2)
Three kinds of Ethernet cabling.
(a) 10Base5, (b) 10Base2, (c) 10Base-T.
Ethernet Cabling (3)
Cable topologies. (a) Linear, (b) Spine, (c) Tree, (d) Segmented.
Ethernet Cabling (4)

(a) Binary encoding, (b) Manchester encoding,


(c) Differential Manchester encoding.
Ethernet Performance
Efficiency of Ethernet at 10 Mbps with 512-bit slot times.
Switched Ethernet
A simple example of switched Ethernet.
Fast Ethernet
The original fast Ethernet cabling.
Gigabit Ethernet

(a) A two-station Ethernet. (b) A multistation


Ethernet.
Gigabit Ethernet (2)
Gigabit Ethernet cabling.
Data Link Layer Switching
• Bridges from 802.x to 802.y
• Local Internetworking
• Spanning Tree Bridges
• Remote Bridges
• Repeaters, Hubs, Bridges, Switches, Routers, Gateways
• Virtual LANs
Data Link Layer Switching
Multiple LANs connected by a backbone to handle a total load higher
than the capacity of a single LAN.
Bridges from 802.x to 802.y
Operation of a LAN bridge from 802.11 to 802.3.
Local Internetworking
A configuration with four LANs and two bridges.
Spanning Tree Bridges
Two parallel transparent bridges.
Spanning Tree Bridges (2)

(a) Interconnected LANs. (b) A spanning tree covering


the LANs. The dotted lines are not part of the
spanning tree.
Remote Bridges
Remote bridges can be used to interconnect distant LANs.
Repeaters, Hubs, Bridges,
Switches, Routers and Gateways

(a) Which device is in which layer.


(b) Frames, packets, and headers.
Repeaters, Hubs, Bridges,
Switches, Routers and Gateways
(2)

(a) A hub. (b) A bridge. (c) a switch.


Virtual LANs
A building with centralized wiring using hubs and a switch.
Virtual LANs (2)

(a) Four physical LANs organized into two VLANs, gray and
white, by two bridges. (b) The same 15 machines organized
into two VLANs by switches.
Token bus
network(802.4)
 Token bus is a network implementing the token ring protocol over a
"virtual ring" on a coaxial cable.
 A token is passed around the network nodes and only the node
possessing the token may transmit. If a node doesn't have anything to
send, the token is passed on to the next node on the virtual ring. Each
node must know the address of its neighbor in the ring, so a special
protocol is needed to notify the other nodes of connections to, and
disconnections from, the ring.
 Token bus was standardized by IEEE standard 802.4. It is mainly used for
industrial applications. The main difference is that the endpoints of the
bus do not meet to form a physical ring.
 Due to difficulties handling device failures and adding new stations to a
network, token bus gained a reputation for being unreliable and difficult
to upgrade.
 In order to guarantee the packet delay and transmission in Token bus
protocol, a modified Token bus was proposed in Manufacturing
Automation Systems and flexible manufacturing system (FMS).
 A means for carrying Internet Protocol over token bus was developed.
 The IEEE 802.4 Working Group is disbanded and the standard has been
withdrawn by the IEEE.
Token Ring Network(IEEE 802.5)
• The Token Ring network was originally developed by IBM in the 1970s. It
is still in IBM's primary local-area network (LAN) technology. The related
IEEE 802.5 specification is almost identical to and completely compatible
with IBM's Token Ring network.
• Token Ring and IEEE 802.5 networks are basically compatible, although
the specifications differ in minor ways. IBM's Token Ring network specifies
a star, with all end stations attached to a device called a multi station
access unit (MSAU). In contrast, IEEE 802.5 does not specify a topology,
although virtually all IEEE 802.5 implementations are based on a star.
• Token Ring and IEEE 802.5 are two principal examples of token-passing
networks (FDDI is the other).
• Token-passing networks move a small frame, called a token, around the
network. Possession of the token grants the right to transmit.
• If a node receiving the token has no information to send, it passes the
token to the next end station. Each station can hold the token for a
maximum period of time
• If a station possessing the token does have information to transmit, it
seizes the token, alters 1 bit of the token (which turns the token into a
start-of-frame sequence), appends the information that it wants to
transmit, and sends this information to the next station on the ring.
• Therefore, collisions cannot occur in Token Ring networks. If early token
release is supported, a new token can be released when frame
transmission is complete.
SAS: Single Attachment Station
DAS: Dual Attachment Station

Das könnte Ihnen auch gefallen