Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 31

MEDIA ACCESS PROTOCOL

Media Access Control in Local Area Network

•Media access control (MAC)is a sub layer of the data link layer (DLL) in
the seven layer OSI network reference model. MAC is responsible for
the transmission of data packets to and from the network interface card,
and to and from another remotely shared channel

•The basic function of MAC is to provide an addressing mechanism and


channel access so that each node available on a network can
communicate with other nodes available on the same or other
networks.
MEDIA ACCESS CONTROL METHODS:

1. Centrally controlled access: Access to the media is controlled by a


central controller , Polling , Demand assigned frequency division or
time division multiple access are such methods , has limitation of
single point failure

2. Distributed access control: A discipline is built up among the stations


of the LAN so that fair opportunity is given to each station to
transmits its data frames, there is no single point of network failure.
available in both bus and ring topologies

Two distributed access control methods


• Token passing, IEEE 802.4
• Carrier sense multiple access/collision detection (CSMA/CD)
,IEEE802.3
TOKEN PASSING IN THE BUS TOPOLOGY

•Station are connected on a bus arranged in a logical ring. i.e. the


addresses of the stations are assigned a logical sequence

•Each station knows the identity of the stations preceding and following
it . There is no relation between the physical location of a station on the
bus and its sequence
Media Access Control:
•Access to the interconnecting bus is regulated by a control frame
known as the TOKEN
•At a time only one station holds the token and has the right to transmit
it s one or more data frames on the bus.
•Each frame carries source and destination addresses
•All station are ready to receive frames at any time except when holding
a token
•The token must be released before time out.
•The token is released with the address of the next station in the logical
sequence and the next station takes it over
•In one cycle each station gets an opportunity to transmit
•It is possible to give more than one opportunity to a station in one cycle
by assigning more than one address to it
•To maintain continuity of communication, it is necessary for each
station to take over the token when its turn comes, even if it does not
have any data to transmit. It can release the token immediately for the
next station
Frame Structure

Preamble: The preamble is an at least one octet-long pattern to


establish bit synchronization
Start Delimiter(SD): It is one octet-long unique bit pattern which makes
the start of the frame
Frame Control (FC): Indicates the type of frame –data frame or control
frame. The token is one control frames
Destination Address (DA):It is 2 or 6 octets long
Source Address(SA): It is 2 or 6 octets long
Frame check sequence (FCS) : It is 4 octets long and contains CRC code.
It checks on DA,SA,FC and data fields
End Delimiter (ED): It is unique bit pattern which makes the end of the
frame, it is one octet long
The total length of the frame from FC to FCS fields is a maximum of 8191
octets
Token Management

•Control frames are used for initialization of the bus and for
adding/removing a station

• types of control frames

Name Function
Claim token frame Claim token during ring initialization
Solicit Successor frame Allow station to enter the ring
Set Successor Frame Allow station to leave the ring
Who Follows Frame Recover from the lost token
Physical Specification :
•Two types of transmission system used are operating at data rates of
1,5 or 10 Mbps
• Carrierband (single channel)
•Broadband (multiple channel)

Carrierband Broadband
Single channel Multiple channel
Bidirectional Unidirectional
Transmission transmission
FSK Modulation Phase and amplitude
modulation
Contention Access
•There is no schedule time or sequence for station to transmit on the
medium
•They compete for the use of the medium which leads to collision of the
data frames due to simultaneous transmission.
• To avoid this Carrier Sense Multiple Access/Collision Detection
(CSMA/CD) is used in local area network

Pure ALOHA
• A station can transmit whenever it wants. There is no pre-assigned
time or sequence
•If a station starts to transmit when another transmission is already in
progress, collision will occur but there will be some instances when
transmission will reach the destination without any collision
•A mechanism to detect collision is established(e.g. ACK). Collision is
assumed to have occurred and the message is retransmitted if the
acknowledgement is not received within a specified time
•Efficiency of pure ALOHA is 0.18 since large time is wasted in collision
Slotted ALOHA:
•The channel is divided into time slot's
•The stations are allowed to transmit at specific instants of time
•The efficiency is 0.37

CARRIER SENSE MULTIPLE ACCESS(CSMA)


•In this mechanism a station defer its transmission on sensing a carrier
on the medium before starting it own transmission
•Contention for the channel can takes place only during the first few bits
of the frame When the first bits is still in transit
•Once the first bit is heard by every station, there cannot be a collision
•Schemes used in which the waiting frames can be transmitted by the
station are as follows
Non-Persistent CSMA
•In this scheme, when a station having a frame to send find that the
channel is busy, it backs off for a fixed interval of time
•It then checks the channel again and if the channel is free, it transmits.
•The back-off delay is determine by the transmission time of a frame,
propagation time and other system parameters

1-Persistent CSMA
•In this scheme, station wishing to transmit monitor the channel
continuously until the channel is idle and then transmit immediately .
•The problem with scheme, is that if two station are waiting to transmit,
then they will always collide and require retransmission

p-Persistent CSMA
•In this scheme, not all the waiting station are allowed to transmit
immediately after the channel is idle
•A waiting station transmits with probability “p” if the channel is idle
CSMA/CD (Ethernet)
•In this, if the station receives other transmission while it is transmitting
,a collision can be detected as soon, as it occurs and transmission of the
wasted frame can be abandoned
•When a collision is detected, the transmitting station release a jam
signal to alert the other stations of the collision
• Meanwhile the other stations do not attempt to transmit again
immediately after a collision has occurred
•The stations are given a random back off delay for retry. If collision
repeats back off delay is progressively increased
Frame Format

Preamble: Seven octets long pattern to establish bit synchronization


Start Frame Delimiter(SFD): One octet –long unique bit pattern which
marks the start of the frame
Destination Address(DA): 2 or 6 octet long
Source Address(SA): 2 or 5 octet long
Length (L): two octets long and indicates the number of octets in the
data field
Data field: It can have 46 to 1500 octets if the address field option is 6
octets. If data octets are less than 46, the PAD field makes up the
difference and ensures minimum size of the frame
TOKEN PASSING ON A RING
•Consists of a number of point to
point links interconnecting
adjacent stations
•Each station is connected to the
ring through a Ring interface
unit (RIU)
•Each RIU regenerates the data
frames it receives and sends
them onto the next link
•RIU makes available the
incoming frame to the local
station if it is addressed to it
•When a station transmits , it
breaks the ring and inserts its
own frame with destination and source addresses
•When the frame eventually returns to the originating station after
completing the round, the station removes the frame and closes the ring
Media Access Control
FRAME FORMAT:

Start Delimiter(SD): one octet long unique bit pattern, marks the start
of the data or token frame
Access Control(AC):one octet long field containing priority bits (P), token
bit(T), monitoring bit (M) and reservation bits (R)
Frame Control: one octet long field and indicates the type of frame,
data frame or control frame
Destination Address (DA): 2 OR 6 octets long
Source Address(SA): 2 OR 6 octets long
Data Field: Zero or more octets, no maximum size but the frame
transmission time is limited by token holding timer
Frame Check Sequence(FCS): 4 octets long and contains the CRC code. It
checks on DA,SA,FC and data fields
End Delimiter(ED): 1 octet long and contains unique bit pattern marking
the end of the token or data frame
Frame Status: 1 octet long and contains two address recognized bits (A),
frame copied bits (C) and reserved bits (X)
Binary Synchronous
Communication Data link
Protocol (BISYNC)
Binary Synchronous Communication Data link Protocol (BISYNC)

•Byte –oriented protocol


•Supports ASCII,EBCDIC and Transcode
•Synchronous two way alternate communication
•Point to point and point to multipoint communication

Types of Stations
•Two types of station
•Point to point communication
•Point to multi point communication
•Master slave relationship between two communicating stations
•Station which sends the megs is designated as master
•Station which receives the megs and send acknowledgment is
designated as slave
Point to Point Communication
•Communication between two hosts
•Two stations contend for master status whenever they want to
transmit message
•One station is designated as control station which delegates master
or slave status to other depending on which station is to transmit
messages

Point to multipoint Communication


•One host and several tributary station
•Host decides who will send or receive message
•All the message are sent by or to the host
Polling and Selecting(Point to multipoint Communication)

•Host invites a station to transmit data by polling


•Polled station becomes the master station and control further
communication, it returns the control to the host after satisfactory
completion of transmission
•If the host wants to transmit data to station, it alerts the station to
receive message. The process is called is selecting
•The selected station takes over the status of slave station for this
communication
Transmission Frame
•BISYNC Frames are called blocks
•Two categories
•Supervisory frame: used for sending control information, not
protected against contents errors
•Data frame: contain user data and contain error detection bytes
Frame Identifier: two character long, consists of synchronizing
characters SYN SYN (synchronous idle),present in all types of frames
Address Field : its optional, can be from 1 to 7 bytes long, present in
supervisory frames sent for polling and selecting in point to multipoint
configuration ,it is the address of the tributary station, poll frame-
address is in upper case , select frame-address is in lower case
Control Field: contains control bytes for link management, error and
flow control
Heading Field: Contains information for higher layer function such as
message identification, routing, device control and priority. It is optional
and its presence is indicated by the field identifier SOH(start of heading)
Text field: contain user data bytes, variable size and is optional,
STX(Start of text) field identifier indicates its presence, ETX(End of text)
or ETB(End of transmission Block ) marks end of field
Block check characters(BCC):Field present in the data frames, used for
content error detection.
Control Characters: used for link management , acknowledgement and
framing
SYN(Synchronous Idle): two SYN characters are used as frame identifier
SOH(start of heading):identifier for the heading field
STX (Start of Text): identifier for the text field
ETB(End of transmission Block):delimiter for text field
ETX(End of text):delimiter for the text field in last frame of message
ENQ(Enquiry):used for link establishment to activate the other end
EOT(End of transmission): signifies the end of a transmission
ACK0/ACK1(Positive Acknowledgement):used to acknowledge even and
odd frames
NAK: Request for retransmission of the frame
DLE(data line Escape): used to change the meaning of the following
contiguous characters
WACK: Request for temporary suspension of transmission
ERROR AND FLOW CONTROL:
• Uses stop and wait mechanism of flow control
•WACK is used to indicate inability of receiving end to accept more
data frames
•For error control alternating (ACK0 AND ACK1) Acknowledgement is
used
•Timers are provided for error recovery
TRANSPARENCY:
•Is achieved by inserting the DLE control character before the text
field identifier STX
•The DLE-STX sequence effectively instructs the receiving end to
treat all characters in the text field as data bytes even if they control
characters
•Transparent mode of the text field is terminated by DLE ETX (or DLE
ETB)as shown in fig
•If a byte representing DLE itself appears in the text field, the sending
end stuffs another DLE into the bit stream to indicate to the receiving
end that this is not control characters DLE which appears before ETX (or
ETB) in the transparent mode of the text field
•When the receiver detects two consecutive DLEs it discards one and
considers the other as part of the text field
HDLC FRAMING
FRAMING
•Two types
•Information transfer frame
•Supervisory frame
• The frame format is fixed. Except the information field all other fields
have fixed sizes
•Two frame identifier/delimiters are used, one at the start of the frame
and other at the end
•The frame is transmitted from left to right and the low -order bit is
transmitted first
Flag: unique 8 bit word pattern. Which identifies the start and end of
each frame. Used for filling the idle time between consecutive frames

Control field: consists of 8 bits, can be extended to 16 bits


Carries sequence number of the frame, acknowledgements, request for
retransmission and other control commands and responses
Information field: has variable size and can consist of any number of
bits, maximum number of the bits in the information field is not
specified, contains the user data, is completely transparent
Frame Check sequence(FCS): Is 16 bit CRC code for detection of error in
the address, control and information fields
Address
•Contains address of secondary station

Transparency
•Achieved by ensuring that the unique flag sequence (01111110)does
not occur in the address, control, information and FCS field
•A technique called ‘zero stuffing’ is used
•At sending end an extra ‘0’bit is inserted after five contiguous “1”s
occurring anywhere after the opening flag and before the closing flag
•At the receiving end, the extra ‘0’ bit following five contiguous ‘1’s is
deleted
• zero stuffing is performed before the flags are appended to the rest of
the frame
•Therefore any sequence of bits (including the flag sequence) can be
transmitted in the address, control, information and FCS fields without
affecting the data link control operation

You might also like