3

I want to setup an SNTP server for testing purposes that

  1. can be set to any arbitrary value (for example testing DST behaviour of the device under test)
  2. serve only on eth1 on my RedHat Enterprise box. I want to limit it into a single interface (or 192.168.1.255/24 network) so that it does not disrupt anything.

What is the easiest way to create such a setup? My must be always online on the other interface for e-mail etc. so I cannot set its time randomly.

palacsint
  • 487
  • 4
  • 10
Atilla Filiz
  • 235
  • 1
  • 4
  • 11

2 Answers2

5

ntpdsim is what you want:

The ntpdsim program is an adaptation of the ntpd operating system daemon. The program operates as a discrete time simulator using specified systematic and random driving sources. It includes all the mitigation and discipline algorithms of the actual daemon, but with the packet I/O and system clock algorithms driven by simulation. Most functions of the real ntpd remain intact, including the monitoring, statistics recording, trace and host name resolution features. Further information on the simulator is on the NTP Discrete Event Simulator page.

The simulator is most useful to study NTP behavior in response to time and/or frequency transients under specific conditions of network jitter and oscillator wander. For this purpose the daemon can be driven by pseudorandom jitter and wander sample sequences characteristic of real networks and oscillators. The jitter generator produces samples from a Poisson distribution, while the wander generator produces samples from a Guassian distribution.

http://www.eecis.udel.edu/~mills/ntpsim.html

http://www.eecis.udel.edu/~mills/ntp/html/ntpdsim.html

dfc
  • 1,341
  • 8
  • 16
  • ntpdsim does not actually serve SNTP. As far as I can determine, both the servers *and* the client are simulated much faster than real time. If there is a configuration to get ntpdsim to serve large offsets without messing with a host's time, please post it. – John Mahowald Jan 11 '17 at 21:53
3

Why do you just want SNTP and not regular NTP? either way the best way is the usual 'ntpd', OpenNTP or 'clockspeed'.

Chopper3
  • 101,299
  • 9
  • 108
  • 239
  • +1 Have a look at the `tinker` command for `ntpd` to skew the clock, YMMV: http://www.eecis.udel.edu/~mills/ntp/html/miscopt.html#tinker – gravyface Feb 14 '11 at 14:29
  • tinker is for adjusting a clock against ntp's better judgement. the OP wanted to test a server/client installation. ntpdsim does just that without mucking with the system clock – dfc Oct 25 '11 at 20:15
  • OpenNTP and clockspeed actually set the system clock. he wants to test things. (you forgot chrony, another ntp server) – dfc Oct 25 '11 at 20:16