Deploy the failover_exp.py
Copy the content of the previous code block to /opt/vc/bin/failover_exp.py. There are some parameters, IP address and interface name you need to change in this python script to make it work in your environment. Those parameters are at line 76 to line 79. You can refer to the network diagram in this post (figure 1) to understand what those IP addresses mean. The interface is the LAN interface, in this example is GE2 which will map to eth1. If you use GE2 as LAN interface, then the lan_interface parameter no need to make changes.
Make sure the failover_exp.py is with executable permission:

To let the failover_exp.py automatically start when the VCE boot up, add the following line in /etc/rc.local
nohup /opt/vc/bin/failover_exp.py >/dev/null 2>&1 &
The /etc/rc.local will become:
