Complete the code to define the primary server IP address.
primary_server_ip = "[1]"
The primary server IP is set to 192.168.1.100 as the main active server in the redundant setup.
Complete the code to set the backup server IP address.
backup_server_ip = "[1]"
The backup server IP is set to 192.168.1.101 to provide failover support.
Fix the error in the failover check function to correctly ping the backup server.
def check_backup_server(): response = ping([1]) return response == 0
The function should ping the backup server IP to check its availability for failover.
Fill both blanks to configure the active server and the failover timeout.
active_server = [1] failover_timeout = [2] # seconds
The active server is set to the primary server IP, and the failover timeout is set to 30 seconds to detect failures quickly.
Fill all three blanks to create a dictionary mapping server roles to their IPs and status.
servers = {
"primary": [1],
"backup": [2],
"status": "[3]"
}The dictionary maps the primary and backup server IPs and sets the status to active indicating the primary is currently active.