In the past few years mobile ad hoc networks (MANETs) have been emerged as the networks for next generation wireless networks. MANETs networks does not require an underlying infrastructure and have dynamically changing network topology. Due to high dynamism and mobility these networks are more vulnerable to attacks. The network performance might be improved if the network is clustered by grouping together nodes that are in close proximity. The primary goal is to enhance the performance of the network and to improve the durability of the nodes and hence the network life time. In this paper the effect of Wormhole attack is analyzed on AODV routing protocol in MANET and a prevention mechanism is presented to secure the network.