Implementing and Operating Cisco Enterprise Network Core Technologies (ENCOR) v1.2AutomationEasy
A network engineer is developing a Python script to interact with a Cisco device using NETCONF. The script needs to retrieve the current operational status of all interfaces. Which operation should the engineer use in the NETCONF RPC request?
- A<commit>
- B<get-config>
- C<edit-config>
- D<get>
Show answer & explanationAnswer & explanation
Correct answer: D. <get>
The NETCONF `<get>` operation is used to retrieve both configuration data and operational state data from a device. To retrieve operational status, `<get>` is the correct choice, typically with appropriate filters.
Why the other options are wrong
- A. The `<commit>` operation is used to apply changes from a candidate configuration to the running configuration, not for data retrieval.
- B. The `<get-config>` operation is used to retrieve only configuration data, not operational state data.
- C. The `<edit-config>` operation is used to modify the configuration of a device, not retrieve operational state.
NETCONF <get> Operation
In NETCONF, the `<get>` operation is used to retrieve both configuration data and operational state data from a network device, typically using filters to specify the desired information.
- Retrieves configuration and state data.
- Can use filters to target specific data.
- Distinct from `<get-config>` which only retrieves configuration.
Memory trick: GET everything, GET-CONFIG only config.