gnmic is a command-line client designed to interact with network devices using the gNMI (gRPC Network Management Interface) protocol. The tool serves as a versatile and efficient solution for managing the configuration and monitoring the operational data of network devices that support gNMI. Developed to streamline network management tasks, gnmic provides administrators and operators with a powerful set of commands to make configuration changes, retrieve real-time updates, and perform various management operations on gNMI-enabled devices.
Key Features
gNMI Protocol Support: As a gNMI command-line client, gnmic fully supports the gNMI protocol. This protocol is based on gRPC, a high-performance RPC (Remote Procedure Call) framework, ensuring reliable and efficient communication between the management system and network devices.
Configuration Management: gnmic allows users to modify the configuration of network devices using the set command. This includes dynamic changes to parameters such as routing configurations, access control policies, and other device-specific settings.
Operational Data Retrieval: The tool facilitates the retrieval of real-time operational data from network devices using the get command. Users can obtain snapshots of the current state of devices, including performance metrics, interface status, and other relevant information.
Subscription and Monitoring: With the subscribe command, gnmic enables users to establish continuous streams of updates, receiving real-time notifications about changes in the operational state of network devices. This feature is valuable for proactive monitoring and rapid issue detection.
gnmic Command Examples
1. Request device capabilities:
# gnmic --address ip:port capabilities
2. Provide a username and password to fetch device capabilities:
# gnmic --address ip:port --username username --password password capabilities
3. Get a snapshot of the device state at a specific path:
# gnmic -a ip:port get --path path
4. Update device state at a specific path:
# gnmic -a ip:port set --update-path path --update-value value
5. Subscribe to target state updates under the subtree at a specific path:
# gnmic -a ip:port subscribe --path path
Summary
In summary, gnmic is a powerful and flexible command-line client that simplifies the management of gNMI-enabled network devices. It combines configuration management, operational data retrieval, and real-time monitoring features to enhance the efficiency and effectiveness of network management tasks.