infix icon indicating copy to clipboard operation
infix copied to clipboard

Add support for NTP server

Open troglobit opened this issue 11 months ago • 2 comments

Description

Currently Infix only supports running chronyd as an NTP client via configuration in ietf-system.yang.

This is a proposal to use RFC 9249, in a stripped down form, to add NTP server support as well using chronyd.

Original tree view, from the RFC, is available here: https://github.com/dhruvdhody/ietf-yang/blob/master/ietf-ntp.tree

Tree View

This is an initial, heavily cut down (deviated), tree view based on the RFC.

module: ietf-ntp
  +--rw ntp!
     +--rw port?                  inet:port-number {ntp-port}?
     +--rw refclock-master!
     |  +--rw master-stratum?     ntp-stratum
     +--rw interfaces
     |  +--rw interface* [name]
     |     +--rw name             if:interface-ref
     +--ro ntp-statistics
        +--ro packet-sent?        yang:counter32
        +--ro packet-sent-fail?   yang:counter32
        +--ro packet-received?    yang:counter32
        +--ro packet-dropped?     yang:counter32

Additional Information

No response

General Information

Anyone can help out by sponsoring development of new features or contributing pull requests. Please use this issue for discussions related to the feature.

troglobit avatar Jan 22 '25 15:01 troglobit

CCB decision: great feature, needs to be investigated further which model to use though. Aiming for milestone: future, for now.

troglobit avatar Jan 23 '25 12:01 troglobit

From the ietf-ntp model:

 container ntp {
    when 'false() = boolean(/sys:system/sys:ntp)' {
      description
        "Applicable when the system /sys/ntp/ is not used.";
    }
    presence "NTP is enabled and system should attempt to
              synchronize the system clock with an NTP server
              from the 'ntp/associations' list.";
    description
      "Configuration parameters for NTP";
    leaf port {
      if-feature "ntp-port";
      type inet:port-number {
        range "123 | 1024..max";
      }
      default "123";
      description
        "Specify the port used to send and receive NTP packets.";

mattiaswal avatar Jan 31 '25 09:01 mattiaswal