- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Ping Error codes.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2002 10:30 AM
тАО04-24-2002 10:30 AM
Ping Error codes.
I tried to ping a host A which is currently down and IP address of that host can be resolved. Ping returns error code 2.
Then I pinged to a unknown host and IP address of that host cannot be resolved. Ping returns the same error 2 code for this scenario too.
What does this mean?
If anyone could tell the ping error codes and respective definitions that will be very helpful.
Thanks & Regards
Brian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2002 10:32 AM
тАО04-24-2002 10:32 AM
Re: Ping Error codes.
Directly from the 'ping' man pages:
1 On failure such as unknown host, illegal packet size, etc.
2 On a unreachable host or network.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2002 10:33 AM
тАО04-24-2002 10:33 AM
Re: Ping Error codes.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2002 10:39 AM
тАО04-24-2002 10:39 AM
Re: Ping Error codes.
Why am i getting error code 2 when i was able to ping the first time?
Regards
Brian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2002 10:41 AM
тАО04-24-2002 10:41 AM
Re: Ping Error codes.
I have not seen ping resulting error code 2. Can you paste your exact error?.
May be your system is running out of some resources like swap space etc., Do a dmesg and look for the errors.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2002 10:43 AM
тАО04-24-2002 10:43 AM
Re: Ping Error codes.
Also Pl. explain why we have /etc/ping and /usr/sbin/ping and i think the /etc/ping has a sticky bit set????
Thanks & Regards
Brian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2002 10:47 AM
тАО04-24-2002 10:47 AM
Re: Ping Error codes.
'/etc/ping' is a transition link to '/usr/sbin/ping' for backwards compatability. The 'setuid' bit is set on /usr/sbin/ping.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2002 10:54 AM
тАО04-24-2002 10:54 AM
Re: Ping Error codes.
1.I tried to ping a host A which is currently down and IP address of that host can be resolved. Ping returns error code 2.
2.Then I pinged to a unknown host and IP address of that host cannot be resolved. Ping returns the same error 2 code for this scenario too.
Thanks
Brian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2002 11:08 AM
тАО04-24-2002 11:08 AM
Re: Ping Error codes.
How are you getting the error code?. Are you trying to get it by doing a "echo $?" or it is giving out an error?.
Are you trying as a superuser or a normal user?.
Did you look at your dmesg output?
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2002 11:19 AM
тАО04-24-2002 11:19 AM
Re: Ping Error codes.
Seems to me that if a host is down - that would certainly qualify as unreachable - hence code 2.
Just because hostname can be resolved has no impact - pings are by IP - specifically by the ICMP protocol.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2002 11:25 AM
тАО04-24-2002 11:25 AM
Re: Ping Error codes.
ping xxx.xyz.abc.com -n1;echo$?
for both the cases.
Thanks
Brian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2002 12:49 PM
тАО04-24-2002 12:49 PM
Re: Ping Error codes.
On 10.20, following are the codes as per the man page and I can verify them on my 10.20 system.
0 Success
1 On failure such as unknown host, illegal packet size, etc.
2 On a unreachable host or network.
-Sri