Page Content

Tutorials

What is Frame Forwarding and Frame Forwarding Methods

What is Frame Forwarding?

Network switches at the OSI model’s Data Link Layer (Layer 2) are mostly responsible for frame forwarding, a basic computer networking function. Its goal is to transport Ethernet frames between devices on the same local network as efficiently as possible, ensuring that data reaches the intended recipient and minimizing unnecessary network traffic.

Frame Forwarding
Frame Forwarding

What is Frame?

A logical collection of data transmitted as a data-link layer unit across a transmission medium is called a frame. In particular, an Ethernet frame includes the data enclosed between the Ethernet data-link header and trailer. Layer 2 Protocol Data Units (PDUs) are what it is known as. Source and destination MAC addresses are among the important details found in the frame header. A Frame Check Sequence (FCS) for error detection utilizing a Cyclic Redundancy Check (CRC) is usually included in the trailer.

You can also read IPv6 Migration Explained: Transition From IPv4 To IPv6

How Network Frame Forwarding Works (Switch Frame Forwarding)

The MAC address table, sometimes referred to as a forwarding table or Content Addressable Memory, or CAM table, is used by switches to function as a database that associates device MAC addresses with the ports to which they are connected. There are numerous crucial steps in the process:

  • Frame Reception: An Ethernet frame is received by the switch through an incoming port, a process known as frame reception.
  • Address Learning: The process by which switches learn source MAC addresses from incoming frames and store this information in a MAC address table (also called a forward/filter table or Content Addressable Memory, or CAM) together with the incoming port. A MAC address’s timestamp is updated if it is already in the table.
  • MAC Address Table Lookup: The switch reads the destination MAC address from the header of the frame. It then determines the correct egress (outgoing) port by using its MAC address table.
  • Forwarding Decision:
    • Known Unicast: Only that particular port receives the frame if the switch can locate the target MAC address in the database.
    • Filtering: To avoid forwarding the frame to other segments and conserve bandwidth, the switch filters the frame if the destination device is on the same network segment as the source (i.e., on the same switch port).
    • Unknown Unicast, Broadcast, or Multicast: The switch “floods” the frame if the destination MAC address is broadcast (such as FFFF.FFFF.FFFF) or multicast, or if it is unknown (unknown unicast) and cannot be located in the table. It does this by sending a copy of the frame out of every port save the one on which it was received. The switch learns its MAC address for later use after the destination device has had time to receive the frame and react as a result of this flooding.
  • Frame Transmission: After choosing a port or ports, the frame is transmitted to its intended device.

Additionally, switches use loop avoidance techniques, like the Rapid Spanning Tree Protocol (RSTP) or Spanning Tree Protocol (STP), to avoid network loops by putting switch ports in either a blocking or forwarding state. Blocking ports does not forward user frames. In order to ensure that the receiving switch floods the frame only into the proper VLAN, switches employ VLAN Trunking, which involves adding a tiny VLAN header with a VLAN ID to the Ethernet frame when it is traversing multiple VLANs.

You can also read What is SLAAC IPv6(Stateless IPv6 Address Autoconfiguration)

Frame Forwarding Methods

Switches employ a variety of frame forwarding techniques to balance data integrity (ensuring error-free transmission) with latency (the delay introduced). The two main techniques are Cut-Through and Store-and-Forward switching, with Fragment-Free being a variant of Cut-Through. Both approaches use the destination MAC address as the basis for their forwarding choices.

Store-and-Forward Switching:

Process: Before forwarding, the switch buffers the full frame after receiving it. Importantly, a Cyclic Redundancy Check (CRC) is then carried out to guarantee that the frame is error-free. The frame is discarded to stop the spread of tainted data if an error is found (CRC values don’t match). Additionally, this approach eliminates frames that are greater than 1518 bytes (giants) and smaller than 64 bytes (runts).

Trade-offs: Before forwarding, the switch must wait for the entire frame to arrive and be checked, which results in increased latency. Nonetheless, it provides excellent dependability and guarantees error-free transmission. Quality of Service (QoS) analysis requires it, and it is frequently the default on contemporary switching equipment.

Cut-Through Switching:

Process: By forwarding the frame as soon as the destination MAC address is read, this approach puts speed first. It does not wait for the full frame or run a complete error check. To read the destination MAC address, which is usually the first six bytes, the switch just has to buffer a sufficient portion of the packet. Cut-through switching forwards incorrect Ethernet frames to the following nodes until another device invalidates the frame’s Frame Check Sequence (FCS), in contrast to store-and-forward.

Trade-offs: It offers extremely quick forwarding and drastically lowers latency. The integrity check is omitted, though, which increases the possibility that corrupted frames may be sent.

Fast-Forward Switching: By instantly forwarding a packet after reading the destination address (from the first byte received), fast-forward switching, the most popular type of cut-through switching, has the lowest latency.

Fragment-Free Switching: This cut-through switching variant aims to reduce the possibility of forwarding mistakes. Before forwarding, it looks for collision fragments in the first 64 bytes of an incoming frame. The reason for this is that the majority of collision-related problems usually happen in the first 64 bytes of a frame. It is an attempt to balance the low latency and diminished integrity of fast-forward switching with the high latency and integrity of store-and-forward switching. The use of this technique has decreased.

Router Frame Forwarding (Frame Rewrite)

Router Frame Forwarding
Router Frame Forwarding

Network layer packet forwarding across several networks is the responsibility of routers, which function at Layer 3 (the Network Layer), whereas switches are mostly in charge of Layer 2 frame forwarding. This procedure, frequently referred to as “frame rewrite,” entails:

Processing Incoming Frame: When a data-link frame is received, the router processes it, looks for mistakes in its FCS, and confirms that the destination data-link address (or broadcast/multicast address) matches its own.

De-encapsulation: When an IP packet is handled, the router discards the old header and trailer and extracts the packet from the data-link frame.

Routing Decision: Choosing the best outgoing interface and possibly the next-hop router involves consulting the routing table based on the packet’s destination IP address.

Encapsulation (Frame Rewrite): The IP packet is repackaged by the router into a new data-link header and trailer that are suitable for the exiting interface. The old data-link header/trailer is removed, and a new set is added for the subsequent hop in a process called frame rewrite.

Transmission: The new frame is sent out through the outgoing interface.

Advanced and Specific Contexts

Software-Defined Access (SDA): Frame forwarding in Cisco’s SDA networks makes use of VXLAN tunneling. The initial frame of an endpoint is wrapped in a VXLAN message by an ingress tunnel router (ITR), sent via the fabric, and then de-encapsulated by the final SDA node before arriving at its destination.

Frame Relay: A Layer 2 WAN technique called Frame Relay sends data over Wide Area Network lines by using virtual circuits. Frame Relay frames have the ability to relay broadcasts to all network destinations and contain particular fields for flags, address (including payload Link Connection Identifiers or DLCIs), payload, congestion control bits, and an FCS.

Web Frame Forwarding (URL Frame Forwarding)

Importantly, “frame forwarding” also refers to a different web hosting procedure. With this method, users are redirected to a new URL but the original domain remains displayed in the address bar of the browser. It allows the owner to show material from another website under their own domain name while preserving their branding by putting an invisible HTML frame on the original website that loads content from the destination site.

You can also read Advantages Of VLSM Variable Length Subnet Masking, Purpose

Index