【正文】
N T P對等體進(jìn)行時鐘同步還是通過N T P服務(wù)器進(jìn)行同步。 ——show ntp association[detail]: 這條執(zhí)行模式命令顯示與N T P有關(guān)的信息,如輪詢期等。 配置實(shí)例登錄cisco3662并進(jìn)入查詢模式。password:ntpserverFS_WH_5F_NTPServerenFS_WH_5F_NTPServerntpserverFS_WH_5F_NTPServerFS_WH_5F_NTPServerclock set 10:11:22 10 june 2010進(jìn)入配置模式,配置路由器時間。FS_WH_5F_NTPServerconfigure Configuring from terminal, memory, or network [terminal]? Enter configuration mands, one per line. End with CNTL/Z.設(shè)置路由器時區(qū)FS_WH_5F_NTPServerclock timezone beijing +8設(shè)置端口FastEthernet0/0的ip地址,即M2000上級NTP服務(wù)器內(nèi)網(wǎng)ip。也是TELNET遠(yuǎn)程控制IP。FS_WH_5F_NTPServer(config)interface FastEthernet0/0 內(nèi)網(wǎng)接口FS_WH_5F_NTPServer(configif)ip address 接口ipFS_WH_5F_NTPServer(configif)speed 100FS_WH_5F_NTPServer(configif)fullduplex設(shè)置端口FastEthernet0/1為公網(wǎng)IP地址,作為訪問互聯(lián)網(wǎng)上的一級NTP時鐘源。FS_WH_5F_NTPServer(configif)interface FastEthernet0/1 外網(wǎng)接口FS_WH_5F_NTPServer(configif)ip address 外網(wǎng)ipFS_WH_5F_NTPServer(configif)duplex autoFS_WH_5F_NTPServer(configif)speed auto打開路由功能,設(shè)置路由器為rip協(xié)議,把內(nèi)網(wǎng)ip和外網(wǎng)ip加入路由協(xié)議,從而實(shí)現(xiàn)路由功能。FS_WH_5F_NTPServer(configif)ip routing 打開路由功能FS_WH_5F_NTPServer(configif)router rip 使用rip協(xié)議FS_WH_5F_NTPServer(configif)network 把內(nèi)網(wǎng)ip加入路由FS_WH_5F_NTPServer(configif)network 把外網(wǎng)ip加入路由添加路由器網(wǎng)關(guān),第一個為訪問公網(wǎng)的網(wǎng)關(guān);第二個網(wǎng)關(guān)為訪問內(nèi)網(wǎng)3G網(wǎng)段的網(wǎng)關(guān)。FS_WH_5F_NTPServerip route 外網(wǎng)網(wǎng)關(guān)FS_WH_5F_NTPServerip route 內(nèi)網(wǎng)網(wǎng)關(guān)設(shè)置NTP服務(wù)器的上一級NTP地址,以獲取NTP時鐘源。同時給下級客戶端提供標(biāo)準(zhǔn)的時鐘源。FS_WH_5F_NTPServerntp clockperiod 17180240FS_WH_5F_NTPServerntp server 時鐘源1 來自日本GPS 主用FS_WH_5F_NTPServerntp server 時鐘源2 中國對時中心 備用設(shè)置好后,檢查NTP服務(wù)是否正常。如下指令,Clock is synchronized表示時間可以同步;stratum 2表示本NTP服務(wù)器在第二層;reference is 。FS_WH_5F_NTPServershow ntp status Clock is synchronized, stratum 2, reference is nominal freq is Hz, actual freq is Hz, precision is 2**24reference time is (10:56: beijing Thu Jun 10 2010)clock offset is msec, root delay is msecroot dispersion is msec, peer dispersion is msecFS_WH_5F_NTPServershow ntp associations address ref clock st when poll reach delay offset disp*~ .GPS. 1 0 256 377 ~ 16 1024 0 16000. * master (synced), master (unsynced), + selected, candidate, ~ configuredFS_WH_5F_NTPServer