Читать книгу Networking All-in-One For Dummies - Lowe Doug, Doug Lowe - Страница 52
Flooding
ОглавлениеWhen a switch receives a packet that is intended for a MAC address that isn’t in the switch’s internal MAC address table, the switch has no way to know what port to forward the packet to. In that case, the switch has no option but to revert to acting like a hub: The switch simply forwards the packet on all available ports other than the one the packet arrived on, of course. This is called flooding, which is the third function of a switch (the first two being learning and forwarding).
The packet will be forwarded even to ports for which the switch has already learned a MAC address. This is necessary because a single port can be a pathway to more than one MAC address, as is the case when the port is connected to another switch.
Flooding is similar to broadcasting, but it isn’t quite the same. A broadcast packet is a packet that is intended for every recipient on the network. Thus, a switch must forward broadcast packets to every port. In contrast, flooding results when the packet has a single destination, but the switch doesn’t know how to reach it. Thus, the switch sends the packet to every port in the hopes that one of them will lead to the destination.
Hopefully, flooding doesn’t happen too often. There’s a very good chance that the destination device will receive the packet and send a reply back to the sender. In that case, the switch will record the MAC address of the recipient in its table. Then, the next time a packet intended for that destination is reached, the switch will be able to forward it to the correct port rather than flood the network again.