OSI Model Layer 2¶
Second Layer
Data link layer
Defines how to transfer data among network nodes, how data is formatted for transmission, how access to network is controlled.
Also error detection.
Data in this layer is called frames.
LAN¶
Local Area Network
A network that is local. Usually network entities inside are close to each other.
Protocols¶
There are many protocols that can be used for this layer.
- PPP (Point-to-Point)
- FR (Frame Relay)
- Ethernet
- …
Ethernet is the most used one.
Sub-layers¶
Data Link Layer has 2 sub-layer
- LLC (Logical Link Control Layer)
- MAC (Media Access Control)
MAC Addressing¶
Used for communication of a network segment.
There are many nodes in one network
An identification for specific ones
See MAC address - Wikipedia for more details (about 48-bit structure)
Each MAC address of one hardware is (supposed to be) unique and cannot be changed.
It has 48 bits, 2 parts.
- OUI
- Organizationally Unique Identification
- Vendor Assigned
MAC Address also has some special bits indicating unicast vs multicast and globally unique vs locally administered.
Since the number of devices is much larger than 48 bits, MAC address is hard to be unique any more.
It’s usually represented in hexadecimal.
Ethernet Frame Structure¶
Each layer will “attach” its HDR to the data is OSI model.
And the HDR for this layer with Ethernet as the protocol is called Ethernet Frame Structure.
FCS (Frame Check Sequence) is used for error detection.
Devices will check the destination address when receiving a frame.
IEEE 802.3.