A setting apparatus (104) acquires a communications device ID that is for a communications device (101) attached to a livestock animal (A) and transmitted from a relay device (102). The setting apparatus (104) determines whether another communications device ID located in the same communication area (103a) as an object communications device (101) defined as an object of group setting is registered in a group. The setting apparatus (104) determines whether another relay device (102b) is present whose distance from the relay device (102) forming a communication area (103a) in which the object communications device (101) is located, is less than or equal to a predetermined value. If the other communications device ID located in the same communication area (103a) is not registered in a group and the other relay device (102b) is not present, the setting apparatus (104) adds a new group name to the communications device ID of the object communications device (101) and registers the communications device ID of the object communications device (101) into a corresponding group.