DATA LINK Layer – Layer 2

What is Data-Link Layer
  • Layer 2 of OSI Model
  • The unit used here is Frames
  • Layer 2 is where the Ethernet frame lives
  • Data Link layer has two sub-layers
    • LLC – Logical Link Control
    • MACMedia Access Control
  • The logical link control layer is to detect error correction.
  • We don’t care about this as much nowadays because we use TCP which does error correction on the transport layer.
MAC Layer
  • MAC- Media Access Layer
  • Every device on our LAN has a unique identifier on the data link layer, this is our “MAC address”.
  • One of the other things that our MAC sublayer does is taking care of channel access.
  • This makes it possible so computers connected to the same physical medium can access and share it.
What is Same Physical Medium means ? 
  • All computers in the network were connected to a single long black coax cable (our physical medium) and were sharing the network. 
  • A network like this was half-duplex which means that only 1 computer was able to send traffic and the others had to wait.
  • What do you think would happen if two computers would start sending data at the exact same moment?
  • You get a collision and no data transmission at all…
  • If you are running a half-duplex network we need to make sure that there is a Protocol called CSMA/CD ( Carrier Sense Multi Access /Collision Detection)
CSMA/CD
  • Carrier sense means we can “listen” on the cable to hear if anything is going on, in other words if another computer is sending data at this moment
  • Multi access means everyone can access our physical medium but it has to be clear…no other computer should be sending at that moment.
  • In case 2 computers send at the same time we have a collision, by using CSMA/CD we can detect that one computer is sending the traffic, so that the other computer won’t send. It helps to avoid collision.
Ethernet Frame 
  • Preamble and SOF “Start of Frame delimiter” are to tell the receiver that an Ethernet frame is incoming.
  • Length is of course the size of our Ethernet     
  • Frame, 802.2 Header/Data is where the LLC sub-layer or data fits in.
  • At the end you’ll find a FCS (Frame Check Sequence) to see if the frame is OK or corrupted.
Characteristics of MAC
  • 48 bit Address
  • Represented in Hexadecimal format
  • Example : 00.54.85.57.9f.4c
  • First 24 bits are Organization Based, Last 24 bits are Vendor Based.
  • First 24 bits are similar for a particular vendor, Next 24 bits are assigned by vendor to Clients.
That't all about Data Link-Layer

You can also Look into my Video Tutorial

If you are interested you can also watch about this Tutorial


If you have any questions kindly comment...

Post a Comment