Windows Registry Setting for Network Max Hops
In Windows, the maximum number of network hops an Internet Protocol
(IP) packet can traverse before being discarded is governed by the Time
to Live (TTL) value. This article explains how to locate and configure
the DefaultTTL registry entry in the Windows Registry
Editor (Regedit) to control the packet hop limit for all outgoing TCP/IP
traffic.
The Registry Setting
The parameter that controls the maximum hop limit is the
DefaultTTL value, located in the TCP/IP
parameters key within the Windows Registry.
- Registry Path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters - Value Name:
DefaultTTL - Value Type:
REG_DWORD(DWORD 32-bit Value) - Valid Range:
1to255(Decimal) - Windows Default:
128(Decimal)
How It Works
Each time an IP packet passes through a router (a hop), the router
decrements the packet’s TTL field by 1. If the TTL value reaches 0
before the packet reaches its destination, the packet is dropped, and an
ICMP “Time Exceeded” message is sent back to the sender. Configuring a
higher or lower DefaultTTL directly alters how many hops a
packet can survive across the network.
Step-by-Step Configuration Guide
Press Win + R, type
regedit, and press Enter to launch the Registry Editor.Navigate to the following path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\ParametersCheck the right-hand pane for the
DefaultTTLvalue.- If it exists, double-click it to modify.
- If it does not exist, right-click an empty area in the right pane,
select New > DWORD (32-bit) Value,
and name it
DefaultTTL.
Double-click
DefaultTTL, set the Base to Decimal, and enter a value between1and255.Click OK to save the changes.
Restart your computer or restart the network adapter for the new TTL setting to take effect.