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

2 - Data Link Layer intro with key

gate notes

Uploaded by

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

2 - Data Link Layer intro with key

gate notes

Uploaded by

adarsh gupta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

The main services provided by Data Link Layer

• Error Control
o The error needs first to be detected. After detection, it needs to be either
corrected at the receiver node or discarded and retransmitted by the sending
node.
• Flow Control
o Deals with controlling the flow of frames from sender to receiver.
o If the rate of produced frames is higher than the rate of consumed frames, frames
at the receiving end need to be buffered while waiting to be consumed
(processed).
• Access control
o When two or more devices are connected to the same link, data link layer
protocols are necessary to determine which device has control over the link at any
given time.
• Framing
• The data-link layer at each node needs to encapsulate the datagram (packet received
from the network layer) in a frame before sending it to the next node.
• A packet at the data-link layer is normally called a frame.

• Physical addressing
• If frames are to be distributed to different systems on the network, the data link
layer adds a header to the frame to define the sender and/or receiver of the
frame.
Two Sublayers

• The IEEE has subdivided the data-link layer into two sublayers: logical link control (LLC)
(TOP) and media access control (MAC) (BOTTOM).
• Media Access Control (MAC): It defines the specific access method for each LAN. For
example, it defines CSMA/CD as the media access method for Ethernet LANs.
• Flow control, error control, and part of the framing duties are collected into one
sublayer called the logical link control (LLC).
• Framing is handled in both the LLC sublayer and the MAC sublayer.
Physical ADDRESSING (MAC address, Link-Layer address)

• In a connectionless internetwork such as the Internet we cannot make a datagram reach


its destination using only IP addresses.
• The reason is that each datagram in the Internet, from the same source host to the
same destination host, may take a different path. The source and destination IP
addresses define the two ends but cannot define which links the datagram should pass
through. Therefore, we need another addressing mechanism, i.e. the link-layer
addresses of the two nodes.
• When a datagram passes from the network layer to the data-link layer, the datagram is
encapsulated in a frame and two data-link addresses are added to the frame header.
These two addresses are changed every time the frame moves from one link to another.
Connectionless and Connection-Oriented
• A DLC protocol can be either connectionless or connection-oriented.

• Connectionless Protocol: Frames are sent from one node to the next without any
relationship between the frames; each frame is independent.
• Connectionless means that there is no connection between frames, it does not imply
that there is no physical link between nodes.

• Connection-Oriented Protocol: A logical connection should first be established between


the two nodes (setup phase). After all frames that are somehow related to each other
are transmitted (transfer phase), the logical connection is terminated (teardown phase).
• The frames are numbered and sent in order. If they are not received in order, the
receiver needs to wait until all frames belonging to the same set are received and then
deliver them in order to the network layer.
Switching

Switched
networks

circuit switched packet switched

datagram virtual circuit


network network

A switched network consists of a series of interlinked nodes, called switches. Switches are
the devices capable of creating temporary connections between two or more devices linked
to the switch.

1. Circuit switching - consist of set switches connected by physical link. A connection


between two stations is a dedicated path made of one or more links. A link is divided
into n channels. There are three phases in order setup phase, data transfer phase, tear
down phase.

2. Datagram network - In data communications, we need to send messages from one end
system to another. If the message is going to pass through a packet-switched network, it
needs to be divided into packets of fixed or variable size. The size of the packet is
determined by the network and the governing protocol. In packet switching, there is no
resource allocation for a packet. This means that there is no reserved bandwidth on the
links, and there is no scheduled processing time for each packet. Resources are allocated
on demand. The allocation is done on a first come, first-served basis. When a switch
receives a packet, no matter what is the source or destination, the packet must wait if
there are other packets being processed. As with other systems in our daily life, this lack
of reservation may create delay. For example, if we do not have a reservation at a
restaurant, we might have to wait. In a datagram network, each packet is treated
independently of all others. Even if a packet is part of a multipacket transmission, the
network treats it as though it existed alone. Packets in this approach are referred to as
datagrams. Packets may also be lost or dropped because of a lack of resources. In most
protocols, it is the responsibility of an upper-layer protocol to reorder the datagrams or
ask for lost datagrams before passing them on to the application.

3. Virtual network - A virtual-circuit network is a cross between a circuit-switched network


and a datagram network. It has some characteristics of both.

You might also like