Hello,
@eric.song wrote:
I confirmed with Juniper J-TAC, it is means NTP not configured if I get the output as below.
root@SW01> show ntp status
localhost: timed out, nothing received
***Request timed out
Eric
This is only half of the story. The other half is that this command produces same output when UDP port 123 is blocked for: (a) NTP source-address and (b) 127.0.0.1 if no NTP source-address is configured, in lo0.0 filter.
That's why I asked You to disable lo0 filter.
These two situations can be discerned with another command:
1/ when NTP is disabled, the following printout applies:
aarseniev@m7i> set date ntp
Nov 01 18:13:47
1 Nov 18:13:47 ntpdate[32415]: no servers can be used, exiting
2/ when UDP port 123 is blocked in lo0.0 filter
aarseniev@rm7i> set date ntp
Nov 01 18:16:19
1 Nov 18:16:19 ntpdate[32761]: no server suitable for synchronization found
@eric.song wrote:
I don't know I will have some risk if I add the command line on the EX.
"set system static-host-mapping localhost inet 127.0.0.1"
The "risk" is that when any JUNOS CLI command referencing "localhost" is run (which is almost any "show ntp..." command), instead of querying Your DNS server for 127.0.0.1, the resolution will use this static mapping. Your DNS server may not have any idea how to resolve "localhost", hence commands previously hanging before will mysteriously start working.
HTH
Thanks
Alex