Check your /etc/ntd.con to make sure the restrictions aren't being set unless 
you really want them. I used a minimallist version when setting up mine:

#-------- ntp.conf ---------  
server <valid server address>
fudge   127.127.1.0 stratum 10  
driftfile /etc/ntp/drift
-----------------------------

Turn off the ntpd daemon if it's running..

Run "ntpd -d -d -a" at the command prompt and watch the interaction. You 
should see some akin to the following:

# -------- output of ntpd -d -d -a ----------
create_sockets(123)
interface <lo> OK
interface <eth0> OK
bind() fd 4, family 2, port 123, addr 0.0.0.0, flags=1
flags for fd 4: 04002
bind() fd 5, family 2, port 123, addr 127.0.0.1, flags=0
flags for fd 5: 04002
bind() fd 6, family 2, port 123, addr 192.168.1.2, flags=1
flags for fd 6: 04002
create_sockets: ninterfaces=3
interface 0:  fd=4,  bfd=0,  name=wildcard,  flags=0x1
              sin=0.0.0.0  bcast=0.0.0.0,  mask=255.255.255.255
interface 1:  fd=5,  bfd=0,  name=lo,  flags=0x4
              sin=127.0.0.1  mask=255.0.0.0
interface 2:  fd=6,  bfd=0,  name=eth0,  flags=0x1
              sin=192.168.1.2  bcast=192.168.1.255,  mask=255.255.255.0
init_io: maxactivefd 6
getnetnum given 192.168.1.1, got 192.168.1.1 (c0a80101)
peer_clear: at 0 assoc ID 0
newpeer: 192.168.1.2->192.168.1.1 mode 3 vers 4 poll 6 10 flags 1 1 ttl 0 key 
00000000
getnetnum given 127.127.1.0, got 127.127.1.0 (7f7f0100)
report_event: system event 'event_restart' (0x01) status 'sync_alarm, 
sync_unspec, 1 event, event_unspec' (0xc010)
auth_agekeys: at 1 keys 1 expired 0
poll_update: at 13 192.168.1.1 flags 0001 poll 6 burst 0 last 13 next 76
        MCAST   *****sendpkt(fd=6 dst=192.168.1.1, src=192.168.1.2, ttl=0, len=48)
transmit: at 13 192.168.1.2->192.168.1.1 mode 3
receive: at 13 192.168.1.2<-192.168.1.1 mode 4 code 1
peer 192.168.1.1 event 'event_reach' (0x84) status 'unreach, conf, 1 event, 
event_reach' (0x8014)
poll_update: at 13 192.168.1.1 flags 0001 poll 6 burst 0 last 13 next 76
clock_filter: n 1 off -0.000698 del 0.001804 dsp 7.937515 jit 0.000015, age 0
auth_agekeys: at 60 keys 1 expired 0
poll_update: at 76 192.168.1.1 flags 0001 poll 6 burst 0 last 76 next 142
        MCAST   *****sendpkt(fd=6 dst=192.168.1.1, src=192.168.1.2, ttl=0, len=48)
transmit: at 76 192.168.1.2->192.168.1.1 mode 3
receive: at 76 192.168.1.2<-192.168.1.1 mode 4 code 1
poll_update: at 76 192.168.1.1 flags 0001 poll 6 burst 0 last 76 next 142
clock_filter: n 2 off -0.000918 del 0.001194 dsp 3.937759 jit 0.000220, age 0
-----------------------------------------

Note especially the lines headed "transmit" and "receive" above. If they're 
both there, you know you're communicating with the ntp server. If not, double 
check, or better yet for a test, turn off you iptables/ipchains filtering and 
make sure that ntpd isn't tripping over them.

Regards, Mike Klinke


 


On Wednesday 11 December 2002 05:12, Kent Borg wrote:
> I am having problems with the NTP client end of the software the comes
> as part of Red Hat 7.3.  I am talking to a RH 7.2 NTP server, and
> before I upgraded my notebook to 7.3 (it was vaguely at 7.2) it could
> get the time, and now it can't.
>
> When I ask it what it is doing, it just sits there:
>
>   [root@spot etc]# ntpq -p
>        remote           refid      st t when poll reach   delay   offset 
> jitter
> ===========================================================================
>=== *LOCAL(0)        LOCAL(0)        10 l   35   64  177    0.000    0.000  
> 0.008 borg.org        0.0.0.0         16 u    -   64    0    0.000    0.000
> 4000.00 [root@spot etc]#
>
> If I do a tcpdump while I do an /etc/init.d/ntpd restart, and then
> another ntpq -p, I get:
>
>   [root@spot etc]# tcpdump
>   tcpdump: listening on eth0
>   00:05:05.985526 spot.borg.org.32805 > borg.org.domain:  51621+ A?
> borg.org. (26) (DF) 00:05:05.985893 borg.org.domain > spot.borg.org.32805: 
> 51621 1/0/0 A borg.org (42) (DF) 00:05:05.986790 spot.borg.org.32806 >
> borg.org.domain:  49265+ PTR? 2.100.168.192.in-addr.arpa. (44) (DF)
> 00:05:05.987048 borg.org.domain > spot.borg.org.32806:  49265 1/0/0 (66)
> (DF) 00:05:05.987514 spot.borg.org.32808 > borg.org.domain:  49266+ PTR?
> 100.100.168.192.in-addr.arpa. (46) (DF) 00:05:05.987737 borg.org.domain >
> spot.borg.org.32808:  49266 1/0/0 (73) (DF) 00:05:09.989611
> spot.borg.org.ntp > borg.org.ntp:  v4 client strat 0 poll 6 prec -17 (DF)
> [tos 0x10] 00:05:09.989853 borg.org.ntp > spot.borg.org.ntp:  v4 server
> strat 2 poll 6 prec -16 (DF) [tos 0x10] 00:05:16.999622 spot.borg.org.32810
> > borg.org.domain:  61936+ PTR? 2.100.168.192.in-addr.arpa. (44) (DF)
> 00:05:16.999975 borg.org.domain > spot.borg.org.32810:  61936 1/0/0 (66)
> (DF) 00:05:18.192839 borg.org.chargen > spot.borg.org.32952: P
> 3986840437:3986840517(80) ack 3996772465 win 63712 <nop,nop,timestamp
> 320704773 3277191> (DF) [tos 0x10] 00:05:18.192897 spot.borg.org.32952 >
> borg.org.chargen: . ack 80 win 62888 <nop,nop,timestamp 3292549 320704773>
> (DF) [tos 0x10]
>
>   12 packets received by filter
>   0 packets dropped by kernel
>   [root@spot etc]#
>
>
> Note, the "chargen" is really an ssh session into my server, I run it
> on port 19 because my ISP blocks the correct ssh port for some reason...
>
>
> Ideas?
>
>
> Thanks,
>
> -kb



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to