×

Method for learning media access control address, network device, and system

  • US 9,294,399 B2
  • Filed: 09/30/2013
  • Issued: 03/22/2016
  • Est. Priority Date: 03/30/2011
  • Status: Active Grant
First Claim
Patent Images

1. A method of learning a media access control (MAC) address for a network device, comprising:

  • performing by the network device;

    generating a key value according to a key field of a received packet, and obtaining an index value corresponding to the key value according to the key value;

    performing a linear random iteration on the index value according to a preset number of iterations to obtain an iteration index value;

    searching, according to the iteration index value obtained during a first iteration, in a MAC address pool for a MAC address corresponding to the iteration index value obtained during the first iteration;

    if failing to find a MAC address corresponding to the iteration index value obtained during the first iteration in the MAC address pool, determining whether there is still an idle MAC address space in the MAC address pool, and continuing to perform another iteration; and

    when number of iterations reach a preset maximum number of iterations, if still failing to find MAC addresses corresponding to iteration index values obtained during iterations and determining that there is still an idle MAC address space in the MAC address pool, learning a MAC address of the received packet at a position where a first idle MAC address space appears.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×