|
121 | 121 | * [Troubleshooting Commands](#troubleshooting-commands)
|
122 | 122 | * [Routing Stack](#routing-stack)
|
123 | 123 | * [Quagga BGP Show Commands](#Quagga-BGP-Show-Commands)
|
| 124 | +* [ZTP Configuration And Show Commands](#ztp-configuration-and-show-commands) |
| 125 | + * [ ZTP show commands](#ztp-show-commands) |
| 126 | + * [ZTP configuration commands](#ztp-configuration-commands) |
124 | 127 |
|
125 | 128 | ## Document History
|
126 | 129 |
|
@@ -6573,3 +6576,152 @@ This command displays the routing policy that takes precedence over the other ro
|
6573 | 6576 | Exit routemap
|
6574 | 6577 | ```
|
6575 | 6578 | Go Back To [Beginning of the document](#) or [Beginning of this section](#quagga-bgp-show-commands)
|
| 6579 | +
|
| 6580 | +# ZTP Configuration And Show Commands |
| 6581 | +
|
| 6582 | +This section explains all the Zero Touch Provisioning commands that are supported in SONiC. |
| 6583 | +
|
| 6584 | +## ZTP show commands |
| 6585 | +
|
| 6586 | +
|
| 6587 | +This command displays the current ZTP configuration of the switch. It also displays detailed information about current state of a ZTP session. It displays information related to all configuration sections as defined in the switch provisioning information discovered in a particular ZTP session. |
| 6588 | +
|
| 6589 | +- Usage: |
| 6590 | + show ztp status |
| 6591 | +
|
| 6592 | + show ztp status --verbose |
| 6593 | +
|
| 6594 | +- Example: |
| 6595 | +
|
| 6596 | +``` |
| 6597 | +root@B1-SP1-7712:/home/admin# show ztp status |
| 6598 | +ZTP Admin Mode : True |
| 6599 | +ZTP Service : Inactive |
| 6600 | +ZTP Status : SUCCESS |
| 6601 | +ZTP Source : dhcp-opt67 (eth0) |
| 6602 | +Runtime : 05m 31s |
| 6603 | +Timestamp : 2019-09-11 19:12:24 UTC |
| 6604 | +
|
| 6605 | +ZTP Service is not running |
| 6606 | +
|
| 6607 | +01-configdb-json: SUCCESS |
| 6608 | +02-connectivity-check: SUCCESS |
| 6609 | +``` |
| 6610 | +Use the verbose option to display more detailed information. |
| 6611 | +
|
| 6612 | +``` |
| 6613 | +root@B1-SP1-7712:/home/admin# show ztp status --verbose |
| 6614 | +Command: ztp status --verbose |
| 6615 | +======================================== |
| 6616 | +ZTP |
| 6617 | +======================================== |
| 6618 | +ZTP Admin Mode : True |
| 6619 | +ZTP Service : Inactive |
| 6620 | +ZTP Status : SUCCESS |
| 6621 | +ZTP Source : dhcp-opt67 (eth0) |
| 6622 | +Runtime : 05m 31s |
| 6623 | +Timestamp : 2019-09-11 19:12:16 UTC |
| 6624 | +ZTP JSON Version : 1.0 |
| 6625 | +
|
| 6626 | +ZTP Service is not running |
| 6627 | +
|
| 6628 | +---------------------------------------- |
| 6629 | +01-configdb-json |
| 6630 | +---------------------------------------- |
| 6631 | +Status : SUCCESS |
| 6632 | +Runtime : 02m 48s |
| 6633 | +Timestamp : 2019-09-11 19:11:55 UTC |
| 6634 | +Exit Code : 0 |
| 6635 | +Ignore Result : False |
| 6636 | +
|
| 6637 | +---------------------------------------- |
| 6638 | +02-connectivity-check |
| 6639 | +---------------------------------------- |
| 6640 | +Status : SUCCESS |
| 6641 | +Runtime : 04s |
| 6642 | +Timestamp : 2019-09-11 19:12:16 UTC |
| 6643 | +Exit Code : 0 |
| 6644 | +Ignore Result : False |
| 6645 | +``` |
| 6646 | +
|
| 6647 | +- Description |
| 6648 | +
|
| 6649 | + - **ZTP Admin Mode** - Displays if the ZTP feature is administratively enabled or disabled. Possible values are True or False. This value is configurable using "config ztp enabled" and "config ztp disable" commands. |
| 6650 | + - **ZTP Service** - Displays the ZTP service status. The following are possible values this field can display: |
| 6651 | + - *Active Discovery*: ZTP service is operational and is performing DHCP discovery to learn switch provisioning information |
| 6652 | + - *Processing*: ZTP service has discovered switch provisioning information and is processing it |
| 6653 | + - **ZTP Status** - Displays the current state and result of ZTP session. The following are possible values this field can display: |
| 6654 | + - *IN-PROGRESS*: ZTP session is currently in progress. ZTP service is processing switch provisioning information. |
| 6655 | + - *SUCCESS*: ZTP service has successfully processed the switch provisioning information. |
| 6656 | + - *FAILED*: ZTP service has failed to process the switch provisioning information. |
| 6657 | + - *Not Started*: ZTP service has not started processing the discovered switch provisioning information. |
| 6658 | + - **ZTP Source** - Displays the DHCP option and then interface name from which switch provisioning information has been discovered. |
| 6659 | + - **Runtime** - Displays the time taken for ZTP process to complete from start to finish. For individual configuration sections it indicates the time taken to process the associated configuration section. |
| 6660 | + - **Timestamp** - Displays the date/time stamp when the status field has last changed. |
| 6661 | + - **ZTP JSON Version** - Version of ZTP JSON file used for describing switch provisioning information. |
| 6662 | + - **Status** - Displays the current state and result of a configuration section. The following are possible values this field can display: |
| 6663 | + - *IN-PROGRESS*: Corresponding configuration section is currently being processed. |
| 6664 | + - *SUCCESS*: Corresponding configuration section was processed successfully. |
| 6665 | + - *FAILED*: Corresponding configuration section failed to execute successfully. |
| 6666 | + - *Not Started*: ZTP service has not started processing the corresponding configuration section. |
| 6667 | + - *DISABLED*: Corresponding configuration section has been marked as disabled and will not be processed. |
| 6668 | + - **Exit Code** - Displays the program exit code of the configuration section executed. Non-zero exit code indicates that the configuration section has failed to execute successfully. |
| 6669 | + - **Ignore Result** - If this value is True, the result of the corresponding configuration section is ignored and not used to evaluate the overall ZTP result. |
| 6670 | + - **Activity String** - In addition to above information an activity string is displayed indicating the current action being performed by the ZTP service and how much time it has been performing the mentioned activity. Below is an example. |
| 6671 | + - (04m 12s) Discovering provisioning data |
| 6672 | +
|
| 6673 | +## ZTP configuration commands |
| 6674 | +
|
| 6675 | +This sub-section explains the list of the configuration options available for ZTP. |
| 6676 | +
|
| 6677 | +
|
| 6678 | +
|
| 6679 | +**config ztp enable** |
| 6680 | +
|
| 6681 | +Use this command to enable ZTP administrative mode |
| 6682 | +
|
| 6683 | +- Example: |
| 6684 | +
|
| 6685 | +``` |
| 6686 | +root@sonic:/home/admin# config ztp enable |
| 6687 | +Running command: ztp enable |
| 6688 | +``` |
| 6689 | +
|
| 6690 | +
|
| 6691 | +
|
| 6692 | +**config ztp disable** |
| 6693 | +
|
| 6694 | +Use this command to disable ZTP administrative mode. This command can also be used to abort a current ZTP session and load the factory default switch configuration. |
| 6695 | +
|
| 6696 | +- Usage: |
| 6697 | + config ztp disable |
| 6698 | +
|
| 6699 | + config ztp disable -y |
| 6700 | +
|
| 6701 | +- Example: |
| 6702 | +
|
| 6703 | +``` |
| 6704 | +root@sonic:/home/admin# config ztp disable |
| 6705 | +Active ZTP session will be stopped and disabled, continue? [y/N]: y |
| 6706 | +Running command: ztp disable -y |
| 6707 | +``` |
| 6708 | +
|
| 6709 | +
|
| 6710 | +**config ztp run** |
| 6711 | +
|
| 6712 | +Use this command to manually restart a new ZTP session. This command deletes the existing */etc/sonic/config_db.json* file and stats ZTP service. It also erases the previous ZTP session data. ZTP configuration is loaded on to the switch and ZTP discovery is performed. |
| 6713 | +
|
| 6714 | +- Usage: |
| 6715 | + config ztp run |
| 6716 | +
|
| 6717 | + config ztp run -y |
| 6718 | +
|
| 6719 | +- Example: |
| 6720 | +
|
| 6721 | +``` |
| 6722 | +root@sonic:/home/admin# config ztp run |
| 6723 | +ZTP will be restarted. You may lose switch data and connectivity, continue? [y/N]: y |
| 6724 | +Running command: ztp run -y |
| 6725 | +``` |
| 6726 | +
|
| 6727 | +Go Back To [Beginning of the document](#SONiC-COMMAND-LINE-INTERFACE-GUIDE) or [Beginning of this section](#ztp-configuration-and-show-commands) |
0 commit comments