Layer 2: Data Link Layer
Frames are encoded and decoded into bits at Layer 2.
Error detection and correction for the Layer 1 can be provided here.
Ethernet is the Layer 2 medium used in Local Area Networks (LAN).
The picture describes the Ethernet Header:
- Preamble: it is used to help the sender and the receiver to synchronize
- Destination ad Source Addresses: they are the MAC addresses for the Ethernet connections
- Frame Check Sequence (
FCS): it is used to check the integrity of the frame
Media Access Control (MAC) Address
The Media Access Control (MAC) address is a 48 bit hex address used by the Ethernet connection.
The first 24 bits identify the Organizationally Unique Identifier (OUI), which uniquely identifies the manufacturer of the Ethernet port. The OUI is assigned by the IEEE.
The last 24 bits are vendor - assigned.
The burned in MAC address on every NIC port in the world is globally unique. There is also no logical addressing in MAC addresses.
Get Information about the MAC Address
- WINDOWS:
$ ipconfig /a
- LINUX:
$ ifconfig
- CISCO Router:
# show interface