![]() |
|
Switch Fabric The beauty of a switch is that, unlike a repeating hub, a switch allows simultaneous transmissions on its ports thereby increasing throughput. This is only true if the switching mechanism within the switch is fast enough to handle simultaneous transmissions on all its ports. If the switch can do this, it is said to be operating at wire speed and it is called a non-blocking switch. If it cannot keep up with the traffic, it may need to queue frames or lose frames. This is called a blocking switch. This switch mechanism within the hub is called its switch fabric and it must be extremely fast for the switch to be effective. A switch's primary mission is to reliably transfer frames from one port to another. Its secondary mission is to note in its table the port location of various source addresses it learns. Its final mission is to age the table so that stations can be relocated to other ports and still be found by the switch. Depending upon the amount of traffic being handled by the switch, the switch may not be able to do all these tasks with each frame. It is possible that a switch may forgo updating its table when transferring multiple frames meaning that some source addresses will not be noted the first time they appear. The aging process is generally a background process anyway and aging time may vary with traffic. Data Latency A repeating hub operates upon symbols while a switch operates upon frames. A switch must receive the complete frame from one of its input ports, observe the destination address, look up the port assignment, note the source address, verify that the frame is not in error and then forward the frame to the indicated port number. This is called store-and-forwarding. At 10 Mbps, the longest allowable Ethernet frame will take over 1.2 ms to transfer through the switch. The shortest allowable frame would still take over 500 µs to send. The store-and-forward nature of the switch introduces significant data latency. Compare this latency to that of a repeating hub which introduces a delay less than a microsecond. To reduce this latency, the concept of cut-through switches was introduced. Since the destination address follows the preamble in an Ethernet frame, it only takes about 11 µs for the switch to know to which port the frame must be transferred to. The switch could immediately begin transferring the frame to the required port. This, of course, assumes the output port is available. If the port is available, data latency can be reduced significantly. There are, however, problems with this approach. If the output port is unavailable, the switch would need to queue the frame just like a store-and-forward switch. If the frame was corrupted, as evidenced by a failed FCS test, the switch would have forwarded a defective frame. Defective frames should be discarded by switches and not propagated through the network. However, with a highly reliable local area network, the chance of a failed FCS is rare so this may not be a significant issue. What is significant though, is that runt frames may exist that are the result of collisions. These runt frames are less than 576 bits in length but could be more than the 112 bits of preamble and destination address. Therefore, the switch could be guilty of propagating an error frame by initiating the forwarding of the frame before determining that it is actually a runt. The solution to this problem is the modified cut-through approach where forwarding does not commence until at least 576 bits of frame are received. Only at this time should the forwarding of the frame begin. Sometimes cut-through operation is not possible anyway. For example, if a switch receives a broadcast, multicast or unknown destination address, it must flood all ports. The probability that all port output queues are simultaneously available for immediate transmission is remote. In this case, the complete frame must be received and sent to the port output queues for eventual transmission. The significance of data latency can be debated. If each transmitted packet must be acknowledged by the receiving station, then data latency can be important since throughput is impacted by the delay in sending packets and receiving acknowledgements. However, if it is possible to stream the data, the delay in transmission is insignificant since the delay of store-and-forwarding is not accumulative. The delay in sending one frame versus many frames in a row is the same. Streaming of data using the TCP/IP protocol is possible. Knowledge of the transport layer protocol is important when determining if switch data latency is going to be an issue. Flow Control With a high-speed switch fabric, there appears to be no bounds to the amount of simultaneous traffic that can be processed by a switch. However, traffic patterns may not be so evenly dispersed. Typically, you will have one port, possibly the port connected to a server or master controller, processing most of the traffic that originate from the other ports. If the switch has no flow control mechanism to limit the traffic being received on input ports and the congested output port has no more buffer available, frames will be simply dropped without any notification. To minimize this possibility, two methods of flow control were developed for switches-backpressure and PAUSE. Backpressure is used on switch ports connected to half-duplex or shared Ethernet data links. The switch port simply uses the built-in collision detection and backoff algorithm of Ethernet to force collisions on its segment thereby requiring the attached devices to resend their data. When the switch is able to recover, it removes the backpressure. For full-duplex links there are no collisions, so backpressure will not work. There is instead a PAUSE function developed solely for full-duplex links. A PAUSE frame initiated by a switch port tells the sourcing device to stop sending traffic for a defined amount of time. This scheme only works if the attached device can invoke full-duplex operation and can interpret a PAUSE frame. |