In an ad hoc network, the transmission range of nodes is limited; hence nodes mutually cooperate with its neighboring nodes in order to extend the overall communication. However, along with the combination of nodes, there may be some reluctant nodes like selfish nodes and malicious nodes present in the environment. These types of nodes degrade the performance of the network. This paper, gives a solution using reputation based mechanism and credit based mechanism. Moreover it includes different strategies by which non cooperative nodes are detect, isolated and/or prevented their advantages and limitations. Also, a global reputation based scheme is proposed in this paper for the detection and isolation of malicious nodes. A cluster head is used which is responsible for reputation management of each node in the environment. Detection of selfish nodes is accomplished which are created due to nodes conserving their energy using NS2. After their detection, performance analysis of network with selfish node and the network after isolation of selfish node is carried out.