A forwarding entry establishment method for a Virtual Extensible Local Area Network, VXLAN, wherein a data center of the VXLAN comprises a first layer 3 gateway device, a second layer 3 gateway device, and a first layer 2 gateway device separately connected to the first layer 3 gateway device and the second layer 3 gateway device; the first layer 2 gateway device is connected to a first host; the first layer 3 gateway device has a first Internet Protocol, IP, address, a second IP address, a first Media Access Control, MAC, address corresponding to the first IP address, a second MAC address corresponding to the second IP address, a first VXLAN tunnel end point, VTEP, identifier corresponding to the first IP address and the first MAC address, and a second VTEP identifier corresponding to the second IP address and the second MAC address; the second layer 3 gateway device has the first IP address, a third IP address, the first MAC address, a third MAC address corresponding to the third IP address, the first VTEP identifier, and a third VTEP identifier corresponding to the third IP address and the third MAC address; the first layer 2 gateway device has a fourth VTEP identifier; the first host has a fourth IP address and a fourth MAC address corresponding to the fourth IP address; the first IP address, the second IP address, the third IP address, and the fourth IP address are different from each other; the first MAC address, the second MAC address, the third MAC address, and the fourth MAC address are different from each other; the first VTEP identifier, the second VTEP identifier, the third VTEP identifier, and the fourth VTEP identifier are different from each other; and the method comprises: obtaining, by the first layer 3 gateway device, the fourth MAC address of the first host and the fourth VTEP identifier of the first layer 2 gateway device by using the second IP address, the second MAC address, the second VTEP identifier, and the fourth IP address, wherein the second IP address is an IP address exclusive to the first layer 3 gateway device, the second MAC address is a MAC address exclusive to the first layer 3 gateway device, and the second VTEP identifier is a VTEP identifier exclusive to the first layer 3 gateway device; and establishing a first forwarding entry based on the second IP address, the second MAC address, the second VTEP identifier, the fourth IP address, the fourth MAC address, and the fourth VTEP identifier, wherein in the first forwarding entry, a source IP address is the second IP address, a source MAC address is the second MAC address, a destination IP address is the fourth IP address, and a destination MAC address is the fourth MAC address, and the first forwarding entry is used to indicate that the fourth MAC address is corresponding to the fourth VTEP identifier. obtaining, by the first layer 3 gateway device, the fourth MAC address of the first host and the fourth VTEP identifier of the first layer 2 gateway device by using the second IP address, the second MAC address, the second VTEP identifier, and the fourth IP address, wherein the second IP address is an IP address exclusive to the first layer 3 gateway device, the second MAC address is a MAC address exclusive to the first layer 3 gateway device, and the second VTEP identifier is a VTEP identifier exclusive to the first layer 3 gateway device; and establishing a first forwarding entry based on the second IP address, the second MAC address, the second VTEP identifier, the fourth IP address, the fourth MAC address, and the fourth VTEP identifier, wherein in the first forwarding entry, a source IP address is the second IP address, a source MAC address is the second MAC address, a destination IP address is the fourth IP address, and a destination MAC address is the fourth MAC address, and the first forwarding entry is used to indicate that the fourth MAC address is corresponding to the fourth VTEP identifier.