A packet processing method, applied to an Ethernet virtual private network, EVPN, wherein a customer edge, CE, device is connected to a first interface of a first provider edge, PE, device over a first link, the CE device is connected to a second interface of a second PE device over a second link, and the method comprises: receiving, by the first PE device, a first message sent by the second PE device, wherein the first message carries a first Media Access Control/Internet Protocol advertisement route, MAC/IP advertisement route, the first MAC/IP advertisement route comprises a MAC address and an Ethernet segment identifier, ESI, used to identify an Ethernet segment, ES, the MAC address comprised in the first MAC/IP advertisement route is a MAC address of the CE device or a MAC address of a terminal device managed by the CE device, and the ES comprises the first link and the second link; obtaining, by the first PE device, the MAC address from the first MAC/IP advertisement route; determining, by the first PE device based on the ESI, that an interface through which the first PE device is connected to the CE device is the first interface; and generating, by the first PE device, a first MAC forwarding entry based on the determined first interface and the MAC address comprised in the first MAC/IP advertisement route, wherein the first MAC forwarding entry comprises the MAC address comprised in the first MAC/IP advertisement route, an outbound interface identifier comprised in the first MAC forwarding entry is an identifier of the first interface, and the first MAC forwarding entry is used by the first PE device to forward, to the CE device, a packet whose destination MAC address is the MAC address comprised in the first MAC/IP advertisement route. receiving, by the first PE device, a first message sent by the second PE device, wherein the first message carries a first Media Access Control/Internet Protocol advertisement route, MAC/IP advertisement route, the first MAC/IP advertisement route comprises a MAC address and an Ethernet segment identifier, ESI, used to identify an Ethernet segment, ES, the MAC address comprised in the first MAC/IP advertisement route is a MAC address of the CE device or a MAC address of a terminal device managed by the CE device, and the ES comprises the first link and the second link; obtaining, by the first PE device, the MAC address from the first MAC/IP advertisement route; determining, by the first PE device based on the ESI, that an interface through which the first PE device is connected to the CE device is the first interface; and generating, by the first PE device, a first MAC forwarding entry based on the determined first interface and the MAC address comprised in the first MAC/IP advertisement route, wherein the first MAC forwarding entry comprises the MAC address comprised in the first MAC/IP advertisement route, an outbound interface identifier comprised in the first MAC forwarding entry is an identifier of the first interface, and the first MAC forwarding entry is used by the first PE device to forward, to the CE device, a packet whose destination MAC address is the MAC address comprised in the first MAC/IP advertisement route.