Page 1 of 1

Setting Time

Posted: Fri Dec 08, 2017 1:39 pm
by wifiwizard
Hello,

First time Netonix switch user here and having some issue setting the NTP server so I can have accurate time on the log. I've enabled NTP and set a know good NTP server and set the timezone. As you can see below:

Image

In the log it just shows it trying to connect to the NTP server over and over. What am I doing wrong? Thanks.

Image

Re: Setting Time

Posted: Fri Dec 08, 2017 1:45 pm
by lligetfa
Can the switch resolve the DNS name and/or reach the default gateway?

Re: Setting Time

Posted: Fri Dec 08, 2017 1:59 pm
by wifiwizard
I can ping the default gateway from the switch. How should I check to see if it can resolve the DNS name?

Re: Setting Time

Posted: Fri Dec 08, 2017 2:15 pm
by jakematic
Code: Select all
ws12# cmdline

BusyBox v1.19.4 (2017-03-07 13:42:37 EST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
admin@ws12:/www# nslookup google.com
Server: 208.67.222.222
Address 1: 208.67.222.222 resolver1.opendns.com
Name: google.com
Address 1: 2607:f8b0:4002:808::200e
Address 2: 172.217.2.46 atl14s78-in-f14.1e100.net
admin@ws12:/www#


You must set the DNS server(s) in the Device -> Configuration tab

Re: Setting Time

Posted: Fri Dec 08, 2017 3:47 pm
by lligetfa
Ping works too.
Code: Select all
 BusyBox v1.19.4 (2017-03-07 13:42:37 EST) built-in shell (ash)
 Enter 'help' for a list of built-in commands.
 Netonix WS-24# cmdline
 BusyBox v1.19.4 (2017-03-07 13:42:37 EST) built-in shell (ash)
 Enter 'help' for a list of built-in commands.
 admin@Netonix_WS-24:/www# ping 2.ca.pool.ntp.org
 PING 2.ca.pool.ntp.org (174.142.39.145): 56 data bytes
 64 bytes from 174.142.39.145: seq=0 ttl=50 time=70.230 ms
 64 bytes from 174.142.39.145: seq=1 ttl=50 time=70.842 ms
 64 bytes from 174.142.39.145: seq=2 ttl=50 time=70.159 ms
 64 bytes from 174.142.39.145: seq=3 ttl=50 time=71.064 ms
 64 bytes from 174.142.39.145: seq=4 ttl=50 time=69.530 ms
 ^C
 --- 2.ca.pool.ntp.org ping statistics ---
 5 packets transmitted, 5 packets received, 0% packet loss
 round-trip min/avg/max = 69.530/70.365/71.064 ms
 admin@Netonix_WS-24:/www#
 

Re: Setting Time

Posted: Fri Dec 15, 2017 12:48 pm
by wifiwizard
So I can ping out from the Netonix just fine. I've changed the NTP server to a new server just in case (time.google.com). Still no time on the switch. Any other ideas?

Also the switch is in DHCP mode so I cannot set DNS manually. So I guess somehow the switch isn't getting DNS so it cannot resolve the hostname? Is there a way to manually set the DNS servers?

Image


Image

Re: Setting Time

Posted: Fri Dec 15, 2017 1:07 pm
by sirhc
So why put in time.google.com simply put in the known IP address which will tell you if it is a DNS issue

time.google.com = 216.239.35.0

ALSO PLEASE UPLOAD IMAGES USING THE INSTRUCTIONS IN MY FOOTER

Re: Setting Time

Posted: Fri Dec 15, 2017 1:08 pm
by jakematic
wifiwizard wrote:So I can ping out from the Netonix just fine. I've changed the NTP server to a new server just in case (time.google.com). Still no time on the switch. Any other ideas?

Also the switch is in DHCP mode so I cannot set DNS manually. So I guess somehow the switch isn't getting DNS so it cannot resolve the hostname? Is there a way to manually set the DNS servers?



Yes, adjust your dhcpd.conf on your DNS server.
However I cannot think of a good reason to let a switch, router, etc use a DHCP acquired address. Bad practice IMHO as it could change...


Code: Select all
deny unknown-clients;
always-reply-rfc1048 true;
authoritative;
option routers 192.168.0.1;
option domain-name-servers 208.67.222.222, 208.67.220.220, 8.8.8.8, 8.8.4.4;
option ntp-servers 192.168.0.19, 192.168.0.42;
next-server 192.168.0.19;
subnet 192.168.0.0 netmask 255.255.255.0 {
 range 192.168.0.240 192.168.0.241;
 }

Re: Setting Time

Posted: Fri Dec 15, 2017 2:37 pm
by lligetfa
wifiwizard wrote:So I can ping out from the Netonix just fine.

I was not suggesting pinging by IP. In my example, I was pinging the DNS A record name to see if DNS resolves it.

As for jakematic not trusting to allow the switch internet access, the solution then is to host your own NTP server internally.

Re: Setting Time

Posted: Fri Dec 15, 2017 5:01 pm
by jakematic
lligetfa wrote:As for jakematic not trusting to allow the switch internet access, the solution then is to host your own NTP server internally.


Apologies - I meant DHCP and have corrected my reply.

He states he is unable to set DNS manually because his switch is DHCP -vs- static IP