Time-to-live (TTL) is the number of hops that a package is set to exist in a network before it is discarded by the router if it does not find the destination host.
If you wish to change the value of this on your macOS to carry out a ping, you can make use of the sysctl command as follows,
% sudo sysctl net.inet.ip.ttl=100
net.inet.ip.ttl: 100 -> 92

Note: If you do not sudo, you will get an error like
sysctl: net.inet.ip.ttl=92: Operation not permitted
This command has been tested on macOS Big Sur, Monterey, and Ventura
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!