rdate question

This is a discussion on rdate question within the Linux Networking forums, part of the Linux Forums category; If I do a 'rdate -p some.host' Do some.host need to have some deamon running in order to ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-05-2004
Jørn Dahl-Stamnes
 
Posts: n/a
Default rdate question

If I do a 'rdate -p some.host'

Do some.host need to have some deamon running in order to reply, or what?

I have tried to use the rdate against an internal linux server, but it won't
reply. If I try a 'rdate -p 127.0.0.1' on that server, nothing happens.

Jørn Dahl-Stamnes, EDB Teamco AS
e-mail: Jorn.Dahl-Stamnes@nospam.novit.no (remove nospam first)
web: http://spiderman.novit.no/dahls/
Reply With Quote
  #2 (permalink)  
Old 02-05-2004
chris-usenet@roaima.co.uk
 
Posts: n/a
Default Re: rdate question

Jørn Dahl-Stamnes <jorn.dahl-stamnes@nospam.edb.com> wrote:
> If I do a 'rdate -p some.host'
> Do some.host need to have some deamon running in order to reply, or what?


Read the first paragraph of "man rdate",

rdate connects to an RFC 868 time server over a TCP/IP network,
printing the returned time and/or setting the system clock.


> I have tried to use the rdate against an internal linux server, but it won't
> reply. If I try a 'rdate -p 127.0.0.1' on that server, nothing happens.


How were you expecting your local server to set its clock correctly to
its local clock, and then actually get it right?

Try this instead (as root):
/usr/sbin/ntpdate tick.usno.navy.mil tock.usno.navy.mil

Chris
Reply With Quote
  #3 (permalink)  
Old 02-05-2004
Cameron Kerr
 
Posts: n/a
Default Re: rdate question

chris-usenet@roaima.co.uk wrote:

> Try this instead (as root):
> /usr/sbin/ntpdate tick.usno.navy.mil tock.usno.navy.mil


And then find a time server closer to you. Preferably something with a
stratum greater than 2.

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

--
Cameron Kerr
cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/
Empowered by Perl!
Reply With Quote
  #4 (permalink)  
Old 02-05-2004
chris-usenet@roaima.co.uk
 
Posts: n/a
Default Re: rdate question

Cameron Kerr <cameron.kerr@paradise.net.nz> wrote:
> And then find a time server closer to you. Preferably something with a
> stratum greater than 2.


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


Good point. I've been using NTP (from S2/S3 servers) for so long I forgot
the reference.

Thanks for pointing it out.
Chris
Reply With Quote
  #5 (permalink)  
Old 02-06-2004
Clifford Kite
 
Posts: n/a
Default Re: rdate question

Jørn Dahl-Stamnes <jorn.dahl-stamnes@nospam.edb.com> wrote:
> Do some.host need to have some deamon running in order to reply,
> or what?


> I have tried to use the rdate against an internal linux server,
> but it won't reply. If I try a 'rdate -p 127.0.0.1' on that server,
> nothing happens.


That works for me. The inetd daemon can apparently be configured in
/etc/inetd.conf to provide time service though the lo interface:

time stream tcp nowait root internal
time dgram udp wait root internal

The /etc/services file may have to contain the tcp line there as well:

time 37/tcp timserver
time 37/udp timserver

The both sets of lines in these files above came pre-configured with my
Linux distribution. So I'm not sure whether they, or at least the tcp
one, must be configured or not. I'm no expert on inetd/services.

---
PPP-Q&A links, downloads: http://ckite.no-ip.net/
Reply With Quote
  #6 (permalink)  
Old 02-06-2004
Jem Berkes
 
Posts: n/a
Default Re: rdate question

> If I do a 'rdate -p some.host'
>
> Do some.host need to have some deamon running in order to reply, or
> what?


Yes, definitely. rdate sends a UDP or TCP query as per RFC 868.

People seem to like NTP these days, but I'm still a fan of rdate (not as
accurate, but much simpler and does the job). This reminds me, which rdate
client are you using? I've found a possibly ancient version, created by Lee
Moore and most recently modifed in '99 by Arkadiusz Miskiewicz. I'd like to
grab a newer version if one exists :)

--
Jem Berkes
http://www.sysdesign.ca/
Reply With Quote
  #7 (permalink)  
Old 02-06-2004
Jørn Dahl-Stamnes
 
Posts: n/a
Default Re: rdate question

In article <40222b99@news.maxnet.co.nz>, Cameron Kerr <cameron.kerr@paradise.net.nz> wrote:
>chris-usenet@roaima.co.uk wrote:
>
>> Try this instead (as root):
>> /usr/sbin/ntpdate tick.usno.navy.mil tock.usno.navy.mil

>
>And then find a time server closer to you. Preferably something with a
>stratum greater than 2.
>
>http://www.eecis.udel.edu/~mills/ntp/servers.html


We have a stratum 1 at our site, but it refuse me to use the rdate against it.
The machine I try to connect to, is stratum 2 (using the stratum 1). We also
have a cisco router that also refuse to answer my request.

Jørn Dahl-Stamnes, EDB Teamco AS
e-mail: Jorn.Dahl-Stamnes@nospam.novit.no (remove nospam first)
web: http://spiderman.novit.no/dahls/
Reply With Quote
  #8 (permalink)  
Old 02-06-2004
Cameron Kerr
 
Posts: n/a
Default Re: rdate question

J?rn Dahl-Stamnes <jorn.dahl-stamnes@nospam.edb.com> wrote:
> In article <40222b99@news.maxnet.co.nz>, Cameron Kerr
> <cameron.kerr@paradise.net.nz> wrote:
>>chris-usenet@roaima.co.uk wrote:
>>
>>> Try this instead (as root): /usr/sbin/ntpdate tick.usno.navy.mil
>>> tock.usno.navy.mil

>>
>>And then find a time server closer to you. Preferably something with a
>>stratum greater than 2.
>>
>>http://www.eecis.udel.edu/~mills/ntp/servers.html

>
> We have a stratum 1 at our site, but it refuse me to use the rdate
> against it.


rdate and NTP are two different protocols.

rdate just gets given the time in the form of something like
Fri Feb 6 23:40:52 NZDT 2004

NTP is much more sophisticated, and gets you much more accurate timings.

Nobody uses rdate any more, except in introductory network programming
courses.

--
Cameron Kerr
cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/
Empowered by Perl!
Reply With Quote
  #9 (permalink)  
Old 02-06-2004
Jørn Dahl-Stamnes
 
Posts: n/a
Default Re: rdate question

In article <40236732@news.maxnet.co.nz>, Cameron Kerr <cameron.kerr@paradise.net.nz> wrote:
>J?rn Dahl-Stamnes <jorn.dahl-stamnes@nospam.edb.com> wrote:
>> In article <40222b99@news.maxnet.co.nz>, Cameron Kerr
>> <cameron.kerr@paradise.net.nz> wrote:
>>>chris-usenet@roaima.co.uk wrote:
>>>
>>>> Try this instead (as root): /usr/sbin/ntpdate tick.usno.navy.mil
>>>> tock.usno.navy.mil
>>>
>>>And then find a time server closer to you. Preferably something with a
>>>stratum greater than 2.
>>>
>>>http://www.eecis.udel.edu/~mills/ntp/servers.html

>>
>> We have a stratum 1 at our site, but it refuse me to use the rdate
>> against it.

>
>rdate and NTP are two different protocols.
>
>rdate just gets given the time in the form of something like
>Fri Feb 6 23:40:52 NZDT 2004
>
>NTP is much more sophisticated, and gets you much more accurate timings.
>
>Nobody uses rdate any more, except in introductory network programming
>courses.


The reason for using rdate, is that I connect to the machines through an ISDN
line. It do not want have the line up all the time, which I probably will if I
use NTP. Other have suggested that I used rdate to get the time from the
server.

However, rdate does not work as expected:

[dahls@jedi dahls]$ rdate -p <server.at.work>
rdate: got EOF from time server

Jørn Dahl-Stamnes, EDB Teamco AS
e-mail: Jorn.Dahl-Stamnes@nospam.novit.no (remove nospam first)
web: http://spiderman.novit.no/dahls/
Reply With Quote
  #10 (permalink)  
Old 02-06-2004
KR
 
Posts: n/a
Default Re: rdate question

Jørn Dahl-Stamnes wrote:
> The reason for using rdate, is that I connect to the machines through an ISDN
> line. It do not want have the line up all the time, which I probably will if I
> use NTP. Other have suggested that I used rdate to get the time from the
> server.
>


There's no reason why an NTP client should keep the line busy any more
than an rdate client.

> However, rdate does not work as expected:
>
> [dahls@jedi dahls]$ rdate -p <server.at.work>
> rdate: got EOF from time server


Probably because the server doesn't support rdate. Forget rdate, it's
obsolete and AFAIK doesn't even support updates against a server in a
different time zone.

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:49 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0