The Internet of Things (IoT) interconnects things, human and animals into a single network. The devices connected in IoT are light weight devices. The security for light weight IoT device is a challengeable task. It faces the vulnerabilities in communication infrastructure due to the different attacks. The attacks are selective forwarding attack, sinkhole attack, black hole attack, Sybil attack, wormhole attack etc. The sinkhole attack is one of the most destructive routing attacks in IoT environment. A sinkhole attacker aims to attract the greatest amount of traffic in a given area and harms the reception of data on collection point. The proposed method is an active detection of sinkhole attack. It uses the Alternative Parent (AP) information to identify the attacker. This method provides security to IoT network from unwanted traffic created by the attacker node.