I am using windows xp sp2. Whenever i ping localhost it resolves to ::1 if network cable is connected. If i remove network cable then localhost resolves to 127.0.0.1. I do not know about this strange behaviour of localhost. Google do not help me on this. I want localhost needs to resolve 127.0.0.1 without touching IPv6. My another machine has IPv6 but in that localhost always points to 127.0.0.1.