NTP Client#
Management → NCNTP Clients
NTP servers are timekeeping entities that allow clients to request the current time periodically, preventing long-term drift and ensuring that all devices within an NTP domain use the same time reference.
NTP servers can in turn be clients of another NTP server. The stratum number indicates the number of synchronization hops between an NTP server and a reference clock. Stratum 1 servers are directly connected to a precise stratum 0 reference, such as an atomic clock or a GNSS receiver.
Use an NTPClient resource to configure network elements with the same reference time.
Reachability#
The NTP server can be reached through the out-of-band ManagementRouter, or in-band through the DefaultRouter or a virtual Router.
NTP uses UDP datagrams for low-latency, connectionless data delivery. Upon receipt of an NTP request, the server sends a reply to the request's source IP address.
The source IP address of the NTPClient is derived automatically from the available interfaces of the source router. It can also be defined explicitly by specifying a SystemInterface or DefaultInterface reference for a DefaultRouter, or a RoutedInterface or IRBInterface reference for a virtual Router.
Initial burst#
Initial burst, or iBurst, is a configuration option that speeds up initial clock synchronization. The client sends a short sequence of packets instead of relying on the normal polling interval.
Preferred server#
Set preferred to true to mark a server as preferred when the client selects among suitable servers.
Dependencies#
The type of router that the NTPClient will use to reach out to the NTP server can be selected through the routerKind property.
Router types#
ManagementRouter#
If routerKind is set to ManagementRouter, the router property should contain a valid reference to a ManagementRouter. The NTPClient will be deployed on all nodes that participate in the router.
DefaultRouter#
If routerKind is set to DefaultRouter, exactly one of the router and routerSelectors properties must select valid references to a DefaultRouter. The NTPClient will be deployed on all nodes that participate in the selected router or routers.
Router#
If routerKind is set to Router, the router property should contain a valid reference to a Router. The NTPClient will be deployed on all nodes that participate in the router.
Referenced resources#
Source interface types#
The source address of NTP request packets can be derived by the node from the available interfaces of the router, or it can be specified explicitly using the sourceInterface property. When specifying an interface, set both sourceInterfaceKind and sourceInterface. A ManagementRouter does not support either property.
SystemInterface#
If routerKind is set to DefaultRouter and sourceInterfaceKind is set to SystemInterface, the sourceInterface property should contain a valid reference to a SystemInterface.
System interfaces can only be used in a DefaultRouter
If multiple nodes are selected by the router or routerSelectors property and the sourceInterface is a system interface, the NTPClient will only be deployed on the node that the SystemInterface is deployed on.
DefaultInterface#
If routerKind is set to DefaultRouter and sourceInterfaceKind is set to DefaultInterface, the sourceInterface property should contain a valid reference to a DefaultInterface.
Default interfaces can only be used in a DefaultRouter
If multiple nodes are selected by the router or routerSelectors property and the sourceInterface is a default interface, the NTPClient will only be deployed on the node that the DefaultInterface is deployed on.
RoutedInterface#
If routerKind is set to Router and sourceInterfaceKind is set to RoutedInterface, the sourceInterface property should contain a valid reference to a RoutedInterface.
Routed interfaces can only be used in a virtual Router
If the selected Router spans multiple nodes and the sourceInterface is a routed interface, the NTPClient will be deployed only on the nodes where the RoutedInterface is deployed.
IRBInterface#
If routerKind is set to Router and sourceInterfaceKind is set to IRBInterface, the sourceInterface property should contain a valid reference to an IRBInterface.
IRB interfaces can only be used in a virtual Router
If the selected Router spans multiple nodes and the sourceInterface is an IRB interface, the NTPClient will be deployed only on the nodes where the IRBInterface is deployed.
The NTPClient will prefer IP addresses that are marked as primary in the IRBInterface.
Examples#
cat << 'EOF' | kubectl apply -f -
apiVersion: timing.eda.nokia.com/v1
kind: NTPClient
metadata:
name: ntpclient
namespace: timing
spec:
routerKind: Router
servers:
- iBurst: true
preferred: true
server: 10.0.100.101
sourceInterfaceKind: IRBInterface
sourceInterface: inband-mgmt-bd-irb
router: inband-mgmt-router
EOF
Custom Resource Definition#
To browse the Custom Resource Definition go to crd.eda.dev.
NTPClient
SPEC
The NTP client allows for configuring NTP servers and the source of NTP traffic in order for the devices to synchronize their clocks.
-
Router used to reach the NTP servers.
-
the Kind of the router used to reach the NTP servers.
enum: "ManagementRouter", "Router", "DefaultRouter" -
Selects router resources based on the defined KIND. Applies to DefaultRouter only. Not supported for Router and ManagementRouter.
-
Specifies a Interface resource to use as a source of NTP traffic. If none is specified the Node default behavior is used.
-
Specifies the source interface Kind to use as a source of NTP traffic.
enum: "IRBInterface", "RoutedInterface", "DefaultInterface", "SystemInterface"
STATUS
NTPClientStatus defines the observed state of NTPClient
-
Indicates the health score of the NTPClient
format: int32range: <= 100 -
Indicates the reason for the health score
-
The time when the state of the resource last changed
-
Operational state of the NTPClient
enum: "Up", "Down", "Degraded", "Unknown"