A multiprotocol/multilayer compatible relay program for relaying, to a second communication line, connection of a communication device that is connected to a first communication line, the multiprotocol/multilayer compatible relay program causing a computer to execute:
- a failure/recovery detection function that detects a failure and recovery of the first communication line;
- a transmission/reception path control function that sets a value for performing mutual switching control of a transmission/reception path between the first communication line and the second communication line in accordance with a detection result acquired by the failure/recovery detection function;
- a first communication line transfer processing function that:
- analyzes a packet exchanged between the communication device and a connection-destination provider of the first communication line in accordance with a value for performing the switching control;
- extracts provider information, session information, and transmission/reception packet information;
- transfers a packet received from the communication device to an interface that houses the first communication line;
- and transfers a packet received from an interface that houses the first communication line to the communication device;
- and
- a second communication line transfer processing function that:
- analyzes the packet received from the communication device in accordance with the value for performing the switching control;
- converts a format of the packet received from the communication device into a:
- format that can be transferred to the second communication line and transfers the packet to the interface that houses the second communication line;
- and converts a format of the packet received from the interface that houses the second communication line into a format that can be transferred to the communication device and transfers the packet to the communication device.