1. A packet relay device which relays packets, comprising: a packet receiving unit which receives packets from an input line; a switch for switching the packets received by the packet receiving unit; a packet sending unit which sends the packets switched by the switch, through an output line; an associative memory which holds a plurality of flow entries with a set conditions identifying a plurality of flows to which the packets belong, and, when header information of the input packets satisfies a condition among the set conditions of the flow entries, outputs an address of the one of the flow entries with the satisfied condition; and a packet search unit which executes an action, from among a plurality of actions, associated with the one of the flows to which the packets belong, based on an output of the associative memory, wherein the packet search unit has a plurality of action registers which hold information specifying the plurality of actions to be executed, wherein the packet search unit is configured to: hold address range information including consecutive address ranges of the associative memory and the action registers in association with each other, register the plurality of flow entries with the conditions identifying the flows associated with a same one of the actions at a plurality of addresses in a same address range, input the header information of the packets to the associative memory, determine an address range including the address output from the associative memory, determine the action to be executed for the packets, in accordance with information read out from the one of the action registers corresponding to the determined address range, and execute the determined action.