Cisco CCNA Network Automation and APIs 5 — Questions and Answers
Question 1: Which protocol operates over TCP port 830 and is used for network device configuration?
- SNMP
- RESTCONF
- NETCONF (Correct answer)
- gRPC
Correct answer: NETCONF
NETCONF uses SSH (TCP port 830) as its transport protocol for secure device configuration.
Question 2: What is RESTCONF, and how does it relate to NETCONF?
- RESTCONF replaces NETCONF entirely and uses a different data model
- RESTCONF is a REST-based protocol that exposes NETCONF data stores over HTTP/HTTPS (Correct answer)
- RESTCONF only supports read operations while NETCONF supports writes
- RESTCONF uses UDP while NETCONF uses TCP
Correct answer: RESTCONF is a REST-based protocol that exposes NETCONF data stores over HTTP/HTTPS
RESTCONF (RFC 8040) provides a RESTful HTTP interface to the same YANG-modeled data stores used by NETCONF.
Question 3: In an Ansible playbook, what is the purpose of the 'vars' section?
- It lists the target hosts for the playbook
- It defines variable values used throughout the playbook (Correct answer)
- It specifies which Ansible modules to install
- It sets the execution order of tasks
Correct answer: It defines variable values used throughout the playbook
The 'vars' section in a playbook defines variables that can be referenced in tasks using {{ variable_name }} syntax.
Question 4: What is the purpose of the 'Accept' HTTP header in a REST API request?
- It authenticates the client to the server
- It tells the server what data format the client wants in the response (Correct answer)
- It specifies the HTTP method to use
- It sets the maximum response size
Correct answer: It tells the server what data format the client wants in the response
The Accept header indicates the media type(s) the client can process, telling the server what format to use for the response.
Question 5: Which of the following is a characteristic of a stateless REST API?
- The server stores session data between client requests
- Each request must contain all information needed; the server stores no client state (Correct answer)
- REST APIs require persistent TCP connections
- Authentication is only needed on the first request
Correct answer: Each request must contain all information needed; the server stores no client state
REST's stateless constraint means every request is self-contained; the server retains no session state between requests.
Question 6: When using Python's 'requests' library to call a HTTPS REST API that uses a self-signed certificate, what parameter disables SSL verification (for lab/testing only)?
- ssl=False
- verify=False (Correct answer)
- cert=None
- tls_check=False
Correct answer: verify=False
Passing verify=False to requests.get() or requests.post() disables SSL certificate verification, used only in lab environments.
Question 7: Which automation approach is described as 'push-based' where a central controller sends configuration to devices?
- Ansible (Correct answer)
- Puppet
- Chef
- Both Puppet and Chef
Correct answer: Ansible
Ansible uses a push model where the control node actively pushes configuration to managed devices over SSH.
Which protocol operates over TCP port 830 and is used for network device configuration?