Title: Network Time Protocol (NTP)
1Network Time Protocol (NTP)
- ??? ???????? ????????
- ??????????????????????????????????
- ????????????????? ????????????????????
- u4606308_at_cm.edu
2Overview
- Introduction
- Stratum
- ntpd on Linux
- Dimension 4 on Windows
- ntp on router
3Introduction
- ???????? David L. Mills ???? University of
Delaware ????????? 1985 - ???? protocol ????????????????????????????????????
????? packet-switched - ??????????????? UDP ?? port 123
- ??????????????????????????????????????????????
4Why ntp ?
- Transaction Processing.
- Network fault isolation, reporting and restores.
- Network monitoring, measurement and control.
- Distributed multimedia stream synchronization.
- Research experiment setup.
- Security mechanisms.
5ntp packet
6Global Positioning System
- ???????? ????????????? ??????????
??????????????????????????????????????????????????
????? - ????????????? ????????????????????????
???????????????????????????????????? - ???????????????????????????? ?????????????????????
??????????????????? atomic clock
??????????????????????????????? - ????????????? ??????? ???????? GPS
????????????????????????????????????????? 340
??????????
7Atomic Clock
- ???????? National Institute of Standards and
Technology (NIST) - ?????????????????? ??????????????????? 1 ????????
1 ?????? - ?????????? Quantum Mechanics ?????????????????????
?? Atomic resonator - ??????????? SI ??? 1 ?????? ??????????????????????
?????????????????? 133 9,192,631,770 ????? - http//en.wikipedia.org/wiki/Atomic_clock
8Atomic Clock
9Stratum
- ????????????????????????????
- ?????????????????????? GPS ?????????? stratum 1
??????????????????????? - ?????????????????????? stratum 1 ???????????????
stratum 2, stratum 3, stratum 4,5,6 ???????? ? - ??????????????????????????????????????????????????
? stratum 1,2,3 ??? 4 ????????????????????????????
??? ANSI
10Stratum
11Stratum
12Stratum
- Stratum 1 ???? slip 1 ????? ??? 72 ???
????????????????????? 1 ?????? ??? 1,557 ?? - Stratum 2 ???? slip 1 ????? ??? 7 ???
????????????????????? 1 ?????? ??? 153 ?? 117 ??? - Stratum 3 ???? slip 1 ????? ??? 6 ????
????????????????????? 1 ?????? ??? 33 ??? 8
??????? - Stratum 4 ????????????????????????????
?????????????????????????????????
13Stratum
Stratum 0
Stratum 1
14ntpdate
- ???????????? Linux ????????????????????? protocol
ntp - ??????
- ntpdate 192.168.1.1
- ??????????????????????????????????????????? ????
????? crontab - ?????????????????????????????????
- ntpd ??????
15Network Time Protocol Daemon (ntpd)
- ???? daemon ??????????????????????????????????????
? - ??????????????????????????????????????????????????
???????????????????? - ???????????????????????????????????????? ntp
- ??????????????????????????????????????????????????
???????????????????????????????????????????????
16?????????? ntpd
- ????????????????????? ntpd ???
- /etc/ntp.conf
- ntpd ???? daemon ?????????????????????? restart
???????????????? - /etc/rc.d/init.d/ntpd restart
- ?????? ntpd ???????????????????????????????????
- /sbin/chkconfig ntpd on
17ntp.conf
- ???????? server ??????????????
????????????? ip ??? server ?????????????????????
????
18ntp.conf
- ???????????????????????????????????
????? ip ??? network ????????????????????????????
?
19?????????????????? ntpd
20?????????????????? ntpd
- /usr/sbin/ntpq -p
- /usr/sbin/ntpdc -p
21?????????????????? ntpd
22??????? ntp client ?? windows
- Dimension 4 http//www.thinkman.com
- ???? freeware ??????????Install
???????????????????
23??????? ntp client ?? windows
- ????? ntp server ????????????????
??????????
24??????? ntp client ?? windows
ip ???? ??????? server
???????(optional)
protocol ????? SNTP
????????(optional)
25??????? ntp client ?? windows
????? server
?????????? server
??????????????
?????????????????
26??????? ntp client ?? windows
- ???????? history ???????????????
27??????? ntp client ?? windows
- ???????? history ???????????????
28??????? ntp client ?? windows
- ???????? history ???????????????
29??????? ntp client ?? windows
- ???????? history ???????????????
30ntp on Cisco router
31ntp on Cisco router
32ntp on Cisco router
33- http//www.cisco.com
- http//www.thaicert.nectec.or.th
- http//www.cis.udel.edu/mills/ntp/html/index.html
- http//www.pool.ntp.org
- http//www.ntp-servers.com
- http//ntp.isc.org/bin/view/Servers/WebHome
34