mac sub-layer and lan

Post on 17-Jul-2016

232 Views

Category:

Documents

6 Downloads

Preview:

Click to see full reader

DESCRIPTION

MAC discussion

TRANSCRIPT

Medium Access Control (MAC) Sub-Layer and LAN

Medium Access Control

role of MAC is to resolve the contention for the shared media between adjacent nodes.

lower sub layer of Data link layer contains the synchronization, flag flow physical address of

next station and error control specifications necessary to move information from one place to another.

functions of MAC sub layer are the media access control, error detection and station addressing.

the physical transmission medium of a LAN is shared by the stations connected on the LAN.

media access control procedures are implemented to ensure that every station gets a fair chance to transmit and collision do not take place.

there are several methods of media access control in LAN’s. Each method is applicable to specific LAN topology.

the MAC layer also handles the frame delimiting, address recognition and error checking functions.

Media Sharing

Static allocation Dynamic medium access control

Scheduling Random Access

Sharing a transmission medium

Multiple Access Communication

When a number of user stations share a single transmission medium.The transmission medium is broadcast in nature, so all other attached

stations to the medium can receive the transmission from any given station.The Channel Allocation Problem

• There are two schemes to allocate a single channel among competing users:

1) Static Channel Allocation.2) Dynamic Channel Allocation

Static Channel Allocation:

a Frequency Division Multiplexing (FDM) is used for allocating a single channel among competing users.

a set of channels is permanently allocated to each cell in the network

Due to short term fluctuations in the traffic, FCA schemes are often not able to maintain high quality of service and capacity attainable with static traffic demands. One approach to address this problem is to borrow free channels from neighboring cells.

Dynamic Channel Allocation: all channels are kept in a central pool and are assigned

dynamically to new calls as they arrive in the system. After each call is completed, the channel is returned to the

central pool. It is fairly straightforward to select the most appropriate channel for any call based simply on current allocation and current traffic, with the aim of minimizing the interference.

DCA scheme can overcome the problem of FCA scheme. However, variations in DCA schemes center around the different cost functions used for selecting one of the candidate channels for assignment.

Multiple Access Protocols:

ALOHA is a system proposed for solving the channel allocation problem.- there are two versions of ALOHA:

1) Pure ALOHA; 2) Slotted ALOHA

The basic difference with respect to timing is: Pure ALOHA does not require global time synchronization; Slotted ALOHA does

Pure ALOHA

In pure ALOHA, frames are transmitted at completely arbitrary times.

Pure ALOHA

The system is working as follows:

1- let users transmit whenever they have data to be sent.2- expected collisions will occur.3- the collided frames will be destroyed.4- using a feedback mechanism to know about the status of frame.5- retransmit the destroyed frame.

Pure ALOHA (2)

Vulnerable period for the shaded frame.

Pure ALOHA

The main disadvantage of Pure ALOHA is a low channel utilization.

This is expected due to the feature that all users transmit whenever they want.

Pure ALOHA (3)

Throughput versus offered traffic for ALOHA systems.

Slotted ALOHA

In this method the proposal was to divide the time into discrete intervals each interval corresponding to one frame.

In Slotted ALOHA, a computer can not send anytime, instead it is required to wait for the beginning of the time slot.

The big advantage of Slotted ALOHA is the increase in channel utilization.

Slotted ALOHA

There is a limit for the best channel utilization using Slotted ALOHA. To reduce the chance of collisions the station should be able to

detect what other stations are doing. In LAN networks this is possible, therefore they can achieve better

utilization than Slotted ALOHA. Carrier Sense Protocols are protocols in which stations listen for a

carrier.

Carrier Sense Multiple Access (CSMA) Protocols

There are several versions of carrier sense protocols:

- 1-persistent CSMA

- Non-persistent CSMA

- P-persistent CSMA

- CSMA with Collision Detection (CSMA/CD)

Carrier Sense Multiple Access (CSMA) Protocols

- In 1-persistent CSMA, a station prior to send data it listen to the channel to see if anyone else is transmitting at that moment.

- if the channel is busy, the station waits until it becomes idle.- If the channel is idle, the station transmits a frame.- If a collision occurs, the station waits a random amount of

time and starts all over again.

Carrier Sense Multiple Access (CSMA) Protocols

- Although this protocol has disadvantages, it is better than ALOHA and Slotted ALOHA

-- 1) It’s performance depends on the propagation delay.-- 2) There is a chance when two stations start transmission at the same time.

Carrier Sense Multiple Access (CSMA) Protocols

- In Non-persistent CSMA a station makes conscious attempt to sense the channel.

- After the first attempt, if the channel is idle, it sends, however, if the channel is already in use, it waits a random period of time and repeats the algorithm.

- (+ -)This algorithm has better utilization but longer delays than 1-persistent CSMA.

Carrier Sense Multiple Access (CSMA) Protocols

- In p-persistent CSMA a station transmits if the channel is idle with a probability p and with probability q=1-p it waits until the next slot.

- The main advantage of persistent and non-persistent over ALOHA is that they ensure no station begins to transmit when it senses the channel busy.

CSMA with Collision Detection

- It is important that stations should terminate transmission as soon as they detect a collision.

- This protocol is called CSMA/CD.

- It is widely used on LANs in the MAC sublayer.

- It is the basis of the popular Ethernet LAN.

CSMA with Collision Detection

CSMA/CD can be in one of three states: contention, transmission, or idle.

CSMA with Collision Detection

- A collision can be detected by looking at the power or pulse width of the received signal and comparing it to the transmitted signal.

- After a station detects a collision it terminates its transmission, waits a random period of time, and then tries again, assuming that no other station has started transmitting in the meantime.

CSMA with Collision Detection

- Collision detection is an analog process. Therefore, special encoding is commonly used.

- A sending station must continually monitor the channel, listening for noise bursts that might indicate a collision. For this reason, CSMA/CD with a single channel is inherently a half-duplex system.

top related