An entry adding method, comprising: receiving by a switch, a first group entry sent by a controller, wherein the first group entry carries importance indication information of the first group entry; the importance indication information of the first group entry is used to indicate importance of the first group entry; and the first group entry comprises at least one first action bucket; determining, by the switch, that the first group entry cannot be added to a group table, and determining, by the switch, whether a second group entry exists in the group table, wherein the second group entry carries importance indication information of the second group entry, and the importance indication information of the second group entry is used to indicate importance of the second group entry, the second group entry comprises at least one second action bucket; further comprising: when the second group entry exists in the group table, and when the importance of the second group entry is lower than the importance of the first group entry, and when a quantity of the at least one first action buckets is not greater than the sum of a first value and a quantity of the at least one second action buckets, the first value being a quantity of available action buckets in the group table, then deleting, by the switch, the second group entry, and adding the first group entry to the group table. receiving by a switch, a first group entry sent by a controller, wherein the first group entry carries importance indication information of the first group entry; the importance indication information of the first group entry is used to indicate importance of the first group entry; and the first group entry comprises at least one first action bucket; determining, by the switch, that the first group entry cannot be added to a group table, and determining, by the switch, whether a second group entry exists in the group table, wherein the second group entry carries importance indication information of the second group entry, and the importance indication information of the second group entry is used to indicate importance of the second group entry, the second group entry comprises at least one second action bucket; further comprising: when the second group entry exists in the group table, and when the importance of the second group entry is lower than the importance of the first group entry, and when a quantity of the at least one first action buckets is not greater than the sum of a first value and a quantity of the at least one second action buckets, the first value being a quantity of available action buckets in the group table, then deleting, by the switch, the second group entry, and adding the first group entry to the group table. when the second group entry exists in the group table, and when the importance of the second group entry is lower than the importance of the first group entry, and when a quantity of the at least one first action buckets is not greater than the sum of a first value and a quantity of the at least one second action buckets, the first value being a quantity of available action buckets in the group table, then deleting, by the switch, the second group entry, and adding the first group entry to the group table.