[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to know the ip reachable quickly.

Posted on 2011-10-23
11
Medium Priority
?
502 Views
Last Modified: 2012-05-12
What is the quickest way to know the ip is reachable. For example, with ping utility,

ping -c 1 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.082 ms

--- 127.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.082/0.082/0.082/0.000 ms

The above is really fast. However,
ping -c 1 128.0.0.1
PING 128.0.0.1 (128.0.0.1) 56(84) bytes of data.

--- 128.0.0.1 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 10000ms

It took 10000ms to know 128.0.0.1 is no good.

Actually when waiting, I already know this is not good.

My question is that there is any other way to know quickly the ip is unreachable or if I want to give a certain number to cut off, saying after 10ms, if ping can't return, I will say the ip is bad.
How to do it?

 
0
Comment
Question by:jl66
  • 4
  • 3
  • 3
  • +1
11 Comments
 
LVL 31

Assisted Solution

by:farzanj
farzanj earned 1200 total points
ID: 37015197
Do you want to check whether a computer is reachable or not?

There are number of ways to do it.

You can check:
1.  Check ports from outside computers. Like nmap
2.  From the machine, check route of some external website  -- like traceroute
3.  From the machine, try querying its own DNS server  -- dig <DNS server> or dig <external website>
0
 
LVL 31

Accepted Solution

by:
farzanj earned 1200 total points
ID: 37015200
This link gives you information of network troubleshooting.  Many of these utilities would be useful for you.
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch04_:_Simple_Network_Troubleshooting
0
 
LVL 5

Expert Comment

by:mlchelp
ID: 37015206
of course not, if your pinging a pc or server that is not on your network it is going to be over 10MS. You have to wait, you can adjust the time with ttl but if say you are on the east coast and ping a server on the west coast it will take at least 45ms round trip. If you adjusted the ttl to 10ms you would get request timed out and think that there was a issue when there really was not.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:jl66
ID: 37015238
Thanks for the info.
michelp: how to adjust the ttl? What is the default value?
0
 
LVL 5

Assisted Solution

by:mlchelp
mlchelp earned 600 total points
ID: 37015263
it really more of a hopp counter, se below.

Every IP packet that gets sent out has a TTL field which is set to a relatively high number (in the case of ping a TTL of 255). As the packet traverses the network, the TTL field gets decreased by one by each router it goes through; when the TTL drops to 0, the packet is discarded by the router. The IP spec says that the TTL should be set to 60 (though it's 255 for ping packets). The main purpose of this is so that a packet doesn't live forever on the network and will eventually die when it is deemed "lost." But for ping purposes, it provides additional information. The TTL can be used to determine approximately how many router hops the packet has gone through. If the TTL field varies in successive pings, it could indicate that the successive reply packets are going via different routes, which isn't a great thing.

you can change it with ping -i
0
 
LVL 5

Expert Comment

by:mlchelp
ID: 37015270
you really cant adjust the limit on the round trip time in MS only the number of hops.
0
 

Author Comment

by:jl66
ID: 37015731
I tried to add option -i , but it did not make any difference.

[root@bare ~]# ping -c 1 -i 1 128.0.0.1
PING 128.0.0.1 (128.0.0.1) 56(84) bytes of data.

--- 128.0.0.1 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 10000ms

It seems if I have a timer, after less than 1 sec. I time it out. Does the shell commands on linux OS have this command?
0
 
LVL 19

Assisted Solution

by:Miguel Angel Perez Muñoz
Miguel Angel Perez Muñoz earned 200 total points
ID: 37016268
Remotes computer may have firewall and blocking ICMP responses. This may cause a bad response when you ping to this computer.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 37017362
Glad you liked it :)
0
 

Author Closing Comment

by:jl66
ID: 37022168
Thanks a lot for everyone's tips.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We've been using the Cisco/Linksys RV042 for years as: - an internet Gateway - a site-to-site VPN device - a leased line site-to-site subnet-to-subnet interface (And, here I'm assuming that any RV0xx behaves the same way as an RV042.  So that's …
I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question