You are on page 1of 14

Chapter 6 Layer 2: Data Link

Layer – Concepts & Technologies

6.1 Functions of Data Link Layer


6.2 MAC Addressing
6.3 Framing
6.4 Media Access Control
6.5 LAN Technologies

Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

6.1 Functions of Data Link Layer


This layer deals with reliable data transfer
across the physical link (node to node). In
doing so, it is concern with network topology,
error checking and network media access.
Different LAN technologies are presented in
6.1 – Functions of Data Link Layer

this layer.

1
Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

6.2 MAC Addressing


MAC addresses (physical address) are unique
for each device on the network. It is burned into
the ROM of the Network Interface Card (NIC).
MAC addresses are 48 bits in length and always
expressed as 12 hexadecimal digits.
The first 6 hexadecimal digits identify the vendor
(Organisational Unique Identifier) and the
6.2 – MAC Addressing

remaining 6 hexadecimal digits represent the


interface serial number.

Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies


6.2 – MAC Addressing

MAC Address Format

Question: What is the representation of a hexadecimal digit?


How many binary bits represent 1 hexadecimal digit?

2
Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

6.3 Framing
Framing helps to organise essential information
gathered at the source node that could be
interpreted by the destination node. Such
information includes:
1. Which computers are communicating with one another?
2. When is the start and end of the communication between
individual computers?
3. Where the data is located within a frame?
4. How communication errors are recorded?
6.3 – Framing

Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

There are varies types of frames. Each frame


consists of sections called fields and each field
composed of bytes. A generic frame format includes:

1. Frame start field


2. Address field
3. Length/type/control field
4. Data field
5. Frame check sequence field
6.3 – Framing

6. Frame stop field

3
Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

At the data link layer, the source and destination


MAC Addresses are attached to the PDU passed
down from the upper OSI layer.

Data Frame
6.3 – Framing

Question: What is PDU?

Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

6.4 Media Access Control


Media Access Control (MAC) is the algorithm that
allows source nodes to systematically access the
shared media for signal transmission. This is to
prevent and react, if necessary, to any data
collision due to multiple concurrent sending nodes.
Two types of MAC:
6.4 – Media Access Control

1. Carrier Sense Multiple Access with Collision


Detection (CSMA/CD)
2. Token Passing

Question: What is the meaning of ‘shared media’?

4
Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

1. Carrier Sense Multiple Access with Collision


Detection (CSMA/ CD)

This algorithm allows any source node to send


data provided that the media is free from use.
The source node ‘listens’ to the media by
measuring the voltage across the media. If the
media is free, the source node begins to send the
6.4 – Media Access Control

data while it continues to ‘listen’ to the media.

Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

1. Carrier Sense Multiple Access with Collision


Detection (CSMA/ CD)

Data collision occurs if multiple source nodes send


out data at the moment when the media is free.
All stations will pick up the collision event and wait
for silence. Then, each affected source node wait
a random back-off period before retransmitting to
6.4 – Media Access Control

minimize the chance of another collision.

Question: What does the node measures to check if


a collision has occurred?

5
Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

1. Carrier Sense Multiple Access with Collision


Detection (CSMA/ CD)

CSMA/CD is contention-based because all the


source nodes in the network need to content for
the shared media before data is transmitted.
CSMA/CD is considered non-deterministic
6.4 – Media Access Control

because it cannot determine when the data will


reach the destination node e.g. data collision may
or may not happen
CSMA/CD is normally associated with bus
topology network

Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

2.Token Passing
A token frame circulates around the network and
the node that acquires the token will have the
right to send data. Network will not face any data
collision since only one token is available in the
network.
Token passing is considered deterministic
6.4 – Media Access Control

because it can be determined when the data will


reach the destination node e.g. no data collision
Token Passing is normally associated with ring
topology network.

6
Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

2.Token Passing

A token frame is 3 bytes in length, consists of a


start byte, an access control byte and an end
byte.
The start and end byte signals the start and end of
the token frame. The access control byte contains a
6.4 – Media Access Control

token bit, a monitor bit and sophisticated priority


and reservation fields.

Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

2.Token Passing
The token bit distinguishes the token frame from a
data frame.
The monitor bit determines if a frame is continuously
circulating in the network e.g. this is an indication
that the token frame or the data frame is damaged.
6.4 – Media Access Control

7
Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

2.Token Passing
A value is set in the priority field. Nodes with equal
or higher priority acquires the token frame. After the
token is seized and changed to a data frame, only
nodes with a priority value higher than the
transmitting node can reserve the token at the
reservation field for the next use. Node that raise
6.4 – Media Access Control

the priority level must reinstate to the previous


priority level after completion of transmission.

Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

2.Token Passing
Source node that seizes the token frame changes
the token bit to busy and attaches the source
address, the destination address, the frame control
field, data field, error checking field and frame status
to the token frame to form the data frame. The data
frame then circulates around the network.
6.4 – Media Access Control

8
Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

2.Token Passing
Only the destination node accepts the data frame
because of the matching address. The data frame
continues to circulate and ends at the source node.
The source node removes all attachments, changes
the token bit back to free and set the token frame
back into circulation again.
6.4 – Media Access Control

Question: How does the


source node knows that
the returning data frame
belongs to itself?

Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

CSMA/CD vs. Token Passing

Advantages
CSMA/CD Token Passing
No waiting time, node Deterministic e.g. good for
transmit as long as media is time critical activities
free from use
Simple algorithm that is Good for heavy load e.g.
6.4 – Media Access Control

easy to implement more nodes per network


Priority features available

9
Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

CSMA/CD vs. Token Passing

Disadvantages
CSMA/CD Token Passing
No priority given to nodes of Source node may wait for a
higher level of importance long time for free token
frame
More data collision occurs Token may be faulty leading
6.4 – Media Access Control

as with increasing nodes in to no data transmission


the network
Non-deterministic

Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

6.5 LAN Technologies


Data Link Layer (Layer 2) defines the various LAN
technologies. The 3 main LAN technologies are
Ethernet (IEEE 802.3), Token Ring (IEEE802.5)
and Fiber Distributed Data Interface.

Logical Link Layer


(a sub-layer of
6.5 – LAN Technologies

data link layer)

10
Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

1. Ethernet/ IEEE 802.3


Ethernet is the most widely used LAN
technology. It carries data at high
speed for limited distance.
Ethernet, developed in 1970s, was
used as the basis for IEEE 802.3
specification. Ethernet covers the
Physical Layer and Data Link Layer.
IEEE 802.3 covers the Physical Layer
6.5 – LAN Technologies

and the MAC sub-layer. The Logical Question: What is


Link sub-layer (IEEE 802.2), is the next upper
layer of the Data
responsible of linking the lower layer to Link Layer?
the next upper layer.

Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

1. Ethernet/ IEEE 802.3


Ethernet and IEEE 802.3 specifies
similar technologies:
1. Both use CSMA/CD
2. Both are broadcast network

There are different varieties of Ethernet


e.g. 10Base-T and 100Base-TX. 10
and 100 refer to the data transfer rate,
6.5 – LAN Technologies

Base refers to baseband, T and TX


refer to twisted pair cable.
Question: What is
the meaning of
10Base-T and 100Base-Tx use CSMA/CD, broadcast
physical star topology and logical bus , data transfer rate,
baseband?
topology.

11
Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

2. Token Ring/ IEEE 802.5


Token Ring is developed by IBM.
IEEE 802.5 specification is modelled
after Token Ring. Both adopt the
token passing method, by using a
token frame to management data
transmission.
Token Ring and IEEE802.5 operate
6.5 – LAN Technologies

at 4/16 Mbps and use twisted pair


cable.
Token Ring and IEEE 802.5 use
physical star topology and logical Question:
ring topology What is token passing?

Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

3. Fiber Distributed Data Interface


FDDI specifies a 100 Mbps token
passing, dual ring LAN using fiber-
optical cable. It consists of two
counter rotating primary and
secondary (redundant) rings. During
normal operation, the primary ring is
used for data transmission while the
secondary ring remains idle. Uses
6.5 – LAN Technologies

the same token frame as Token Ring.

12
Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

3. Fiber Distributed Data Interface


Dual Attachment Stations (DAS)
attach to both rings. Single
Attachment Stations (SAS) attach to
one ring through a concentrator.
FDDI uses physical ring topology and
logical ring topology.
6.5 – LAN Technologies

Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

3. Fiber Distributed Data Interface


FDDI provides high data security,
high data transfer rate and high
reliability because of the use of fiber-
optical cable. It is commonly used as
a network backbone.
The cost of FDDI is high.
6.5 – LAN Technologies

13
Chapter 6 – Layer 2: Data Link Layer – Concepts & Technologies

3. Fiber Distributed Data Interface

The secondary ring


automatically kicks in
when the primary
ring is faulty. The
DAS or concentrator
will also be
automatically
6.5 – LAN Technologies

bypassed if faulty.

14

You might also like