TechInfoDepot:DD-WRT/Network Time Protocol

From TechInfoDepot
Jump to navigationJump to search
Source

NTP Client (Network Time Protocol) is the software client that allows your router to synchronize with an available time server. Your router's current time is listed in the upper right hand corner of the Web GUI when you log in to your router. Certain features such as "Access Restrictions" and the "Traffic by Month" graph will not function if the router hasn't synchronized with a time server. And if it has synchronized but the time has not been adjusted for your time zone, you may see unexpected behavior. You cannot set your time manually, and must do it via NTP. Don't be fooled by the time zone setting located at "Setup" > "Basic Setup" > "Time Settings". This setting alone is only to adjust the synchronized time from the server to match your local time.

As Brainslayer states "If NTP is disabled the time starts at zero which is 1 January 1970".

As mentioned, you cannot just manually set the time on your router and then forget about it. You can, however, set it to synchronize with a public time server using the NTP client and then forget about it. To configure the NTP client, log into the router and go to "Setup" > "Basic Setup" > "Time Settings". Now:

1) Select "Enable" next to NTP Client
2) Choose the appropriate Time Zone for your area
3) Set Summer Time (DST) as appropriate (See Time Zone settings below)
4) Enter the domain name or IP address of the time server you have selected (See Time Servers below)

Don't forget to Save and Apply settings.

How often does NTP synchronize? According to redhawk0, it is "checked at boot up...then after 120 seconds for a second time....that's it."
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=419797#419797

Have the clocks just changed in your area but you find that DD-WRT is still an hour behind/ahead? Open a Telnet/SSH command prompt and run these three commands:

ntpclient pool.ntp.org
stopservice process_monitor
startservice process_monitor

Courtesy: http://www.dd-wrt.com/phpBB2/viewtopic.php?p=271968#271968

Note: A time server is hard-coded into the DD-WRT firmware. If you enable the NTP Client (that's the default setting) but leave the Server IP/Name field blank, your router will synchronize anyway. One forum poster has reported a time server (ntp2.usno.navy.mil) in his config file. Brainslayer is mum on the issue.

Time Servers

It's recommended to use the closest one available to reduce Internet traffic. You can find the up-to-date pool address for your area/country at http://www.pool.ntp.org/. Examples are provided here for a number of areas:

North America
0.north-america.pool.ntp.org
1.north-america.pool.ntp.org
2.north-america.pool.ntp.org

United States
0.us.pool.ntp.org
1.us.pool.ntp.org
2.us.pool.ntp.org

Canada
0.ca.pool.ntp.org
1.ca.pool.ntp.org
2.ca.pool.ntp.org

Europe
0.europe.pool.ntp.org
1.europe.pool.ntp.org
2.europe.pool.ntp.org

Germany
de.pool.ntp.org

Lithuania
ntp1.litnet.lt
ntp2.litnet.lt

Netherlands
nl.pool.ntp.org

United Kingdom
uk.pool.ntp.org

Switzerland
swisstime.ethz.ch


Time Zone Settings

Since 2007 in the US and parts of Canada, Daylight Savings Time (DST) begins on the second Sunday of March and end the first Sunday of November. The EU uses the "last Sun Mar - last Sun Oct". (Note: UTC stands for Coordinated Universal Time).

United States
Eastern Time Zone
UTC-05:00 /2nd Sun Mar - first Sun Nov

Central Time Zone
UTC-06:00 /2nd Sun Mar - first Sun Nov

Mountain Time Zone
UTC-07:00 /2nd Sun Mar - first Sun Nov

Pacifiic Time Zone
UTC-08:00 /2nd Sun Mar - first Sun Nov

Hawaii Time Zone
UTC-10:00 /none

Europe
France
UTC+01:00 /last Sun Mar - Last Oct

Germany
UTC+01:00 /last Sun Mar - Last Oct

Lithuania
UTC+02:00 /last Sun Mar - Last Oct

Netherlands
UTC+01:00 /last Sun Mar - Last Oct

United Kingdom
UTC /last Sun Mar - last Sun Oct

Troubleshooting

You've followed the instructions to get your router's time/clock synchronized but the time is still blank or incorrect. You probably have one of three problems:

  • (A) Your router doesn't have a valid default route to your gateway. This is particularly a common problem for WDS/CB/RB/WAP configurations which disable the WAN so they don't get a gateway automatically set. Make sure to set the gateway IP in the basic settings to be the main router's IP that will be serving internet to your router. You should be able to Telnet/SSH to your router and then ping internet IP's from your router.
  • (B) Your router isn't resolving the domain name for the NTP server. Try entering the correct corresponding IP Address in the NTP server field instead of the domain name. If this fixes your problem, you have a DNS issue that will need to be resolved by setting your Local DNS to a valid DNS server IP. You should be able to Telnet/SSH to your router and then ping internet domain names from your router.
  • (C) You've selected the wrong time zone settings from the drop down menu on "Setup" > "Basic Setup" > "Time Settings".

External Links

http://www.pool.ntp.org/ Official NTP Site