640-407 | Cisco Certified Network Associate

In a typical standard Ethernet network, all computers share a common media. The result it reduced bandwidth per host and excessive collisions. There are many methods available to reduce these effects. All involve segmenting the network. The following discussion will introduce several methods for segmenting a network, including LAN switching. It is important to note that the term "switch" is general and can include cell switches such as used in ATM devices like the Cisco Lightstream products. Here, however, we are interested in FRAME (layer 2) switching, as used by Cisco Catalyst products.

Bridges

Bridges are one mechanism used to segment a network. By placing dividing a network with bridges, each new segment becomes its physically distinct. Bridges work at the Data Link layer (specifically the MAC sublayer) by examining the source and destination MAC address of each incoming frame. Through this process of examination the bridge learns on which segment each host is located. It will then forward frames only to those segments that need the frame. This will be the segment where the host resides, or in the case of a broadcast, all segments. The end result is reduced traffic on each segment and thus reduced collisions and increased bandwidth per attached host.

Routers

Another method of segmentation is to use a router. Routers also create physicall distinct segments, but they work at the Network Layer by examining destination network addresses. Routers examine a routing table to determine which interface should receive a particular packet. Routers typically do not forward broadcast packets and therefore limit the succeptability of broadcast storms. However, there are new challenges that develop as a result of broadcasts now being localized. For instance, certain types of host find each other on a network by broadcasting a packet that essentially asks "Are you there?". When two such hosts are seperated by a router, some other mechanism must be used to allow these hosts to find one another.

Lan Switches

So, what are LAN switches? Switches are essentiall mult-port bridges. Switches operate on the same basic principle as bridges. The difference is that essentially each host is often connected directly to a port on the switch, effectively resulting in each host having its own dedicated segment (microsegmentation). By examining MAC addresses the switch learns where hosts are located and forwards frames only to the necessary port. Because the decision to forward packets is based on layer 2 addresses, these types of switches are often called frame switches. Note: Some vendors also sell LAN switches that incorporate functions that operate on layer 3 information. Such switches are often referred to as multi-layer switches.

The benefits of switches are enormous. With Full-Duplex ethernet support, collisions can be virtually eliminated. Each host on the switch essentially has access to the full amount of available bandwidth.

There are two primary of Lan Switching modes, Store & Forward and Cut Through.

Store & Forward

This is the mode used by Catalyst 5000 series switches. In this mode an entire frame is read into a memory buffer on the switch. The frame is then analyzed for errors (CRC computation). If the frame is good, the switch consults its table of known MAC addresses and forwards the frame to the appropriate port. This method has the benefit of having each frame checked for errors and discarded if mal-formed. However, because it must read the entire frame into memory and peform the CRC, there is a higher degree of latency when compared to other methods.

Cut Through

This is an option in some EtherSwitch models. In Cut-Through switching, only the destination MAC address is read into memory. This is done simply to determine to which port to forward the frame. Once the destination port is known the switch immediatly begins forward the frame to that port. It does not do any error checking. The benefit of this method of switching is reduced latency but at the cost of potentially sending unwanted, mal-formed frames to host computers. Some cut-through switches attempt to reduce problems by filtering out collision fragments. Collision fragments are less than 64 bytes, so the switch reads 64bytes before beginning to forward the frame. Cisco refers to the standard cut-through switch as Fast Forward and those that filter collision fragments as Fragment Free.

Virtual LANs

Another great benefit of modern switches is a capability to created virtual LANs (VLANs). After a VLAN is established on a switch, frames (broadcast, multicast, or unicast) will only be forwarded to that particular VLAN. VLANs become particularly beneficial in their capability to span switches. No longer is the physical location of a host the determining factor in which LAN it belongs. This is accomplished by inserting a VLAN ID into the frame that identifies to which VLAN the frame belongs. This is used only in the switch framework and is removed before the final switch in a network forwards the frame to the destination port.