A data transfer device comprising: a plurality of communication ports (1a-1d, 2a-2d); a communication establishment processor configured to transmit and receive communication establishing information for establishing communication with an external device (3, 4) connected via the communication port to and from the external device; and a communication maintenance processor configured to operate independently of the communication establishment processor, and transmit communication maintaining information for maintaining establishment of the communication with the external device, to the external device, every time a predetermined transmission period elapses, the data transfer device being configured to, in a state that communication with each of a plurality of external devices via the plurality of communication ports is established, transmit data received from one of the plurality of external devices to the other one of the plurality of external devices, wherein: the communication maintenance processor includes a transmission instruction information storing part configured to store transmission instruction information, which includes the communication maintaining information and communication port specification information for specifying the communication port used for transmitting the communication maintaining information; and the communication maintenance processor is configured to transmit the communication maintaining information included in the stored transmission instruction information to the external device via the communication port specified by the communication port specification information included in the transmission instruction information; and the communication maintenance processor is configured to transmit the communication maintaining information to the external device with which an establishment of communication is maintained, even if an operation of the communication establishment processor has stopped. a plurality of communication ports (1a-1d, 2a-2d); a communication establishment processor configured to transmit and receive communication establishing information for establishing communication with an external device (3, 4) connected via the communication port to and from the external device; and a communication maintenance processor configured to operate independently of the communication establishment processor, and transmit communication maintaining information for maintaining establishment of the communication with the external device, to the external device, every time a predetermined transmission period elapses, the data transfer device being configured to, in a state that communication with each of a plurality of external devices via the plurality of communication ports is established, transmit data received from one of the plurality of external devices to the other one of the plurality of external devices, wherein: the communication maintenance processor includes a transmission instruction information storing part configured to store transmission instruction information, which includes the communication maintaining information and communication port specification information for specifying the communication port used for transmitting the communication maintaining information; and the communication maintenance processor is configured to transmit the communication maintaining information included in the stored transmission instruction information to the external device via the communication port specified by the communication port specification information included in the transmission instruction information; and the communication maintenance processor is configured to transmit the communication maintaining information to the external device with which an establishment of communication is maintained, even if an operation of the communication establishment processor has stopped. the communication maintenance processor includes a transmission instruction information storing part configured to store transmission instruction information, which includes the communication maintaining information and communication port specification information for specifying the communication port used for transmitting the communication maintaining information; and the communication maintenance processor is configured to transmit the communication maintaining information included in the stored transmission instruction information to the external device via the communication port specified by the communication port specification information included in the transmission instruction information; and the communication maintenance processor is configured to transmit the communication maintaining information to the external device with which an establishment of communication is maintained, even if an operation of the communication establishment processor has stopped.