Illegal AP prevention method and device

The invention discloses an illegal AP prevention method and device. The method comprises the following steps: an AP associated with a wireless client is detected whether to be an illegal AP; and if the AP is an illegal AP, then the illegal AP is simulated on the channel on which the illegal AP is located to send a channel switching instruction to all users associated with the illegal AP to guide the client to switch the channel to a specified new channel and counterfeit the illegal AP to provide services on a corresponding channel to prevent the users from being switched back to the illegal AP. Through the illegal AP prevention method and device of the invention, the potential risks of illegal APs can be eliminated to provide normal services for the users.