Routing with Layer 2 and Layer 3 Modules
When a switch contains a combination of layer 2 and layer 3 modules, IP and IPX routing is performed by the layer 3 media modules or the supervisor module using special ASICs present on those modules. These ASICs contain an address cache (forwarding table) that can contain a maximum of 20,000 cache entries. The address cache entries consist of packet addressing information and next hop information that enable the switch to effectively route the packets to their destination.
The supervisor module also maintains a master routing table that is kept in the its memory. The master routing table can contain up to 28,000 entries. This routing table enables the supervisor module to keep track of which entries are in each address cache. As a result, each time a change occurs in the master routing table, the supervisor module updates the appropriate address caches. For example, if a unicast route is removed from the master routing table, all matching entries in address caches are also removed.
Consequently, when you connect a switch to the network, it begins to receive frames from the network and builds a master routing table (supervisor module) and forwarding tables (address caches of media modules) based on those frames.
This process creates three distinct results:
- All known (learned) layer 3 traffic that requires routing, is routed directly by the 50-series layer 3 or 80-series media module without a need to traverse the switching fabric to get to the supervisor module's software routing function. This is referred to as the FIRE path, or Fast Inband Routing Engine, since the routing is accomplished in the hardware in the media modules.
- All unknown (not learned) layer 3 traffic must first be sent to the 50-series layer 3 or 80-series supervisor module, where information on the frame is added to the supervisor module's master routing table, then it is added to the address cache of each applicable layer 3 media module. This is referred to as the Slow Path, since the routing is accomplished by the CPU and software in either supervisor module instead of the hardware in the media modules.The Slow Path is used when the destination is unknown for IP and IPX packets and for all AppleTalk routing.
- Since layer 2 modules have no routing capability, packets that are received by a layer 2 module and require routing are forwarded by sending the packet to the 50-series layer 3 or 80-series supervisor module. The routing engine on the supervisor module then performs the routing operation for the layer 2 modules and sends the packet back through the switching fabric to the destination port.This is referred to as the FORE path, or Fast Out of Bands Routing Engine, since the routing is accomplished in the hardware of either supervisor module.
Figure�3 shows how traffic is routed in a switch.
Figure�3:�Layer 2 and Layer 3 Routing in a Switch