Anda di halaman 1dari 52

LOCAL AREA NETWORK

(LAN) part 2
MEDIA ACCESS CONTROL (MAC)
INTRODUCTION:
MEDIA ACCESS CONTROL (MAC)
TYPES OF MAC:

CARRIER SENSE MULTIPLE ACCESS


/ COLLISION AVOIDANCE (CSMA/CA)
CARRIER SENSE MULTIPLE ACCESS
/ COLLISION DETECTION (CSMA/CD)
TOKEN PASSING

MEDIA ACCESS CONTROL (MAC)


1) Provides a unique identification and access control for
computers using Internet Protocol (IP) network.
The main task of MAC protocol is to minimize collisions in
order to utilize the bandwidth by determining when a
station can use the link (medium).
2) MAC sub layer provides addressing and channel access control
The hardware that implements MAC is referred to as a
medium access controller. The MAC sub layer acts as an
interface between the logical link control (LLC) sub layer
and the network's physical layer.
3) In LAN or other network, the MAC address is your computer's
unique hardware number.
When you are connected to Internet from your computer
(or host), a correspondence table relates your IP address to
your computer's physical (MAC) address of LAN.

IMPORTANCE OF MAC
Local Area Networks differ, depending on which MAC technique
is used, which describes how devices share access to the LAN.
MAC technique is necessary, because every LAN uses
broadcasting, which means that independent devices can start
sending data at the same time.
Networking tasks becomes critical especially main
responsibility of LAN that allows users from different types of
data processing equipments to enter the network without
having problem of compatibility.
The protocol access can be done only if all equipments follow
the same set of protocol which control communications
between each other on bus network.

TYPES OF MAC
CARRIER SENSE MULTIPLE ACCESS/
COLLISION AVOIDANCE (CSMA/CA)
CARRIER SENSE MULTIPLE ACCESS/
COLLISION DETECTION (CSMA/CD)
TOKEN PASSING

CSMA/CA
CSMA/CA

Stands for Carrier Sense


Multiple Access with Collision Avoidance.
Each device listens to media for transmissions.
When media is clear, device sends an intent to
transmit signal. As this signal is small, chances of
collision are minimized.

Used often in wireless networking.

CSMA/CA

cont

The following is configuration of CSMA/CA:

CSMA/CA

cont

CSMA/CA PROCESS
In this process, station will counts start of sending time for a
data to minimize the probability of two stations receives (or use)
network at one time.
Every station must hear (check) the carrier (at channel) before
executing a transmission.
If the channel is not used, thus station can send data. If the
channel is used, then station will wait until the channel is free.

CSMA/CA

cont

CSMA/CA CHARACTERISTICS
1) Instead of detecting data collisions, CSMA/CA method attempts
to avoid them altogether.
2) On a network that uses the CSMA/CA access method, when a
computer has data to transmit, its Network Interface Card (NIC)
first checks cable to determine if there is already data on wire.
3) So far, the process is identical to CSMA/CD. However, if the NIC
senses that cable is not in use, it still does not send its data
packet.
4) Instead, it send a signal of intent indicating that it is about to
transmit data out of the cable.

CSMA/CA

cont

Used to prevent collisions at the moment


they are most likely to occur, for example
when the bus is released.

All clients are forced to wait for a random


number of timeslots and then sense the medium
again, before starting a transmission.
If the medium is sensed to be busy, then the client
freezes its timer until it becomes free again.
Thus, the chance of two clients starting to send
simultaneously is reduced.

CSMA/CA
ADVANTAGES
Cheaper than CSMA/CD
Effective in avoiding data
collisions and can be
operated in high data rate
A reliable data transmission
service because intent
signals are sent until cable is
clear.

cont
DISADVANTAGES
Inappropriate for large or
active networks.
Distance limitations since it
must listen for signals of
intent.
Slow in speed because intent
signal
must
be
sent
everytime a computer wants
to transmit data.

CSMA/CD
Stands for Carrier Sense Multiple Access with
Collision Detection.
Each device listens to media for transmissions. When
media is clear, initiates transmission and listens for
collision.
If collision occurs, device waits for random amount of
time before attempting transmission again.
Commonly used on physical networks.

CSMA/CD

CSMA/CD

cont

The following is configuration of CSMA/CD:

CSMA/CD

cont

Used to allow device attached to medium to


transmit on medium (multiple access), if it
senses that medium is free (carrier sense).
This means that collisions may occur if two
computers send data at exactly the same time,
however NICs of a sending computers will detects
that a collision has occurred so they can resend
their data.
In CSMA/CD, station detects line to make sure the line is not
used in sending data. Station also detects line to ensure no
collision after the data is send.

CSMA/CD

cont

CSMA/CD PROCESS
At first level where station A acts as a Sender station:Station A will detects line before transmission to determines the
line is not used by other station at that time.
If another station use the line for transmission, then station A has
to wait for a while and detects the line again.
When another station has finished using the line, then station A
can send its message.

CSMA/CD

cont

CSMA/CD PROCESS
At second level is where message is heading to destination:Station A will detects message and make sure there is no
collision. Collision occurs when 2 stations send data at similar
time.
This situation happens because both stations detect line is not
used and both stations send message.
When collision happens, both stations have to send message
again after waiting for a while. Waiting time for both stations
are different to avoid another collision from occurs.

CSMA/CD

cont

ADVANTAGES

DISADVANTAGES

Relatively fast because


computer does not have to
wait its turn to transmit
data.

Inappropriate for large or


active networks because
collisions slower down the
network.

A reliable data transmission


service because collisions
are detected and packets
are resent, so no data lost.

Distance limitations because


the
collision
detection
mechanism will restricts the
length of cable segment that
can be used.

TOKEN PASSING
The following is configuration of Token Passing:
TOKEN
PASSING

TOKEN PASSING cont


Method of controlling access to multiple
equipments to media which used a bit
pattern known as token.
Token is send around the network and a station
or equipment can only send data after it owns
the token.
Token passing is usually used for ring topology. By
this method, data collision can be eliminated in the
network.
Thus, the chance of two clients starting to send
simultaneously is reduced.

TOKEN PASSING cont


TOKEN PASSING PROCESS
With token passing, a specific packet of data, called a token, is circulated
around the ring from station to station, always in the same direction.
Before a station is allowed to transmit, it must first posses the token, then
fills it with address of destination station and data and marks the token as
being used.
Each station, in turn, acquires the token and examines the data frame to
determine if it is carrying a packet addressed to it.
When the destination station reads the message, it sends the message
back to the sender station with an acknowledgement to say that it has
received the data.
The sender station unmarks the token and passes the token along to the
next station in the topology. In this process, when a station receives the
token and has no data to send, it just passes the data to the next station.

TOKEN PASSING cont


TOKEN PASSING CHARACTERISTICS
When the data sent received back by computer A (after full
round), then it will marks the token as unused and send it to
the next station.
In this process, the token must always moves. For example, if
computer C receives the token but the system is down before it
can send the data; then the token will lost.
To overcome this problem, more than one control station must
be placed in the network to sense the token transmission.

If the token does not arrive in time or during maximum duration,


thus control station must generate a new token.

TOKEN PASSING cont


ADVANTAGES

DISADVANTAGES

Ensure about token arrivals,


where maximum (round
trip time).

Not suitable for network


where few stations generate
traffic burst while other
station idle all the time.

If each station has message


to send every time it owns
the token, the real round
trip time is less than the
maximum
value
(very
small).

Damages at any station in


the
network
disturbs
transmission and reception
of token.

CSMA/CD

CSMA/CA

Carrier Sense Multiple Access/ Carrier Sense Multiple Access/


Collision Detection.
Collision Avoiding
Suitable in BUS and STAR
Topology

Suitable in BUS and STAR


Topology

Have THREE steps:


Have TWO steps only:
1) Each station freely to send 1) Each station will ensure
the data.
the line is free from any
2) While sending the data,
transmitting process
each station will examine
before sending the data.
and detect any collision of 2) IF the line is surely FREE
data between the other
then only one station can
data sending.
do the sending process.
3) IF the collision occurred,
While another station have
each station will terminate
to wait after previous
their data sending for a
transmitting process is
while and send back the
done.
previous data.
***Each station will be given a
different time waiting to
avoid the same collision.

TOKEN PASSING

Suitable in RING Topology

Each station have to use a


TOKEN to send the data.
Only ONE token used in ONE
network .
IF no data to be sent, an
EMPTY token will round the
ring.
IF stations need to send data,
WAIT for the token, GRAB the
token, SENT the data and
RELEASE an empty token.

LAN Standards
Standards are required so that different manufacturers can create equipment
that will interoperate without special configuration.
Standards will allow different computers to communicate.
Standards will increase the market for products adhering (mematuhi) to the
standard, resulting in mass production and cheaper prices .
Standards groups include:
ISO. International Organization for Standardization establishes standards for
networking operation.
ANSI. American National Standards Institute is the US representative to ISO.
EIA/TIA. Electronics Industries Alliance/Telecommunications Industry Association
is an industry based standards group.
IEEE. Institute of Electrical and Electronics Engineers is an international
professional organization that sets communications standards. IEEE Project 802
sets standards for cabling and data transmission on local area networks.

OSI Model

OSI Reference Model: 7 Layers

Internet Layers (TCP/IP)

LAN standard : IEEE 802


IEEE 802 refers to a family of networking standard, developed by the
Institute of Electrical and Electronic Engineers (IEEE).
IEEE 802 is a Standard for Local Area Network (LAN) and Metropolitan
Area Networks (MAN).
IEEE 802 is subdivided into 22 parts ( 802.1 - 802.22) that cover or map
to the two layers of ISO/OSI model:
Data link layer
Logical link control (LLC) sublayer
Media Access Control (MAC) sublayer
Physical layer
In general, IEEE 802 standard define physical network interfaces such
as network interface cards, bridges, routers, connectors, cables, and
all signaling and access methods associated with physical network
connections.
The most widely used standards : The Ethernet family (802.3), Token
Ring (802.5), Wireless LAN (802.11), Wireless PAN (802.15) , WIRELESS
MAN (802.16)

OSI Model

TCP/IP Model

Application

Presentation

Application

Session
Transport

Host-to-Host

Network

Internet

Data Link
Network Access
Physical

IEEE 802

OSI vs. TCP/IP Stack


Application
Presentation

FTP

Application

ASCII/Binary

Session
Transport
Network

TCP

Transport

IP

Network

Ethernet

Link

Link
Physical

The 7-layer OSI Model

The 4-layer Internet model

OSI Layers
OSI Model
Data unit

Host
layers

Media
layers

Data

Layer

Function

7. Application

Network process to application

6. Presentation

Data representation, encryption


and decryption

5. Session

Interhost communication

Segments 4. Transport

End-to-end connections and


reliability, Flow control

Packet

3. Network

Path determination and logical


addressing

Frame

2. Data Link

Physical addressing

Bit

1. Physical

Media, signal and binary


transmission

Going from layer 1 to 7: Please Do Not Throw Sausage Pizza Away


Going from layer 7 to 1: All People Seem To Need Data Processing

TCP/IP Layers
OSI
Application Layer

Presentation Layer
Session Layer
Transport Layer
Network Layer
Data Link Layer

Physical Layer

TCP/IP
Application Layer
TELNET, FTP, SMTP, POP3, SNMP,
NNTP, DNS,NIS, NFS, HTTP, ...
Transport Layer
TCP , UDP , ...

Internet Layer
IP , ICMP, ARP, RARP, ...

Link Layer
FDDI, Ethernet, ISDN, X.25,...

Position of the data-link layer

Data link layer duties

OSI Protocols and IEEE 802

LLC and MAC


Data Link Layer is divided into two sublayers:
a. Logical Link Control (LLC)
b. Media Access Control (MAC)
Logical Link Control (LLC) :
This sublayer is responsible to manage and ensure the
integrity of data transmissions ; provides data transmission
method in different network.
LLC provide multiplexing mechanisms that make it possible for
several network protocol to be transported over the same
network medium, and optionally provides flow control,
acknowledgment, and error notification.
The LLC provides addressing and control of the data link. It
specifies which mechanisms are to be used for addressing
stations over the transmission medium and for controlling the
data exchanged between the originator and recipient
machines.

LLC and MAC


Media Access Control (MAC):
MAC may refer to the sublayer that determines who is
allowed to access the media at any one time. Other times it
refers to a frame structure with MAC addresses inside.
The Media Access Control sublayer also determines where
one frame of data ends and the next one starts frame
synchronization.

Variation of LAN standard (IEEE 802)


802.1:

802.2:
802.3:
802.4:
802.5:
802.6:
802.7:
802.8:
802.9:
802.10:

Covering architecture, addressing,


internetworking and management.
Logical Link Control (LLC)
CSMA/CD
Token Bus LAN
Token Ring LAN
Metropolitan Area Network
Broadband Technical Advisory Group
Fiber-Optic Technical Advisory Group
Integrated Voice/Data Networks
Network Security

Variation of LAN standard (IEEE 802) cont


802.11:
802.12:
802.15:
802.16:
802.20:

Wireless Networks
Demand Priority Access LANs
Ex: 100BaseVG-AnyLAN
Wireless Personal Area Network
Wireless Mertopolitan Area Network
Mobile Broadband Wireless Access

MAC Frame Formats


The basic frame consists of seven elements split between three
main areas:

Header
Payload
Trailer

Header

Payload

Trailer

MAC frame formats

cont

Header
Preamble (PRE) - This is seven bytes long and it consists of a pattern
of alternating ones and zeros, and this informs the receiving
stations that a frame is starting as well as enabling synchronisation.
Start Of Frame delimiter (pemisah) (SOF) - This consists of one byte
and contains an alternating pattern of ones and zeros but ending in
two ones.
Destination Address (DA) - This field contains the address of station
for which the data is intended.
The left most bit indicates whether the destination is an individual
address or a group address.
An individual address is denoted by a zero, while a one indicates a
group address.
The next bit into the DA indicates whether the address is globally
administered, or local. If the address is globally administered the bit
is a zero, and a one of it is locally administered. There are then 46
remaining bits. These are used for the destination address itself.

MAC frame formats

cont

Header cont
Source Address (SA) - The source address consists of six
bytes, and it is used to identify the sending station.
As it is always an individual address the left most bit is
always a zero.
Length / Type - This field is two bytes in length. It
provides MAC information and indicates the number of
client data types that are contained in the data field of
the frame. It may also indicate the frame ID type if the
frame is assembled using an optional format.(IEEE 802.3
only).

MAC frame formats

cont

Payload
Data - This block contains the payload data and it may be up
to 1500 bytes long. If the length of the field is less than 46
bytes, then padding data is added to bring its length up to the
required minimum of 46 bytes.
Trailer
Frame Check Sequence (FCS) - This field is four bytes long. It
contains a 32 bit Cyclic Redundancy Check (CRC). A 32-bit CRC
provides error detection in the case where line errors (or
transmission collisions in Ethernet) result in corruption of the
MAC frame. Any frame with an invalid CRC is discarded by the
MAC receiver without further processing.

MAC frame field

Nine fields of MAC frame format


Field
Preamble
Start Frame
Delimiter (SFD)
Destination
Address
Source
Address
Length/Type

MAC Client
Data
PAD

Description
Contains 7 octet field that is used to allow the PLS circuitry to reach its
steady state synchronization with the received frames timing.
Sequence of 10101011. It immediately follows the preamble pattern and
indicates the start of a frame.
Specify the destination addressee(s) for which the frame is intended. It
may be an individual or multicast (including broadcast) address.
Identify the station from which the frame was initiated. The Source
Address field is not interpreted by the CSMA/CD MAC sublayer.
This two-octet field takes one of two meanings, depending on its numeric
value. For numerical evaluation, the first octet is the most significant octet
of this field.
Contains the original Length/Type field from the MAC frame prior to
insertion of the QTag Prefix. The QTag Prefix offsets this field exactly 4
octets from its position in an untagged MAC frame.
Data field is extended by appending extra bits (refers to pad) in units of
octets after data field but prior to calculating and appending FCS.

Frame Check
Sequence (FCS)

Contains a 4-octet (32-bit) of CRC value. This value is computed as a


function of contents of source/destination address, length/type, LLC data
and pad.

Extension

Follows the FCS field and is made up of a sequence of extension bits,


which are readily distinguished from data bits.

Metropolitan Area Network (MAN)


MAN is collection of LANs with the same geographical
area, for instance a city between 5 and 50 km2.
Is a network of computers located at different sites within
a large physical area, such as a city.
MAN often acts as a high speed network (although not as
fast as LAN) to allow sharing
of regional resources.
MAN can defined as a group
of computers and network
devices connected together
within a large physical area.

Wide Area Network (WAN)


Is the largest network of all network types.
The internet is the largest WAN in the world.
WAN generally covers large distances such as states,
countries or continents.
WAN is group of MANs or LANs or the mixture of both
network.
WAN often uses
transmission facilities
provided by the
common carriers,
such as telephone companies.
An example in the society using WAN is the banking
organization.

Differences between Types of Computer Networks

Characteristic
MAN
Geographical Covers an area of between 5 and 50 km
spread
diameter. Many MANs cover an area size of a
city, a group of buildings or as large as the North
of Scotland.
Speed
High speed network to allow sharing of regional
resources.

WAN
Large geographical range generally
spreading across boundaries and
need leased telecommunication.

Data Transfer
Rate

High data transfer rate

Lower data transfer rate

Technology

Some legacy technologies used for MAN are


ATM, FDDI, DQDB and SMDS.

Connection

Ownership

Less speed (150 Mbps).

Use technology like MPLS, ATM,


Frame Relay and X.25 for
connectivity over longer distances.
The role is similar to Internet Service Provider
Computers are often connected
(ISP), but for corporate users with large LANs. It through public networks, such as
typically uses wireless infrastructure or optical the telephone system. They can also
fiber connections to link their sites.
be connected through leased lines or
satellites.
Not owned by a single organization. Its
Not owned by any one
communications links and equipment generally organization but rather exist under
owned by either a consortium of users or by a collective or distributed ownership
single network provider who sells the service to and management over long
the users.
distances.

Differences between LAN, WAN and MAN

REFERENCES:
Main:
Forouzan, B.A. (2012). Data Communications and
Networking (5th edision). Mc Graw Hill. (ISBN: 978-0-07131586-9)

Additional:
William Stallings. (2011). Data And Computer
Communication (9th edition). Prentice Hall. (ISBN-10:
0131392050)