LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   NTP listening on UDP+TCP(!)/123 (http://www.linuxquestions.org/questions/linux-networking-3/ntp-listening-on-udp-tcp-123-a-125517/)

hugohindemith 12-13-2003 12:35 PM

NTP listening on UDP+TCP(!)/123
 
Hi all,
How can I make the ntpd daemon listening on TCP(!)/123 ? Listening just on UDP/123 seems to be the default configuration.

Thanks for any comment,
Hugo

chort 12-13-2003 02:37 PM

NTP is a UDP-based protocol. I'm not aware of any implementations of NTP over TCP. The reason is that NTP submits one query and gets one response. That is very quick with UDP, but if you were to do that with TCP it would have to setup a whole connection just to send two packets, not very effecient...

hugohindemith 12-13-2003 03:14 PM

Hi,
"netstat -an" on my NT-box displays listeners both on UPD/123 and TCP/123. The same command list only UPD/123 on my Linux-box.

"cat /etc/services | grep ntp" on my linux-box lists:
ntp 123/tcp
ntp 123/upd

I don't regard this definitions being humbug. There should be a way to enable this. I need this to enable DTSS under VMS to synchronize to my linux-box.

Best Regards
Hugo

chort 12-13-2003 03:52 PM

From /usr/local/share/doc/ntp/debug.html:26:
Quote:

Note that NTP does not use TCP in any form.
From /usr/local/share/doc/ntp/debug.html:158:
Quote:

NTP is specifically designed to use UDP and does not respond to TCP.
Just because /etc/services has reserved both UDP and TCP does not mean they're both actually used. Many services reserve the same port on both protocols, but only use one of them (they're both reserved to avoid confusion). For instance Windows runs NetBIOS over UDP and NetBIOS over TCP, but they used different port numbers. Even though they used different port numbers, each of them reserves both UDP and TCP, although only one is used in practice.

Even though your Windows box is bound to both ports, I seriously doubt TCP is used. Run Ethereal on the Windows box while you syncronize time and you'll see this is true.

ncorreia 12-15-2003 11:11 AM

Hi,

Having NTP on TCP makes no sense from my point of view (and by all means, someone correct me if I'm wrong!!!). TCP provides error correction whilst UDP doesn't... imagine some packets are lost along the way... why would you want to have a time information resent??? It would have no use anyway...


All times are GMT -5. The time now is 12:15 PM.