Huawei Certified ICT Associate – Data Center Network (HCIA-DCN) — Question 176
You want to check the running configuration on a device by running a Python script to telnet to the device. Which of the following statements is true?
Answer options
- A. telnetlib can implement this function.
- B. telnet.write(b"display current-configuration \n") can be used to check the current configurations.
- C. telnet.close() can be used to wait for the device output after each command is entered.
- D. telnet.Telnet(host) can be used to connect to a Telnet server.
Correct answer: A, B, D
Explanation
The correct answer is A because telnetlib is a Python library that provides tools for Telnet communication. Option B is incorrect because the command syntax is slightly off; it should be formatted correctly for the specific device. Option C is wrong since telnet.close() is used to terminate the connection, not to wait for output. Option D is correct as it accurately describes how to establish a Telnet connection.