• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Time to live exceeded ping error

by admin

Every packet of data that is sent out includes a TTL value within the IP packet header. This refers to the number of hops data can go through before it is discarded. Based on network traffic between hosts, it is possible to predict what OS is running on a system. Every operating system has its own unique way to implement the TCP/IP stack. A very simple but effective passive method is to inspect the initial time-to-live (TTL) in the IP header:

Time to live exceeded ping error

“Time to live exceeded” this ICMP ping error is due to the time to live (TTL) field reaching a zero value or there is a timeout for the reassembly of segments. As a solution, I will recommend increasing the TTL (Time To Live) value (the highest is 255).

Solution

For example, run traceroute to ipaddress 8.8.8.8 (Google’s publc DNS server). And find number of hops to the destination.

[root@server ~]# traceroute 8.8.8.8      (in linux distro)
C:\>tracert 8.8.8.8                                (in Windows OS)

For me its 6 hops to 8.8.8.8. So a minimum TTL value of 6 is required to reach icmp packets to 8.8.8.8 and get ping replay. And cannot ping to 8.8.8.8 with a TTL value of 5 or less.

Ping Results with different TTL values:

[root@server ~]# ping 8.8.8.8 -t 5                 (-t 5  is for custom TTL value of 5)

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 192.168.1.1  icmp_seq=1 Time to live exceeded
From 192.168.1.1  icmp_seq=2 Time to live exceeded
From 192.168.1.1  icmp_seq=3 Time to live exceeded
From 192.168.1.1  icmp_seq=4 Time to live exceeded
# ping 8.8.8.8 -t 6             (-t 6  is for custom TTL value of 6)
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=55 time=48.9 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=55 time=49.5 ms
64 bytes from 8.8.8.8: icmp_req=3 ttl=55 time=50.4 ms
64 bytes from 8.8.8.8: icmp_req=4 ttl=55 time=49.4 ms

Filed Under: Linux

Some more articles you might also be interested in …

  1. 12 RPM (Red Hat Package Manager) Command Examples
  2. How to Verify if a Disk/Partition is in Use by Oracle ASM, was used by Oracle ASM or is never used by Oracle ASM
  3. Swapon Fails To Mount Swap – Gives Invalid Argument Error
  4. mkfs.ntfs: command not found
  5. pwdx Command Examples in Linux
  6. How to create an XFS Filesystem
  7. How to configure postifx smtp relay in CentOS/RHEL 5 and 6
  8. Installation Steps of jEdit on Ubuntu Linux
  9. pstree Command Examples in Linux
  10. ‘Found duplicate PV’ warnings when using LVM with multipath storage in RHEL/CentOS

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright