


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Python for DNS Operations โ Sample Questions
1. Which Python module is most commonly used for performing DNS queries and zone transfers in Task 2? A. socket B. dnspython C. requests D. subprocess Answer: B โ The dnspython module (dns.resolver) is the most comprehensive library for DNS operations. It supports all common record types and provides native parsing and exception handling, reducing reliance on external binaries. 2. What is the correct way to perform an A-record lookup for a domain using modern versions of dnspython? A. dns.resolver.query('example.com', 'A') B. dns.resolver.resolve('example.com', 'A') C. socket.gethostbyname('example.com') D. dns.query.A('example.com') Answer: B โ In modern versions of dnspython, dns.resolver.resolve() is the recommended method. The older dns.resolver.query() method is deprecated. 3. Which data type is most appropriate for storing a collection of unique IP addresses in Python?
A. List B. Tuple C. Set D. Dictionary Answer: C โ A set automatically eliminates duplicate values, making it the most appropriate data type for storing unique IP addresses.
4. What is the primary purpose of a backup process in the network remediation workflow? A. To delete old configuration files B. To save the current configuration before making changes, enabling rollback if needed C. To compress configuration files D. To encrypt configuration files Answer: B โ Backing up current configurations before applying changes ensures that if remediation causes issues, the system can be restored to its previous state. 5. What is the purpose of including error handling when making API requests in the helpdesk integration? A. To slow down the script B. To handle network failures, timeouts, and invalid responses gracefully C. To generate additional log entries D. To verify the device's DNS configuration Answer: B โ Error handling for API requests is essential to handle network failures, timeouts, HTTP errors, and invalid responses, preventing script crashes. 6. Which log level is used for confirming normal script operation and successful actions? A. DEBUG B. INFO C. WARNING D. ERROR Answer: B โ INFO log level is used for confirming normal script operation and successful actions, such as "DNS configuration remediated successfully on device X". 7. What information should be included in a log entry for a DNS remediation task?
Answer: B โ T2-E04 requires a fresh read/query after the change, with the observed altered value visible. Evidence must not rely only on a write-command success message