OSI Layer 2 - Datalink Layer

             
    The first four layers define how data is transmitted end-to-end.

Some common protocols which work at the Datalink layer are: ARP, RARP, DCAP.

   
 

Layer 2 - The Datalink Layer

The Datalink ensures that messages are delivered to the proper device and translates messages from the Network layer into bits for the Physical layer to transmit. It formats the message into data frames (notice how we are not using the term segments) and adds a customized header containing the hardware destination and source address.

This added information forms a sort of capsule that surrounds the original message (or data), think of it like grabbing a letter which has information and putting it into an envelope. The envelope is only used to get the letter to its destination, right? So when it arrives at the addressee, the envelope is opened and discarded, but the letter isn't because it has the information the addressee needs.

Data traveling through a network works in a similair manner. Once it gets to the destination, it will be opened and read (processed). This is illustrated in the Data Encapsulation - Decapsulation section.

The Datalink layer is subdivided into two other sublayers, the Media Access Control (MAC) and the Logical Link Control (LLC). The figure below illustrates this:

                 
                 
           
    Media Access Control (MAC) 802.3

This defines how packets are placed on the media (cable). Contention media (Ethernet) access is first come first served access where everyone shares the same bandwidth. Physical addressing is defined here. What's Physical addressing? It's simple.

You will come across 2 addressing terms, 1)Logical addressing 2)Physical addressing.

Logical addressing is basically the address which is given by software e.g IP address.When you get an IP address, this is considered a "logical address" which is provided to you after your TCP/IP stack is loaded.

Physical addressing is an address which is given not by the software, but the hardware. Every network card has a "MAC" address which is burnt into the card's eprom (a special memory chip) and this special address is used to uniquely identify your computer's network card from all the others on the network.

There is a whole page dedicated to MAC Addressing if you would like to read more about it.

Logical Link Control (LLC) 802.2

This sublayer is responsible for identifying Network layer protocols and then encapsulating them when they are about to be transmitted onto the network or decapsulate them when it receives a packet from the network and pass it onto the layer above it, which is the Network layer. An LLC header tells the Datalink layer what to do with a packet once a frame is received. For example, a host (computer) will receive a frame and then look in the LLC header to understand that the packet is destined for the IP protocol at the Network layer. The LLC can also provide flow control and sequencing of control bits.

If you are finding all this a bit too difficult to understand, I suggest that you read more on the OSI model and check the Data Encapsulation - Decapsulation page which explains how the data travels up and down the OSI model and shows how each layer adds or removes its header information depending on the direction of the data.

 

 
Back

Top

Next - Layer 3

     
  Networking Menu  
    Firewall    
    Networking    
    Cabling    
    Protocols    
    Routing     
    Routers    
    Ethernet      
    Fast Ethernet    
 
   Introduction   
   Introduction   
   Introduction   
   Firewall Topologies   
   Firewall Topologies   
   Firewall Topologies   
   The DMZ Zone   
   The DMZ Zone   
   The DMZ Zone   
   DoS & DDoS Attacts   
   DoS & DDoS Attacts   
   DoS & DDoS Attacts   
   Locking Win9x
   Locking Win9x
   Locking Win9x
   Network Add Translation   
   Network Add Translation   
   Network Add Translation   
 
   Introduction   
   Introduction   
   Introduction   
   The NAT Concept   
   The NAT Concept   
   The NAT Concept   
   The NAT Table   
   The NAT Table   
   The NAT Table   
   Static NAT (Part 1)
   Static NAT (Part 1)
   Static NAT (Part 1)
   Static NAT (Part 2)
   Static NAT (Part 2)
   Static NAT (Part 2)
   Dynamic NAT (Part1)
   Dynamic NAT (Part1)
   Dynamic NAT (Part1)
   Dynamic NAT (Part2)
   Dynamic NAT (Part2)
   Dynamic NAT (Part2)
   Overload NAT/PAT (part1)
   Overload NAT/PAT (part1)
   Overload NAT/PAT (part1)
   Overload NAT/PAT (part2)   
   Overload NAT/PAT (part2)   
   Overload NAT/PAT (part2)   
 
   General   
   General   
   General   
   Data Transmission   
   Data Transmission   
   Data Transmission   
   IP Subnetting   
   IP Subnetting   
   IP Subnetting   
   Supernetting   
   Supernetting   
   Supernetting   
 
   Introduction   
   Introduction   
   Introduction   
   Topologies   
   Topologies   
   Topologies   
 
   Introduction   
   Introduction   
   Introduction   
   Mac Addresses   
   Mac Addresses   
   Mac Addresses   
   Broadcast B   
   Broadcast B   
   Broadcast B   
   Multicast   
   Multicast   
   Multicast   
   Multicast IP List  
   Multicast IP List  
   Multicast IP List  
   Unicast V   
   Unicast V   
   Unicast V   
   Controlling Multicast & Broadcast   
   Controlling Multicast & Broadcast   
   Controlling Multicast & Broadcast   
 
   Introduction   
   Introduction   
   Introduction   
   Basic Concept   
   Basic Concept   
   Basic Concept   
   Subnet Mask Effect   
   Subnet Mask Effect   
   Subnet Mask Effect   
   Subnet Mask Bit   
   Subnet Mask Bit   
   Subnet Mask Bit   
   Subnet Routing & Communications   
   Subnet Routing & Communications   
   Subnet Routing & Communications   
   Subnetting Guidlines   
   Subnetting Guidlines   
   Subnetting Guidlines   
 
   Introduction   
   Introduction   
   Introduction   
   In Depth Analysis   
   In Depth Analysis   
   In Depth Analysis   
   Supernetting Chart   
   Supernetting Chart   
   Supernetting Chart   
   Securing Your Home Network   
   Securing Your Home Network   
   Securing Your Home Network   
 
   Introduction   
   Introduction   
   Introduction   
   UTP CAT 1/2/3/4/5/6 Cable   
   UTP CAT 1/2/3/4/5/6 Cable   
   UTP CAT 1/2/3/4/5/6 Cable   
   UTP Straight Through Cable   
   UTP Straight Through Cable   
   UTP Straight Through Cable   
   UTP X-over Cable   
   UTP X-over Cable   
   UTP X-over Cable   
   Fiber Optic Cable   
   Fiber Optic Cable   
   Fiber Optic Cable   
   10Base T/2/F/5/35   
   10Base T/2/F/5/35   
   10Base T/2/F/5/35   
   100Base T/TX/T4/FX   
   100Base T/TX/T4/FX   
   100Base T/TX/T4/FX   
   Direct Cable Connection (DCC)   
   Direct Cable Connection (DCC)   
   Direct Cable Connection (DCC)   
 
   Introduction   
   Introduction   
   Introduction   
   Serial DCC    
   Serial DCC    
   Serial DCC    
   Parallel DCC   
   Parallel DCC   
   Parallel DCC   
   USB DCC   
   USB DCC   
   USB DCC   
   Important Notes For DCC    
   Important Notes For DCC    
   Important Notes For DCC    
 
   Introduction   
   Introduction   
   Introduction   
   TCP   
   TCP   
   TCP   
   In Depth TCP Analysis   
   In Depth TCP Analysis   
   In Depth TCP Analysis   
   DNS   
   DNS   
   DNS   
   DNS Server Setup (Unix-BIND)   
   DNS Server Setup (Unix-BIND)   
   DNS Server Setup (Unix-BIND)   
   ICMP   
   ICMP   
   ICMP   
   Internet Protocol (IP)   
   Internet Protocol (IP)   
   Internet Protocol (IP)   
   The OSI Model   
   The OSI Model   
   The OSI Model   
 
   Introduction    
   Introduction    
   Introduction    
   A Transport Protocol   
   A Transport Protocol   
   A Transport Protocol   
   Quick Overview    
   Quick Overview    
   Quick Overview    
   TCP Header / Segment   
   TCP Header / Segment   
   TCP Header / Segment   
 
   Introduction    
   Introduction    
   Introduction    
   Source & Destination Port    
   Source & Destination Port    
   Source & Destination Port    
   Sequence & Ack. Numbers   
   Sequence & Ack. Numbers   
   Sequence & Ack. Numbers   
   Header Length    
   Header Length    
   Header Length    
   TCP Flag Options   
   TCP Flag Options   
   TCP Flag Options   
   Window, Checksum, Urgent Flags   
   Window, Checksum, Urgent Flags   
   Window, Checksum, Urgent Flags   
   TCP Options   
   TCP Options   
   TCP Options   
   Data    
   Data    
   Data    
   UDP    
   UDP    
   UDP    
   FTP   
   FTP   
   FTP   
   TFTP   
   TFTP   
   TFTP   
 
   Introduction   
   Introduction   
   Introduction   
   The DNS Protocol   
   The DNS Protocol   
   The DNS Protocol   
   The DNS Resolution Process   
   The DNS Resolution Process   
   The DNS Resolution Process   
   DNS Query Messages   
   DNS Query Messages   
   DNS Query Messages   
   DNS Response Messages   
   DNS Response Messages   
   DNS Response Messages   
 
   Introduction   
   Introduction   
   Introduction   
   The db.domain file   
   The db.domain file   
   The db.domain file   
   The db.addr file   
   The db.addr file   
   The db.addr file   
   Other Common Files   
   Other Common Files   
   Other Common Files   
   Slave DNS Server   
   Slave DNS Server   
   Slave DNS Server   
   DNS Caching   
   DNS Caching   
   DNS Caching   
 
   Introduction    
   Introduction    
   Introduction    
   ICMP Echo/Echo Reply (ping)    
   ICMP Echo/Echo Reply (ping)    
   ICMP Echo/Echo Reply (ping)    
   ICMP Destination Unreachable    
   ICMP Destination Unreachable    
   ICMP Destination Unreachable    
   ICMP Source Quench    
   ICMP Source Quench    
   ICMP Source Quench    
   ICMP Redirect   
   ICMP Redirect   
   ICMP Redirect   
   ICMP Time Exceeded   
   ICMP Time Exceeded   
   ICMP Time Exceeded   
 
   Introduction   
   Introduction   
   Introduction   
   Binary & IP   
   Binary & IP   
   Binary & IP   
   The IP Header   
   The IP Header   
   The IP Header   
   IP Classes   
   IP Classes   
   IP Classes   
 
   Introduction   
   Introduction   
   Introduction   
   Layer 1   
   Layer 1   
   Layer 1   
   Layer 2   
   Layer 2   
   Layer 2   
   Layer 3   
   Layer 3   
   Layer 3   
   Layer 4   
   Layer 4   
   Layer 4   
   Layer 5   
   Layer 5   
   Layer 5   
   Layer 6   
   Layer 6   
   Layer 6   
   Layer 7   
   Layer 7   
   Layer 7   
   Layer Encapsulation & Decapsulation    
   Layer Encapsulation & Decapsulation    
   Layer Encapsulation & Decapsulation    
 
   Introduction   
   Introduction   
   Introduction   
   Routed Protocols   
   Routed Protocols   
   Routed Protocols   
   IP Routing   
   IP Routing   
   IP Routing   
   Routing Protocols   
   Routing Protocols   
   Routing Protocols   
 
   Introduction   
   Introduction   
   Introduction   
   Distance Vector Routing Protocols   
   Distance Vector Routing Protocols   
   Distance Vector Routing Protocols   
   Link State Routing Protocols   
   Link State Routing Protocols   
   Link State Routing Protocols   
   Hybrid Routing Protocols   
   Hybrid Routing Protocols   
   Hybrid Routing Protocols   
   OSPF Routing Protocol   
   OSPF Routing Protocol   
   OSPF Routing Protocol   
   RIP Routing Protocol   
   RIP Routing Protocol   
   RIP Routing Protocol   
   IGRP Routing Protocol   
   IGRP Routing Protocol   
   IGRP Routing Protocol   
   EIGRP Routing Protocol   
   EIGRP Routing Protocol   
   EIGRP Routing Protocol   
   Connectivity Devices   
   Connectivity Devices   
   Connectivity Devices   
 
   Hubs & Repeaters   
   Hubs & Repeaters   
   Hubs & Repeaters   
   Switches & Bridges   
   Switches & Bridges   
   Switches & Bridges   
 
   Introduction   
   Introduction   
   Introduction   
   Cisco Basics   
   Cisco Basics   
   Cisco Basics   
   Cisco Modes   
   Cisco Modes   
   Cisco Modes   
 
   Introduction   
   Introduction   
   Introduction   
   User Exec Mode    
   User Exec Mode    
   User Exec Mode    
   User Privileged Mode   
   User Privileged Mode   
   User Privileged Mode   
 
   Introduction   
   Introduction   
   Introduction   
   Frame Formats   
   Frame Formats   
   Frame Formats   
   Collisions   
   Collisions   
   Collisions   
 
   Introduction   
   Introduction   
   Introduction   
   Ethernet 802.3    
   Ethernet 802.3    
   Ethernet 802.3    
   Ethernet II   
   Ethernet II   
   Ethernet II   
   Ethernet 802.3 SNAP   
   Ethernet 802.3 SNAP   
   Ethernet 802.3 SNAP   
   Ethernet 802.3 Raw (Novell)   
   Ethernet 802.3 Raw (Novell)   
   Ethernet 802.3 Raw (Novell)   
   Media Access   
   Media Access   
   Media Access   
 
   Introduction    
   Introduction    
   Introduction    
   Early Collisions    
   Early Collisions    
   Early Collisions    
   Late Collisions    
   Late Collisions    
   Late Collisions    
   Propagation Delay    
   Propagation Delay    
   Propagation Delay    
   Frame Corruption   
   Frame Corruption   
   Frame Corruption   
   Interframe Gap    
   Interframe Gap    
   Interframe Gap    
   Signal Encoding    
   Signal Encoding    
   Signal Encoding    
 
   Introduction    
   Introduction    
   Introduction    
   10/100 Mbits   
   10/100 Mbits   
   10/100 Mbits   
   Integration   
   Integration   
   Integration   
   Migration   
   Migration   
   Migration   
   The Fast Ethernet Model   
   The Fast Ethernet Model   
   The Fast Ethernet Model   
   Troubleshooting    
   Troubleshooting    
   Troubleshooting