COMMUNICATION PROGRAM, ROUTER, SERVER AND COMMUNICATION SYSTEM

The communication system addresses direct terminal communication issues by using port range information to adjust source port numbers, ensuring successful connections despite NAT router conversions.

JP7559642B2Active Publication Date: 2024-10-02YAMAHA CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2021051905
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-03-25
Publication Date
2024-10-02
Estimated Expiration
2041-03-25

AI Technical Summary

Technical Problem

Existing communication systems struggle with direct terminal communication due to NAT routers converting source port numbers, leading to failed connections when inferred port numbers are unavailable.

Method used

A communication system that includes terminals, routers, and a server to acquire and utilize port range information, allowing terminals to select and use different port numbers for direct communication by determining available port ranges and adjusting source port numbers based on these ranges.

Benefits of technology

Enables direct and reliable communication between terminals by ensuring available port numbers are used, overcoming the limitations of NAT router port number conversions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007559642000001
    Figure 0007559642000001
  • Figure 0007559642000002
    Figure 0007559642000002
  • Figure 0007559642000003
    Figure 0007559642000003
Patent Text Reader

Abstract

To provide a program for communication, a communication system, and the like that facilitate direct communication between terminals.SOLUTION: A program according to an embodiment causes a first terminal to execute processing of obtaining a range of available port numbers for a first router, transmitting the obtained range of available port numbers of the first router to a first server via the first router in order to cause a second terminal to obtain the port number of the first router, obtaining a predetermined second router port number selected on the basis of the second router's source port number and the second router's available port number range, and attempting to connect to the second terminal via the first router with the port number of the second router as a destination port number.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a program, a router, a server, and a communication system for communication. [Background technology]

[0002] Conventionally, there has been known a network session system that enables musical sessions such as musical instrument performances (ensembles) and choruses via a communication network such as the Internet. In this session system, two or more terminals transmit performance information based on the performance at their own terminals to other terminals via a wide area communication network, and each terminal produces the performance sounds of the two or more terminals including the own terminal. When transmitting and receiving performance information via a network, there is a risk of delays occurring before the performance information reaches each terminal. In order to reduce such delays, P2P connections that allow direct communication between two or more terminals have been attempted.

[0003] When a packet is sent from a communication device on the LAN (Local Area Network) side to a communication device on the WAN (Wide Area Network) side, the NAT router transfers the packet to a higher-level network. At this time, the NAT router converts the source IP address and source port in the communication packet into the WAN side IP address of the NAT router and a newly assigned port number. The packet that returns as a reply is converted by the NAT router into the destination IP address and port number on the LAN side, and is transferred to the communication device on the LAN side. For example, Patent Documents 1 and 2 disclose communication systems that allow direct communication between two terminals even when a NAT router that converts a destination port into a different source port number is interposed. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2015-119217 A [Patent Document 2] JP 2015-142217 A Summary of the Invention [Problem to be solved by the invention]

[0005] In Patent Documents 1 and 2, two terminals attempt to establish a direct communication connection with each other using a guessed port number based on the source port number used in transmitting data. If the guessed port number generated based on the source port number used in transmitting data is not included in the port numbers that the router can use, the two terminals cannot communicate directly with each other.

[0006] An object of the present invention is to provide a communication program and a communication system that enable terminals to easily communicate directly with each other. [Means for solving the problem]

[0007] A program according to one embodiment causes a first terminal to execute the following process: acquire a range of available port numbers of a first router, and to cause a second terminal to acquire the port number of the first router, transmit the acquired range of available port numbers of the first router to a first server via the first router, acquire information from the first server for identifying a port number of a specific second router selected based on the source port number of the second router and the range of available port numbers of the second router, and attempt to connect to the second terminal via the first router using the port number of the second router as the destination port number.

[0008] A program according to one embodiment causes a first terminal to execute a process of acquiring a range of available port numbers of a first router, transmitting the acquired range of available port numbers of the first router to a first server via the first router to cause a second terminal to acquire the port number of the first router, acquiring a port number of a specific second router selected based on the source port number of the second router and the range of available port numbers of the second router, and attempting to connect to the second terminal via the first router using the port number of the second router as the destination port number.

[0009] A router in one embodiment includes a receiving unit that receives an inquiry about the range of available port numbers from a first terminal, and a transmitting unit that transmits the range of available port numbers to the first terminal in response to the inquiry, and the transmitting unit transmits the range of available port numbers and its own external port number to the outside based on a request from the first terminal.

[0010] A server in one embodiment includes a receiving unit that receives a range of usable port numbers of a router from a terminal, a port selection unit that selects a port number of a specific router based on the source port number received from the router and the range of usable port numbers of the router, and a transmitting unit that transmits the port number of the specific router to another predetermined terminal.

[0011] A communication system according to one embodiment includes a first terminal under a first router, a second terminal under a second router, and a server not under a router, and the first terminal and the second terminal communicate with each other via the first router and the second router using a source address, a source port number, a destination address, and a destination port number. The first terminal includes a first acquisition unit that acquires a range of available port numbers of the first router, a first transmission unit that transmits the acquired range of available port numbers of the first router to the server via the first router, a first reception unit that receives from the server a port number of a predetermined second router selected based on the source port number of the second router and the range of available port numbers of the second router, and a first communication unit that attempts to connect to the second terminal via the first router using the port number of the second router as a destination port number. The second terminal includes a first acquisition unit that acquires the range of available port numbers of the second router, and a first transmission unit that transmits the acquired range of available port numbers of the second router to the server via the first router. a second transmitting unit that transmits a port number range of the predetermined first router to the server via the second router, a second receiving unit that receives from the server a port number of a predetermined first router selected based on a source port number of the first router and a range of usable port numbers of the first router, and a second communication unit that attempts to connect to the first terminal via the second router with the port number of the first router as a destination port number, wherein the server receives from the first terminal the range of usable port numbers of the first router and the first source port number, and receives from the second terminal the range of usable port numbers of the second router and the second source port number, transmits to the second receiving unit information for specifying the port number of the predetermined first router selected based on the source port number of the first router and the range of usable port numbers of the first router, and transmits to the first receiving unit information for specifying the port number of the predetermined second router selected based on the source port number of the second router and the range of usable port numbers of the second router. Effect of the Invention

[0012] According to the present invention, it is possible to provide a communication program and a communication system that enable terminals to easily communicate directly with each other. [Brief description of the drawings]

[0013] [Figure 1] 1 is a diagram illustrating a configuration of a communication system according to an embodiment of the present invention. [Diagram 2] 1 is a diagram for explaining an example of a procedure and operation leading to direct communication between terminals according to an embodiment of the present invention. FIG. [Diagram 3] 1 is a diagram for explaining an example of a procedure and operation leading to direct communication between terminals according to an embodiment of the present invention. FIG. [Figure 4] 1 is a diagram for explaining an example of a procedure and operation leading to direct communication between terminals according to an embodiment of the present invention. FIG. [Diagram 5] 1 is a diagram for explaining an example of a procedure and operation leading to direct communication between terminals according to an embodiment of the present invention. FIG. [Figure 6] 10 is a flowchart illustrating an example of a connection process on the terminal side according to the present embodiment. [Figure 7] 10 is a flowchart illustrating an example of a connection process on the terminal side according to the present embodiment. [Figure 8] 10 is a flowchart illustrating an example of a connection process on the terminal side according to the present embodiment. [Figure 9] 10 is a flowchart illustrating an example of a connection process on the terminal side according to the present embodiment. [Figure 10] 10 is a flowchart illustrating an example of a connection support process on the router side according to the present embodiment. [Figure 11] 10 is a flowchart illustrating an example of a connection support process on the router side according to the present embodiment. [Figure 12] 10 is a flowchart illustrating an example of a server-side connection assistance process according to the present embodiment. [Figure 13] FIG. 2 is a block diagram showing a functional configuration of a terminal according to an embodiment of the present invention. [Figure 14]FIG. 2 is a block diagram showing a functional configuration of a server according to an embodiment of the present invention. [Figure 15] 1 is a block diagram showing a functional configuration of a router according to an embodiment of the present invention; [Figure 16] 11A and 11B are diagrams for explaining a part of the procedures and operations up to direct communication between terminals according to one modified example of the present invention. [Figure 17] FIG. 13 is a block diagram showing a functional configuration of a terminal according to a modified example of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] Hereinafter, each embodiment of the present invention will be described with reference to the drawings, etc. However, the present invention can be embodied in various forms without departing from the spirit of the present invention, and the present invention should not be interpreted as being limited to the description of the embodiments exemplified below.

[0015] In this specification and each drawing, elements having similar functions to those described with reference to the previous drawings are given the same reference numerals, and duplicated descriptions may be omitted.

[0016] [First embodiment] <Communication system configuration> 1 is a diagram illustrating a configuration of a communication system 10 according to an embodiment of the present invention. The configuration of the communication system 10 will be described with reference to FIG.

[0017] The communication system 10 includes a first terminal 101, a second terminal 103, a first router 105, a second router 107, and a server 109. The first terminal 101, the second terminal 103, the first router 105, the second router 107, and the server 109 are communicatively connected via a wide area communication network NW such as the Internet.

[0018] The first terminal 101 and the second terminal 103 are terminals capable of communicating with other devices via a network NW. The first terminal 101 and the second terminal 103 may each be a device capable of transmitting and receiving audio data in real time. The audio data transmitted from such a device may be, for example, audio data received from an external microphone, audio data received from an external electronic device, or audio data generated in response to an input performance operation. In FIG. 1, only two terminals, the first terminal 101 and the second terminal 103, are shown as an example. However, the number of terminals is not limited to two, and may be two or more.

[0019] The first terminal 101 includes a control unit 111 and a memory unit 113. The control unit 111 includes an arithmetic processing circuit such as a CPU. The memory unit 113 includes a storage device such as a RAM and a ROM. A control program in which instructions are written is stored in the memory unit 113. The control unit 111 executes the control program stored in the memory unit 113 by the CPU to realize various functions in the first terminal 101. Similarly, the second terminal 103 also includes a control unit 115 and a memory unit 117. The functions of the control unit 115 and the memory unit 117 are similar to those of the control unit 111 and the memory unit 113, so duplicated explanations will be omitted.

[0020] The first router 105 and the second router 107 are each a NAT router. The first router 105 has the first terminal 101 under its control. The second router 107 has the second terminal 103 under its control. The first router 105 and the second router 107 each have a plurality of host devices under its control in addition to the terminals shown in FIG. 1, relay data between a local network consisting of these devices and a wide area communication network NW, and have a NAT function for converting addresses and port numbers between the two networks. That is, the first router 105 and the second router 107 automatically convert between local addresses and port numbers that are valid only in the local network, such as private IP addresses, and global addresses and port numbers on the network NW, such as global IP addresses.

[0021] The NAT function of the first router 105 converts a destination address to a different port number from that used in the past communication when a packet is sent from under the router using the same source address and source port number as those used in the past communication if the destination address changes. The second router 107 also has the same function as the first router 105.

[0022] The first router 105 includes a control unit 119 and a memory unit 121. The control unit 119 includes an arithmetic processing circuit such as a CPU. The memory unit 121 includes a storage device such as a RAM and a ROM. A control program in which instructions are written is stored in the memory unit 121. The control unit 119 executes the control program stored in the memory unit 121 by the CPU to realize the above-mentioned NAT function in the first router 105. Similarly, the second router 107 also includes a control unit 123 and a memory unit 125. The functions of the control unit 123 and the memory unit 125 are similar to those of the control unit 119 and the memory unit 121, so duplicated explanations will be omitted.

[0023] The server 109 is not under the control of the first router 105 or the second router 107. The server 109 assists in connection between the first terminal 101 and the second terminal 103, for example, performs a procedure for connecting the first terminal 101 and the second terminal 103 to each other prior to the start of a session. After a connection is established between the first terminal 101 and the second terminal 103, performance information such as audio data is directly transmitted and received between the first terminal 101 and the second terminal 103 via the first router 105 and the second router 107 without the intervention of the server 109.

[0024] The server 109 includes a control unit 127 and a storage unit 129. The control unit 127 includes an arithmetic processing circuit such as a CPU. The storage unit 129 includes storage devices such as a RAM and a ROM. A control program in which instructions are written is stored in the storage unit 129. The control unit 127 executes the control program stored in the storage unit 129 by the CPU, and executes various functions in the server 109, such as the above-mentioned connection procedure between the first terminal 101 and the second terminal 103, which is performed prior to the start of a session.

[0025] [Communication Procedure] The communication system 10 according to this embodiment is composed of a plurality of terminals (here, the first terminal 101 and the second terminal 103) under the control of a first router 105 and a second router 107 that are different from each other, and a server 109 that is not under the control of the first router 105 or the second router 103. Each of the first terminal 101 and the second terminal 103 performs direct communication via the first router 105 and the second router 103 to which the first terminal 101 and the second terminal 103 belong, using a source address, a source port number, a destination address, and a destination port number. Below, with reference to Figs. 2 to 5, a procedure and an example of operation until direct communication between two terminals according to this embodiment will be described. Note that, in the following, a case where communication is established between the first terminal 101 and the second terminal 103 will be described as an example.

[0026] 2 to 5 are diagrams for explaining an example of procedures and operations until direct communication is established between first terminal 101 and second terminal 103 according to this embodiment.

[0027] As shown in FIG. 2, first, prior to direct communication between first terminal 101 and second terminal 103, first terminal 101 inquires of first router 105 about the range of port numbers available to first router 105. Hereinafter, the range of port numbers available to first router 105 refers to all port numbers associated with a global IP available to first router 105. Hereinafter, the range of port numbers available to first router 105 is referred to as first port range information. The first port range information is stored in storage unit 121. First router 105 receives an inquiry from first terminal 101 under its control. In response to the inquiry from first terminal 101, first router 105 transmits the first port range information to first terminal 101. FIG. 2 shows, as an example, a case where the first port range information is 1024-1156, 4096-4224, and 59000-60000.

[0028] Similarly, second terminal 103 inquires of second router 107 about the range of port numbers that second router 107 can use. Hereinafter, the range of port numbers that second router 107 can use is referred to as second port range information. The second port range information is stored in storage unit 125. Second router 107 receives an inquiry from second terminal 103 under its control. In response to the inquiry, second router 107 transmits the second port range information to second terminal 103. FIG. 2 shows, as an example, the cases where the second port range information is 1224-1256, 5096-5224, and 61000-62000.

[0029] 3, first terminal 101 uses "source address: 192.168.0.100.10" and "source port number: 5000" to packetize and transmit data to "destination address: 2.2.2.2" and "destination port number: 7000", i.e., server 109. At this time, the data includes first port range information.

[0030] Similarly, second terminal 103 uses "source address: 192.168.100.20" and "source port number: 6000" to packetize and transmit data to "destination address: 2.2.2.2" and "destination port number: 7000", i.e., server 109. At this time, the data includes second port range information.

[0031] Server 109 receives a packet from first terminal 101 via first router 105. Server 109 confirms the results of the conversion by first router 105, which manages first terminal 101, namely, "source address: 1.1.1.1," "source port number: 60000," and "first port range information: 1024-1156, 4096-4224, 59000-60000."

[0032] Similarly, server 109 receives a packet from second terminal 103 via second router 107. Server 109 confirms the results of conversion by second router 107 which manages second terminal 103, namely, “source address: 3.3.3.3”, “source port number: 5224”, and “second port range information: 1224-1256, 5096-5224, 61000-62000”.

[0033] Next, server 109 determines the "source address: 1.1.1.1" for the confirmed first terminal 101 as the address of first terminal 101, and selects a port number that is presumed to be used when second terminal 103 attempts to communicate with first terminal 101 based on the "source port number: 60000" and "first port range information: 1024-1156, 4096-4224, 59000-60000" for the confirmed first terminal 101.

[0034] Here, a procedure for server 109 to select a port number that is assumed to be used when second terminal 103 attempts to communicate with first terminal 101 will be briefly described. First, server 109 checks whether the number next to the source port number of the received packet, that is, the port number obtained by adding "+1" to the source port number of the received packet, is included in the first port range information. If the port number obtained by adding "+1" to the source port number of the received packet is included in the first port range information, server 109 selects the port number obtained by adding "+1" to the "source port number" as the port number that is assumed to be used when second terminal 103 attempts to communicate with first terminal 101. On the other hand, if the port number obtained by adding "+1" to the source port number of the received packet is not included in the first port range information, server 109 selects the smallest port number from one or more port numbers that are larger than the source port number of the received packet in the first port range information, as the port number that is assumed to be used when second terminal 103 attempts to communicate with first terminal 101. Furthermore, if the port number obtained by adding "+1" to the source port number of the received packet is not included in the first port range information, and if there is no port number greater than the source port number of the received packet in the first port range information, server 109 selects the smallest port number from the first port range information as the port number that is presumed to be used when second terminal 103 attempts to communicate with first terminal 101.

[0035] A specific description will be given with reference to Fig. 3 and Fig. 4. The server 109 selects the port number obtained by adding "+1" to the confirmed "source port number" related to the first terminal 101 as the port number to be used when the second terminal 103 attempts to communicate with the first terminal 101. In the case of the "source port number: 60000" related to the first terminal 101, the port number obtained by adding "+1" is "60001". However, "60001" is not included in the first port range information. In this way, when the selected port number, that is, the port number obtained by adding "+1" to the "source port number" is not included in the first port range information, the server 109 selects a predetermined port number that is assumed to be used when the second terminal 103 attempts to communicate with the first terminal 101 from "first port range information: 1024-1156, 4096-4224, 59000-60000". "Source port number: 60000" is the maximum port number in "first port range information: 1024-1156, 4096-4224, 59000-60000". Therefore, server 109 selects the minimum port number "1024" in "first port range information: 1024-1156, 4096-4224, 59000-60000" as the port number that is assumed to be used when second terminal 103 attempts to communicate with first terminal 101. Server 109 then notifies second terminal 103 that the address of first terminal 101 is "1.1.1.1" and the port number of first terminal 101 is "1024".

[0036] Similarly, server 109 determines "source address: 3.3.3.3" for confirmed second terminal 103 as the address of second terminal 103, and selects a port number that is assumed to be used when first terminal 101 attempts to communicate with second terminal 103 based on "source port number: 5224" and "second port range information: 1224-1256, 5096-5224, 61000-62000" for confirmed second terminal 103. Server 109 selects a port number obtained by adding "+1" to the "source port number" for confirmed second terminal 103 as a port number that is assumed to be used when first terminal 101 attempts to communicate with second terminal 103. In the case of "source port number: 5224" for second terminal 103, the port number with "+1" added is "5225". However, "5225" is not included in the second port range information. In this way, if the selected port number, i.e., the port number obtained by adding "+1" to the "source port number", is not included in the second port range information, server 109 selects a specific port number from "second port range information: 1224-1256, 5096-5224, 61000-62000" that is presumed to be used when first terminal 101 attempts to communicate with second terminal 103. In the "second port range information: 1224-1256, 5096-5224, 61000-62000", the smallest port number among port numbers 61000-62000 that are greater than "source port number: 5224" is 61000. Therefore, server 109 selects port number "61000" from "second port range information: 1224-1256, 5096-5224, 61000-62000" as the port number that is presumed to be used when first terminal 101 attempts to communicate with second terminal 103. Then, server 109 notifies first terminal 101 that the address of second terminal 103 is "3.3.3.3" and the port number of second terminal 103 is "61000".

[0037] First terminal 101 receives notification from server 109 that the address of second terminal 103 is "3.3.3.3" and the port number of second terminal 103 is "61000." Similarly, second terminal 103 receives notification from server 109 that the address of first terminal 101 is "1.1.1.1" and the port number of first terminal 101 is "1024."

[0038] 5, the first terminal 101 secures "source port number: 5001" which is different from "source port number: 5000" used when it first transmitted a packet to the server 109. Then, the first terminal 101 uses "source address: 192.168.100.10" and "source port number: 5001" to transmit a packet to "destination address: 3.3.3.3" and "destination port number: 61000" notified by the server 109, that is, to the second terminal 103.

[0039] Similarly, second terminal 103 secures "source port number: 6001" which is different from "source port number: 6000" used when it first transmitted a packet to server 109. Then, second terminal 103 uses "source address: 192.168.100.20" and "source port number: 6001" to transmit a packet to "destination address: 1.1.1.1" and "destination port number: 1024" notified by server 109, i.e., first terminal 101.

[0040] [Operation] Next, an example of a specific communication flow will be described. FIGS. 6 to 9 show an example of a connection process on the terminal side according to this embodiment. Here, the terminal may be the first terminal 101 or the second terminal 103. FIGS. 10 and 11 show an example of a connection support process on the router side according to this embodiment. Here, the router may be the first router 105 or the second router 107. FIG. 12 shows an example of a connection support process on the server (server 109) side according to this embodiment. The process examples shown in FIGS. 6 to 9 show a flowchart of a computer program related to the connection process executed by the CPU of the terminal. The process examples shown in FIGS. 10 and 11 show a flowchart of a computer program related to the connection support process executed by the CPU of the router. Also, the process example shown in FIG. 12 shows a flowchart of a computer program related to the connection support process executed by the CPU of the server (server 109).

[0041] For convenience, the following description will be given of a connection notification from one terminal to server 109. However, other terminals communicating with each other also similarly execute the program processes shown in FIGS.

[0042] When a user operates the terminal to initiating a connection, the terminal starts executing the program shown in Fig. 6. The terminal first inquires of the router to which it belongs about the range of port numbers that the router can use, that is, the port range information corresponding to the router (S101).

[0043] On the other hand, when the router receives an inquiry about port range information from a subordinate terminal, it starts executing the program shown in Fig. 10. In response to the inquiry from the subordinate terminal, the router notifies the terminal of its own port range information (S301).

[0044] 6 again, the terminal acquires the port range information corresponding to the router notified by the router (S102). Then, the terminal notifies server 109 that it will establish a connection (S103). Next, the terminal determines whether or not a connection start instruction has been received from server 109, that is, whether or not another participant has appeared (S104). If the connection start instruction has not been received from server 109 (S104; No), the terminal repeats the process of S104 and waits for a connection start instruction.

[0045] On the other hand, when the server 109 receives a connection notification from a terminal by the process of S103 described above, it starts executing the program shown in Fig. 12. The server 109 first judges whether or not there are two or more terminals TM waiting for connection (i.e., whether or not another participant has appeared) (S201). If there are not two or more terminals waiting for connection (S201; No), the server 109 waits until there are two or more terminals TM waiting for connection. In this embodiment, when a connection notification is received from two terminals, i.e., the first terminal 101 and the second terminal 103, it is judged that there are two or more terminals TM waiting for connection (S201; Yes).

[0046] If it is determined that there are two or more terminals TM waiting for connection (S201; Yes), the server 109 transmits a command to start a connection to all terminals waiting for a connection (S202). Next, the server 109 determines whether or not packets to port number P1 have been received from all terminals that have been instructed to start a connection (S203). If packets to port number P1 have not been received from all terminals (S203; No), the server 109 waits to receive packets from all terminals.

[0047] 6, when each terminal waiting for a connection start instruction receives a connection start instruction from server 109 while waiting for the process of S104 (S104; Yes), the terminal proceeds to the process of S105. The terminal uses a predetermined source address and source port number to send a packet to server 109 addressed to port number P1 (S105). Then, the terminal determines whether or not a notification of the destination port number and address has been received from server 109 (S106). If the notification of the destination port number and address has not been received (S106; No), the terminal waits for a notification of the destination port number and address.

[0048] On the other hand, when the router receives a packet addressed to port number P1 from the terminal to server 109 as a result of the above-mentioned process of S105, the router starts execution of the program shown in Fig. 11. The router converts the source IP address and source port number of the received packet, and transmits the packet addressed to port number P1 (S302).

[0049] Referring again to FIG. 12, server 109, which is waiting to receive a packet, receives the transmitted packet in the process of S203 every time a packet is transmitted from a terminal. Then, when server 109 receives packets to port number P1 from all terminals notified of connection (S203; Yes), it proceeds to the process of S204. Based on the source port number of the packet received from each terminal and the port range information corresponding to the router to which the terminal that transmitted the packet belongs, server 109 selects a port number that is assumed to be used when each terminal attempts to communicate with the terminal to which it is trying to connect. Specifically, server 109 selects the port number obtained by adding "+1" to the source port number of the packet received from each terminal as the port number that is assumed to be used when the terminal attempts to communicate with the terminal that is the communication partner. However, if the port number obtained by adding "+1" to the source port number of the received packet is not included in the port range information corresponding to the router to which the terminal to be connected belongs, server 109 selects a specific port number from the port range information as the port number that is assumed to be used when the terminal attempts to communicate with the terminal to be connected. Server 109 transmits the source address of the received packet and the selected port number to all terminals (S205).

[0050] Next, server 109 judges whether any of the packets of "connection complete", "connection retry notification", and "connection failure" has been received from the terminal (S206). If no packet has been received (S206; No), server 109 waits for a packet to arrive. Regarding the judgment of "connection complete" in S206, it judges whether or not a notification has been received from all terminals that sent an instruction to start a connection in the process of S205. Meanwhile, regarding the "connection retry notification" and "connection failure", it judges whether or not a notification has been received from any one of all terminals.

[0051] Referring again to FIG. 6, when the terminal waiting for notification of the destination port number and address receives the destination address and port number from server 109 via the router to which the terminal belongs (S106; Yes), it proceeds to the process of S107. Here, the port number received from server 109 is the port number selected based on the source port number of the packet received by server 109 from each terminal and the port range information corresponding to the router to which each terminal belongs. The terminal sets a new source port number different from the source port number used when executing the process of S105, i.e., the source port number used when transmitting the packet to server 109 (S107). In this case, the new source port number may be set by adding "+1" to the source port number used when transmitting the packet to server 109. However, the present invention is not limited to this, and the terminal may set another port number as the source port number as long as it is different from the source port number used when transmitting the packet to server 109.

[0052] Next, the terminal attempts to connect to the communication partner terminal by sending a trial packet to the port number and address of the communication partner terminal notified by server 109, using the same predetermined source address and newly set source port number as in the processing of S105 (S108).

[0053] The terminal may not only attempt to connect to the terminal using only the port number and address of the terminal to be the communication partner notified by the server 109, but may also attempt to connect using multiple port numbers before and after the port number of the terminal to be the communication partner notified by the server 109. The port numbers before and after are, for example, several port numbers obtained by adding "+1", "+2", "+3", etc. to the notified port number, and several port numbers obtained by subtracting "+1", "+2", "+3", etc. from the notified port number. If the router to which the terminal to be connected belongs is being used for another communication, the router may change to a port before or after the port number notified by the server 109. As a result, the attempt packet may not reach the terminal to be connected by only trying the port number notified by the server 109. In this case, the terminal attempts to connect using multiple port numbers before and after the port number of the terminal to be the communication partner notified by the server 109.

[0054] After the process of S108, the terminal judges whether or not a trial packet has arrived from the terminal to which the terminal is to be connected (S109). If the trial packet from the terminal to which the terminal is to be connected has not arrived (S109; No), the terminal proceeds to the process of S110. The terminal judges whether or not a maximum time for waiting for a packet from the terminal to which the terminal is to be connected has elapsed (S110). Then, while the maximum time has not elapsed (S110; No), the terminal returns to the process of S109 and repeatedly executes the processes of S109 to S110 until a trial packet arrives from the terminal to which the terminal is to be connected or until the maximum time has elapsed.

[0055] When a trial packet arrives from the other terminal to which a connection is to be made (S109; Yes), the terminal proceeds to the process of S111 shown in FIG. 8. In this case, the terminal notifies server 109 that the connection has been completed (S111). As a result, the terminal that received the trial packet from the other terminal to which a connection is to be made establishes a direct connection with the other terminal, and this connection operation is terminated. Note that the received trial packet includes the source address and source port number of the other terminal, so the terminal that received the trial packet can recognize the address and port number of the other terminal. After this, packets are sent and received directly between the two terminals.

[0056] On the other hand, when the maximum time has elapsed (S110; Yes) while the trial packet from the remote terminal to which the connection is to be made has not arrived (S109; No), the terminal judges whether the maximum number of attempts to transmit the packet by the process of S108 has been made (S112). If the maximum number of attempts has not been made (S112; No), the terminal proceeds to the process of S113 shown in FIG. 7. If the maximum number of attempts has not been made (S112; No), the terminal notifies the server 109 of a retry of the connection (S113), returns to S105, and repeatedly executes the retry of the connection consisting of the above-mentioned processes S105 to S110, S112, and S113. Then, when the maximum number of attempts to transmit the packet have been made (S112; Yes), the terminal notifies the server 109 that the connection has failed, as shown in FIG. 9, gives up the connection, and ends this connection operation (S114). In this case, the terminal has failed to connect to the remote terminal to which the connection is to be made.

[0057] Referring again to Fig. 12, when server 109 repeats the process of S206 and receives any one of the packets of "connection complete", "connection retry notification", and "connection failure" from the terminal (S206; Yes), server 109 executes branching process according to the "connection complete", "connection retry notification", or "connection failure" received from the terminal (S207).

[0058] If a "connection complete" packet is received, server 109 proceeds to processing of S208, determines that the connection is complete, and removes the terminal that received the packet from terminals waiting for connection. If a "connection retry notification" packet is received, server 109 returns to processing of S202, and repeatedly executes the above-mentioned processing of S202 to S207. If a "connection failure" packet is received, server 109 proceeds to processing of S209, determines that the connection is unsuccessful, and removes the terminal that received the packet from terminals waiting for connection. Then, after processing of S208 or S209, the process returns to the original standby state.

[0059] [Device configuration] 13 is a block diagram showing a functional configuration for executing a connection process in the first terminal 101 and the second terminal 103. The functional configuration of the first terminal 101 and the second terminal 103 will be described with reference to FIG.

[0060] The first terminal 101 includes a first acquisition unit 203, a first transmission unit 205, a first reception unit 207, and a first communication unit 209.

[0061] First acquisition unit 203 acquires first port range information from first router 105. First acquisition unit 203 may inquire of first router 105 about the first port range information and acquire the first port range information notified by first router 105. The connection method for the Internet connection may be IPv4 over IPv6.

[0062] First transmitting unit 205 packetizes the data and transmits it to server 109 via first router 105. At this time, the acquired first port range information of first router 105 is included in the data.

[0063] The first receiving unit 207 receives from the server 109 a notification of the IP address and port number of the second terminal 103 for attempting communication with the second terminal 103, i.e., the IP address of the second router 107 to which the second terminal 103 belongs and the port number of the second router 107 (hereinafter also referred to as the source port number of the second router 107) and a port number of a specific second router 107 selected based on the second port range information corresponding to the second router 107.

[0064] The first communication unit 209 attempts to connect to the second terminal 103 using the IP address of the second router 107 and the port number of the selected predetermined second router 107 notified by the server 109 as the destination address and destination port number.

[0065] The second terminal 103 includes a second acquisition unit 213, a second transmission unit 215, a second reception unit 217, and a second communication unit 219.

[0066] Second acquisition unit 213 acquires second port range information from second router 107. Second acquisition unit 213 may inquire of second router 107 about second port range information and acquire the second port range information notified from second router 107. The connection method for Internet connection may be IPv4 over IPv6.

[0067] Second transmitting unit 207 packetizes the data and transmits it to server 109 via second router 107. At this time, the data includes the acquired second port range information of second router 107.

[0068] The second receiving unit 217 receives from the server 109 a notification of the IP address and port number of the first terminal 101 for attempting communication with the first terminal 101, i.e., the IP address of the first router 105 to which the first terminal 101 belongs and a notification of a port number of a specific first router 105 selected based on the port number of the first router 105 (hereinafter also referred to as the source port number of the first router 105) and the first port range information corresponding to the first router 105.

[0069] The second communication unit 219 attempts to connect to the first terminal 101 using the IP address of the first router 105 and the port number of the selected specific first router 105 notified by the server 109 as the destination address and destination port number.

[0070] [Server configuration] Fig. 14 is a block diagram showing a functional configuration for executing a connection assistance process in server 109. The functional configuration of server 109 will be described with reference to Fig. 3. Server 109 includes a receiving unit 303, a port selecting unit 305, and a transmitting unit 307.

[0071] Receiving unit 303 receives a packet from first terminal 101 via first router 105. Similarly, receiving unit 303 also receives a packet from second terminal 103 via second router 107. Data sent from first terminal 101 includes first port range information corresponding to first router 105. Data sent from second terminal 103 includes second port range information corresponding to second router 107.

[0072] Port selection unit 305 selects a specific port number of first router 105 from the first port range information based on the source port number of first router 105 and the first port range information. The selected port number is a newly set port number that is used when the destination address is changed. Here, the selected port number is a port number different from the port number used when the first terminal 101 transmitted a packet to server 109, and is a newly set port number that is used when first terminal 101 attempts to connect to second terminal 103.

[0073] Similarly, port selection unit 305 selects a predetermined port number of second router 107 from the second port range information based on the source port number of second router 107 and the second port range information. The selected port number is a newly set port number that is used when the destination address is changed. Here, the selected port number is a port number different from the port number used when the second terminal 103 transmitted a packet to server 109, and is a newly set port number that is used when second terminal 103 attempts to connect to first terminal 101. The port number selection procedure executed by port selection unit 305 is as described above, and a duplicated description will be omitted.

[0074] Transmitting unit 307 transmits the port number selected in port selecting unit 305 to a predetermined terminal. For example, transmitting unit 307 transmits the source port number of first router 105 and the port number selected based on the first port range information to second terminal 103 via second router 107. Similarly, transmitting unit 307 transmits the source port number of second router 107 and the port number selected based on the second port range information to first terminal 101 via first router 105.

[0075] First terminal 101 attempts to connect to second terminal 103 using the source port number of second router 107 acquired from server 109 and a predetermined port number selected from the second port range information. Similarly, second terminal 103 attempts to connect to first terminal 101 using the source port number of first router 105 acquired from server 109 and a predetermined port number selected from the first port range information. The connection method between first terminal 101 and second terminal 103 is P2P connection.

[0076] [Router configuration] Fig. 15 is a block diagram showing a functional configuration for executing a connection support process in the first router 105. The functional configuration of the first router 105 will be described with reference to Fig. 15. Note that the second router 107 has substantially the same functional configuration as the first router 105, and therefore illustration and detailed description thereof will be omitted here.

[0077] First router 105 includes a receiving unit 401, a transmitting unit 403, and a port changing unit 405. Receiving unit 401 receives an inquiry from subordinate first terminal 101 requesting that first router 105 be notified of the corresponding first port range information.

[0078] In response to this inquiry, transmitter 403 notifies first terminal 105 of the first port range information. Transmitting unit 403 may read out the first port range information stored in memory unit 121. Furthermore, when a packet is transmitted from first terminal 101 to server 109, transmitting unit 403 transmits its own IP address and port number, i.e., of first router 105, as the source address and source port to server 109 together with the first port range information.

[0079] When the destination IP address is changed, the port change unit 405 changes the port number used as the source to another port number selected from the range of port numbers that the unit itself can use.

[0080] As described above, in this embodiment, prior to direct communication between two terminals (first terminal 101 and second terminal 103), first terminal 101 and second terminal 103 transmit packetized data including the first port range information or the second port range information to server 109. Based on the source port number used in packet transmission and the first and second port range information, server 109 selects a specific port number of the other terminal to which each terminal attempts to connect, and notifies each terminal of the port number. After that, first terminal 101 and second terminal 103 can directly communicate with each other using a source port number different from the source port number used when transmitting to server 109, the IP address of the other terminal notified by server 109, and the selected port number. That is, in this embodiment, when the destination address is changed, the first router 105 and the second router 107 use the property of sequentially changing the source port number, thereby enabling the first terminal 101 and the second terminal 103 to communicate directly with each other, regardless of the type of the first router 105 that governs the first terminal 101 and the second router 107 that governs the second terminal 103. Therefore, according to this embodiment, no matter what type of NAT router the first router 105 and the second router 107 are, the first terminal 101 and the second terminal 103 can communicate directly with each other simply by changing the source port number used for transmission to the server 109.

[0081] [Variation 1] In the above embodiment, prior to direct communication between first terminal 101 and second terminal 103, first terminal 101 inquires of first router 105 about first port range information. Similarly, second terminal 103 inquires of second router 107 about second port range information. However, each terminal may inquire of a server other than the above-mentioned server 109 about port range information corresponding to the router to which the terminal belongs. Such a server can calculate the range of port numbers assigned from an IPv6 address to an IPv4 address, that is, the port range information, by a predetermined calculation method. The server notifies each terminal of the calculated port range information.

[0082] [Variation 2] In the above embodiment, server 109 selects a port number of a predetermined first router 105 to be used when the destination address is changed from the first port range information based on the source port number and first port range information of a packet received from first terminal 101. Similarly, server 109 selects a port number of a predetermined second router 107 to be used when the destination address is changed from the second port range information based on the source port number and second port range information of a packet received from second terminal 103. However, the port number used when a terminal attempts to communicate with another terminal may be selected on the terminal side.

[0083] 16 is a diagram for explaining a part of the procedure and operations until direct communication is established between first terminal 101 and second terminal 103 according to modification 2. As described with reference to FIG. 3, server 109 receives a packet from first terminal 101 via first router 105. Server 109 receives "source address: 1.1.1.1", "source port number: 60000", and "first port range information: 1024-1156, 4096-4224, 59000-60000", which are the results of conversion by first router 105 which manages first terminal 101. Server 109 also receives a packet from second terminal 103 via second router 107. Server 109 receives the results of the conversion by second router 107 which manages second terminal 103, namely, "source address: 3.3.3.3," "source port number: 5224," and "second port range information: 1224-1256, 5096-5224, 61000-62000."

[0084] 16, server 109 transmits the received "source address: 1.1.1.1", "source port number: 60000", and "first port range information: 1024-1156, 4096-4224, 59000-60000" of first terminal 101 to second terminal 103. Similarly, server 109 transmits the received "source address: 3.3.3.3", "source port number: 5224", and "second port range information: 1224-1256, 5096-5224, 61000-62000" of the second terminal to the first terminal.

[0085] First terminal 101 may select a port number of a predetermined second router 107 to be used when a destination address is changed from the second port range information based on "source port number: 5224" and "second port range information: 1224-1256, 5096-5224, 61000-62000" received from the second terminal. Similarly, second terminal 103 may select a port number of a predetermined first router 107 to be used when a destination address is changed from the first port range information based on "source port number: 60000" and "first port range information: 1024-1156, 4096-4224, 59000-60000" received from the first terminal. The port number selection procedure may be the same as the port number selection procedure executed by server 109.

[0086] FIG. 17 is a diagram for explaining the functional configuration of first terminal 101A and second terminal 103A according to the second modification.

[0087] First terminal 101A includes a first acquisition unit 203, a first transmission unit 205, a first reception unit 207, a first communication unit 209, and a first port selection unit 221. First acquisition unit 203, first transmission unit 205, first reception unit 207, and first communication unit 209 shown in Fig. 17 are similar to first acquisition unit 203, first transmission unit 205, first reception unit 207, and first communication unit 209 described with reference to Fig. 13.

[0088] Based on the received "source port number: 5224" and "second port range information: 1224-1256, 5096-5224, 61000-62000" of the second terminal, first port range selection unit 221 selects, from the second port range information, a predetermined port number of second router 107 to be used when the destination address is changed. The port number selection procedure is the same as the port number selection procedure executed by server 109.

[0089] The second terminal 103A includes a second acquisition unit 213, a second transmission unit 215, a second reception unit 217, a second communication unit 219, and a second port selection unit 223. In the second terminal 103A, the functions of the second acquisition unit 213, the second transmission unit 215, the second reception unit 217, the second communication unit 219, and the second port selection unit 223 are similar to those of the first acquisition unit 203, the first transmission unit 205, the first reception unit 207, the first communication unit 209, and the first port selection unit 221, so duplicated explanations will be omitted.

[0090] [Variation 3] In the above embodiment, server 109 selects a port number of a predetermined first router 105 from the first port range information based on the source port number and the first port range information of a packet received from first terminal 101, and transmits the port number of the selected first router 105 to second terminal 103. Similarly, server 109 selects a port number of a predetermined second router 107 from the second port range information based on the source port number and the second port range information of a packet received from second terminal 103, and transmits the port number of the selected second router 107 to first terminal 101. However, server 109 may transmit the source port number and the first port range information of a packet received from first terminal 101 to another server that can communicate with server 109. The other server may select a port number of a predetermined first router 105 from the first port range information based on the received source port number and the first port range information, and transmit the port number of the selected first router 105 to second terminal 103. Similarly, server 109 may transmit the source port number and the second port range information of the packet received from second terminal 103 to another server capable of communicating with server 109. The other server may select a port number of a predetermined second router 107 from the second port range information based on the received source port number and the second port range information, and transmit the selected port number of second router 107 to first terminal 101. Note that, instead of the above-mentioned other server, server 109 may transmit the source port number and the first port range information of the packet received from first terminal 101 to another terminal (third terminal) connectable to server 109, and select a port number of a predetermined first router 105 from the first port range information based on the source port number and the first port range information received by the terminal, and transmit the selected port number of first router 105 to second terminal 103.Similarly, server 109 may transmit the source port number and second port range information of the packet received from second terminal 103 to the terminal (third terminal) of server 109, select a specific port number of second router 107 from the second port range information based on the source port number and second port range information received by the terminal, and transmit the selected port number of second router 107 to first terminal 101.

[0091] The above is a description of the modified example.

[0092] As described above, according to one embodiment of the present invention, there is provided a program for causing a first terminal to execute a process of acquiring a range of available port numbers of a first router, transmitting the acquired range of available port numbers of the first router to a first server via the first router in order to cause a second terminal to acquire the port number of the first router, acquiring information from the first server for specifying a port number of a predetermined second router selected based on the source port number of the second router and the range of available port numbers of the second router, and attempting a connection to the second terminal via the first router with the port number of the second router as the destination port number. The program can also be configured as follows.

[0093] The first terminal executes a process of inquiring of the first router about the range of port numbers available for use by the first router, and acquires the range of port numbers available for use by the first router from the first router.

[0094] The first terminal executes a process of inquiring of the second server about the range of port numbers available for use by the first router, and acquires the range of port numbers available for use by the first router from the second server.

[0095] The information for identifying the port number of the specified second router is the port number of the specified second router selected by the first server based on the source port number of the second router and the range of available port numbers of the second router.

[0096] This includes selecting a port number of a specified second router based on a source port number of the second router and a range of port numbers available for use by the second router, which are included in information for identifying the port number of the specified second router.

[0097] The range of port numbers available to the first router is the range of port numbers for Internet connections.

[0098] The connection method for Internet connection is IPv4 over IPv6.

[0099] The connection to the second terminal is a P2P connection.

[0100] According to one embodiment of the present invention, there is provided a router including a receiver for receiving an inquiry about a range of available port numbers from a first terminal, and a transmitter for transmitting the range of available port numbers to the first terminal in response to the inquiry, the transmitter transmitting the range of available port numbers and its own external port number to the outside based on a request from the first terminal. The router can also be configured as follows.

[0101] The device further includes a port change unit that changes the port number used as the source to another port number selected from the range of available port numbers when the destination address is changed.

[0102] Furthermore, according to one embodiment of the present invention, a server is provided which includes a receiving unit that receives a range of usable port numbers of a router from a terminal, a port selecting unit that selects a port number of a specific router based on a source port number from the router and the range of usable port numbers of the router, and a transmitting unit that transmits the port number of the specific router to another predetermined terminal.

[0103] According to one embodiment of the present invention, in a communication system including a first terminal under a first router, a second terminal under a second router, and a server not under the router, the first terminal and the second terminal communicating with each other via the first router and the second router using a source address, a source port number, a destination address, and a destination port number, the first terminal includes a first acquisition unit that acquires a range of port numbers available for the first router, a first transmission unit that transmits the acquired range of port numbers available for the first router to a server via the first router, a first reception unit that receives from the server a port number of a predetermined second router selected based on the source port number of the second router and the range of port numbers available for the second router, and a first communication unit that attempts to connect to the second terminal via the first router using the port number of the second router as the destination port number, and the second terminal includes a first acquisition unit that acquires the range of port numbers available for the second router, a first transmission unit that transmits the acquired range of port numbers available for the second router to a server via the first router, a second transmitting unit that transmits the range of available port numbers of the first router to a server via the second router, a second receiving unit that receives from the server a port number of a predetermined first router selected based on the source port number of the first router and the range of available port numbers of the first router, and a second communication unit that attempts to connect to a first terminal via the second router using the port number of the first router as a destination port number, wherein the server receives the range of available port numbers of the first router and the first source port number from the first terminal, and receives the range of available port numbers of the second router and the second source port number from the second terminal, transmits information to the second receiving unit for identifying the port number of the predetermined first router selected based on the source port number of the first router and the range of available port numbers of the first router, and transmits information to the first receiving unit for identifying the port number of the predetermined second router selected based on the source port number of the second router and the range of available port numbers of the second router.

[0104] The first terminal is equipped with a first port selection unit that selects a port number of a specified second router based on a source port number of the second router and a range of usable port numbers of the second router, which are included in information for identifying a port number of a specified second router received from the server, and the second terminal is equipped with a second port selection unit that selects a port number of a specified first router based on a source port number of the first router and a range of usable port numbers of the first router, which are included in information for identifying a port number of a specified first router received from the server. [Explanation of symbols]

[0105] 10...communication system, 101, 101A...first terminal, 103, 103A...second terminal, 105...first router, 107...second router, 109...server, 111...control unit, 113...storage unit, 115...control unit, 117...storage unit, 119...control unit, 121...storage unit, 123...control unit, 125...storage unit, 127...control unit, 129...storage unit, 20 3...first acquisition unit, 205...first transmission unit, 207...first reception unit, 209...first communication unit, 213...second acquisition unit, 215...second transmission unit, 217...second reception unit, 219...second communication unit, 221...first port selection unit, 223...second port selection unit, 303...reception unit, 305...port selection unit, 401...reception unit, 403...transmission unit, 405...port change unit

Claims

1. Obtain a range of available port numbers of the first router; transmitting the acquired range of available port numbers of the first router to a first server via the first router in order to cause a second terminal to acquire the port number of the first router; obtaining information from the first server for identifying a port number of a predetermined second router selected based on a source port number of the second router and a range of available port numbers of the second router; attempting a connection to the second terminal via the first router using the port number of the second router as a destination port number; A program for causing the first terminal to execute processing.

2. causing the first terminal to execute a process of inquiring of the first router about a range of port numbers that can be used by the first router; The program according to claim 1 , further comprising acquiring a range of port numbers available for use by the first router from the first router.

3. causing the first terminal to execute a process of inquiring of a second server about a range of port numbers available for use by the first router; 2. The program according to claim 1, further comprising acquiring a range of port numbers available for use by the first router from the second server.

4. The program according to any one of claims 1 to 3, wherein the information for identifying the port number of the specified second router is a port number of the specified second router selected by the first server based on a source port number of the second router and a range of usable port numbers of the second router.

5. 4. The program according to claim 1, further comprising: selecting a port number of the specified second router based on a source port number of the second router and a range of port numbers available for use by the second router, the source port number being included in information for identifying the port number of the specified second router.

6. 6. The program according to claim 1, wherein the range of port numbers available for use by the first router is a range of port numbers for Internet connection.

7. The program according to claim 6 , wherein the Internet connection method is IPv4 over IPv6.

8. The program according to claim 1 , wherein the connection to the second terminal is a P2P connection.

9. a receiving unit that receives an inquiry about a range of available port numbers from a first terminal; a transmission unit that transmits the range of available port numbers to the first terminal in response to the inquiry; Equipped with The transmitting unit transmits the range of available port numbers and its own external port number to an external device based on a request from the first terminal.

10. 10. The router according to claim 9, further comprising a port change unit that changes a port number used as a source to another port number selected from the range of available port numbers when a destination address is changed.

11. a receiving unit that receives a range of available port numbers of the router from the terminal; a port selection unit that selects a port number of a predetermined router based on a source port number received from the router and a range of port numbers available for use by the router; a transmitting unit that transmits the port number of the specified router to another terminal that is determined in advance; A server comprising:

12. A communication system including a first terminal under a first router, a second terminal under a second router, and a server not under a router, the first terminal and the second terminal communicating with each other via the first router and the second router using a source address, a source port number, a destination address, and a destination port number, The first terminal is a first acquisition unit that acquires a range of port numbers available for use by the first router; a first transmission unit that transmits the acquired range of available port numbers of the first router to the server via the first router; a first receiving unit that receives from the server a port number of a predetermined second router selected based on a source port number of the second router and a range of port numbers available for use by the second router; a first communication unit that attempts to connect to the second terminal via the first router using a port number of the second router as a destination port number; The second terminal is a first acquisition unit that acquires a range of port numbers available for use by the second router; a second transmission unit that transmits the obtained range of available port numbers of the second router to the server via the second router; a second receiving unit that receives from the server a port number of a predetermined first router selected based on a source port number of the first router and a range of available port numbers of the first router; a second communication unit that attempts to connect to the first terminal via the second router using a port number of the first router as a destination port number; The server, receiving a range of available port numbers of the first router and a first source port number from the first terminal, and receiving a range of available port numbers of the second router and a second source port number from the second terminal; A communication system which transmits information to the second receiving unit for identifying a port number of a predetermined first router selected based on a source port number of the first router and a range of usable port numbers of the first router, and transmits information to the first receiving unit for identifying a port number of a predetermined second router selected based on a source port number of the second router and a range of usable port numbers of the second router.

13. the first terminal includes a first port selection unit that selects a port number of a predetermined second router based on a source port number of the second router and a range of available port numbers of the second router, the port number being included in information for identifying the port number of the predetermined second router received from the server; 13. The communication system according to claim 12, wherein the second terminal is provided with a second port selection unit that selects a port number of a specified first router based on a source port number of the first router and a range of usable port numbers of the first router, which are included in information for identifying the port number of the specified first router received from the server.

Citation Information

Patent Citations

  • Communication system, and address translation method

    JP2011142455A

  • Communication system and terminal device

    JP2015119217A

  • Communication system and server

    JP2015142217A

  • Communication relay device and communication system

    JP2015156593A

  • JPP6671676B