Our investigations revealed that the cause of this delay is the media disconnect and media connect notifications to the IP stack. The IP stack damps the media disconnect and connect for a few seconds to protect itself and its clients from spurious signals. The spurious connects and disconnects can be generated by network interface cards due to a variety of reasons ranging from buggy implementations of the card or switch firmware to the card/switch resetting itself to flush out old state. Windows was designed to damp the media disconnect and connect notifications for some time before rechecking the connectivity state of the adapter and taking the action commensurate with that state.
In the case of MultiNet, switching between networks is deliberate and meant to be hidden from higher protocols such as IP and its clients. We hide switching by having MPD trap the media disconnect and media connect messages when it switches between networks. Since the MPD is placed below IP, it can prevent the network layer from receiving these messages. This minor modification results in significant improvement in the switching overhead as shown in Table 1. Using the above optimization, we were able to reduce the switching delay from 2.8 seconds to 300 ms when switching from an ad hoc network to an infrastructure network and from 3.9 seconds to 170 ms when switching from an infrastructure network to an ad hoc network. These numbers are further reduced to as low as 30 ms and 25 ms respectively, when Native WiFi cards are used. We believe that this overhead is extraneous for purposes of MultiNet and in Section 8 we suggest additional ways to make this delay negligible.
A nice consequence of masking the media connect and media disconnect messages is that all virtual adapters are visible to IP as active, and our architecture of Section 5.1 is therefore consistent.