I want to build a code which given an ip-address just prints the finalresult reachable or not. I guess we have to use ping command but am not able to correctly implement it.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Note that “reachability” on IP networks is kind of tricky to test for.
It’s perfectly possible that a server machine is running any number of real services (www, ftp, whatever), but has been configured not to reply to pings since some people do that.
If possible, it’s better to just connect like the real service you want to check for.