Good day. Today we will start our discussion on Data Link layer. As a matter of fact, we
have already discussed a part of the data link layer, namely, the MAC sub link layer.
We will see how that all is but to it into the broader picture, if you remember when
we were discussing the 7-layer OSI protocol, starting from the application layer, the bottom
most layers was the physical layer. So, we have finished our discussion on physical layer
and just above the physical layer we have the data link layer. We will look at the different
components of data link layer and how they are used and we will discuss different protocols,
etc. So, our main this thing is protocols, which are protocols which are used in the
data link layer? Now, what are the main tasks of data link layer?
It transfers data from the network layer of one machine to the network layer of another
machine. So, actually this is a part of the services it gives to the upper layer. You
remember that above the data link layer, we have the network layer and below the network
layer, we have the data link layer. The data link layer gives a service to the network
layer and this service is the transfer of data from one network layer to another network
layer. So, that is the service that it gives to another network layer and this in its turn
uses the physical layer. It converts the raw bit stream of the physical layer into groups
of bits etc. or frames.
This is how we can look at it, this is one node and this is another node. Above this,
of course there may be other layers; we are not concerned about these upper layers at
this moment. This gets some data to be sent from the network layer and this data link
layer sends it to the next data link layer. Remember once again that the network layer
is concerned with transfer of data, etc., across the network. That means it may take
several such hops. But data link layer is just concerned with a single hop. This is
how we simplify the problem, the problem of going multi- hop. So, this multi – hop part,
we will leave it to the network layer. For the single hop, so, multi-hop naturally will
constitute a number of such single hops and data link layer would handle the transfer
of data from one node to the next node.
So, actually this is another way of looking at it because there is a virtual data path
from layer three to layer three, but actually this goes through the data link layer and
this is the actual data path which goes through the physical layer and some physical transmission
medium.
Now, why do we require any kind of control in the data link layer? These are the main
points or these are the main functions of the data link layer. Actually, all of them
are not, all combinations are used in all situations but these are the general sort
of categorizations of the kind of thing that we will be concerned with in data link layer.
One is frame synchronization that means the beginning and end of a data block called frame,
should be recognizable. That means when you are sending a number of bytes let us say,
from one machine to other, they are sort of grouped into let us say, some blocks. So,
on the other side they should be able to recognize that, okay this is the beginning of the block
and this is the end of the block. So, for that you require to organize these bytes into
some what are called frames. We will look at the details of frame later on.
So, that is the first job of the data link layer. Second job of data link layer which
it might or might not do in some cases, but any way one of the things which they does
sometimes is flow control. The sender should not send frames at a rate faster than the
receiver can receive and process them. This is important because the sender may not know
everything about the state of the receiver at that particular point of time. If it keeps
on sending data which overwhelms the receiver, the receiver will be forced to drop some of
that data.
In some cases, this is ignored or in some cases this is not relevant. But in some cases,
they are very relevant and the data link layer may do some flow control. Secondly, thirdly
rather, error control: Any bit errors introduced by the transmission system should be corrected.
This is important that whenever you are sort of sending something through a transmission
medium there is always some chance of errors and the data link layer has to take care of
this error for that particular link. We will come to this and see once again.
Next is addressing on a multipoint link, like LAN. The identity that means, suppose there
is a LAN which is hanging from a bus or something, the identity of sender and receiver must be
specified. In such a case, the identity of the receiver would be very important because
in many such links, especially in broadcast links, what happens is whatever you send,
reaches everybody. The receiving station must know that whether or not this particular frame
is meant for him. So, the address of the receiver is important. So addressing, this is another
issue. This is a data link kind of address, we will come to that later on.
Now for all these error control, flow control, etc., we require some protocols, some data
link layer protocol to run between the two layers. In order for this protocol to run,
actually these two nodes need to exchange some control or management information. Otherwise
their protocol cannot run at that level. But, how the control and management information
go from one machine to the other? How will they interchange? once again through the same
medium, so control and data on the same link. Control and data will flow on the same link.
The receiver must be able to distinguish control information from the data being transmitted.
Then we require some link management, procedures for the management of the initiation, maintenance
and termination of a sustained data exchange.
These are the different functions of the data link layer. So, far as services, if you look
at the same thing from the services angle, what kind of services it gives? It gives framing
and link access. So, encapsulates datagram into frame, adding header or trailer. We will
look at this headers and trailers, these are the dependents. What kind of headers, what
will they contain etc, that depends on the particular protocol that you are using on
that link. Some of them do not have any trailers, only header, some have both header and trailer.
This is the part which is used for the protocol to run. Channel access is shared medium.
We have already seen a number of such cases so called MAC protocol. So, that is also part
of it. If it is a shared medium, then the medium access control has to be used and then
the address, if there are multiple receivers so called MAC addresses, used in frame headers
to identify source, destination. This is different from another address we have over the entire
network, which is called an IP address. So, we will be looking at IP address later on
after we talk about network layer. But, right now the address we will be considering, on
MAC addresses, also known as hardware addresses.
Link layer services: Other service is that it is reliable delivery between adjacent nodes.
So, for reliable delivery, we may need something depending on quality of your link. If the
quality of your link is very good, like say, some good quality fiber etc, you may not need
to do much. But then, there are media which essentially are very prone to noise or very
prone to introduction of all kinds of errors. In such cases, data link layer has to take
special care so that the transmission over this particular link is reliable.
Apart from this particular link, you may still require some kind of resilience at a higher
level because some particular node in between at a network layer, when you are talking about
the entire network, at some particular node in between the node might fail. So, whatever
protocol you might be having for the data link etc for making it very sturdy, it will
not work. So, the chain will sort of break down. But this to make individual links of
the chain as good as possible, so far the errors are considered. This is one job of
the reliable data delivery. Just as fiber may have low error bit, similarly, some links
like wireless links have high error rates. Why both link-level and end-end reliability?
So, this we have just discussed.
Then flow control, as we are saying, pacing between the adjacent sending and receiving
nodes. They should have must, should be in sync. That means whatever the sending station
sends, the receiving station should be able to absorb that much. For that, you may require
some explicit controls sometimes. We will look at flow control later on, in some later
lecture.
Error detection, errors caused by signal attenuation, noise. So, receiver detects presence of errors;
that is the error detection part. Once you detect that there has been some error in this,
several things may happen. First of all, you may ask for some retransmission from the other
side so that you may get the correct data or it might happen in some cases, atleast
in some limited cases, you might be able to look at that faulty data and correct it locally,
without referring back to anybody or without any sort of reference to the sending node,
you can do it locally at the receiving node. So, that is called error correction. So, error
detection and error correction, receiver identifies and corrects the bit errors without resorting
to retransmission. All these would happen on the line and the line could be simplex,
half-duplex and full-duplex. Simplex is not very common because simplex can go in only
one direction. In half-duplex and full-duplex, nodes at both ends of link can transmit, but
not at the same time.
So, what are the types of services that data link layer gives? One is unacknowledged connectionless,
so no attempt to recover lost frame. If some frame is lost due to noise error etc, there
is no attempt to recover this and there is no acknowledgement from the other side. It
is a connectionless system, suited for low error rate networks or for fault tolerant
applications such as voice. What do you mean by that voice is a fault tolerant application?
We mean that even if some of the bits in a digitized voice stream drop, obviously there
will be some degradation on the other side if you are not doing any type of corrections.
But to the human ear, it may not be very perceptible. For example, I am talking, even if there is
any momentary glitch, you would more or less make out, what I am talking about. That is
why in that sense it is invariantly a fault-tolerant. So, that is unacknowledged connectionless
service, one kind of service. Acknowledged connectionless service, this is another kind
of service. So, each frame is acknowledged by the receiver and this is suited for unreliable
channels where you require this acknowledgement for special reliability.
Acknowledged connection-oriented service ensures that all frames are received and each is received
exactly once and these services are accomplished using as I said simplex not usual, but half-duplex
or full-duplex channels.
So, this is some examples, not every important. It is a reliable message stream. It may be
connection-oriented service or it may be connectionless service. It may be a reliable message stream
or reliable byte stream that is remote login. So, they are coming byte by byte and here
it is coming page by page. Unreliable connection, like digital voice and unreliable datagram
but when you come to datagram, this becomes connectionless service. Unreliable datagram,
acknowledged datagram, request reply etc.
Now, let us look at just one thing that where does all this data link layer, exactly where
does it exists? Physical medium we understand, it is a cable or it is this electromagnetic
field, this free space or fiber. So, we can see it, we can feel it. But where does the
data link layer resides? So to say, usually, they reside in the so called network interface
card. If you have a PC which is connected to a network, possibly it is connected through
a may be an Ethernet card or something or Ethernet NIC, as they call it. NIC for NIC
that is network interface card and that network interface card has a socket where your, may
be Ethernet cable may come and plug in. Similarly, there may be other kinds of cards.
So, there is a network adaptor. So, these adaptors actually implement most of these
data link functions and it is actually these adaptors which are communicating. So let us
say, we have a datagram which is coming from a higher layer, this is made into a frame
by this adaptor called and then this frame is sent and in sending it, this is where link
layer protocol comes into the picture and reaches the destination. So, these are the
two adapters, this is the sending node and the receiving node.
So, as I said the link layer implemented in adaptor, also known as NIC, examples are Ethernet
card, PCMCI card which may be there in say, laptops and all. 802.11 cards which are used
for let us say, wireless LAN connection and things like that. On the sending side we encapsulate
the datagram in a frame, adds error correcting or checking bits, rdt, flow control, etc.
On the receiving side, it looks for errors or flow control, etc., extracts datagram,
passes to the receiving node. The adaptor is semi-autonomous and communicates directly
with link and physical layers. So, it is basically the adapters where most of the data link functionalities
are and so of course that adapters will have some hardware as well as some in-built software,
so, all that is there in that card.
Now, we talk about 2 parts, MAC and LLC. We have already seen about MAC. Actually the
data link layer is divided into 2 parts. One is the MAC and LLC as we will see. So, in
any broadcast network, MAC we know that the stations must ensure that only one station
transmits at a time on the shared communication channel. Otherwise they will collide and they
will become sort of garbled etc. So, this is the MAC part of it. The protocol that determines
who can transmit on a broadcast channel are called Medium Access Control (MAC) protocol.
We have seen a number of MAC protocols already like TDMA, CDMA and then your token based
MAC protocol. We will see a few more in future.
So, we have the part, so if we have the entire thing is the data link layer, then this is
divided into two sub layers. Above the data link layer, as you see two network layers
and below it is the physical layer. The data link layer itself is divided into two parts:
the medium access control part, which is closer to the physical layer and the logical link
control. We have already seen a number of MAC protocols, we will talk about LLC or logical
link control today. The MAC protocols are implemented in the MAC sub layer, which is
the lower sub layer of the data link layer. The higher portion of the data link layer
is often the called logical link control or LLC.
This is the broad picture, we have been referring to some numbers like 802.1, 2, 3, 4 etc. So
this is what the broad picture looks like. So, IEEE 802 is a family of standards for
LANs, which define an LLC and several MAC sub layers. So 802.1 is some overview kind
of thing, this sort of encompass all these. 802.2 is the LLC part which we will be talking
about now and below the 802.2, we have various kinds of medium access controls. We have 802.3,
802.4, 5, 6 and now we have 11, 15, 16, all kinds are there and all these are in the data
link layer. Above that is a higher layer and below that is the physical layer.
So, these are the some of the names for time being. 802.1 gives you an overview, 802.2
is the LLC that we will be talking about today. 802.3 is the famous Ethernet, CSMA/ CD is
the kind of MAC protocol that it uses. We will talk about it later. 802.4 is the token
bus, which we have already seen. 802.5 is the token ring also seen. 802.6 is the distributed
queue dual bus. FDDI is the fiber distributed data interface and there are others. As new
MAC protocols and new systems come up, they keep adding to this set of standards etc.
So, we will see a few more later.
So, we have this LLC sub layer sitting on top of the MAC sub layer. So, what does it
mean in terms of headers and trailers? For LLC, whatever it does, it requires some headers.
So when the packet is coming from the network layer, the LLC header is added to the packet.
So it will reach the LLC sub layer on the other side. Then it comes to the MAC sub layer
and MAC sub layer will add its header, it may add some trailer also. The MAC, LLC, and
original packet etc, the whole things may constitute one frame and it is pushed on to
the physical layer in the network.
The 802 LANs offer the best effort data frame service. Error control and flow control are
handled by LLC. LLC run on all the three 802 LANs and hides the differences to the network
layer. So, to the network layer, this different physical layer protocols whether it is a token
bus or an Ethernet etc that is a sort of transparent to the network layer. The network layer does
not bother about it. The data link layer takes care of that. What the network layer knows
is that, this network layer which is sitting below me is going to give me a sort of as
reliable as possible service for sending the data or the packet from this node to the next.
So, that service is taken for granted by the network layer and it does not bother with
all the different complexities or the different variabilities which are there in the lower
layers. So, LLC adds its header as I showed, to the network layer packet. It contains sequence
and acknowledgment numbers it might. Why? We will see it later. Resulting structure
goes into the payload of 802.x frame for transmission.
So, LLC operations are sometimes divided in this fashion. Type 1 operation and type 2
operation and type 3 operation, so type 1 operation supports un acknowledgement connectionless
service. For different the different services we have the different types of operations.
Type 2 is connection mode service and type 3 operation supports acknowledged connectionless
service. So, we will look at this.
For this LLC, we have a PDU or so called protocol data unit. This Protocol Data Unit, it carries
information, it carries some different parts and different types of PDUs are there. The
PDU used to carry user data. The control field includes a 7-bit sequence number N(S), associated
with this PDU. It also includes a piggybacking acknowledgment sequence number N(R). What
is piggybacking of acknowledgment? We will discuss later. Unnumbered, like various protocol
control PDUs, these five bit M fields indicates, what kind of PDU it is.
There are some supervisory PDUs used for flow and error control. It includes an acknowledgment
and sequence number and a 2-bit, some fields they receive ready (RR), receive not ready
(RNR) and reject (REJ). This may be used for some particular data link protocol.
So, type 1 operation, we know what it is. The UI of PDU is used to transfer user data.
There is no acknowledgement, flow control or error control. The XID and TEST PDUs support
management functions associated with all the three types of operations that means type
1, type2 type3 operations, so these PDUs are used for any of these.
An LLC entity may issue a command XID or TEST. The receiving LLC entity issues a corresponding
XID or TEST in response. So, you remember that even if you have an un acknowledged data
that means connectionless kind of service, even then you have to test the link, see that
it is alright, see that the other side is operating and then only you can send. So,
checking the link is still necessary whether it is a connection oriented service or a connectionless
service. Type 2 operations support the connection mode service. So, type two operations involves
three phases, connection establishment, data transfer and connection termination.
With type 3 operation, you should remember, it is acknowledged connectionless service.
With type 3 operation, each PDU transmitted is acknowledged. So, there is an acknowledgement
coming from the other side. A new unnumbered PDU, the acknowledged connectionless (AC)
information PDU, is defined. Because for this acknowledgment. User data are sent in AC command
PDUs and must be acknowledged using an AC response PDU. So, we will look at some detail
of this later on.
To guard against lost PDUs, some PDUs, the sender might have sent. It might not have
reached the destination. If it does not reach the destination it may be lost. Why does it
not reach the destination? May be the link failed momentarily, may be momentarily there
was a noise burst which sort of garbledd the data completely etc for various reasons the
data may get lost on the way. So, you have to make that worst case assumption. So, to
guard against lost PDUs, say this is the most reliable kind of operation, type 3 operation,
a 1-bit sequence number is used. We will see how it is used later on. The sender alternates
the use of 0 and 1 in this 1 bit. So, how that helps, we will see. The receiver responds
with an AC PDU with opposite number of the corresponding command. Only one PDU in each
direction may be outstanding at any time.
Now, let us come to some of the details. First we will discuss framing and then we will look
at some of the way things are transferred. Now Frame Synchronization, that is, the 2
sides must be able to synchronize their operations. This synchronization may be of various types.
Suppose you are sending just I bit or 1 byte at a time. Now at that byte level you have
to synchronize or you are sending a series of blocks, each block containing a number
of bytes, carrying them. Now where does one block start, where does it end etc, all these
synchronization, higher level synchronization is also necessary. So, frame synchronization
is necessary.
When data are transferred from the transmitted to the receiver unless steps are taken to
provide synchronization the receiver may start interpreting the data erroneously. Suppose
you have taken the second byte as the first byte, you will never know that you have lost
the first byte anywhere. Now, two common approaches are there, one is asynchronous transmission
and the other is synchronous transmission. So, we will look at both of these.
This is asynchronous transmission. Data are transmitted one character at a time. This
is what I am talking about asynchronous transmission. Timing of synchronization must only be maintained
within each character and of course here the receiver has the opportunity to resynchronize
at the beginning of each new character. If you use some kind of coding, like let us say,
if you remember from our discussion about how data is encoded digitally, so if you are
using Manchester encoding so that there is definitely a transition in the middle of the
bit then you can use the transition time to synchronize between the sending and receiving
nodes. So, such synchronization is possible.
So, when no character is being transmitted, the line between transmitter and receiver
is in idle state. It is in idle state, so there must be some start and some stop. So,
this is the start of a sequence of a character, so data are going. Then we may add some parity
bits. We will later see what parity bits are and then the transmission stops. There is
a start, parity and some stop bits.
In synchronous transmission, a block of bits is transmitted in a steady stream without
start and stop codes. Actually, in terms of efficiency, asynchronous transmission is not
that efficient. So, if you are just sending very small amount of, just 1 or a few characters
then asynchronous transmission may be alright but when you are doing a lot of transfer,
in that case asynchronous transmission becomes very inefficient. So, for the purpose of efficiency,
we need to go for the synchronous transmission where we send a number of blocks, each block
containing a number of characters.
So, here a block of bits is transmitted in a steady stream without start and stop codes.
The block may be arbitrarily long, it may be. To prevent timing drift between the transmitter
and receiver, clock signal is embedded in the data signal, For example, using Manchester
encoding.
Apart from this synchronization of clock for the bit, where does the bit start and end
or especially in the middle, apart from that you require another level of synchronization,
so as to allow the receiver to determine the beginning and end of a block of data. So,
this for synchronization we require this. So, we need to say that this is where the
data begins and this is where the data ends.
Every block begins with a preamble bit pattern and generally ends with a post amble bit pattern.
That is for each block, it starts with a preamble bit pattern that is the start of the block
and then the block goes and then there will be some part at the end which is the post
amble. Now, what kind of pre amble or what kind of post amble will be there, would depend
very much on what kind of protocol, what type of data link protocol is running. So, different
protocols will be having different headers and different trailers or some will not be
having any trailer at all. So, here I give some examples. You need not remember all this
but this is just to show you, For example, DECNETs.
These are some frames. This whole excepting the body, you see that the body is the part
which came down from above. That means from the network layer. The rest of it, all this
header, the part which is coming in the beginning and the part which is coming in the end, CRC
etc, they have been added at this layer. So, DECNETs, DDCMP frame looks like this ATM cells.
They just have a header, CRC and a body. IBMs have some BISYNC frame, ARPANET’s IMP-IMP
frame. So, this is a sort of … The ISO’s HDLC frame. We look at details of HDLC later
on. This looks like this, some specific pattern, big pattern. Then some header, then the body,
then CRC and then again …..
A typical synchronous frame format would have 8-bit flag, which would be the preamble, then
may be some control fields, data field and then may be again some control fields and
then some 8-bit flag, that the post amble.
For sizeable blocks of data, synchronous transmission is far more efficient than asynchronous mode.
Asynchronous transmission requires 20% or more of overhead. It has a lot of overhead.
The control information preamble and post amble in synchronous transmission are typically
less than 100 bits. The overhead is much less here, so the efficiency of synchronous transmission
is very high. That is why I say, that when you are sending a lot of data, you usually
go for synchronous transmission which is more economic.
So, let us look at this specific issue of framing, translates the physical layer’s
raw bit stream into discrete units called frames. The sender is sending and the receiver
is receiving. Sender has sent frame1, frame2 to frame n. So, you see n frames are on the
transit and it is going from the sender to the receiver. Now how can the receiver detect
frame boundaries? That is, how can the receiver recognize the start and end of a frame? There
are four methods, length count, bit stuffing, character or byte stuffing or pulse encoding.
We will look at some of these now.
Frames could be fixed length, like ATM. So, ATM cells are of fixed length. You know, once
they have synchronized, you know that they are going to come with 53-byte kind of regularity.
But frames could be of variable length also, in which case we use the byte count, byte
stuffing, bit stuffing, generic framing procedure and Manchester encoding etc. One is the framing
the length count.
Make the first field in the frame’s header with the length of the frame, that way the
receiver knows how big the current frame is and can determine when this frame ends. So,
if you have a frame 1, is 5 characters, so if write 5 over here 1,2,3,4,5, 5 characters,
you know that this where the first frame has ended and the next say, the sixth byte is
to interpreted as the length of the next frame which is again 5 and then this one is a frame
of length 8 and so on. So, you know where each frame ends and the next frame starts.
But this has a disadvantage which is that the receiver loses synchronization when bits
become garbled. If the bits in the count become corrupted during transmission, the receiver
will think that the frame contains fewer or more bits than it actually does.
This is a problem in the sense that when you are sending them, suppose due to some error
etc, the count field itself has become garbled. Now that the receiver does not know, how many
bits are there. So, it may make some assumption which may be a wrong assumption. So, it will
interpret some other byte which is a part of something else may be data, may be control
field or whatever as the length of the next frame etc. So, once it loses sink, everything
gets garbled. This is one disadvantage and this is one reason why this is not used much.
You can use a checksum, we will later on see what check sum is. It will detect the incorrect
frames; the receiver will have difficulty desynchronizing to the start of a new frame.
This technique is not used anymore, since better techniques are available.
One of the better techniques is known as bit stuffing. Use reserved bit patterns to indicate
the start and end of a frame. For instance, use the 4-bit sequence of 0111 to delimit
consecutive frames. A frame consists of everything between two delimiters. So you have this one
delimiter on one side, 0111, and then the frame and then the other, 011. So as soon
as you get 011, you know that the frame is starting and as soon as you get another 011,
you know that the frame has ended. So this way we can know the beginning or the end of
the frame. I do not know whether it is obvious but there is a problem with this.
The problem is what happens if the reserved delimiter happens to appear in the frame itself?
If we do not remove it from the data, the receiver will think that the incoming frame
is actually two smaller frames. So, you understand? The problem is very simple, suppose we have
the 0111 as the delimiter but the data itself may contain, that is the data which has come
may be from the user, this may contain any bit pattern. Actually you have to allow any
and every bit pattern to the user. You cannot say that you cannot send 01111 because it
may be some, may be a picture is being sent through a number of frames and the bit pattern
may be arbitrary. In that case, 0111 may very well appear in the body of the data. So, this
is where the bit stuffing part comes.
What we do is that, we introduce another kind of pattern, let us say, the same 0111 for
each 0111 which appears inside which means that for the preamble, the beginning and the end
we used this 0111 and this 0111 unit appears singly at these two places. In the body of
the frame, if 0111 needs to appear, instead of 0111 we put in two 0111. So, if the receiving
end sees two 0111, one after the other, it knows that it is actually bit stuffing and
it will reduce it to only one 0111 in the body, whereas, the preamble and the post amble
will appear separately.
So now, the solution is to use bit stuffing. Within the frame, after every occurrence of
two consecutive 1s, insert a 0. This is another example of a bit stuffing. So, after every,
f there are two consecutive 1s insert a 0. For example, append a 0 bit after each pair
of 1s in the data. This prevents three consecutive 1s from ever appearing in the frame. So, some
bits have been introduced. After every two 1s in the data, we insert a 0 and the receiver
knows that if I encounter two 1s then there is a 0, this 0 is actually a bit stuffing,
so this zero will be dropped from the actual data. This way, this 111 will never appear
in the body of the frame, whereas it will appear in the preamble and the post amble.
Similar to bit stuffing, we may have byte stuffing. For example, let us say a flag,
say some character is there. So, say the flag which is also a part of the regular header
but this just happens to appear in the body of the frame or body of the packet. So what
we do is that, we use this other character. So, these are character introductions. That
is why it is called byte stuffing. One byte is one character. So we introduce the character,
escape character, just before the flag and what happens if escape itself appears in the
body? Well, we put escape, escape. So if there are two escapes side by side we know that
we have to interpret it as only one escape. If there are two escapes in the original data
packet, just by chance, then actually this will be, what will be center 4 escapes and
just one after the other and for receiving side, each for 2 escapes, it will reduce it
to one escape and know that this is the just a part of the data. Only at the end, we will
get this flag, etc., bytes. If there is escape flag, we have escape, escape, escape flag,
escape, escape flag and so on. So this is known as byte stuffing. So, we have done a
sort of general discussion. So, what I am going to do now is to discuss very simple
kind of protocol which is used quite often, known as point to point protocol. So, this
is one of another example of protocol that we will be using. It is the sum of the stuff
that we have done till now and then we will go to another parts of this LLC.
We will now be discussing point-to-point protocol. So, point to point protocol will have some,
it will send things like this. So, there will be a flag, we will just discuss the details
of this later on. So, there will be a flag field, address field, control field, protocol
field and payload. This payload is the one which is actually coming from the higher layers.
That means from the network layer and some of it will actually come from the user, from
the application layer itself. This is the payload and as far as the data link layer
is concerned then some checksum, it ends with Checksum and then flag. This is what the general
things looks like, what exactly they are, usually how they are used, we will come to
discussion.
In a point to point data link control, we have one sender, one receiver, one link. This
is the main thing that we have one sender, one receiver and there is only one link. So,
in effect, there is no question of any media access control that MAC part is not very relevant
over here. Because it is not a shared medium, this is just a point to point link. So, that
is one good thing. So, we do not require any media access control and no need for explicit
MAC addressing. That is not required because there is no question of any address. Whatever
you were sending from the receiver side, it is just distinct for the other side, that
is a point to point protocol and examples are of course dial-up links which many people
use and ISDN line. So, these are all point to point link. When you are using a dial up
link for connecting your computer from a remote location, actually that is a point to point
link, your computer is directly getting connected to a sort of computer on the other side, there
is nothing else. So, popular point to point DLC protocols are PPP, point to point protocol
which we are discussing, HDLC which I will discuss later, high level data link control.
So, data link used to be considered higher layer in protocol stack. Now it has become
very common.
So, PPP design requirements, these are given in RFC 1557. By the way, I do not remember
whether I mentioned this earlier, this business about RFC, which is very, very important in
the field of networking. RFC stands for Request for Common. So, what is happening is that,
suppose somebody has got an idea, well it goes to various stages. I am not going to
go in details of these stages, but at particular point of time, some particular protocol or
some particular system etc, they become widely accepted and they get coded into some RFC.
If you want to know the exact technical details of something in the network field, if you
know the RFC number, go to the website and download the corresponding RFC, they are all
freely downloadable. So, you can read them and you can get all the details of any of
these protocols, systems etc that are used in the network.
So, for PPP design requirements frozen in this RFC 1557, one thing is that it uses packet
framing. So, these are the requirements. So, it has to frame the packet. Encapsulation
of network layer datagram in data link frame, carry network layer data of any network layer
protocol. So, that is one thing. So, then the network layer once again just as in the
MAC layer we have seen that a number of protocols are possible and then now we are looking at
a number of protocols in the upper layer, that upper sub layer, that LLC layer also.
Similarly in the network layer also different alternative protocol may be possible. So,
PPP has to support all these, ability to demultiplex upwards. What is meant by demultiplexing?
What is this demultiplexing? So, this is the main thing that it is supporting this different
network layer protocols at the same time.
Suppose there are two network layer protocols, p1 and p2, both of them are using same link
and both of them are using the same point to point link. So, it is using the point to
point protocol. Both of them will send it to the PPP that is they will get some multiplex
and then send, on the other side. The receiving side, by taking at it, the receiving node
that PPP system, it will get something, it will know whether it is meant for p1, protocol
p1 on the network the layer or protocol p2 for the network layer. So, it is separating
arc. So, this is demutiplexing, so this has to be possible. This is one of the requirements.
The other requirement is bit transparency which we have talked about, which must be
always there. That means it must carry any bit pattern in the data field. So, whatever
you may decide as your flag etc, but finally all those bit patterns may appear in the data.
That is all …
We require only error detection, no correction at the receiving end. That is another point.
So, we require only error detection. Connection liveness: we must be able to detect, signal
link failure to network layer. So, we must be able to detect whether the connection is
live or not. If it is not live then we must be able to give that information to the network
layer. So, network layer may decide to send its data through, using some other channel.
Network layer address negotiation, so endpoint can learn/configure each other’s network
address etc., that is also. So, these are all part of PPP design requirements.
Non-requirements, these are not actually called for, so no error correction or recovery, we
have mentioned this. No flow control, here it is assumed that whatever the sender is
sending, the receiver can absorb that. So, there is no explicit flow control. Out of
order delivery is okay that means you do not care if your packets are going or reaching
the destination out of order. Of course, if you are sending it through a particular transmission
line, just one link, they are not lightly to get out of order, but anyway, PPP, even
if it does because of some strange reason, PPP is not worried about it. No need to support
multipoint links. So, that is also not in its agenda at all, it is just point to point.
Error recovery, flow control and data re-ordering, if they are necessary, they are relegated
to higher layers.
So, now just look at this once again and see what it does. First one is this flag, so this
flag 001111110, this is the flag which shows the beginning of the frame and the same pattern
shows the end of the frame. So, they are the delimiter for framing. Address, this address
is actually meaningless over here because, as I mentioned, since this is the PPP link,
whatever you are sending, pumping from one end, it will reach only one destination on
the other end. So, there is no necessity for having a separate address field. So, address
field is just used all once. It does not really serve much of our purpose. The control field
also at the moment does not, was not kept over there because if it used n this, some
extending the protocol, somehow later. So, this field was there, control field. Once
again this is not used.
Protocol, this is used because upper layer protocol to which frame delivered. Because
whatever frame is coming, this is meant for which protocol? You remember, we were talking
about that example, that in the network layer 2 different protocols are running p1 and p2
and both of them are using same PPP, in that case on the receiving end, by getting a frame,
you should know whether this frame is meant for p1 protocol which is running at the upper
layer or the p2 protocol which is running at the upper layer. Both of them are running
concurrentlly.
Then this check, this is for error detection part. How this check is done, we will see
in the next lecture and the end delimiter. In the data frame some info that is upper
layer data being carried and the check is the cyclic redundancy check for error. So
info is the upper layer data. So this is the main body or the payload which is being carried.
The check is for error detection.
It uses byte stuffing. You see that <01111110>, which is the flag. So, this is 1 byte, so
this is 8 bits, so that is 1 byte is received now. So, the question is received this same
pattern, is it data or is it flag. Sender adds extra 01111110 byte after each <01111110>
data byte. If it had been a part of data, then instead of getting one such pattern,
you will get two such consecutive patterns. Whereas, if it is occurring singly, that means
that it is a frame delimiter. So, two such patterns in a row discard first byte, continue
data reception. Single this thing means it is a flag byte.
So this is the one, inside the data you have this pattern, the same I have shown. So, after
PPP, instead of sending it will send first this B1 then B2 etc., and then instead of
sending one of them 01110, it sends two of them and then B4 and B5. This is byte stuffing
which is used by PPP.
There are a few control issues like before exchanging network layer data: data link peers
must configure PPP link, maximum frame length, authentication etc, and so we have a, I think
this is the better diagram, so we can look at this.
The first thing is the link may be dead. Then the carrier is detected. So it will try to
establish the link. For that, they will require some authentication that means the two sides,
configurations, etc. that must agree if it fails to establish then it goes back to dead.
If it gets successful, authentication is successful then of course the network, it is open and
then there is some transmission of data and then finally it will terminate. So for all
these, there is a data exchange. We need not go into the details of this.
Configure request, configure acknowledgement and configure not acknowledgement that means
your configured thing is not acknowledged. Some of the options are not accepted and some
of the options are not negotiable. So this way, the two sides communicate and establish
the link. We need not go into the details. This is not really necessary.
This is a very simple protocol. Just use byte stuffing and use some data, some error detection
and the framing. This is very simple but very widely used protocol. In the next lecture,
we will look at the details of how this error detection and error control can be done by
the data link layer. Thank you.
Good day. So, in the last lecture, we have seen some functionalities of data link layer,
mainly framing etc., and we have been talking often on about the error control, that is
error control means error detection, correction etc. So, we will be talking about error detection,
correction in this lecture. We will be talking about error control now.
Data errors, when data is transmitted over a cable or a channel, there is always a chance
that some of the bits will be changed or corrupted due to noise signal distortion or attenuation.
So, so many things may happen, for example, suppose you have a wireless channel and suddenly
there is a burst of noise. What will happen is that some of the data will get garbled.
Similarly, the data may have become very attenuated, may be due to some loose contact somewhere
or something. Then one that was sent was not received that way or maybe it was received
as a zero or something. So whenever you are sending some data or something, there is some
communication going on, some transmission over some transmission line. You always have
to assume that data may not reach the other side in a perfect condition. So, that is why
CRC is preferred in many data link protocols.
So, what is CRC? Let us just look at the details of it. Essentially, the data is regarded as
being one very long binary number. After all, what you are sending is a string of ones and
zeros. So, you can take a few of them and just look at it as a binary number although
the original intention of the user or if you are adding the header also, it then got even
more mixed up, it was not be interpreted as a number but for CRC purpose, we interpret
it as a binary number anyway.
As we will see later on, so we will continue our discussion on this error control and then
we will move on to flow control etc., in the next lecture. So, this is a simple kind of
protocol but this has got efficiency problem, in the sense, that this is not very efficient.
So, we will continue this discussion in the next lecture.Thank you. 543