Skip to content

Instantly share code, notes, and snippets.

@ji-podhead
Last active April 13, 2025 01:59
Show Gist options
  • Select an option

  • Save ji-podhead/7ed2e470a2ee3fb65d480f12d527aff2 to your computer and use it in GitHub Desktop.

Select an option

Save ji-podhead/7ed2e470a2ee3fb65d480f12d527aff2 to your computer and use it in GitHub Desktop.
check your TTL (Time to leave) value while using USB tethering vs WIFI tethering
ping -c 5 google.com | grep ttl
sudo iptables -t mangle -A POSTROUTING -j TTL --ttl-set 65

Your operators might limit your speed based on detecting the number of middle hops in your TCP connection. Using the following command, you will be able to check your TTL (Time to leave) value while using USB tethering vs WIFI tethering. (Use the needed number instead of 65 in the above command.)

Der Sinn der TTL, die auch als Hop-Limit bezeichnet wird, besteht darin, zu verhindern, dass Ströme von nicht zustellbaren Paketen, die in Routing-Schleifen stecken bleiben (vielleicht aufgrund fehlerhafter Routing-Tabellen) ewig im Umlauf sind und die Netze verstopfen.

In MPLS-Clouds (Multiprotocol Label Switching) wird die MPLS-TTL von der IP-TTL kopiert, wenn das IP-Paket die Cloud erreicht. Wenn es die Cloud verlässt, wird der MPLS-TTL-Wert in das IP-TTL-Feld kopiert, sofern er kleiner ist als der Wert in diesem Feld.

TTL is used to remove undeliverable data packets and mitigates the risk that data packets will bounce from router to router indefinitely. This prevents these expired packets from clogging systems, improves content delivery speed and reduces network latency.

TTL is also used for computer network utilities such as ping and traceroute to identify hosts on a network, map the path data travels through a network and measure the time it takes for a packet to move from one point to another across a network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment