摘要 |
This application provides a method for processing a packet in an access network and a network device. The method includes: receiving, by an access device, a layer 2 protocol packet sent by a central device, where a destination address of the layer 2 protocol packet is a MAC address of the access device; obtaining, by the access device, flow table information according to the layer 2 protocol packet, and generating, by the access device, a flow table entry according to the flow table information, where the flow table entry includes a match field and an instruction; receiving, by the access device, a service packet sent by user equipment; and determining, by the access device, a matching flow table entry according to the service packet, and when the matching flow table entry is the generated flow table entry, processing the service packet according to the instruction in the generated flow table entry. According to the technical solution, the access device can obtain the flow table information from the central device without the need of configuring a public IP address for the access device, so as to implement that the user equipment accesses an IP network by using the access device, which helps simplify management and maintenance of the access device. |