NTP
Daron Chabot
daron.chabot at gmail.com
Wed Oct 13 14:06:21 UTC 2010
On Wed, Oct 13, 2010 at 8:27 AM, Martin Grim <W.M.Grim at sron.nl> wrote:
> > Can you send me your NTP server config (/etc/ntp.conf) and
> > your target's network config?
>
> Below my configuration for BSD:
>
> #define DEFAULT_IP_ADDR "192.168.0.80"
> #define DEFAULT_IP_NETMASK "255.255.255.0"
> #define DEFAULT_IP_GATEWAY "192.168.0.1"
> #define DEFAULT_TCP_PORT 5001
> #define DEFAULT_NTP_SERVER "172.16.150.35"
>
> // 172.16.150.25 is the SRON NTP server
>
As I understand things here, your target ("leon") is directly connected to
your linux box? And, this linux box has (at least) two network interfaces,
on 192.168.0.xx and 172.16.xx.xx ?
Unless you are doing NAT on the linux box between the 192.168 and 172.16
networks, I don't see how "leon" could reach the 172.16.xx.xx subnet.
You could change DEFAULT_NTP_SERVER to 192.168.0.1 on your target, and add
the following to your ntp.conf (then restart the NTP daemon):
restrict 192.168.0.80 mask 255.255.255.0 nomodify notrap
-- dc
>
> // Ethernet
> static struct rtems_bsdnet_ifconfig gNetdriverConfig = {
> (char*)RTEMS_BSP_NETWORK_DRIVER_NAME, // name
> RTEMS_BSP_NETWORK_DRIVER_ATTACH, // attach
> NULL,
> (char *)DEFAULT_IP_ADDR, // ip_address
> (char *)DEFAULT_IP_NETMASK, // ip_netmask
> };
>
> // Network configuration
> struct rtems_bsdnet_config rtems_bsdnet_config = {
> &gNetdriverConfig, // ifconfig
> NULL, // bootp
> THREAD_NORMAL_PRIO, // network_task_priority
> 128*1024, // mbuf_bytecount */
> 256*1024, // mbuf_cluster_bytecount */
> (char *)"leon", // hostname
> (char *)"localnet", // domainname
> (char *)DEFAULT_IP_GATEWAY, // gateway
> NULL, // log host
> {NULL, }, // Name server(s)
> { (char*)DEFAULT_NTP_SERVER, },
> };
>
>
> My target is connected to a Linux PC with the following in /etc/ntp.conf.
> To keep things a bit short, I removed all comments form ntp.conf.
>
> driftfile /var/lib/ntp/ntp.drift
> statsdir /var/log/ntpstats/
>
> statistics loopstats peerstats clockstats
> filegen loopstats file loopstats type day enable
> filegen peerstats file peerstats type day enable
> filegen clockstats file clockstats type day enable
> server ntp.sron.nl
> server 127.127.1.0
> fudge 127.127.1.0 stratum 13
> restrict default kod notrap nomodify nopeer noquery
> restrict 127.0.0.1 nomodify
>
>
> Any help on my misconfiguration is greatly appriciated!
>
> Regards,
>
> Martin
>
>
>
>
>
>
>
> --
>
> ir. W.M. Grim
> SRON Netherlands Institute for Space Research
> Sorbonnelaan 2
> 3584 CA Utrecht, The Netherlands
> www.sron.nl
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20101013/9225da6f/attachment-0001.html>
More information about the users
mailing list