A packet processing method, wherein the method comprises: receiving, by a first device, a first packet sent by a second device, wherein the first packet comprises identifier information and first authentication information of an Ethernet ring, the first device is an edge device of the Ethernet ring, and the second device is a device outside the Ethernet ring; verifying, by the first device, validity of the first packet based on the identifier information and the first authentication information; and processing, by the first device, the first packet when verifying that the first packet is valid, wherein the verifying, by the first device, validity of the first packet based on the identifier information and the first authentication information comprises: obtaining, by the first device, second authentication information of the Ethernet ring based on the identifier information; and verifying, by the first device, the validity of the first packet based on the first authentication information and the second authentication information, wherein the obtaining, by the first device, second authentication information of the Ethernet ring based on the identifier information of the Ethernet ring comprises: obtaining, by the first device, ring configuration information of the Ethernet ring from a correspondence between identifier information and ring configuration information based on the identifier information; and encrypting, by the first device, the ring configuration information to obtain the second authentication information of the Ethernet ring. receiving, by a first device, a first packet sent by a second device, wherein the first packet comprises identifier information and first authentication information of an Ethernet ring, the first device is an edge device of the Ethernet ring, and the second device is a device outside the Ethernet ring; verifying, by the first device, validity of the first packet based on the identifier information and the first authentication information; and processing, by the first device, the first packet when verifying that the first packet is valid, wherein the verifying, by the first device, validity of the first packet based on the identifier information and the first authentication information comprises: obtaining, by the first device, second authentication information of the Ethernet ring based on the identifier information; and verifying, by the first device, the validity of the first packet based on the first authentication information and the second authentication information, wherein the obtaining, by the first device, second authentication information of the Ethernet ring based on the identifier information of the Ethernet ring comprises: obtaining, by the first device, ring configuration information of the Ethernet ring from a correspondence between identifier information and ring configuration information based on the identifier information; and encrypting, by the first device, the ring configuration information to obtain the second authentication information of the Ethernet ring. obtaining, by the first device, second authentication information of the Ethernet ring based on the identifier information; and verifying, by the first device, the validity of the first packet based on the first authentication information and the second authentication information, wherein the obtaining, by the first device, second authentication information of the Ethernet ring based on the identifier information of the Ethernet ring comprises: obtaining, by the first device, ring configuration information of the Ethernet ring from a correspondence between identifier information and ring configuration information based on the identifier information; and encrypting, by the first device, the ring configuration information to obtain the second authentication information of the Ethernet ring. obtaining, by the first device, ring configuration information of the Ethernet ring from a correspondence between identifier information and ring configuration information based on the identifier information; and encrypting, by the first device, the ring configuration information to obtain the second authentication information of the Ethernet ring.