Learning of MAC Addresses with Cut-Through Switching

mac addressswitch

I would like to ask, what part of frame is actually read in cut-through mode of switching? I understand that as soon as he read the destination MAC address it can forward. However, how will switch learn the source MAC address and populate his CAM table when he doesn't read the source MAC?

Or if it sees that he doesn't know the dest. MAC address switch reads the rest of the frame and send it out of all port, while learning the source MAC address in process? Thank you.

Best Answer

Cut-trough switching is not a standard. Actually it violates the 802.1D standard in some (minor) aspects.

So each vendor implement it on its own way and there's not a single answer to this question.

Beginning to forward the frame immediately after the destination mac address has been read doesn't prevent the switch to read the source mac while transmitting it, this could be a way to learn it with an optimal latency.

However most cut-trough switches will examine more than the single destination address field prior to decide to forward it.

In this article from Cisco you will find more information on this subject and more specificaly this paragraph :

Examining More Fields

Switches do not necessarily have cut-through and store-and-forward "modes" of operation. As stated earlier, cut-through switches usually receive a predetermined number of bytes, depending on the type of packet coming in, before making a forwarding decision.

The switch does not move from one mode to the other as dictated by configuration, speed differential, congestion, or any other condition.

For example, in the case of a configuration that permits or denies packets with certain IPv4 TCP port ranges, the cut-through switch examines 54 bytes before it makes a forwarding decision. For a non-IP packet, the switch may receive the first 16 bytes of the frame, if the user has configured some kind of QoS policy based on the IP precedence bits in the type-of-service (ToS) byte or on the differentiated services code point (DSCP) bits.

Figure 3 shows a standard IPv4 packet structure in an Ethernet ARPA frame. The cut-through switch takes in 54 bytes of the Ethernet header (not counting the 8 bytes of the preamble, which serves only to wake up the transceiver and indicate the arrival of a frame) and, depending on the vendors' design, may then run a policy engine against the pertinent fields in the IPv4 header to determine whether, for example, the TCP destination port matches the ACL, or the source IP address is in the range of that ACL.