2019/12/09

NTP 서버 클라이언트

ubuntu 18.04
1 ntp server 

NTP : 네트웍크 타임 프로토콜.
네트워크에 있는 모든 시스템 시간 및 클럭을 동기화 하는데 사용하는 프로토콜이다.

설치
$ sudo apt-get install ntp

버전 확인
$ sntp --version

추가
sudo vi /etc/ntp.conf

server time.google.com iburst
restrict time.google.com mask 255.255.255.255 nomodify notrap nopeer noquery
server 1.kr.pool.ntp.org iburst
restrict 1.kr.pool.ntp.org mask 255.255.255.255 nomodify notrap nopeer noquery
server 1.asia.pool.ntp.org iburst
restrict 1.asia.pool.ntp.org mask 255.255.255.255 nomodify notrap nopeer noquery
server 2.asia.pool.ntp.org iburst
restrict 2.asia.pool.ntp.org mask 255.255.255.255 nomodify notrap nopeer noquery
server 3.asia.pool.ntp.org iburst
restrict 3.asia.pool.ntp.org mask 255.255.255.255 nomodify notrap nopeer noquery

서비스 재시작
sudo service ntp restart

서비스 상태 확인
sudo service ntp status

방화벽 설정.
sudo ufw allow from any to any port 123 proto udp

2 ntp client
sudo apt-get install ntpdate

ntp host 기반 추가.
sudo vi /etc/hosts
172.16.1.1 ntpdate NTP-server-host

업데이트
sudo ntpdate NTP-server-host

클라이언트 시스템 시간 공기화 비활성화.
sudo timedatectl set-ntp off

ntp 클라이언트 설치
sudo apt-get install ntp

vi /etc/ntp.conf
server NTP-server-host prefer iburst

sudo service ntp restart

시간 동기화 큐 보기
ntpq -p

재미는건
서버와 클라이언트를 한 시스템에 설정 하면 내부 네트워크 주소를 두 개 생성한다.
그리고 주소 두 개를 전부 사용할 수 있다.

즉 이말은 한 시스템에 dhcp 아이피를 여러개 받을 수 있다는 이야기가 된다.
ntp 서버 주소 하나에 dhcp ip를 임대 받아 서비스를 할 수 있다는 이야기가 된다.
나중 테스트 해 본다.

cat /etc/hosts
127.0.0.1       localhost.localdomain localhost
127.0.1.1       gfairline.fairline.lan gfairline

172.16.1.1      NTP-server-host ---> 호스트 이름 생성 후 업데이트
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

설정 내용 서버 -> /etc/ntf.conf
server NTP-server-host prefer iburst ---> 호스트 기반 설정.
server time.google.com iburst
restrict time.google.com mask 255.255.255.255 nomodify notrap nopeer noquery
server 1.kr.pool.ntp.org iburst
restrict 1.kr.pool.ntp.org mask 255.255.255.255 nomodify notrap nopeer noquery
server 1.asia.pool.ntp.org iburst
restrict 1.asia.pool.ntp.org mask 255.255.255.255 nomodify notrap nopeer noquery
server 2.asia.pool.ntp.org iburst
restrict 2.asia.pool.ntp.org mask 255.255.255.255 nomodify notrap nopeer noquery
server 3.asia.pool.ntp.org iburst
restrict 3.asia.pool.ntp.org mask 255.255.255.255 nomodify notrap nopeer noquery

댓글 1개:

  1. 게으름 리: Ntp 서버 클라이언트 >>>>> Download Now

    >>>>> Download Full

    게으름 리: Ntp 서버 클라이언트 >>>>> Download LINK

    >>>>> Download Now

    게으름 리: Ntp 서버 클라이언트 >>>>> Download Full

    >>>>> Download LINK Qv

    답글삭제