A method of forwarding a packet, the method being applied to an Edge Stream Gateway, ESGW, device, said method comprising the steps of: receiving the packet through a port connected to an access device; determining whether the packet is an upstream Q-in-Q protocol packet or an upstream Q-in-Q data packet according to a protocol feature field carried in the packet, wherein the upstream Q-in-Q protocol packet is a protocol packet encapsulated with a Q-in-Q tag; and in a case that the packet is the upstream Q-in-Q protocol packet, forwarding the upstream Q-in-Q protocol packet to a Virtual Broadband Remote Access Server, vBRAS, device through a Virtual extensible Local Area Network, VXLAN, tunnel between the ESGW device and the vBRAS device by querying an Access Control List, ACL, entry configured on the ESGW, such that the vBRAS device processes the upstream Q-in-Q protocol packet; and in a case that the packet is the upstream Q-in-Q data packet, removing a Q-in-Q tag of the upstream Q-in-Q data packet to obtain an upstream Ethernet data packet without the Q-in-Q tag, determining whether a destination Media Access Control, MAC, address of the upstream Ethernet data packet without the Q-in-Q tag is an MAC address of the ESGW device, and performing layer-3 forwarding based on a destination Internet Protocol, IP, address of the upstream Ethernet data packet without the Q-in-Q tag, in response to determining the destination MAC address of the upstream Ethernet data packet without the Q-in-Q tag as the MAC address of the ESGW device, such that the ESGW device directly forwards the data packet locally rather than forwarding the upstream Q-in-Q data packet to the vBRAS device. receiving the packet through a port connected to an access device; determining whether the packet is an upstream Q-in-Q protocol packet or an upstream Q-in-Q data packet according to a protocol feature field carried in the packet, wherein the upstream Q-in-Q protocol packet is a protocol packet encapsulated with a Q-in-Q tag; and in a case that the packet is the upstream Q-in-Q protocol packet, forwarding the upstream Q-in-Q protocol packet to a Virtual Broadband Remote Access Server, vBRAS, device through a Virtual extensible Local Area Network, VXLAN, tunnel between the ESGW device and the vBRAS device by querying an Access Control List, ACL, entry configured on the ESGW, such that the vBRAS device processes the upstream Q-in-Q protocol packet; and in a case that the packet is the upstream Q-in-Q data packet, removing a Q-in-Q tag of the upstream Q-in-Q data packet to obtain an upstream Ethernet data packet without the Q-in-Q tag, determining whether a destination Media Access Control, MAC, address of the upstream Ethernet data packet without the Q-in-Q tag is an MAC address of the ESGW device, and performing layer-3 forwarding based on a destination Internet Protocol, IP, address of the upstream Ethernet data packet without the Q-in-Q tag, in response to determining the destination MAC address of the upstream Ethernet data packet without the Q-in-Q tag as the MAC address of the ESGW device, such that the ESGW device directly forwards the data packet locally rather than forwarding the upstream Q-in-Q data packet to the vBRAS device. removing a Q-in-Q tag of the upstream Q-in-Q data packet to obtain an upstream Ethernet data packet without the Q-in-Q tag, determining whether a destination Media Access Control, MAC, address of the upstream Ethernet data packet without the Q-in-Q tag is an MAC address of the ESGW device, and performing layer-3 forwarding based on a destination Internet Protocol, IP, address of the upstream Ethernet data packet without the Q-in-Q tag, in response to determining the destination MAC address of the upstream Ethernet data packet without the Q-in-Q tag as the MAC address of the ESGW device, such that the ESGW device directly forwards the data packet locally rather than forwarding the upstream Q-in-Q data packet to the vBRAS device.