Method and device for determining mac address hash collision

A MAC address and hash collision technology, which is applied in the field of media access control address hash collision determination, can solve the problems of high cost, TCAM resource occupation, TCAM capacity and TCAM power consumption, etc., to reduce occupation and hash The effect of the probability of conflict

CN103001878BActive Publication Date: 2018-02-16ZTE CORP
11 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Publication Date
2018-02-16

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The present invention provides a method and device for determining a hash conflict of a Media Access Control (MAC) address, wherein the method includes: hashing a key value N times to obtain N hash values, where N is an integer greater than 2 ; Use M hash values ​​to search M hash tables one by one to obtain M hash table entries, and the M is less than the N; use the N hash values ​​to divide the M hash The (N-M) hash values ​​other than the value are traversed and compared with the hash values ​​in the M hash table entries to find and / or learn MAC addresses with hash conflicts. The embodiment of the present invention effectively reduces the probability of hash collisions by performing multiple hashes on key values, thereby greatly reducing the occupation of TCAM space.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the field of computer technology, in particular to a method and device for determining hash conflicts of Media Access Control (MAC) addresses. Background technique

[0002] A hash table (Hash table, also called a hash table) accesses records by mapping a key value to a location in the table. This mapping function is called a hash function, and the array storing the records is called a hash table. The same hash address may be obtained for different keywords, that is, Key1≠Key2, and f(Key1)=f(Key2), this phenomenon is called hash collision. The advantage of the hash table lookup method is that the lookup is fast and the storage space utilization rate is high. The disadvantage is that the search time is not fixed, and the more conflicts, the longer the search time.

[0003] The MAC (Media Access Control, Media Access Control) address is an identifier used to identify a LAN node and is globally unique. The MAC address is 48 bit...

Examples

Embodiment Construction

[0041] In order to make the purpose, technical solution and advantages of the present invention more clear, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined arbitrarily with each other.

[0042] The hash conflict in the embodiment of the present invention mainly exists in the following two situations:

[0043] 1) When MAC is searched, the search key value has not been learned into the entry, but has a hash conflict with the key value that has been learned into the entry, and the same MAC table entry is found. At this time, it is necessary to use the search key value and Compare the Compare field in the table result to determine whether it is the entry corresponding to the search key value;

[0044] 2) Hash collision during MAC learning.

[0045] For the abov...