Cryptography and computer security

In cryptography and computer security, a man-in-the-middle attack (MITM), is an attack where the attacker secretly relays and possibly alters the communications between two parties who believe that they are directly communicating with each other.
(i) Describe how a man-in-the-middle attack may be performed on a Wi-Fi network and the consequences of such an attack.
(ii) Explain how a man-in-the-middle attack on a Wi-Fi network can be defeated.