CN103491004A - Method for Ethernet exchange based on MIAS system - Google Patents
Method for Ethernet exchange based on MIAS system Download PDFInfo
- Publication number
- CN103491004A CN103491004A CN201310393149.6A CN201310393149A CN103491004A CN 103491004 A CN103491004 A CN 103491004A CN 201310393149 A CN201310393149 A CN 201310393149A CN 103491004 A CN103491004 A CN 103491004A
- Authority
- CN
- China
- Prior art keywords
- mac
- address
- hash
- mac table
- level
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Small-Scale Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a method for Ethernet exchange based on an MIAS system. The method comprises the steps that a destination MAC address of Ethernet data is extracted and judged; Hash locating is adopted, so that addresses of MAC tables are obtained, then, the access to the first-level MAC table and the access to the second-level MAC table are achieved respectively according to the obtained addresses of the MAC tables, therefore, storage content is read and matched, and finally, corresponding port information is output. The Ethernet data can be transmitted to a corresponding port through the MIAS system according to the output port information so that Ethernet exchange can be achieved. According to the method for Ethernet exchange based on the MIAS system, the locating efficiency is high, the processing speed is high, the performance is stable, CAM is not needed, the cost for Ethernet exchange is reduced, and the method can be widely applied to the field of communication.
Description
Technical field
The present invention relates to the Ethernet exchanging method, particularly relate to a kind of Ethernet exchanging method based on the MIAS system.
Background technology
In the MIAS system, need to access WLAN in local module, thereby often need to connecting many remote end modules, a local module carries out the Ethernet data exchange.The Ethernet exchanging method that local module adopts at present is to adopt micro-control machine to realize fast finding in conjunction with the CAM module, thereby realizes the fast finding function of Ethernet, and then realizes exchanges data.CAM is a kind of special storage array, belong to hardware module, all data item of storing in input data and CAM can be compared simultaneously, within certain cycle judgement input data whether with CAM in the data item of storing mate, and provide data item corresponding address and match information.But there is the shortcoming that cost is high, capacity is little, easily overflow in CAM, has increased the cost of Ethernet exchanging, and caused the poor-performing of Ethernet exchanging.
Summary of the invention
In order to solve above-mentioned technical problem, the purpose of this invention is to provide a kind of stable performance, the Ethernet exchanging method based on the MIAS system cheaply.
The technical solution adopted for the present invention to solve the technical problems is:
A kind of Ethernet exchanging method based on the MIAS system, comprise the port finding step, and described port finding step comprises:
The target MAC (Media Access Control) address of A1, extraction Ethernet data;
A2, judge whether Ethernet data is the ether broadcast frame, if, flooded, otherwise, carry out after Hash lookup obtaining the address of MAC table according to target MAC (Media Access Control) address;
A3, the address of showing according to the MAC obtained, access first order MAC table, then whether judgement storage content is effective, if effectively, search the effective information that obtains the Hash bucket in second level MAC table, otherwise, judge whether to carry out Hash lookup again, if, flooded and finished the port finding step, otherwise, carry out again obtaining the address of MAC table after Hash lookup according to target MAC (Media Access Control) address, and again perform step A3;
The effective information of the Hash bucket of A4, the address of showing according to MAC and acquisition, the Hash bucket from second level MAC table is read the storage content, and each MAC address entries of described storage content comprises MAC Address and port information;
Whether MAC Address and target MAC (Media Access Control) address that A5, judgement are read mate, if, export corresponding port information, otherwise, judge whether to carry out Hash lookup again, if, flooded and finished the port finding step, otherwise, carry out again obtaining the address of MAC table after Hash lookup according to target MAC (Media Access Control) address, and return to steps A 3;
Described MAC table comprises first order MAC table and second level MAC table.
Further, described second level MAC table comprises two Hash buckets, and these two Hash buckets are followed successively by the first Hash bucket and the second Hash bucket, and each list item of described two Hash buckets forms by MAC Address and port information;
Each MAC address entries of described first order MAC table forms by five flag bits, and described five flag bits are followed successively by second level MAC table storage content effective marker position, second level MAC table the first Hash bucket storage content effective marker position, the storage of second level MAC table the second Hash bucket content effective marker position, the second level aging flag bit of MAC table the first Hash bucket and the aging flag bit of second level MAC table the second Hash bucket.
Further, described steps A 3, it is specially:
Address according to the MAC table obtained, access first order MAC table, then whether effective according to the value judgement storage content of second level MAC table storage content effective marker position, if effectively, search the value of acquisition the first Hash bucket storage content effective marker position and the value of second level MAC table the second Hash bucket storage content effective marker position, obtain the effective information of two Hash buckets in second level MAC table, otherwise, judge whether to carry out Hash lookup again, if, flooded and finished the port finding step, otherwise, according to target MAC (Media Access Control) address, carry out again obtaining the address that MAC shows after Hash lookup, and again perform step A3.
Further, described steps A 4, it is specially:
Store the value of content effective marker position and the value of second level MAC table the second Hash bucket storage content effective marker position according to the address of MAC table and the first Hash bucket of acquisition, the first Hash bucket and/or the second Hash bucket from second level MAC table are read the storage content, and each MAC address entries of described storage content comprises MAC Address and port information.
Further, in described steps A 2, according to target MAC (Media Access Control) address, carry out obtaining the address that MAC shows after Hash lookup, it is specially: after with the CRC algorithm, target MAC (Media Access Control) address being carried out to the hash function computing, obtain the address of MAC table;
In described steps A 3, according to target MAC (Media Access Control) address, carry out obtaining the address that MAC shows after Hash lookup, it is specially again: after with folding algorithm, target MAC (Media Access Control) address being carried out to the hash function computing, obtain the address of MAC table.
Further, also comprise learning procedure, described learning procedure comprises:
B1, the Ethernet data to receiving, after the arrival of source MAC is waited in time delay, carry out obtaining the address that MAC shows after Hash lookup according to source MAC;
B2, the address of showing according to the MAC obtained, access first order MAC table, then whether judgement storage content is effective, if effective, searches the effective information that obtains the Hash bucket in second level MAC table, otherwise, directly perform step B5;
The effective information of the Hash bucket of B3, the address of showing according to MAC and acquisition, the Hash bucket from second level MAC table is read the storage content, and each MAC address entries of described storage content comprises MAC Address and port information;
MAC Address and source MAC that B4, coupling are read, if the MAC Address of reading and source MAC are complementary, upgrade the port information in second level MAC table; Do not mate if only from a Hash bucket, read storage content and the MAC Address of reading and source MAC, directly perform step B5; If the MAC Address of reading from two Hash buckets is not all mated with source MAC, judge whether to carry out Hash lookup again, if, finish learning procedure, otherwise, carry out again obtaining the address of MAC table after Hash lookup according to source MAC, and return to step B2;
B5, will the port information of source MAC and Ethernet data as a MAC address entries, write in second level MAC table after combination, be effective by the mark position of corresponding stored content in first order MAC table simultaneously.
Further, in described step B1, according to source MAC, carry out obtaining the address that MAC shows after Hash lookup, it is specially: after with the CRC algorithm, source MAC being carried out to the hash function computing, obtain the address of MAC table;
In described step B4, according to source MAC, carry out obtaining the address that MAC shows after Hash lookup, it is specially again: after with folding algorithm, source MAC being carried out to the hash function computing, obtain the address of MAC table.
The invention has the beneficial effects as follows: a kind of Ethernet exchanging method based on the MIAS system of the present invention, adopt Hash lookup to obtain the address of MAC table, then the address of showing according to the MAC obtained, respectively first order MAC table and second level MAC table are conducted interviews, and then read the storage content and carry out matching treatment, finally export corresponding port information, the MIAS system can be forwarded to corresponding port by Ethernet data according to the port information of output, realizes Ethernet exchanging.This method search efficiency is high, and processing speed is fast, and stable performance, without using CAM, has reduced the cost of Ethernet exchanging.
The accompanying drawing explanation
Below in conjunction with drawings and Examples, the invention will be further described.
Fig. 1 is the module frame chart that the MIAS internal system is carried out Ethernet exchanging;
Fig. 2 is the structural representation of the first order MAC table in a kind of Ethernet exchanging method based on the MIAS system of the present invention;
Fig. 3 is the structural representation of the second level MAC table in a kind of Ethernet exchanging method based on the MIAS system of the present invention.
Embodiment
For the ease of following description, the following explanation of nouns of given first:
MII(Media-Independent Interface): Media Independent Interface;
GMII(Gigabit Media Independent Interface): the gigabit Media Independent Interface;
SGMII(Serial Gigabit Media Independent Interface): the serial gigabit Media Independent Interface;
MAC(Medium Access Control): medium access control;
The MAC table: for assisting to determine source address and the destination address of Ethernet, created the unique identifier that is called medium access control (MAC) address, MAC Address also is called as burning address (BIA) usually, because it is burnt in the ROM of network interface card;
PHY(Physical layer): physical layer;
CRC(Cyclic Redundancy Check): cyclic redundancy check (CRC);
CAM(Content addressable memory): Content Addressable Memory, all data item of storing in input data and CAM can be compared simultaneously, within certain cycle judgement input data whether with CAM in the data item of storing mate;
WLAN(Wireless Local Area Network): WLAN (wireless local area network);
RAM (Random Access Memory): random asccess memory;
MIAS (Multi-Network Integration Access System): many nets merge connecting system;
MSB:Most Significant Bit, refer to the highest significant position of binary number;
LSB:Least Significant Bit, refer to the least significant bit of binary number;
Flood (Flooding) be a kind of data flow Transfer Technology that switch and bridge are used, the data flow that certain interface is received sends from the total interface except this interface.
The invention provides a kind of Ethernet exchanging method based on the MIAS system, comprise the port finding step, described port finding step comprises:
The target MAC (Media Access Control) address of A1, extraction Ethernet data;
A2, judge whether Ethernet data is the ether broadcast frame, if, flooded, otherwise, carry out after Hash lookup obtaining the address of MAC table according to target MAC (Media Access Control) address;
A3, the address of showing according to the MAC obtained, access first order MAC table, then whether judgement storage content is effective, if effectively, search the effective information that obtains the Hash bucket in second level MAC table, otherwise, judge whether to carry out Hash lookup again, if, flooded and finished the port finding step, otherwise, carry out again obtaining the address of MAC table after Hash lookup according to target MAC (Media Access Control) address, and again perform step A3;
The effective information of the Hash bucket of A4, the address of showing according to MAC and acquisition, the Hash bucket from second level MAC table is read the storage content, and each MAC address entries of described storage content comprises MAC Address and port information;
Whether MAC Address and target MAC (Media Access Control) address that A5, judgement are read mate, if, export corresponding port information, otherwise, judge whether to carry out Hash lookup again, if, flooded and finished the port finding step, otherwise, carry out again obtaining the address of MAC table after Hash lookup according to target MAC (Media Access Control) address, and return to steps A 3;
Described MAC table comprises first order MAC table and second level MAC table.
Further, described second level MAC table comprises two Hash buckets, and these two Hash buckets are followed successively by the first Hash bucket and the second Hash bucket, and each list item of described two Hash buckets forms by MAC Address and port information;
Each MAC address entries of described first order MAC table forms by five flag bits, and described five flag bits are followed successively by second level MAC table storage content effective marker position, second level MAC table the first Hash bucket storage content effective marker position, the storage of second level MAC table the second Hash bucket content effective marker position, the second level aging flag bit of MAC table the first Hash bucket and the aging flag bit of second level MAC table the second Hash bucket.
Further, described steps A 3, it is specially:
Address according to the MAC table obtained, access first order MAC table, then whether effective according to the value judgement storage content of second level MAC table storage content effective marker position, if effectively, search the value of acquisition the first Hash bucket storage content effective marker position and the value of second level MAC table the second Hash bucket storage content effective marker position, obtain the effective information of two Hash buckets in second level MAC table, otherwise, judge whether to carry out Hash lookup again, if, flooded and finished the port finding step, otherwise, according to target MAC (Media Access Control) address, carry out again obtaining the address that MAC shows after Hash lookup, and again perform step A3.
Further, described steps A 4, it is specially:
Store the value of content effective marker position and the value of second level MAC table the second Hash bucket storage content effective marker position according to the address of MAC table and the first Hash bucket of acquisition, the first Hash bucket and/or the second Hash bucket from second level MAC table are read the storage content, and each MAC address entries of described storage content comprises MAC Address and port information.
Further, in described steps A 2, according to target MAC (Media Access Control) address, carry out obtaining the address that MAC shows after Hash lookup, it is specially: after with the CRC algorithm, target MAC (Media Access Control) address being carried out to the hash function computing, obtain the address of MAC table;
In described steps A 3, according to target MAC (Media Access Control) address, carry out obtaining the address that MAC shows after Hash lookup, it is specially again: after with folding algorithm, target MAC (Media Access Control) address being carried out to the hash function computing, obtain the address of MAC table.
Further, also comprise learning procedure, described learning procedure comprises:
B1, the Ethernet data to receiving, after the arrival of source MAC is waited in time delay, carry out obtaining the address that MAC shows after Hash lookup according to source MAC;
B2, the address of showing according to the MAC obtained, access first order MAC table, then whether judgement storage content is effective, if effective, searches the effective information that obtains the Hash bucket in second level MAC table, otherwise, directly perform step B5;
The effective information of the Hash bucket of B3, the address of showing according to MAC and acquisition, the Hash bucket from second level MAC table is read the storage content, and each MAC address entries of described storage content comprises MAC Address and port information;
MAC Address and source MAC that B4, coupling are read, if the MAC Address of reading and source MAC are complementary, upgrade the port information in second level MAC table; Do not mate if only from a Hash bucket, read storage content and the MAC Address of reading and source MAC, directly perform step B5; If the MAC Address of reading from two Hash buckets is not all mated with source MAC, judge whether to carry out Hash lookup again, if, finish learning procedure, otherwise, carry out again obtaining the address of MAC table after Hash lookup according to source MAC, and return to step B2;
B5, will the port information of source MAC and Ethernet data as a MAC address entries, write in second level MAC table after combination, be effective by the mark position of corresponding stored content in first order MAC table simultaneously.
Further, in described step B1, according to source MAC, carry out obtaining the address that MAC shows after Hash lookup, it is specially: after with the CRC algorithm, source MAC being carried out to the hash function computing, obtain the address of MAC table;
In described step B4, according to source MAC, carry out obtaining the address that MAC shows after Hash lookup, it is specially again: after with folding algorithm, source MAC being carried out to the hash function computing, obtain the address of MAC table.
Shown in Fig. 1, Fig. 1 is the module frame chart that the MIAS internal system is carried out Ethernet exchanging, the MIAS system only need to connect a small amount of ethernet port, the block diagram of realizing by Fig. 1 can find out, a plurality of Ethernet interfaces are sorted, are transferred to next stage by arbitration controller by the Ethernet data transmitted.In next stage, FPGA is processed the Backwards Forwarding controller to the Ethernet data of moderator gating and is sent the forwarding instruction, and FIFO, as buffer, carries out buffer memory to the Ethernet data that is about to forward, and waits for the control of transmitting controller.Transmitting controller obtains forwarding port from FPGA, then reads corresponding ethernet frame data from FIFO, and is forwarded to corresponding port.In Fig. 1, FPGA mainly carries out matched and searched of MAC Address etc., be the core that the MIAS internal system is carried out Ethernet exchanging, and the MIAS system is to realize the function of Ethernet exchanging in FPGA.
A specific embodiment of the present invention is as follows:
A kind of Ethernet exchanging method based on the MIAS system, comprise learning procedure, pre-treatment step, port finding step and exchanges data step; Learning procedure is the study of MAC Address, for generate the MAC table when initialization, thereby pre-treatment step is Ethernet data to be carried out to the priority judgement sort and wait processing, the port finding step is according to the priority orders of pre-treatment step acquisition, pending Ethernet data to be carried out to port to search, thereby the exchanges data step can be carried out data retransmission according to searching the port obtained, and realizes Ethernet exchanging.
Learning procedure comprises:
B1, the Ethernet data to receiving, after the arrival of source MAC is waited in time delay, after the address of according to source MAC, carrying out after Hash lookup obtaining the MAC table carries out the hash function computing with the CRC algorithm to source MAC, obtain the address of MAC table;
B2, the address of showing according to the MAC obtained, access first order MAC table, then whether judgement storage content is effective, if effective, searches the effective information that obtains the Hash bucket in second level MAC table, otherwise, directly perform step B5;
The effective information of the Hash bucket of B3, the address of showing according to MAC and acquisition, the Hash bucket from second level MAC table is read the storage content, and each MAC address entries of storage content comprises MAC Address and port information;
MAC Address and source MAC that B4, coupling are read, if the MAC Address of reading and source MAC are complementary, upgrade the port information in second level MAC table; Do not mate if only from a Hash bucket, read storage content and the MAC Address of reading and source MAC, directly perform step B5; If the MAC Address of reading from two Hash buckets is not all mated with source MAC, judge whether to carry out Hash lookup again, if, finish learning procedure, otherwise, carry out again obtaining the address of MAC table after Hash lookup according to source MAC, and return to step B2; Here, then Hash lookup refers to carry out obtaining after Hash lookup according to source MAC the address of MAC table again, after with folding algorithm, source MAC being carried out to the hash function computing, obtains the address of MAC table;
B5, will the port information of source MAC and Ethernet data as a MAC address entries, write in second level MAC table after combination, be effective by the mark position of corresponding stored content in first order MAC table simultaneously.
Pre-treatment step comprises: will wait multichannel Ethernet data to be exchanged to store in buffer, and after the multichannel Ethernet data being carried out to the priority judgement, be processed according to priority orders Dui Ge road Ethernet data simultaneously.As shown in Figure 1, the multichannel Ethernet data is carried out to the priority judgement carries out in arbitration controller.
The MAC table comprises first order MAC table and second level MAC table, shown in Fig. 2 and Fig. 3, MAC table in the second level comprises two Hash buckets, and these two Hash buckets are followed successively by the first Hash bucket and the second Hash bucket, and each list item of two Hash buckets forms by MAC Address and port information; In Fig. 3, mac_table0 means the first Hash bucket, and mac_table1 means the second Hash bucket, and the degree of depth of two Hash buckets is 2048, and each MAC address entries consists of the MAC Address of 48 and the port information of 8; Numbering or the address of port information finger tip mouth;
In Fig. 2, mac_bitmap means first order MAC table, each MAC address entries of first order MAC table forms by five flag bits, and five flag bits are followed successively by second level MAC table storage content effective marker position " Valid ", second level MAC table the first Hash bucket storage content effective marker position " Valid0 ", the storage of second level MAC table the second Hash bucket content effective marker position " Valid1 ", the second level aging flag bit of MAC table the first Hash bucket " Aging0 " and the second level aging flag bit of MAC table the second Hash bucket " Aging1 "; First order MAC table is the description to second level MAC table, the value of five flag bits of its each list item represents respectively corresponding effective status in second level MAC table, when the value of flag bit is 1, mean effective status, when the value of flag bit is 0, mean disarmed state, for example, when the value of second level MAC table storage content effective marker position " Valid " is 1, the storage content that means second level MAC table is effective status, and the value of working as " Valid " means that the storage content of second level MAC table is disarmed state while being 0.Therefore, in step B5, by the mark position of corresponding stored content in first order MAC table, be effective simultaneously, the flag bit that is about to the corresponding stored content is made as 1, for example second level MAC table storage content effective marker position " Valid ", second level MAC table the first Hash bucket storage content effective marker position " Valid0 " or second level MAC table the second Hash bucket storage content effective marker position " Valid1 " is made as to 1.
The port finding step comprises:
The target MAC (Media Access Control) address of A1, extraction Ethernet data;
A2, judge whether Ethernet data is the ether broadcast frame, if, flooded, otherwise, after the address of according to target MAC (Media Access Control) address, carrying out after Hash lookup obtaining the MAC table carries out the hash function computing with the CRC algorithm to target MAC (Media Access Control) address, obtain the address of MAC table;
A3, the address of showing according to the MAC obtained, access first order MAC table, then whether judgement storage content is effective, if effectively, search the effective information that obtains the Hash bucket in second level MAC table, otherwise, judge whether to carry out Hash lookup again, if, flooded and finished the port finding step, otherwise, carry out again obtaining the address of MAC table after Hash lookup according to target MAC (Media Access Control) address, and again perform step A3;
The structure of first order MAC table and second level MAC table is with reference to shown in Fig. 2 and Fig. 3, and learning procedure have been described in detail the structure of first order MAC table and second level MAC table, no longer repeats here;
Steps A 3 is specially: according to the address of the MAC table obtained, access first order MAC table, then whether effective according to the value judgement storage content of second level MAC table storage content effective marker position, if effectively, search the value of acquisition the first Hash bucket storage content effective marker position and the value of second level MAC table the second Hash bucket storage content effective marker position, obtain the effective information of two Hash buckets in second level MAC table, otherwise, judge whether to carry out Hash lookup again, if, flooded and finished the port finding step, otherwise, according to target MAC (Media Access Control) address, carry out again obtaining the address that MAC shows after Hash lookup, and again perform step A3,
The effective information of the Hash bucket of A4, the address of showing according to MAC and acquisition, Hash bucket from second level MAC table is read the storage content, each MAC address entries of storage content comprises MAC Address and port information, that is: store the value of content effective marker position and the value of second level MAC table the second Hash bucket storage content effective marker position according to the address of MAC table and the first Hash bucket of acquisition, the first Hash bucket and/or the second Hash bucket from second level MAC table are read the storage content, and each MAC address entries of storage content comprises MAC Address and port information; Here, read the storage content from corresponding Hash bucket, the storage content that the value of a readout sign will position is 1 corresponding Hash bucket according to the value of the first Hash bucket storage content effective marker position and the value of second level MAC table the second Hash bucket storage content effective marker position;
Whether MAC Address and target MAC (Media Access Control) address that A5, judgement are read mate, if, export corresponding port information, otherwise, judge whether to carry out Hash lookup again, if, flooded and finished the port finding step, otherwise, carry out again obtaining the address of MAC table after Hash lookup according to target MAC (Media Access Control) address, and return to steps A 3.
In steps A 3 and A5 again Hash lookup all refer to carry out again obtaining after Hash lookup according to target MAC (Media Access Control) address the address of MAC table, after with folding algorithm, target MAC (Media Access Control) address being carried out to the hash function computing, obtain the address of MAC table; Hash lookup again in steps A 3 and A5 is similar to the processing procedure of Hash lookup again in step B4, just processes object slightly different.
Learning procedure and finding step are the core procedures of this method, be to carry out in the FPGA in Fig. 1, and because FPGA has the characteristic that parallel high-speed is processed, so this method can be carried out Ethernet exchanging rapidly.
The exchanges data step comprises: to after carrying out the port finding step and exported corresponding port Mei road Ethernet data, read its corresponding ethernet frame data from buffer, and be forwarded to the port that this port information is corresponding.
In this method, also can adopt MAC address aging to carry out burin-in process to out-of-date MAC address entries, keep the real-time of MAC table, thereby reduce the conflict probability and prevent overflowing of MAC table.And, in this method, adopt the two-stage Hash table to improve the efficiency that port is searched, and adopted two-stage Hash lookup and two Hash buckets, reduced collision probability.
More than that better enforcement of the present invention is illustrated, but the invention is not limited to embodiment, those of ordinary skill in the art also can make all equivalent variations or replacement under the prerequisite without prejudice to spirit of the present invention, and the modification that these are equal to or replacement all are included in the application's claim limited range.
Claims (7)
1. the Ethernet exchanging method based on the MIAS system, is characterized in that, comprises the port finding step, and described port finding step comprises:
The target MAC (Media Access Control) address of A1, extraction Ethernet data;
A2, judge whether Ethernet data is the ether broadcast frame, if, flooded, otherwise, carry out after Hash lookup obtaining the address of MAC table according to target MAC (Media Access Control) address;
A3, the address of showing according to the MAC obtained, access first order MAC table, then whether judgement storage content is effective, if effectively, search the effective information that obtains the Hash bucket in second level MAC table, otherwise, judge whether to carry out Hash lookup again, if, flooded and finished the port finding step, otherwise, carry out again obtaining the address of MAC table after Hash lookup according to target MAC (Media Access Control) address, and again perform step A3;
The effective information of the Hash bucket of A4, the address of showing according to MAC and acquisition, the Hash bucket from second level MAC table is read the storage content, and each MAC address entries of described storage content comprises MAC Address and port information;
Whether MAC Address and target MAC (Media Access Control) address that A5, judgement are read mate, if, export corresponding port information, otherwise, judge whether to carry out Hash lookup again, if, flooded and finished the port finding step, otherwise, carry out again obtaining the address of MAC table after Hash lookup according to target MAC (Media Access Control) address, and return to steps A 3;
Described MAC table comprises first order MAC table and second level MAC table.
2. a kind of Ethernet exchanging method based on the MIAS system according to claim 1, it is characterized in that, described second level MAC table comprises two Hash buckets, these two Hash buckets are followed successively by the first Hash bucket and the second Hash bucket, and each list item of described two Hash buckets forms by MAC Address and port information;
Each MAC address entries of described first order MAC table forms by five flag bits, and described five flag bits are followed successively by second level MAC table storage content effective marker position, second level MAC table the first Hash bucket storage content effective marker position, the storage of second level MAC table the second Hash bucket content effective marker position, the second level aging flag bit of MAC table the first Hash bucket and the aging flag bit of second level MAC table the second Hash bucket.
3. a kind of Ethernet exchanging method based on the MIAS system according to claim 2, is characterized in that, described steps A 3, and it is specially:
Address according to the MAC table obtained, access first order MAC table, then whether effective according to the value judgement storage content of second level MAC table storage content effective marker position, if effectively, search the value of acquisition the first Hash bucket storage content effective marker position and the value of second level MAC table the second Hash bucket storage content effective marker position, obtain the effective information of two Hash buckets in second level MAC table, otherwise, judge whether to carry out Hash lookup again, if, flooded and finished the port finding step, otherwise, according to target MAC (Media Access Control) address, carry out again obtaining the address that MAC shows after Hash lookup, and again perform step A3.
4. a kind of Ethernet exchanging method based on the MIAS system according to claim 3, is characterized in that, described steps A 4, and it is specially:
Store the value of content effective marker position and the value of second level MAC table the second Hash bucket storage content effective marker position according to the address of MAC table and the first Hash bucket of acquisition, the first Hash bucket and/or the second Hash bucket from second level MAC table are read the storage content, and each MAC address entries of described storage content comprises MAC Address and port information.
5. a kind of Ethernet exchanging method based on the MIAS system according to claim 1, it is characterized in that, in described steps A 2, according to target MAC (Media Access Control) address, carry out obtaining the address that MAC shows after Hash lookup, it is specially: after with the CRC algorithm, target MAC (Media Access Control) address being carried out to the hash function computing, obtain the address of MAC table;
In described steps A 3, according to target MAC (Media Access Control) address, carry out obtaining the address that MAC shows after Hash lookup, it is specially again: after with folding algorithm, target MAC (Media Access Control) address being carried out to the hash function computing, obtain the address of MAC table.
6. a kind of Ethernet exchanging method based on the MIAS system according to claim 1, is characterized in that, also comprise learning procedure, described learning procedure comprises:
B1, the Ethernet data to receiving, after the arrival of source MAC is waited in time delay, carry out obtaining the address that MAC shows after Hash lookup according to source MAC;
B2, the address of showing according to the MAC obtained, access first order MAC table, then whether judgement storage content is effective, if effective, searches the effective information that obtains the Hash bucket in second level MAC table, otherwise, directly perform step B5;
The effective information of the Hash bucket of B3, the address of showing according to MAC and acquisition, the Hash bucket from second level MAC table is read the storage content, and each MAC address entries of described storage content comprises MAC Address and port information;
MAC Address and source MAC that B4, coupling are read, if the MAC Address of reading and source MAC are complementary, upgrade the port information in second level MAC table; Do not mate if only from a Hash bucket, read storage content and the MAC Address of reading and source MAC, directly perform step B5; If the MAC Address of reading from two Hash buckets is not all mated with source MAC, judge whether to carry out Hash lookup again, if, finish learning procedure, otherwise, carry out again obtaining the address of MAC table after Hash lookup according to source MAC, and return to step B2;
B5, will the port information of source MAC and Ethernet data as a MAC address entries, write in second level MAC table after combination, be effective by the mark position of corresponding stored content in first order MAC table simultaneously.
7. a kind of Ethernet exchanging method based on the MIAS system according to claim 6, it is characterized in that, in described step B1, according to source MAC, carry out obtaining the address that MAC shows after Hash lookup, it is specially: after with the CRC algorithm, source MAC being carried out to the hash function computing, obtain the address of MAC table;
In described step B4, according to source MAC, carry out obtaining the address that MAC shows after Hash lookup, it is specially again: after with folding algorithm, source MAC being carried out to the hash function computing, obtain the address of MAC table.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310393149.6A CN103491004B (en) | 2013-09-02 | 2013-09-02 | A kind of Ethernet exchanging method based on MIAS system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310393149.6A CN103491004B (en) | 2013-09-02 | 2013-09-02 | A kind of Ethernet exchanging method based on MIAS system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103491004A true CN103491004A (en) | 2014-01-01 |
CN103491004B CN103491004B (en) | 2016-07-20 |
Family
ID=49830974
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310393149.6A Active CN103491004B (en) | 2013-09-02 | 2013-09-02 | A kind of Ethernet exchanging method based on MIAS system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103491004B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113904987A (en) * | 2021-10-29 | 2022-01-07 | 西安微电子技术研究所 | MAC address routing management controller, system and control method |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101431472A (en) * | 2008-12-15 | 2009-05-13 | 中兴通讯股份有限公司 | Processing method and apparatus for media access control clauses |
EP2141867A1 (en) * | 2008-07-02 | 2010-01-06 | Nec Corporation | Communication system, network apparatus, communication recovery method for use therein, and program thereof |
CN101651626A (en) * | 2009-09-23 | 2010-02-17 | 杭州华三通信技术有限公司 | Traffic-forwarding method and device |
CN202488726U (en) * | 2012-01-11 | 2012-10-10 | 奥维通信股份有限公司 | Multi-network integration access system |
CN102754394A (en) * | 2010-08-19 | 2012-10-24 | 华为技术有限公司 | Method for hash table storage, method for hash table lookup, and devices thereof |
CN103079216A (en) * | 2013-01-16 | 2013-05-01 | 奥维通信股份有限公司 | Multi-network fusion access indoor signal coverage system |
-
2013
- 2013-09-02 CN CN201310393149.6A patent/CN103491004B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2141867A1 (en) * | 2008-07-02 | 2010-01-06 | Nec Corporation | Communication system, network apparatus, communication recovery method for use therein, and program thereof |
CN101431472A (en) * | 2008-12-15 | 2009-05-13 | 中兴通讯股份有限公司 | Processing method and apparatus for media access control clauses |
CN101651626A (en) * | 2009-09-23 | 2010-02-17 | 杭州华三通信技术有限公司 | Traffic-forwarding method and device |
CN102754394A (en) * | 2010-08-19 | 2012-10-24 | 华为技术有限公司 | Method for hash table storage, method for hash table lookup, and devices thereof |
CN202488726U (en) * | 2012-01-11 | 2012-10-10 | 奥维通信股份有限公司 | Multi-network integration access system |
CN103079216A (en) * | 2013-01-16 | 2013-05-01 | 奥维通信股份有限公司 | Multi-network fusion access indoor signal coverage system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113904987A (en) * | 2021-10-29 | 2022-01-07 | 西安微电子技术研究所 | MAC address routing management controller, system and control method |
CN113904987B (en) * | 2021-10-29 | 2022-11-15 | 西安微电子技术研究所 | MAC address routing management controller, system and control method |
Also Published As
Publication number | Publication date |
---|---|
CN103491004B (en) | 2016-07-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101692651B (en) | Method and device for Hash lookup table | |
CN101594319A (en) | List item lookup method and device | |
Bando et al. | FlashTrie: beyond 100-Gb/s IP route lookup using hash-based prefix-compressed trie | |
CN104579940B (en) | Search the method and device of accesses control list | |
CN103294822B (en) | A kind of based on active Hash with the high-efficiency caching method of Bloom filter | |
US20180287942A1 (en) | Forwarding Data Packets | |
CN102364463B (en) | Hash-based method for searching CAM (central address memory) | |
CN101753445A (en) | Fast flow classification method based on keyword decomposition hash algorithm | |
CN105515997B (en) | The higher efficiency range matching process of zero scope expansion is realized based on BF_TCAM | |
CN110808910A (en) | OpenFlow flow table energy-saving storage framework supporting QoS and application thereof | |
CN103428093A (en) | Route prefix storing, matching and updating method and device based on names | |
CN103248573A (en) | Centralization management switch for OpenFlow and data processing method of centralization management switch | |
CN100426791C (en) | Engine apparatus for route forwarding table address searching | |
CN1216473C (en) | TCAM high-speed search method and system supporting multiple nexthop | |
CN102333036A (en) | Method and system for realizing high-speed routing lookup | |
CN103412858A (en) | Method for large-scale feature matching of text content or network content analyses | |
Han et al. | A novel routing algorithm for IoT cloud based on hash offset tree | |
CN102904812B (en) | The storage means of route table items, lookup method, Apparatus and system | |
CN104253754A (en) | ACL (access control list) fast matching method and equipment | |
WO2024037243A1 (en) | Data processing method, apparatus and system | |
CN106878185B (en) | Message IP address matching circuit and method | |
CN103491004B (en) | A kind of Ethernet exchanging method based on MIAS system | |
CN109039911B (en) | Method and system for sharing RAM based on HASH searching mode | |
CN106789706B (en) | Network shunting system based on TCAM | |
CN111614793B (en) | FPGA-based Ethernet switch MAC address management device and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |