NTP
AsterNOS-NTP
Section titled “AsterNOS-NTP”This chapter provides examples on how to use Netconf to manage NTP configurations on AsterNOS devices.
Modify NTP Global Configurations
Section titled “Modify NTP Global Configurations”Request example to modify Kdump-tools configurations via edit-config.
<config> <top> <ntp-global operation="merge"> <vrf>default</vrf> <source-interface>eth0</source-interface> </ntp-global> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:0d9c9ea3-cb6b-4db2-976f-b9dda15b4be1"> <ok/></rpc-reply>Get NTP Global Configurations
Section titled “Get NTP Global Configurations”Request example to retrieve NTP global configurations via get-config with subtree filter.
<filter type="subtree"> <top> <ntp-global/> </top></filter>Response example
<data> <top> <ntp-global xmlns="http://asterfusion.com/ns/yang/asternos-ntp"> <vrf>default</vrf> <source-interface>eth0</source-interface> </ntp-global> </top></data>Create NTP Server
Section titled “Create NTP Server”Request example to create NTP server via edit-config.
<config> <top> <ntp-servers operation="create"> <ntp-server> <address>pool.ntp.org</address> </ntp-server> <ntp-server> <address>192.168.1.1</address> </ntp-server> </ntp-servers> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:df5299b4-8762-4219-8acb-57c2549a3fdf"> <ok/></rpc-reply>Delete Single NTP Server
Section titled “Delete Single NTP Server”Request example to delete single NTP server via edit-config.
<config> <top> <ntp-servers> <ntp-server operation="delete"> <address>192.168.1.1</address> </ntp-server> </ntp-servers> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5e1e8349-d8e4-4d20-a8e5-89fa83712aee"> <ok/></rpc-reply>Delete All NTP Servers
Section titled “Delete All NTP Servers”Request example to delete all NTP server via edit-config.
<config> <top> <ntp-servers operation="delete"> </ntp-servers> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:70c89d24-6af6-4cd0-b4a8-b20f635779d3"> <ok/></rpc-reply>Get All NTP Server
Section titled “Get All NTP Server”Request example to create NTP server via get-config with subtree filter.
<filter type="subtree"> <top> <ntp-servers/> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:864dfd12-0da9-42be-8753-061261a37b05"> <data> <top> <ntp-servers xmlns="http://asterfusion.com/ns/yang/asternos-ntp"> <ntp-server> <address>192.168.1.1</address> </ntp-server> <ntp-server> <address>pool.ntp.org</address> </ntp-server> </ntp-servers> </top> </data></rpc-reply>Show NTP Status
Section titled “Show NTP Status”Request example to get NTP status via rpc show-ntp
<show-ntp/>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:1f493334-1c53-4739-91a1-129bac3c83e6"> <data xmlns="http://asterfusion.com/ns/yang/asternos-ntp"> MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^* 192.168.1.1 4 6 17 16 -5986us[ -17ms] +/- 356ms </data></rpc-reply>