0% found this document useful (0 votes)
7 views

Data-Link-Layer-Part2

Uploaded by

alaaabdo347890
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Data-Link-Layer-Part2

Uploaded by

alaaabdo347890
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 41

Port no 192.168.0.

1 ARP
16 bit
Ip add bit Data link layer frame
32bit
Physical
addr 48 bits Data link layer
MAC pdu
Application layer Invers ARP
Transportation layer
data Logical link
Network layer packet control
L2 Data link layer frame
Physical layer Media Access
bit
r 1- exchange frame Control
2- translation frame ARP
3- error detection
Proxy ARP
4- encapsulation /
decapsulation
Why Data Link Control?

The data link layer is the connection between a user


workstation and the network.

For example, it is the connection between:


• your laptop and a wireless LAN
• your workstation and a wired LAN
• your computer at home and your ISP
• Mansoura university and its ISP
• a business and …

How does the data get from this workstation on the desk
here to a server in, say, India?
Packets Packets

(a) Data link Data link


Layer Frames Layer
A B
Physical Physical
Layer Layer

(b) 1 1
2 2
1 2 3 21 12 3 21
Medium
2
A B 1

1 Physical layer entity


3 Network layer entity
2 Data link layer entity

Data Link Layer


Data Link Layer
The Data Link layer performs two basic services:
•Allows the upper layers to access the media using techniques such as
framing.
•Controls how data is placed onto the media and is received from the
media using techniques such as media access control and error
detection.
Link Layer: Introduction
“link”
Some terminology:
 hosts and routers are nodes
 communication channels that
connect adjacent nodes along
communication path are links
–wired links
–wireless links
–LANs
 2-PDU is a frame, encapsulates
datagram

data-link layer has responsibility of


transferring datagram from one node
to adjacent node over a link
6
Terms specific to Data Link Layer
 Frame - The Data Link layer PDU.
 Node - The Layer 2 notation for network devices
connected to a common medium.
 Media/medium (physical)*
physical - The physical means for
the transfer of information between two nodes.
 Network (physical)**
physical - Two or more nodes
connected to a common medium.
 The Data Link layer is responsible for the
exchange of frames between nodes over the media of
a physical network.
Terms specific to Data Link Layer
Controlling transfer across local media
Controlling transfer across local media
 framing and error detection
 media access control

Frame - The Data Link layer PDU


Sublayers in Data Link Layer
- Sets up the frame header and
trailer to encapsulate the
packet.
Network -Identifies network layer
protocol.
Logical
link
Data link control
(LLC)
Media
access
control
(MAC)
Physical -Adds layer 2 address
-Marks frame start and end
Data Link Sublayers

 Logical Link Control (LLC) places information in the


frame that identifies which Network layer protocol is
being used for the frame.
 Media Access Control (MAC) provides Data Link layer
addressing and delimiting of data according to the type
of Data Link layer protocol in use.
 Separating the Data Link layer into sublayers allows for
one type of frame defined by the upper layer to access
different types of media defined by the lower layer.
Layer 2 Frame
Data link sub-layers :
LLC : (logical link control) interact with network layer protocol
MAC : (media access control) provide physical addressing and
other data link layer functions
Note: LLC sub-layer frame (IEEE 802.2) is encapsulated into
MAC sub-layer frame (IEEE 802.3)
IEEE 802.2
•IEEE version Logical Link
( IEEE 802.3 (MAC sub-layer) Data-Link Control sub-layer

Ethernet II
“Interact with physical layer” Layer IEEE 802.3
+ Media Access
IEEE 802.2 (LLC sub-layer) Control sub-layer
“Interact with Internet layer” )
Physical IEEE 802.3
Layer Physical Layer
802.2 LLC APPLE-
* IPX IP * TALK

Layer 3

Layer 2 - LLC LLC

MAC &Layer 1 Ethernet


* Token
Ring * FDDI
Data Link layer: Controlling Transfer
 Layer 2 protocols specify the
1 - Encapsulation of a packet into a frame and
2- The techniques for getting the encapsulated packet on
and off each medium.
The technique used for getting the frame on and off
media is called the media access control method.
method
For the data to be transferred across during different media,
different media access control methods may be required
during a single communication.
Data Link layer: Creating Frame

Data Link layer protocols require control information to


enable the protocols to function. Control information may
tell:
 Which nodes are in communication with each other?
 When communication between individual nodes begins and
when it ends?
 Which errors occurred while the nodes communicated?
 Which nodes will communicate next?
Link layer frame includes
 Data - The packet from the Network layer.
 Header - Contains control information, such as
addressing, and is located at the beginning of the PDU.
 Trailer - Contains control information added to the end
of the PDU.
Formatting Data for Transmission
• Frame Header: It contains the source, and the destination addresses of the frame and the
control bytes.
• Payload field: It contains the message to be delivered.
• Trailer: It contains the error detection and error correction bits. It is also called a Frame Check
Sequence (FCS).
• Flag: Two flag at the two ends mark the beginning and the end of the frame

Trailer
Formatting Data for Transmission
Shared medium

Physical bus Star with hub


Media Accesses Control Methods
Definition
Regulating the placement of data frames onto the media is
known as media access control.
A network access method used
in ethernet networks to handle
CSMA/CA collisions. When a device wants
to transmit data over the
Contention network, it first listens to the
CSMA/CD medium to check if it is idle
(carrier sense). If the medium is
idle, the device starts

Controlled Polling transmitting.

Methods Access
Token Passing

Channel Time Slots


Partitioning
Freq Slots
Media Access Control Techniques
CSMA/CD
 CSMA (Carrier Sense Multiple Access)
–Check the bus for traffic
–If the bus is free, then transmit
–If it is busy, wait for a random period of time before attempting
to transmit again
Media Access Control Techniques
CSMA/CD
 Two stations may check the data bus simultaneously
 Both may find the line free and engage in the
transmission of data
 Both transmission will collide
 CD component will detect this collision
–Inform the workstations of the collision
 Each station will wait for a random period of time
before attempting to transmit again
Oh…No
When the channel carries I will
Still busy
a (1) data signal: sense
I will have
tothe
wait a
channel
random
to !
time
transmit
!

(1) data
When the channel carries
no signal: BINGO..!
Now I can
I will
transmit
sense
with
the the
whole
channel
bandwidth
to !
Transmitter
transmit
!

Receiver
When the channel carries
a (0) data signal : !..BINGO
Now I can
I will
transmit
sense
with
thethe
whole
channel
! bandwidth
to
transmit
!

Collision

(0) data
Media Access Control Techniques
Token Passing Protocol in Operation

Circulating
Token
A

D B

Server Workstation

C
•No collisions
Workstation
Now let’s see how requests are served

Free Token

+ Data Frame
Thanks
SAMEH

I got my
copy.

ALI
Any time
Thanks….
Hey....
ALI. I will
I want
take
Here back
it
to
my data.
goes ALI
transmit
SAMEH
Assume that the time slot is (3) seconds.
(Of course it is too long for a time slot but
Order
it is just an assumption).

1
3
2 3
2
1 3
2
1
Transmitter Transmitter

1 2 3
IDLE

Receiver Receiver
Media Access Control Techniques
Polling

Server
Poll

WS A WS B WSC

Data Delivery
WS : Workstation
Acknowledgement or
Request for
retransmission
Media Access Control Techniques
Polling
1- Polling process is similar to the roll-call performed in class. Just like
the teacher, a controller sends a message to each node in turn.
2-In this, one acts as a primary station(controller) and the others are
secondary stations. All data exchanges must be made through the
controller.
3- The message sent by the controller contains the address of the node
being selected for granting access.
4- Although all nodes receive the message the addressed one responds
to it and sends data if any. If there is no data, usually a “poll
reject”(NAK) message is sent back.
5- Problems include high overhead of the polling messages and high
dependence on the reliability of the controller.
Two types of networks at the data link layer

–Broadcast Networks: All stations share a single communication channel


–Point-to-Point Networks: Pairs of hosts (or routers) are directly
connected

Broadcast Network Point-to-Point Network

 Typically, local area networks (LANs) are broadcast and wide area
networks (WANs) are point-to-point

32
Point-to-Point (serial) links
 Many data link connections are point-
to-point serial links:
–Dial-in or DSL access connects hosts to
access routers
–Routers are connected by Access
high-speed point-to-point links Router
Modems

Dial-Up Access
 Here, IP hosts and routers are
connected by a serial cable

 Data link layer protocols for point-to-


Router
point links are simple:
Router
–Main role is encapsulation of IP datagrams
–No media access control needed
Router Router

Point-to-Point Links
Simplex, Half-Duplex, and Full-Duplex
Transmission

 A communications channel is classified as one of three types:


(depending on the direction of transfer)
–Simplex
–Full-Duplex
–Half-Duplex

 Simplex: a simplex mechanism can only transfer data in a single direction


–It is analogous to broadcast radio or television
–Figure 9.8a illustrates simplex communication

 Full-Duplex: allows transmission in two directions simultaneously


–It is analogous to a voice telephone conversation
•in which a participant can speak even if they are able to hear background music at the
other end.
34
Simplex, Half-Duplex, and Full-Duplex
Transmission

35
Simplex, Half-Duplex, and Full-Duplex
Transmission
 Half-Duplex: A half-duplex mechanism involves a shared transmission
medium

–The shared medium can be used for communication in each direction

–But the communication cannot proceed simultaneously

–It is analogous to using walkie-talkies where only one side can transmit at a time

 An additional mechanism is needed at each end of a half-duplex


communication that coordinates transmission

–to insure that only one side transmits at a given time


Media access control for non-shared media
 Define Full Duplex and Half Duplex as it relates to
Media Access Control for non-shared media
Addressing- Where the frame goes
 Describe the role of addressing in the Data Link layer and
identify cases where addresses are needed and cases
where addresses are not needed
Layer 2 devices

• A layer 2 device is a device that understand MAC,


for example:
 NIC (Network Interface Card)
 Bridge :
- address learning
- forwarding decisions are based on software
- bridge is used for LAN segmentation
- max. 16 port.
 Switch:
- a multi-port bridge up to 567 port
- forwarding decisions are based on hardware ASIC
(faster than bridge).
Physical topology vs Logical Topology

 The physical topology is an arrangement of the nodes


and the physical connections between them. “
representation of how the media is used to interconnect
the devices”.
 A logical topology is the way a network transfers frames
from one node to the next. The logical signal paths are
defined by Data Link layer protocols. The Data Link layer
"sees" the logical topology of a network when controlling
data access to the media.
Report 1
1. Specify the basic services that may be performed of the Data Link layer?
2. Within the data link layer state what is meant by (Node, links, frame, Network)?
3. State the responsibility of the data link protocol?
4. State the function of (LLC) and (MAC)?
5. Data Link layer protocols require control information, discuss what is meant
by control information?
6. Explain the necessity for controlling access to the media
7. State the protocols of the Data Link layer functions?
8. Define the components of the Link layer frame ?
9. What is meant by media access control then state the different methods?
10. Define Full Duplex and Half Duplex as it relates to Media Access Control for
non-shared media
11. Describe the role of addressing in the Data Link layer and identify cases where
addresses are needed and cases where addresses are not needed.

You might also like