CHAPTER 42Network Adapter Failover

The script in this chapter provides network redundancy. It monitors the network accessibility of the local machine for issues. When there is a problem detected with a primary network interface, it reverts its configuration to a backup interface. We are assuming a network architecture where two network interface cards (NICs) are installed in the machine that runs the script. We're also assuming there are network connections running to both interfaces, which are configured in the same fashion (subnet/vlan, speed, duplex, and so on). Each interface should be physically connected to a different network switch for the sake of redundancy.

The goal is that if the primary network hardware fails for any reason, the ...

Get Expert Shell Scripting now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.