kareem_nasser wroteI want to know how like if the requests time out or there is no reply or DNS error.
If I get you correctly, if you try to ping a host not an IP and you get back the reply as IP then there must be no DSN error. You can also use ping -a
C:\Users\KARIM>ping -a 74.125.79.99
Pinging
ey-in-f99.1e100.net [74.125.79.99] with 32 bytes of data:
Reply from 74.125.79.99: bytes=32 time=135ms TTL=51
Reply from 74.125.79.99: bytes=32 time=141ms TTL=51
Reply from 74.125.79.99: bytes=32 time=134ms TTL=51
Reply from 74.125.79.99: bytes=32 time=136ms TTL=51
Is that what you are looking for ?