Patent ID: 7760667

Claim:
A first-arrival learning method of learning, as a first-arrival port, a port at which an identical packet that is transmitted through a plurality of paths by other relay apparatus arrives in a relay apparatus that controls a path of a packet in a network through which packets are distributed, the first-arrival learning method comprising: selecting a learning-target packet to be used for a path learning from among a plurality of packets queued by the relay apparatus, each of the packets queued by the relay apparatus being set a transfer priority; registering a relationship between a transmission-source address and the first-arrival port for the learning-target packet selected at the selecting, as learning information; packet transferring including transferring a packet corresponding to the learning information registered at the registering to the first-arrival port pertaining to the learning information; and transferring a packet that does not correspond to the learning information to all ports to which the packet is to be transferred, receiving other learning-target packet having a same transmission-source address as the transmission-source address pertaining to the learning information at other ports that are different from a current first-arrival port pertaining to the learning information; and setting a new first-arrival port having a largest first-arrival percentage from among the other ports when a first-arrival percentage of the current first-arrival port is below a predetermined threshold, wherein the registering includes updating, when the first-arrival port registered in the learning information is a first-arrival port for a low-priority packet, the learning information by changing the first-arrival port from the first-arrival port for the low-priority packet to a first-arrival port for a high-priority packet.