Topic 6.2 Data Link Layer
Topic 6.2 Data Link Layer
Encapsulation
Each message is encapsulated into a specific format,
called a frame, that includes the source and
destination addresses.
Ethernet Frame
On an Ethernet network, messages are put into a frame or Layer 2 protocol data units (PDUs).
4
Ethernet Frame
• PREAMBLE – Ethernet frame starts with a 7-Bytes
Preamble. PRE (Preamble) indicates to the receiver that
frame is coming and allow the receiver to lock onto the
data stream before the actual frame begins.
• Start of frame delimiter (SFD) –SFD indicates that
upcoming bits are starting the frame, which is the
destination address. Sometimes SFD is considered part of
PRE, this is the reason Preamble is described as 8 Bytes
in many places. The SFD warns station or stations that
this is the last chance for synchronization.
Ethernet Frame
• Destination Address – This is a 6-Byte field that contains
the MAC address of the machine for which data is
destined.
• Source Address – This is a 6-Byte field that contains the
MAC address of the source machine. As Source Address
is always an individual address (Unicast), the least
significant bit of the first byte is always 0.
• Length – Length is a 2-Byte field, which indicates the
length of the entire Ethernet frame. This 16-bit field can
hold a length value between 0 to 65534, but length
cannot be larger than 1500 Bytes because of some own
limitations of Ethernet.
Ethernet Frame
• Data – This is the place where actual data is inserted, also
known as Payload. Both IP header and data will be
inserted here if Internet Protocol is used over Ethernet.
The maximum data present may be as long as 1500 Bytes.
In case data length is less than minimum length i.e. 46
bytes, then padding 0’s is added to meet the minimum
possible length.
• Frame Check Sequence – It’s a checksum that computes
the entire frame.
Frame Processing
Any device that is the source or destination of an Ethernet
frame, will have an Ethernet NIC and therefore, a MAC
address. This includes workstations, servers, printers,
mobile devices, and routers.
Switch Fundamentals
• A Layer 2 Ethernet switch uses Layer 2 MAC addresses to make
forwarding decisions. It is completely unaware of the data
(protocol) being carried in the data portion of the frame, such as an
IPv4 packet, an ARP message, or an IPv6 ND packet. The switch
makes its forwarding decisions based solely on the Layer 2 Ethernet
MAC addresses.
• An Ethernet switch examines its MAC address table to make a
forwarding decision for each frame.
• When a switch is turned on, the MAC address table is empty
•Note: If the source MAC address does exist in the table but on a
different port, the switch treats this as a new entry. The entry is
replaced using the same MAC address but with the more current port
number.
41