OSI Model Layer 2¶
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.
Switch is more common
Local Area Network
A network that is local. Usually network entities inside are close to each other.
There are many protocols that can be used for this layer.
- PPP (Point-to-Point)
- FR (Frame Relay)
Ethernet is the most used one.
The standards for Ethernet and LAN and so on are defined in:
- IEEE 802.2
- IEEE 802.3
Data Link Layer has 2 sub-layer
- LLC (Logical Link Control Layer)
- MAC (Media Access Control)
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.
- 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.
Communication Within LAN¶
- 1 to 1
- 1 to all
- Use FF:FF:FF:FF:FF:FF as the destination address
- 1 to more