Docsity

WGU D522 Task 2 Performance Assessment — Python Network Remediation, DNS Configuration,, Exams of Information Technology

Toggle sidebar
bg1
WGU D522 Task 2 Performance Assessment
— Python Network Remediation, DNS
Configuration, System Recovery & Validation
2026-2027
1. A Python remediation script must connect to multiple
network devices, execute configuration commands, and
continue processing if one device becomes unreachable.
Which design is MOST appropriate?
A. Use one global connection and terminate on the first
exception
B. Use a separate device connection inside a loop with per-
device exception handling
C. Use manual Telnet sessions and record results afterward
D. Store all commands in a text file without execution logic
B. Use a separate device connection inside a loop with per-
device exception handling
Rationale: A scalable remediation script should isolate each
device operation so that one failed connection does not
terminate the entire remediation process. A loop allows the
same procedure to be applied consistently, while exception
handling captures connection failures and permits the script
to continue. This also supports meaningful logging of which
devices succeeded or failed.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e

Partial preview of the text

Download WGU D522 Task 2 Performance Assessment — Python Network Remediation, DNS Configuration, and more Exams Information Technology in PDF only on Docsity!

WGU D522 Task 2 Performance Assessment

— Python Network Remediation, DNS

Configuration, System Recovery & Validation

  1. A Python remediation script must connect to multiple network devices, execute configuration commands, and continue processing if one device becomes unreachable. Which design is MOST appropriate? A. Use one global connection and terminate on the first exception B. Use a separate device connection inside a loop with per- device exception handling C. Use manual Telnet sessions and record results afterward D. Store all commands in a text file without execution logic B. Use a separate device connection inside a loop with per- device exception handling Rationale: A scalable remediation script should isolate each device operation so that one failed connection does not terminate the entire remediation process. A loop allows the same procedure to be applied consistently, while exception handling captures connection failures and permits the script to continue. This also supports meaningful logging of which devices succeeded or failed.
  1. A remediation script modifies a router configuration. Which approach provides the strongest protection against an incorrect configuration change? A. Apply the change immediately and depend on the router's event log B. Back up the current configuration, apply the change, and validate the resulting state C. Restart the router before making the change D. Delete the existing configuration before generating the replacement B. Back up the current configuration, apply the change, and validate the resulting state Rationale: Configuration backup establishes a recovery point, while post-change validation determines whether the desired state was actually achieved. If validation fails, the previous configuration can be restored. Applying changes without preserving the original state creates unnecessary recovery risk.
  2. A Python script needs to determine whether an IPv address belongs to a particular subnet before performing remediation. Which Python capability is most appropriate? A. The json module B. The csv module C. The ipaddress module D. The logging module

A. Ignore the command's return code B. Capture and evaluate the command's return code and handle exceptions C. Remove all error handling D. Replace every command with a comment B. Capture and evaluate the command's return code and handle exceptions Rationale: External commands can fail without necessarily causing the Python process itself to terminate. Checking the return code allows the script to distinguish successful execution from failure. Exception handling can additionally address conditions such as missing executables or invalid subprocess parameters.

  1. A DNS remediation script must verify that a hostname resolves to the expected IPv4 address. Which validation provides the most direct functional test? A. Check whether the DNS service process is running B. Query the hostname and compare the returned A record with the expected address C. Check the DNS server's disk capacity D. Verify that the DNS configuration file exists B. Query the hostname and compare the returned A record with the expected address Rationale: Service status and file existence only establish that components are present or running. Functional DNS validation requires an actual resolution test. Comparing the

returned A record with the expected address verifies that the remediation produced the intended result.

  1. A network remediation program processes 100 devices. Device 37 times out during connection. What is the best design if devices 38–100 must still be processed? A. Allow the exception to terminate the program B. Place the entire script inside one exception handler that suppresses all errors C. Handle exceptions around each device operation and record the failure D. Skip all devices after device 37 C. Handle exceptions around each device operation and record the failure Rationale: Per-device exception handling provides fault isolation. The failed device can be logged with its error condition while the loop continues with the remaining devices. A single global handler can obscure individual failures, while terminating the program reduces automation reliability.
  2. A recovery plan specifies an RPO of 15 minutes. What does this requirement primarily describe? A. The maximum acceptable time required to restore service B. The maximum amount of data loss measured in time that the organization can tolerate

A. Assume the recovery succeeded B. Delete the backup because it is no longer required C. Perform functional validation of DNS resolution and configuration state D. Shut down the DNS server C. Perform functional validation of DNS resolution and configuration state Rationale: Successful file restoration does not guarantee successful service operation. Validation should confirm both configuration correctness and actual DNS functionality. Maintaining the backup until recovery has been verified also preserves a recovery option if another problem appears.

  1. Which Python data structure is MOST appropriate for representing expected DNS settings as key-value pairs? A. Dictionary B. Tuple containing only integers C. Set containing unrelated strings D. Boolean A. Dictionary Rationale: Dictionaries naturally represent key-value relationships such as "dns_server": "10.0.0.10" or "domain": "example.local". This structure is particularly useful when configuration data must be loaded, compared, modified, and validated programmatically.
  1. A remediation script reads a CSV containing device names and IP addresses. One row contains a missing IP address. What is the BEST approach? A. Attempt the connection using the empty value B. Validate required fields before attempting remediation C. Delete the entire CSV D. Assign a random IP address B. Validate required fields before attempting remediation Rationale: Input validation prevents malformed configuration data from being passed into network operations. The script should identify the invalid record, log the issue, and either skip or safely quarantine that entry according to the recovery requirements.
  2. A DNS administrator needs to determine whether a server is authoritative for a particular zone. Which information is MOST relevant? A. The server's CPU utilization B. The SOA record returned by the DNS server C. The amount of RAM installed D. The Python version installed on the server B. The SOA record returned by the DNS server Rationale: The Start of Authority record identifies authoritative information for a DNS zone and contains important zone-management fields such as the serial number

C. Deleting existing configuration before every execution D. Restarting every network device after every command A. Idempotent operations that produce the intended state without unnecessary repeated changes Rationale: Idempotent remediation can be executed multiple times while producing the same desired state rather than accumulating unintended changes. This is especially important when scripts are rerun after partial failures or during validation.

  1. A script changes a DNS configuration and then immediately reports success without checking DNS resolution. What is the primary weakness? A. The script uses too many variables B. The script lacks functional post-remediation validation C. DNS cannot be tested programmatically D. Python cannot process DNS information B. The script lacks functional post-remediation validation Rationale: Applying a configuration is not equivalent to proving that the system works. Functional validation should confirm that the intended DNS records resolve correctly and that the service behaves as expected. This establishes evidence that the remediation achieved its objective.
  1. A recovery script must preserve evidence from a compromised system before making substantial modifications. Which approach is MOST appropriate? A. Immediately delete suspicious files B. Modify timestamps on all files C. Preserve relevant data and acquire appropriate evidence before destructive remediation D. Reformat the system immediately C. Preserve relevant data and acquire appropriate evidence before destructive remediation Rationale: Destructive remediation can alter or eliminate evidence needed for investigation and recovery analysis. Preserving relevant information before making major changes supports forensic integrity and allows administrators to determine what happened while maintaining a defensible recovery process.
  2. A Python network automation script stores device credentials directly in its source code. Which change MOST improves security? A. Print the credentials before connecting B. Store credentials securely outside the source code and retrieve them at runtime C. Put the credentials into comments D. Duplicate the credentials in every function B. Store credentials securely outside the source code and retrieve them at runtime

meaningful comparisons C. Ignore the entire configuration D. Automatically replace the router configuration B. Normalize or parse configuration data before performing meaningful comparisons Rationale: Raw text comparison can generate false positives when formatting differs without changing actual behavior. Parsing or normalization allows the validation process to focus on meaningful configuration state. This produces more reliable configuration-drift detection.

  1. A recovery script restores files successfully but the application cannot start because a required configuration file has incorrect permissions. Which lesson does this demonstrate? A. File restoration automatically guarantees application recovery B. Recovery validation must include dependencies such as permissions and service functionality C. Permissions never affect applications D. Backup files should always be deleted after restoration B. Recovery validation must include dependencies such as permissions and service functionality Rationale: Restoring file contents is only one component of system recovery. Applications may depend on correct ownership, permissions, configuration syntax, network

connectivity, services, and supporting components. Validation must therefore test the complete operational chain.

  1. A Python script writes remediation results to a log. Which information is MOST useful for troubleshooting a failed device operation? A. Only the word "failed" B. Timestamp, device identifier, operation performed, result, and relevant error information C. Only the Python version D. Only the administrator's username B. Timestamp, device identifier, operation performed, result, and relevant error information Rationale: Effective logs provide enough context to reconstruct what happened. A timestamp establishes when the event occurred, the device identifies the affected system, the operation explains what was attempted, and the error details help determine the corrective action.
  2. A DNS remediation script successfully changes a zone record, but clients continue receiving the previous address. Which explanation should be investigated FIRST? A. Whether clients or intermediate resolvers are using cached DNS data B. Whether Python supports strings
  1. A network remediation script has completed successfully on every target device. Which evidence provides the STRONGEST confirmation that the overall remediation was successful? A. The Python script reached the final line of code B. Every device returned a successful connection message C. The intended configuration state was verified and functional network/DNS tests passed after remediation D. The administrator manually closed the terminal C. The intended configuration state was verified and functional network/DNS tests passed after remediation Rationale: Successful script execution does not necessarily mean that the desired system state was achieved. Strong validation combines state verification with functional testing. For D522-style remediation workflows, this provides evidence that the change was applied correctly and that the resulting system actually performs as required.
  2. A Python remediation script must execute a DNS configuration change only when the current configuration differs from the approved baseline. Which approach BEST supports this requirement? A. Always overwrite the configuration regardless of its current state B. Compare the current state with the desired state before applying changes

C. Restart the DNS service before performing the comparison D. Delete the baseline after the first successful execution B. Compare the current state with the desired state before applying changes Rationale: Comparing actual state against desired state prevents unnecessary modifications and supports idempotent remediation. The script should make a change only when a deviation is detected. This reduces service disruption and makes repeated executions safer.

  1. A Python script receives a DNS server address from user input. Which validation is MOST appropriate before using the value in a network operation? A. Verify that the value is a valid IP address B. Convert the address to uppercase C. Remove every period from the address D. Assume the input is valid because it came from an administrator A. Verify that the value is a valid IP address Rationale: Network automation should validate externally supplied values before using them. Python's IP-address handling capabilities can identify malformed IPv4 or IPv addresses before a connection attempt is made, preventing avoidable runtime failures.

Rationale: A checksum mismatch indicates that the file contents differ from the expected backup contents. Restoring potentially corrupted data can make recovery worse. Integrity verification should therefore precede restoration when checksums are part of the recovery process.

  1. A remediation script successfully connects to a device but receives an authorization error when attempting a configuration command. What does this most directly indicate? A. Network connectivity is impossible B. Authentication succeeded but the account lacks the required authorization C. DNS resolution necessarily failed D. The device has no operating system B. Authentication succeeded but the account lacks the required authorization Rationale: Authentication establishes identity, while authorization determines what that identity is permitted to do. An account may successfully establish a session but still lack privileges necessary to modify configuration.
  2. A DNS service refuses to start after a configuration file has been modified. Which remediation step should occur FIRST?

A. Delete all DNS zone data B. Validate the configuration syntax and inspect the service error output C. Replace the server hardware D. Change every client DNS setting B. Validate the configuration syntax and inspect the service error output Rationale: A service that fails immediately after configuration modification may have a syntax or semantic configuration error. Validating the configuration and reviewing service diagnostics provides targeted information before destructive or unrelated changes are attempted.

  1. A Python remediation workflow must distinguish between a successful configuration command and a successful end-to-end network outcome. Which design BEST accomplishes this? A. Check only whether the command executed B. Check command execution, verify configuration state, and perform functional tests C. Check only the device's uptime D. Check only whether the Python script exited B. Check command execution, verify configuration state, and perform functional tests Rationale: These are separate validation layers. Command success indicates that the operation was accepted, configuration verification confirms the intended state exists,