Patent ID: 8737413

Claim:
A relay server comprising: an address filter information storage unit that stores a first routing target address and a second routing target address, the first routing target address being an address of a first routing target device, to which a packet is transferred, located in a first LAN, the second routing target address being an address of a second routing target device to which a second relay server located in a second LAN transfers a packet; a virtual address allocation relationship storage unit that stores the first routing target address and a virtual address allocated and correlated to the first routing target address; a virtual address setting information storage unit that stores whether communication with the second relay server is conducted using the virtual address or the first routing target address; and a controller that is programmed to perform: control to store in the virtual address setting information storage unit whether communication with the second relay server is conducted using the virtual address or the first routing target address; control to allocate the virtual address to the first routing target address and store an allocation relationship between the virtual address and the first routing target address in the virtual address allocation relationship storage unit when the virtual address setting information storage unit stores that communication with the second relay server is conducted using the virtual address; control to set with respect to the second relay server whether the communication is conducted using the virtual address or the first routing target address; control to transmit the virtual address allocated to the first routing target address to the second relay server and receive the second routing target address from the second relay server, to establish a routing session with the second relay server; control to refer to the virtual address allocation relationship storage unit when receiving a packet having a destination of the virtual address from the routing session and convert the destination address of the packet into the first routing target address corresponding to the virtual address, to transfer the packet to the first routing target device of the destination; and control to refer to the virtual address allocation relationship storage unit when receiving a packet having a destination of the second routing target device from the first routing target device and convert a source address of the packet into the virtual address allocated to the first routing target address, to transfer the packet to the routing session.