How can I configure a network infrastructure that establishes two separate networks and allows them to utilize each other's Internet connection as a backup in the event of an Internet outage on one network? Please provide a detailed explanation of the setup, including hardware requirements, network configurations, and failover mechanisms to ensure seamless Internet access for both networks during outages.