Take both the rods and suspend them separately. Bring one end of a bar magnet close to both the ends of the suspended rod. If it shows attraction at both the ends then it is an iron rod. If it shows attraction at one end and repulsion at the other end then it is a bar magnet.