Switch

Summary Table of Switch Methods

MethodHow It WorksSpeedError CheckingFrame Processing StartNotes / Use Cases
Store-and-ForwardReceives entire frame, checks for errors (CRC), then forwards if valid.SlowestBest (CRC check)After full frame receivedHigh accuracy, supports different port speeds
Cut-ThroughStarts forwarding after reading destination MAC (first 6–8 bytes), before whole frame arrives.FastestNoneAfter 1st 6–8 bytesLowest latency, may forward corrupted frames
- Fragment-FreeWaits for first 64 bytes (to filter out runts), then forwards.ModerateLimited (runts)After 64 bytes receivedBalances speed and error avoidance (filters runts)
- Fast-ForwardOften used as another term for cut-through (vendor-specific); behaves like cut-through.FastestNoneAfter 1st 6–8 bytesSometimes used interchangeably with cut-through

Method Details

Store-and-Forward

  • Switch receives the entire Ethernet frame into memory.
  • Performs a CRC (Cyclic Redundancy Check) to detect errors.
  • Only forwards error-free frames.
  • Introduces the most latency but ensures data integrity.
  • Can connect ports of different speeds.

Cut-Through

  • Switch reads only enough of the frame to learn the destination MAC (typically first 6–8 bytes).
  • Starts forwarding immediately after determining the output port.
  • Lowest latency, but may forward frames with errors.
  • Cannot detect or filter out corrupted frames.

- Fragment-Free

  • Switch waits for the first 64 bytes of the frame before forwarding.
  • 64 bytes is the minimum legal Ethernet frame size; anything smaller is a "runt" (likely a collision fragment).
  • Filters out runts but does not check for other errors.
  • Provides a balance between speed and error avoidance.

- Fast-Forward

  • Often a vendor-specific term for cut-through switching.
  • Behavior is essentially the same as cut-through: forwards frames as soon as the destination MAC is read.
  • Focuses on minimizing latency.

Visual Comparison

FeatureStore-and-ForwardCut-ThroughFragment-FreeFast-Forward
LatencyHighLowMediumLow
Error Detection (CRC)YesNoNo (except runts)No
Filters RuntsYesNoYesNo
When Forwarding StartsAfter full frameAfter 6–8 bytesAfter 64 bytesAfter 6–8 bytes
Port Speed ConversionYesNoNoNo

In summary:

  • Store-and-forward maximizes reliability but adds delay.
  • Cut-through (and fast-forward) minimizes delay but may propagate errors.
  • Fragment-free offers a compromise, filtering out the most common collision fragments but not all errors.

Ethernet Frame Fields

An Ethernet frame is a structured packet used for data transmission at the data link layer. It encapsulates both addressing and error-checking information, along with the payload. Here are the main fields in a standard Ethernet II frame:


Ethernet Frame Structure

FieldSize (Bytes)Description
Preamble7Synchronizes the receiver's clock; pattern of alternating 1s and 0s
Start Frame Delimiter1Marks the end of preamble and start of the frame (10101011)
Destination MAC Address6MAC address of the receiving device
Source MAC Address6MAC address of the sending device
EtherType/Length2Indicates protocol type (e.g., IPv4, IPv6) or payload length
(Optional) VLAN Tag4Used for VLAN identification (802.1Q)
Payload (Data and Pad)46–1500Data being transmitted; padded if less than 46 bytes
Frame Check Sequence4CRC for error checking

Field Descriptions

  • Preamble: 7 bytes of alternating 1s and 0s for synchronization.
  • Start Frame Delimiter (SFD): 1 byte (10101011) indicating the start of the actual frame.
  • Destination MAC Address: 6 bytes specifying the intended recipient.
  • Source MAC Address: 6 bytes specifying the sender.
  • EtherType/Length: 2 bytes; EtherType (≥1536) specifies the upper-layer protocol, or Length (≤1500) for payload size.
  • VLAN Tag (optional): 4 bytes inserted after the source MAC for VLAN tagging.
  • Payload (Data and Pad): Actual data; minimum 46 bytes (padded if needed), maximum 1500 bytes.
  • Frame Check Sequence (FCS): 4 bytes CRC for error detection.

Visual Representation

| Preamble | SFD | Dest MAC | Src MAC | EtherType/Length | [VLAN Tag] | Payload (Data+Pad) | FCS | | 7 B | 1 B | 6 B | 6 B | 2 B | 4 B | 46–1500 B | 4 B |


Note:

  • VLAN Tag is optional and present only in VLAN-enabled networks.
  • The minimum Ethernet frame size is 64 bytes (including all fields).
  • The maximum payload is 1500 bytes, and the maximum frame size (without VLAN) is 1518 bytes.