fbpx
Frame Forwarding Switching
Frame Forwarding Switching

Frame Forwarding

Frame Forwarding
5

Summary

This topic explain how frames are forwarded in a switched network. Start learning CCNA 200-301 for free right now!!

Note: Welcome: This topic is part of Module 2 of the Cisco CCNA 2 course, for a better follow up of the course you can go to the CCNA 2 section to guide you through an order.

Switching in Networking

The concept of switching and forwarding frames is universal in networking and telecommunications. Various types of switches are used in LANs, WANs, and in the public switched telephone network (PSTN).

The decision on how a switch forwards traffic is made based on the flow of that traffic. There are two terms associated with frames entering and leaving an interface:

  • Ingress – This is used to describe the port where a frame enters the device.
  • Egress – This is used to describe the port that frames will use when leaving the device.

A LAN switch maintains a table that is referenced when forwarding traffic through the switch. The only intelligence of a LAN switch is its ability to use its table to forward traffic. A LAN switch forwards traffic based on the ingress port and the destination MAC address of an Ethernet frame. With a LAN switch, there is only one master switching table that describes a strict association between MAC addresses and ports; therefore, an Ethernet frame with a given destination address always exits the same egress port, regardless of the ingress port it enters.

Note: An Ethernet frame will never be forwarded out the same port it was on which it was received.

Click Play to see an animation of the switching process.

Switching process
Switching process

The Switch MAC Address Table

A switch is made up of integrated circuits and the accompanying software that controls the data paths through the switch. Switches use destination MAC addresses to direct network communications through the switch, out the appropriate port, toward the destination.

For a switch to know which port to use to transmit a frame, it must first learn which devices exist on each port. As the switch learns the relationship of ports to devices, it builds a table called a MAC address table. This table is stored in content addressable memory (CAM) which is a special type of memory used in high-speed searching applications. For this reason, the MAC address table is sometimes also called the CAM table.

LAN switches determine how to handle incoming data frames by maintaining the MAC address table. A switch populates its MAC address table by recording the source MAC address of each device connected to each of its ports. The switch references the information in the MAC address table to send frames destined for a specific device out of the port which has been assigned to that device.

The Switch Learn and Forward Method

The following two-step process is performed on every Ethernet frame that enters a switch.

Step 1. Learn – Examining the Source MAC Address

Every frame that enters a switch is checked for new information to learn. It does this by examining the source MAC address of the frame and port number where the frame entered the switch:

  • If the source MAC address does not exist in the MAC address table, the MAC address and incoming port number are added to the table.
  • If the source MAC address does exist, the switch updates the refresh timer for that entry. By default, most Ethernet switches keep an entry in the table for five minutes. 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.

Step 2. Forward – Examining the Destination MAC Address

If the destination MAC address is a unicast address, the switch will look for a match between the destination MAC address of the frame and an entry in its MAC address table:

  • If the destination MAC address is in the table, it will forward the frame out of the specified port.
  • If the destination MAC address is not in the table, the switch will forward the frame out all ports except the incoming port. This is called an unknown unicast. If the destination MAC address is a broadcast or a multicast, the frame is also flooded out all ports except the incoming port.

MAC Address Tables on Connected Switches

Click Play in the figure to view a demonstration of how two connected switches build MAC address tables.

MAC address tables Switches
MAC address tables Switches

Switching Forwarding Methods

Switches make Layer 2 forwarding decisions very quickly. This is because of software on application-specific-integrated circuits (ASICs). ASICs reduce the frame-handling time within the device and allow the device to manage an increased number of frames without degrading performance.

Layer 2 switches use one of two methods to switch frames:

  • Store-and-forward switching – This method makes a forwarding decision on a frame after it has received the entire frame and checked the frame for errors using a mathematical error-checking mechanism known as a cyclic redundancy check (CRC). Store-and-forward switching is Cisco’s primary LAN switching method.
  • Cut-through switching – This method begins the forwarding process after the destination MAC address of an incoming frame and the egress port have been determined.

Store-and-Forward Switching

Store-and-forward switching, as distinguished from cut-through switching, has the following two primary characteristics:

  • Error checking – After receiving the entire frame on the ingress port, the switch compares the frame check sequence (FCS) value in the last field of the datagram against its own FCS calculations. The FCS is an error checking process that helps to ensure that the frame is free of physical and data-link errors. If the frame is error-free, the switch forwards the frame. Otherwise, the frame is dropped.
  • Automatic buffering – The ingress port buffering process used by store-and-forward switches provides the flexibility to support any mix of Ethernet speeds. For example, handling an incoming frame traveling into a 100 Mbps Ethernet port that must be sent out a 1 Gbps interface would require using the store-and-forward method. With any mismatch in speeds between the ingress and egress ports, the switch stores the entire frame in a buffer, computes the FCS check, forwards it to the egress port buffer and then sends it.

The figure illustrates how store-and-forward makes a decision based on the Ethernet frame.

Store-and-Forward Switching
Store-and-Forward Switching

Cut-Through Switching

The store-and-forward switching method drops frames that do not pass the FCS check. Therefore, it does not forward invalid frames.

By contrast, the cut-through switching method may forward invalid frames because no FCS check is performed. However, cut-through switching has the ability to perform rapid frame switching. This means the switch can make a forwarding decision as soon as it has looked up the destination MAC address of the frame in its MAC address table, as shown in the figure.

Cut-Through Switching
Cut-Through Switching

The switch does not have to wait for the rest of the frame to enter the ingress port before making its forwarding decision.

Fragment free switching is a modified form of cut-through switching in which the switch only starts forwarding the frame after it has read the Type field. Fragment free switching provides better error checking than cut-through, with practically no increase in latency.

The lower latency speed of cut-through switching makes it more appropriate for extremely demanding, high-performance computing (HPC) applications that require process-to-process latencies of 10 microseconds or less.

The cut-through switching method can forward frames with errors. If there is a high error rate (invalid frames) in the network, cut-through switching can have a negative impact on bandwidth, thereby clogging up bandwidth with damaged and invalid frames.

Glossary: If you have doubts about any special term, you can consult this computer network dictionary.

Ready to go! Keep visiting our networking course blog, give Like to our fanpage; and you will find more tools and concepts that will make you a networking professional.

Full Network BundleCourse Offer