Network Time Protocol

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 14:56, 20 December 2008 (edit)
Wlindley (Talk | contribs)
m (Punctuation)
← Previous diff
Revision as of 02:54, 25 January 2010 (edit) (undo)
Imrehg (Talk | contribs)
(Time Servers - added link to pool website.)
Next diff →
Line 13: Line 13:
=Time Servers= =Time Servers=
-It's recommended to use the closest one available to reduce Internet traffic.+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'''<br /> '''North America'''<br />

Revision as of 02:54, 25 January 2010

Contents

NTP Client (Network Time Protocol) is the software client that allows your router to synchronize with an available time server. You can access this setting by going to "Administration" > "Management". 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" 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 have unexpected behavior. You cannot set your time manually, and must do it via NTP. Don't be fooled by the time zone settings located at "Setup" > "Basic Setup" > "Time Settings". These settings are 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".

You may be wondering if you can just manually set the time on your router and then forget about it. The answer is no, but you can 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 "Administration" > "Management". Select "Enable" under the NTP client heading and enter the domain name or IP address of the time server you have selected. (See list below.) Don't forget to save the settings.

Next you should configure your router to adjust the synchronized time from the time server to match your local time, go to "Setup" > "Basic Setup" > "Time Settings" and tick "Use Local Time". Next, select the correct time zone from the drop-down menu. Don't forget to save the settings (the router will reboot).

How often does the NTP synchronize? It will try every 30 seconds until the clock is set, then it will synchronize every 3600 seconds (1 hour). For users of ISDN and similar "Pay-Per-Minute" or "Pay-To-Connect" type Internet connections, you might get a huge bill if your router hasn't been able to synchronize properly and has been trying every 30 seconds.

(It appears that a time server might be hard-coded into the DD-WRT firmware. If you enable the NTP client (that's the default setting) but leave the NTP server 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

Netherlands
nl.pool.ntp.org

United Kingdom
uk.pool.ntp.org

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

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 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.
  • (B) You've selected the wrong time zone settings from the drop down menu on "Setup" > "Basic Setup" > "Time Settings" or forgot to check "Use Local Time" (on the same page).
  • (C) Some part of your router is configured in such a way that the NTP Client can't "see" the Internet. If your router does not use the WAN port for it's Internet connection, you may need to setup a static route in the advanced routing section.

"Setup" -> "Advanced Routing"

  • Route Name = NTP (your choice of names)
  • Destination LAN IP = IP address of NTP Server
  • Subnet Mask 255.255.255.0
  • Default Gateway = IP Address of gateway (must be visible to this router)

"Administration" -> "Management"

  • NTP Server = IP address of NTP Server (must match what you just used in your routing rule)

It appears that the NTP client always uses the WAN port with one exception: If you've entered a default gateway on "Setup" > "Basic Setup" > "Network Setup" > "Gateway", your router will attempt to use that gateway to access the Internet and synchronize with the NTP server.

External Links

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