Top Banner
Unit-III (Contd.) The Medium Access Control Sub layer
79

Medium Access Control(MAC)

Nov 18, 2015

Download

Documents

Saurabh Sharma

mac sublayer,networking
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
*
Deals with broadcast networks and their protocols.
The key issue is how to determine who gets to use the channel when there is competition for it.
Also called multiaccess channels or random access channels.
The protocols determine who goes next on a multiaccess channel.
Bottom part of the data link layer.
*
competing users?
continuously varying, or the traffic is bursty,
FDM presents some problems.
A simple queuing theory calculation
For a channel of capacity C bps, with an arrival rate of l frames/sec, each frame having a length drawn from an exponential probablity density function with mean 1/m bits/frame, the mean time delay
*
Dynamic Channel Allocation
Five key assumptions:
1. Station Model. The model consists of N independent stations, each with a program or user that generates frames for transmission.
The probability of a frame being generated in an interval of length Dt is lDt, where l is a constant (the arrival rate of new frames).
*
Five key assumptions:
2. Single Channel Assumption. A single channel is available for all communication. All stations can transmit on it and all can receive from it.
*
Five key assumptions:
*
Five key assumptions:
*
Five key assumptions:
5a. Carrier Sense. Stations can tell if the channel is in use before trying to use it. If the channel is sensed as busy, no station will attempt to use it until it goes idle.
*
Collision-Free Protocols
Computer
Center
channel at random times
*
Transmit frames of fixed length.
When two transmissions overlap, they garble each other (collision)
Feedback property is there.
If the frame gets destroyed, the sender waits a random amount of time and sends it again.
Continues till successful transmission.
(new and old combined)
*
*
New frames generated by the stations are well modeled by a Poisson distribution with mean number of N frames per time.
If N>1 ( i.e. the users community is generating frames at a higher rate than the channel can use.)
For reasonable throughput
time
pure ALOHA
slot
*
ALOHA
The probability that k frames are generated during a given frame time is given by the Poisson distribution:
So the probability of zero frames in a slot is just e-G.
In an interval two time slots long, the mean number of frames generated is 2G. Therefore, the distribution is:
The probability of zero frames is e-2G.
*
The best channel utilization:
*
Carrier Sense Multiple Access Protocols
*
1-persistent CSMA: the station transmits with a probability of 1
whenever it finds the channel idle, if the channel is busy, it waits
until it becomes idle
Non-persistent CSMA: the station transmits if the channel is idle,
*
*
*
CSMA with collision detection (CSMA/CD)
Abort a transmission as soon as they detect a collision. Quickly terminating damaged frames saves time and bandwidth.
*
*
twice the maximum end-to-end propagation delay.
*
Contd.
So, contention interval width is 2t (t is the end to end delay). On a 1-km long coaxial cable, t5msec.
Collision detection is an analog process. The station’s hardware must listen to the cable while it is transmitting.
The signal encoding must allow collisions to be detected (e.g., a collision of two 0-volt signals may well be impossible to detect).
Collisions do not occur with CSMA/CD once a station has unambiguously seized the channel, But still occur during the contention period.
*
A Bit-Map protocol
Protocols, in which the desire to transmit is broadcast before the actual transmission are called reservation protocols.
*
Assuming contention slot: 1 slot, data slot: d slots
Low-numbered stations must wait on the average 1.5N slots and high-numbered stations must wait on the average 0.5N slots before starting to transmit, the mean for all stations is N slots.
Channel efficiency at low load: d/(N+d)
Channel efficiency at high load: Nd/(N+Nd)=d/(d+1)
*
The channel efficiency of this method is d/(d+log2N).
If the frame format is chosen such that the sender’s address is the first field in the frame, the efficiency is 100%.
Variations (by Mok and Ward): Use virtual station numbers. The successful station being circularly permuted after each transmission.
Stations C H D A G B E F
*
Two important performance measures for channel acquisition strategies: delay at low load and channel efficiency at high load
Contention protocol
Contention-free protocol
Limited-Contention Protocols
Better to combine the best properties of the contention and collision-free protocols, arriving at a new protocol that uses contention at low loads to provide low delay, but uses a collision-free technique at high load to provide good channel efficiency.
Such protocols are called limited contention protocols.
*
Limited contention protocols decrease the amount of competition by dividing the stations up into (not necessarily disjoint) groups. Only the members of group 0 are permitted to compete for slot 0. If one of then succeeds, it acquires the channel and transmits its frame.
If the slot lies fallow or if there is a collision, the members of group 1 contend for slot 1, etc.
By making an appropriate division of stations into groups, the amount of contention for each slot can be reduced.
Limited-Contention Protocols
Slot 0
*
When the load on the system is heavy,
Not worth the effort to dedicate slot 0 to node 1, because that makes sense only in the unlikely event that precisely one station has a frame to send.
*
Assume that each station has a good estimate of the number of ready stations, q, for example, from monitoring recent traffic.
Assume the root (node 1) is at level 0. Each node at level i has a fraction 2-i of the stations below it.
If the q ready stations are uniformly distributed, the expected number of them below a specific node at level i is just 2-iq.
The optimal level to begin searching the tree as the one at which the mean number of contending stations per slot is 1, that is, the level at which 2-iq=1.
So, i=log2q.
*
*
*
*
Uses 1-persistent CSMA/CD
Three kinds of Ethernet cabling.
10Base5- 50mtr., T Cable contains 5 twisted pairs (2 –data In/Out, 2- control In/Out, 1- Power supply), Controller (Frames to & from Transceiver)
10Base2- T Junction Connector,
10Base-T- No shared Cable
*
To allow larger networks, multiple cables can be connected by repeaters.
*
*
No significance outside
Preamble: Contains 10101010 to synchronize the clocks.
Start Byte: 10101011
Length: How many bytes 0 to 1500, 0 bytes is legal but may cause problem in Collision Detection., (64 bytes min Frame Size).
Pad: to make Frame size at least 64 bytes.
Checksum: CRC
*
How Randomization is done when a Collision Occurs?
If a frame has collided n successive times, where n<16, then the
node chooses a random number K with equal probability from the
set {0,1,2,3,...,2m-1} where m=min{10,n}. The node then waits
for bit times. (slot time=512 bit time)
after first collision
after second collision
*
*
Switching
Circuit Switching: When a call passes through a switching office, a physical connection is established between the line on which the call came in and one of the output lines.
Message switching: No physical path is established in advance. Block of data is transmitted using store-and-forward technique.
*
Circuit switching takes place at the physical layer.
Before starting communication, the stations must make a reservation for the resources to be used during the communication.
These resources, such as channels (bandwidth in FDM and time slots in TDM), switch buffers, switch processing time, and switch input/output ports, must remain dedicated during the entire duration of data transfer until the teardown phase.
Data transferred between the two stations are not packetized. The data are a continuous flow sent by the source station and received by the destination station.
*
*
*
*
*
*
*
Virtual Circuits
As in a circuit-switched network, there are setup and teardown phases in addition to the data transfer phase.
Resources can be allocated during the setup phase, as in a circuit-switched network, or on demand, as in a datagram network.
As in a datagram network, data are packetized and each packet carries an address in the header. The address in the header has local jurisdiction (it defines what should be the next switch and the channel on which the packet is being carried), not end-to-end jurisdiction.
All packets follow the same path established during the connection.
*
*
*
*
*
In virtual-circuit switching, all packets belonging to the same source and
destination travel the same path;
but the packets may arrive at the destination with different delays
if resource allocation is on demand.
*
*
5.1.2 Internal Organization of the Network Layer
*
The Local Loop: Modems and ADSL
*
(a) Fully-interconnected network.
(b) Centralized switch.
(c) Two-level hierarchy.
A typical circuit route for a medium-distance call.
*
Local loops
Trunks
Switching offices
*
The Local Loop: Modems and ADSL
*
Contd.
The two-wire local loop coming from a telephone company end office into houses and small businesses.
uses analog signaling. (due to high cost of converting to digital).
When a computer wishes to send digital data over an analog dial-up line, the data must first be converted to analog form for transmission over the local loop. (done by a modem)
At the telephone company end office the data are converted to digital form for transmission over the long trunks. (by codec)
Analog signaling consists of varying a voltage with time to represent an information stream.
*
Digital subscriber line (DSL)
With the advent of the Internet came the need for high-speed downloading and uploading; the modem was too slow. The telephone companies added a new technology, the digital subscriber line (DSL).
Although dial-up modems still exist all over the world, DSL provides much faster access to the Internet through the telephone network.
Asymmetric DSL(ADSL) uses the existing local loops.
*
T1 Carrier
The method used in North America and Japan is the T1 carrier.
The T1 carrier consists of 24 voice channels multiplexed together.
The analog signals are sampled on a round-robin basis with the resulting analog stream being fed to the codec rather than having 24 separate codecs and then merging the digital output.
*
Numerical
What is the percent overhead on a T1 carrier; that is , what percent of the 1.544Mbps are not delivered to the end user?
l
m