Switching WhitePaper

Source MAC addresses are learned from incoming frames.
A table of MAC addresses and their associated ports are built and maintained. Unknown unicast, broadcast and multicast frames are flooded to all ports (except the incoming port) Bridges and switches communicate with each other using spanning tree protocol to eliminate bridging loops. Layer 2 Switching

A layer 2 switch performs the same functionality as a transparent bridge, however a switch is like a multiport bridge that performs hardware-based-bridging. Frames are forwarded using specialized hardware, called application-specific integrated circuits (ASIC). This hardware gives switching great scalability, with wire-speed performance, low latency, and high port density. As long as Layer 2 switch frames between two Layer 1 interfaces of the same media type, such as two Ethernet connection or an Ethernet connection and a Fast Ethernet connection, the frames do not have to be modified. However, if two interfaces are different media, such as Ethernet and Token Ring or Ethernet and Fibre Distributed data Interface (FDDI), the Layer 2 switch must translate the frame contents before sending out the Layer 1 interface.

Layer 2 Switching
One draw back to Layer 2 switching is that it can not be scaled effectively. Switches must forward broadcast traffic to all ports, causing large switched networks to become a large broadcast domain. In addition, STP can have a slow convergence time when the switch topology changes. Layer 2 switching alone can not provide an effective, scalable network design. Layer 2 Switches

Source MAC Address learning
Filtering/ forwarding
Loop avoidance
Frame Switching Modes
Store and forward
Cut through
Fast Forwarding
Fragment Free

Layer 3 Switching
Packets are forwarded at Layer 3, just as a router would do. Packets are switched using specialized hardware, ASIC, for high speed and low latency. Packets can be forwarded with security control and quality of service (QOS) using layer 3 address translation. Layer 3 switches are designed to examine and forward packets in high-speed LAN environments. Whereas a router might impose a bottleneck to forwarding throughput, a Layer 3 switch can be placed anywhere in the network, with little or no performance penalty.

Layer 4 Switching
Packets are forwarded using hardware switching, based on layer 3 addressing and Layer 4 application information. (Layer 2 addressing is also inherently used) Layer 4 protocol types (UDP or TCP, for example) in packet headers are examined. Layer 4 segment headers are examined to determine application port numbers. Allows finer control over movement of information.

Layer 4 Switching
A Layer 4 switch must allocate a large amount of memory to its forwarding table. Layer 2 and Layer 3 addresses have forwarding tables based on MAC and network addresses, making those tables only as large as the number of network devices. Layer 4 devices, however, must keep track of application protocols and conversations occurring in the network. Their forwarding tables become proportional to the number of devices multiplied by the number
of applications.

Multilayer Switching
Packets are forwarded in hardware that combine Layer 2, Layer 3, Layer 4 switching. Packets are forwarded at wire speed.
The traditional Layer 3 routing function is provided using Cisco Express Forwarding (CEF), in which a database of routes to every destination network is maintained and distributed to switching ASICs for very high forwarding performance.

Multilayer Switching
Cisco switches perform multilayer switching at Layer 3 and Layer 4 The Catalyst family of switches cache traffic flow based on IP addresses. At layer 4, traffic flows are cached based on source and destination addresses, in addition to source and destination ports. All switching is performed in hardware, providing equal performance at both Layer 3 and Layer 4 switching.