Skip to content

Commit 2cbcae9

Browse files
committed
Update Configuration reference
Signed-off-by: Yevhen Fastiuk <[email protected]>
1 parent ee6ee4d commit 2cbcae9

File tree

1 file changed

+124
-6
lines changed

1 file changed

+124
-6
lines changed

src/sonic-yang-models/doc/Configuration.md

+124-6
Original file line numberDiff line numberDiff line change
@@ -1474,6 +1474,35 @@ These configuration options are used to modify the way that
14741474
ntp binds to the ports on the switch and which port it uses to
14751475
make ntp update requests from.
14761476

1477+
***NTP Admin state***
1478+
1479+
If this option is set to `enabled` then ntp client will try to sync system time with configured NTP servers.
1480+
Otherwise, NTP client feature will be disabled.
1481+
```
1482+
{
1483+
"NTP": {
1484+
"global": {
1485+
"admin_state": "enabled"
1486+
}
1487+
}
1488+
}
1489+
```
1490+
1491+
***NTP Server role***
1492+
1493+
This option is used to control NTP server state on the switch.
1494+
If this option is set to `enabled` switch will act as NTP server.
1495+
By default `server_role` is `disabled`.
1496+
```
1497+
{
1498+
"NTP": {
1499+
"global": {
1500+
"server_role": "enabled"
1501+
}
1502+
}
1503+
}
1504+
```
1505+
14771506
***NTP VRF***
14781507

14791508
If this option is set to `default` then ntp will run within the default vrf
@@ -1511,6 +1540,36 @@ for that address.
15111540
}
15121541
```
15131542

1543+
***NTP Authentication***
1544+
1545+
If this option is set to `enabled` then ntp will try to verify NTP servers it connects to.
1546+
This option **has no effect** if key is not set for NTP server.
1547+
By default it is `disabled`
1548+
```
1549+
{
1550+
"NTP": {
1551+
"global": {
1552+
"authentication": "enabled"
1553+
}
1554+
}
1555+
}
1556+
```
1557+
1558+
***NTP DHCP leases***
1559+
1560+
If this option is set to `enabled` then ntp client will try to use NTP servers provided by DHCP server.
1561+
If this option is set to `disabled` you will be able to use the user-configured NTP servers.
1562+
By default it is `enabled`
1563+
```
1564+
{
1565+
"NTP": {
1566+
"global": {
1567+
"dhcp": "enabled"
1568+
}
1569+
}
1570+
}
1571+
```
1572+
15141573
### NTP and SYSLOG servers
15151574

15161575
These information are configured in individual tables. Domain name or IP
@@ -1521,18 +1580,77 @@ attributes in those objects.
15211580
```
15221581
{
15231582
"NTP_SERVER": {
1524-
"2.debian.pool.ntp.org": {},
1525-
"1.debian.pool.ntp.org": {},
1526-
"3.debian.pool.ntp.org": {},
1527-
"0.debian.pool.ntp.org": {}
1583+
"2.debian.pool.ntp.org": {
1584+
"association_type": "pool",
1585+
"iburst": "on",
1586+
"admin_state": "enabled",
1587+
"version": 4
1588+
},
1589+
"1.debian.pool.ntp.org": {
1590+
"association_type": "pool",
1591+
"iburst": "off",
1592+
"admin_state": "enabled",
1593+
"version": 3
1594+
},
1595+
"3.debian.pool.ntp.org": {
1596+
"association_type": "pool",
1597+
"iburst": "on",
1598+
"admin_state": "disabled",
1599+
"version": 4
1600+
},
1601+
"0.debian.pool.ntp.org": {
1602+
"association_type": "pool",
1603+
"iburst": "off",
1604+
"admin_state": "disabled",
1605+
"version": 3
1606+
}
15281607
},
15291608
15301609
"NTP_SERVER": {
1531-
"23.92.29.245": {},
1532-
"204.2.134.164": {}
1610+
"23.92.29.245": {
1611+
"association_type": "server",
1612+
"iburst": "on",
1613+
"admin_state": "enabled",
1614+
"version": 4,
1615+
"key": 3,
1616+
"trusted": "yes"
1617+
},
1618+
"204.2.134.164": {
1619+
"association_type": "server",
1620+
"iburst": "on",
1621+
"admin_state": "enabled",
1622+
"version": 3
1623+
}
1624+
}
1625+
}
1626+
```
1627+
* `association_type` - is used to control the type of the server. It can be `server` or `pool`.
1628+
* `iburst` - agressive server polling `{on, off}`.
1629+
* `version` - NTP protool version to use `[3..4]`.
1630+
* `key` - authentication key id `[1..65535]` to use to auth the server.
1631+
* `admin_state` - enable or disable specific server.
1632+
* `trusted` - trust this server when auth is enabled.
1633+
1634+
***NTP keys***
1635+
```
1636+
{
1637+
"NTP_KEY": {
1638+
"1": {
1639+
"type": "md5",
1640+
"value": "bXlwYXNzd29yZA==",
1641+
"trusted": "yes"
1642+
},
1643+
"42": {
1644+
"type": "sha1",
1645+
"value": "dGhlYW5zd2Vy",
1646+
"trusted": "no"
1647+
}
15331648
}
15341649
}
15351650
```
1651+
* `type` - key type to use `{md5, sha1, sha256, sha384, sha512}`.
1652+
* `value` - base64 encoded key value.
1653+
* `trusted` - trust this NTP key `{yes, no}`.
15361654

15371655
***Syslog server***
15381656
```

0 commit comments

Comments
 (0)