A kind of method that OLT PON service card realizes the soft table update of FDB
Technical field
The present invention relates to a kind of data more frontiers of PON business board, real more particularly, to a kind of OLT PON service card
The method that the existing soft table of FDB updates.
Background technique
FDB management function is highly important management service function in EPON system, and main function is that maintenance system FDB is soft
Table provides the inquiry of MAC for operation maintenance personnel and removes means.Information in the soft table of FDB be Ethernet interface in OLT device and
The MAC information of the static MAC information of the dynamic MAC and configuration that learn on the port PON, these information and bottom chip is kept
It is synchronous.
The dynamic MAC study of PON business board FDB management at present depends on the MAC Address active reporting function of chip, i.e.,
MAC address learning is carried out using hardware mode.The part PON mac learning mode such as Fig. 1 in one typical distributed OLT system
It is shown.For not having the chip of MAC Address active reporting function, software can not effectively obtain the update status of its MAC Address.
Two layer functions of PON chip are still weaker compared with exchange chip currently on the market, for MAC active reporting function support compared with
Difference.Therefore, it is necessary to realize a kind of general FDB software learning mode not depended on chip.
Summary of the invention
It is an object of the invention to: in view of the problems of the existing technology, provide a kind of OLT PON service card realization FDB
The method that soft table updates is solved for not having the chip of MAC Address active reporting function, and software can not effectively obtain its MAC
The problem of update status of address.
Goal of the invention of the invention is achieved through the following technical solutions:
A kind of method that OLT PON service card realizes the soft table update of FDB, which is characterized in that the method comprising the steps of:
(1) MAC Address of PON chip is obtained;
(2) MAC Address that will acquire is matched with local FDB list item, if being matched to, and the list item is not required to delete, then sets
Setting the table entry operation mark is to remain unchanged, if not being matched to, FDB table is added to the MAC Address not being matched to, and recording should
Table entry operation mark is newly-increased.
As further technical solution, this method is further comprised the steps of:
(3) MAC Address for judging whether to have obtained all PON chips, if being judged as NO, return step (1), if judgement
To be to carry out step (4);
(4) local FDB list item is obtained, corresponding operating is executed according to content if having content in table entry operation mark, if table
There is no content in item operation flag, then it is to need aging that the table entry operation mark, which is arranged, waits next poll.
It is specific according to content execution corresponding operating if having content in table entry operation mark as further technical solution
If are as follows: the table entry operation mark be it is newly-increased, report tension management module, be synchronized to global FDB table;If table entry operation mark
Will is aging, then deletes the PON FDB list item, while reporting tension management module, be synchronized to global FDB table;If list item is grasped
Make mark to delete, then deletes the PON FDB list item.
As further technical solution, local FDB contents in table include: the address Mac, vlan, source port, source LLID with
And the table entry operation mark.
As further technical solution, table entry operation mark include the list item whether be increase newly, aging, need delete or
It remains unchanged.
As further technical solution, if receiving the configuration-direct for the removing MAC Address that operation maintenance personnel issues, lead to
It crosses PON chip SDK interface and deletes the MAC Address of PON chip, while traversing the soft table of FDB, for meeting the list item of deletion condition,
Setting table entry operation mark is to need to delete.
Compared with prior art, the invention has the following advantages that
1, the present invention is FDB software learning mode, the hardware circuit independent of chip;
2, automatically updating for the soft table content of FDB may be implemented through the invention.
Detailed description of the invention
Fig. 1 is mac learning mode in the part PON in existing distributed OLT system;
Fig. 2 is mac learning mode in the part PON in distributed OLT system of the invention;
Fig. 3 is flow chart of the invention.
Specific embodiment
The present invention is described in detail with specific embodiment below in conjunction with the accompanying drawings.
Embodiment
Present invention is mainly applied to the PON business boards of the OLT device of EPON system, and the technology that certain present invention realizes is also
It can be applied to other to count in logical product.
As shown in Fig. 2, for using the part PON mac learning in the typical distributed OLT system of one after the method for the present invention
Mode.Its hardware being related to includes PON business board and main control card, and wherein PON business board includes CPU and PON chip, master control
CPU is provided on card.The CPU of PON business board actively obtains the address M AC of PON chip, then gives FDB to main control card
CPU。
Detailed process of the invention is as shown in Figure 3, comprising:
Step 1: PON chip MAC Address periodically being obtained by PON chip SDK specified interface;
Step 2: the MAC that will acquire is matched with local FDB list item, if being matched to, and the list item is not required to delete, then is arranged
The table entry operation mark is to remain unchanged, and goes to step 4, otherwise enters step 3;
Step 3: FDB table being added to the MAC Address not being matched to, and it is newly-increased for recording the table entry operation mark;
Step 4: whether having obtained all PON chip MAC, if not completing, gone to step 1, otherwise enter step 5;
Step 5: traversal the soft table of PON FDB, if the table entry operation mark be it is newly-increased, report tension management module, together
It walks to global FDB table;If mark is aging, the PON FDB list item is deleted, while reporting tension management module, be synchronized to
Global FDB table;If mark deletes the PON FDB list item to delete;If three kinds of non-front situation, list item behaviour is set
Make mark to need aging, waits next poll.
Wherein, OLT CPU safeguards that the dedicated FDB table of PON, contents in table include: the address Mac, vlan, source port, source LLID,
And the table entry operation mark.The table entry operation mark includes whether the list item is newly-increased, aging, needs to delete, or keeps not
Become;
In addition, if operation maintenance personnel issues the configuration for removing MAC, by chip SDK interface deletion chip MAC, while time
PON FDB table is gone through, for meeting the list item of deletion condition, setting operation flag is to need to delete.
PON service card FDB table key data structure are as follows:
Wherein, the data structures such as balanced binary tree or red black tree may be selected in TREE_NODE.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, it is noted that all
Made any modifications, equivalent replacements, and improvements etc. within the spirit and principles in the present invention should be included in guarantor of the invention
Within the scope of shield.