A network device, wherein the network device is a first provider edge, PE, and is applied to a Layer 3 virtual private network, L3VPN, a first site attaches to the L3VPN by using the first PE, a second site attaches to the L3VPN by using a second PE and a second terminal device attaches to the second site, and the first PE comprises a sending and receiving unit and a processing unit, wherein: the sending and receiving unit is configured to receive an attachment notification packet sent by a first terminal device, wherein the attachment notification packet carries an Internet Protocol, IP, address of the first terminal device, and the attachment notification packet is used to notify the first PE that the first terminal device attaches to the first site when the first terminal device migrates from the second site to the first site, wherein the first terminal device stores a correspondence between an IP address of the second terminal device and a MAC address of the second terminal device; the processing unit is configured to obtain an IP address of the second PE according to a virtual private network identifier, VPN ID, and the IP address of the first terminal device, wherein the first terminal device attaches to the second site before attaching to the first site, and the VPN ID identifies a VPN associated with an interface receiving the attachment notification packet; the processing unit is further configured to obtain the IP address of the second terminal device according to the VPN ID and the IP address of the second PE, wherein the IP address of the second terminal device is different from the IP address of the first terminal device; and the sending and receiving unit is further configured to send a binding update notification packet to the first terminal device, wherein the binding update notification packet carries a Media Access Control, MAC, address of the first PE and the IP address of the second terminal device. the sending and receiving unit is configured to receive an attachment notification packet sent by a first terminal device, wherein the attachment notification packet carries an Internet Protocol, IP, address of the first terminal device, and the attachment notification packet is used to notify the first PE that the first terminal device attaches to the first site when the first terminal device migrates from the second site to the first site, wherein the first terminal device stores a correspondence between an IP address of the second terminal device and a MAC address of the second terminal device; the processing unit is configured to obtain an IP address of the second PE according to a virtual private network identifier, VPN ID, and the IP address of the first terminal device, wherein the first terminal device attaches to the second site before attaching to the first site, and the VPN ID identifies a VPN associated with an interface receiving the attachment notification packet; the processing unit is further configured to obtain the IP address of the second terminal device according to the VPN ID and the IP address of the second PE, wherein the IP address of the second terminal device is different from the IP address of the first terminal device; and the sending and receiving unit is further configured to send a binding update notification packet to the first terminal device, wherein the binding update notification packet carries a Media Access Control, MAC, address of the first PE and the IP address of the second terminal device.