|
|
|
|
|
by aaronbee
5140 days ago
|
|
Every packet goes through special switching hardware or ASIC. This ASIC has a pipeline for processing packets like a CPU has a pipeline for processing instructions. The ASIC also contains very fast tables optimized for storing and looking up MAC and IP addresses. One part of the pipeline checks if the destination MAC matches the switch's MAC. If it does then the packet is routed and the ASIC will read the destination IP address from the packet. The dest IP is looked up in the routing table to figure out which port the next hop lives on and what it's MAC address is.
If the destination MAC is for another host, then the MAC table is checked to see what port to send the mac. Modern ASICs are designed to handle both cases very quickly. |
|