3

I don't see how this could be a problem, as the switch table would remember the destination MAC address. My teacher says this is a problem and that the switch would need to reconfigure.

could you explain ?

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Apr 1 '18 at 22:40
5

Disconnecting a link usually flushes all MAC addresses associated with that port from the port list. If another frame for the disconnected MAC comes in, the destination MAC is unknown and accordingly, the frame is flooded to all ports except its source port.

When you reconnect the client it will likely send a frame (e.g. DHCP discovery) and this frame will make the switch learn its MAC address on the new port.

With remote switches this is a bit more complicated. While disconnecting the port flushes the MAC from the directly connected switch, it doesn't remove it from any other switch - these will continue sending the frames to be previous uplink switch (which will flood them as pointed out above).

It is only when the reconnected client sends a frame through a switch that its MAC table is updated - this can be a gratuitous ARP broadcast (thx @AbraCadaver) to update all switches and hosts' ARP caches, a DHCP discovery (see above), or a broadcasted ARP request for a desired IP connection.

  • Gratuitous ARP would be first and needed for non-DHCP hosts. – AbraCadaver Mar 8 '18 at 20:32
  • Gratuitous ARP is one method, there may be others. – Zac67 Mar 8 '18 at 21:22
4

The switch would not have to reconfigure, it would just have to re-learn the MAC address on the new interface. This happens automatically, without operator intervention.

  • This happens automatically... if and when x sends a frame after reconnecting. – hertitu Apr 1 '18 at 22:45
1

If the machine in question just stops receiving on one port and magically appears on a different port and never transmits anything, then the switch will still have the MAC address associated with the old port in its table and will happily switch all frames destined for that MAC address to the (now empty) port.

But, that will not happen.

First off, the machine will very likely at some point transmit something. Maybe it will announce itself via LLDP, maybe ARP, maybe it will send a DHCP request, maybe it will respond to a broadcast (e.g. an ARP request). At this point, at the latest, the switch will realize the network topology has changed and update the table entry to point to the new port.

But even before that, the switch will simply realize that there is nothing connected to the port and delete all entries corresponding to that port from its table.

The only way that something even remotely "strange" could happen is if the machine was connected to the switch through some kind of media converter or transparent tunnel, and the machine was disconnected from the media converter but the media converter is still connected to the switch and thus the switch thinks the port is still up. Now, the switch will still switch frames addressed to the MAC address of the machine to this port, while the machine is already connected to a different port. However, this state is only going to exist for a very short period of time, since it is highly likely that the machine will send something on the new port, and then the table entry will be updated.

So, the only time frame where something "strange" is happening is the time when the switch has not yet realized that the old port is down and the machine has not yet sent anything from the new port. In any normal scenario, that time frame is going to be zero, and even in some convoluted ones, it is still going to be pretty close to zero.

  • "media converter or transparent tunnel" - or, indeed, another switch :) – psmears Mar 8 '18 at 22:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.