摘要 |
Embodiments of the present invention provide a method, an apparatus, a device, and a system for generating a Dynamic Host Configuration Protocol snooping DHCP Snooping binding table. The method includes: constructing a request packet for obtaining information about a DHCP client, and sending the request packet to a DHCP server; receiving, from the DHCP server, a response packet corresponding to the request packet, and extracting the information about the client from the response packet, where the information about the client includes the client's Internet Protocol IP address and Media Access Control MAC address; and obtaining the client's virtual local area network VLAN number and ingress port number through the MAC address, and generating the DHCP Snooping binding table. With the technical solutions provided in the embodiments of the present invention, a DHCP Snooping binding table can be generated for a client that has established a connection with the DHCP server before DHCP Snooping is enabled, thereby solving the problem that traffic of some clients is lost due to a lack of a DHCP Snooping binding table of these clients in a process of enabling DHCP Snooping. |