Pejman Moghadam / Slackware

Slackware 12.2 - Synchronizing Cisco time with Linux NTP server

Public domain


Backup

cp /etc/ntp.conf{,.bak}

/etc/ntp.conf

# Upstream time servers
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
restrict 0.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 1.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 2.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery

# Clients
restrict 127.0.0.1
restrict 172.31.0.3 mask 255.255.255.255 nomodify notrap

Commands

ntpdate -v 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org
ntpdate -v 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org
ntpdate -v 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org
chmod  +x /etc/rc.d/rc.ntpd
/etc/rc.d/rc.ntpd restart
ps -A | grep ntp
sleep 60
ntpq -p

Firewall

iptables -A INPUT -p udp --dport 123 ! -s 172.31.0.3 -j DROP

Cisco config

Cisco-3750#configure terminal 
Cisco-3750(config)#ntp server 172.31.0.254
Cisco-3750(config)#exit
Cisco-3750#wri mem

Bookmark

http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch24_:_The_NTP_Server

BY: Pejman Moghadam
TAG: ntp, cisco
DATE: 2012-08-18 11:08:01


Pejman Moghadam / Slackware [ TXT ]