WO2016206371A1 - 一种路由管理方法、装置及存储介质 - Google Patents
一种路由管理方法、装置及存储介质 Download PDFInfo
- Publication number
- WO2016206371A1 WO2016206371A1 PCT/CN2016/071381 CN2016071381W WO2016206371A1 WO 2016206371 A1 WO2016206371 A1 WO 2016206371A1 CN 2016071381 W CN2016071381 W CN 2016071381W WO 2016206371 A1 WO2016206371 A1 WO 2016206371A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- routing table
- self
- full
- module
- reachable
- 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.)
- Ceased
Links
Images
Definitions
- the present invention relates to the field of wireless communication technologies, and in particular, to a route management method, apparatus, and storage medium.
- SA Swich Access
- SF Swich Fabric
- FIG. 1 A schematic diagram of the composition of a switching network in the prior art, as shown in FIG. 1, the SA chip and the SF chip are connected by a plurality of high-speed serial buses to form a link, and the serial bus can be Serdes; when the data packet is from a source SA When forwarding to a destination SA via the SF, the data is transmitted through multiple physical links; the source SA needs to query the routing table before sending, and sends the data packet to the SF according to the valid link of the query; meanwhile, the SF passes the query. The data table then forwards the data packet to the destination SA; therefore, updating the routing table in time according to changes in the link becomes an important factor in improving the efficiency of data packet exchange.
- Dynamic routing means that the router automatically establishes a routing table, that is, a self-routing table, and can adjust it according to actual changes. Routing table.
- a routing table that is, a self-routing table
- Routing table In order to ensure that the cells can be correctly forwarded between the input port and the output port of the switching network, a unicast routing table and a full-purpose reachable link inside the switching network need to be constructed; wherein the unicast routing table is used for unicast cells. For route lookup use, the full-purpose reachable link uses all self-routing tables for the forwarding of multicast cells.
- the processing flow of the route management includes: the router according to The topology relationship of the link is updated in real time from the routing table.
- the routing table entries are copied to the unicast routing table and the reachable link is extracted. Therefore, when the networking environment of the switching network changes, the corresponding self The routing table entries also change.
- the embodiment of the present invention is to provide a route management method, device, and storage medium, which can reduce the packet loss rate of data packet forwarding in the switching network and improve the transmission efficiency of the data packet.
- the embodiment of the invention provides a route management method, including: confirming that the changed self-routing table is copied to the unicast routing table when the routing table stops changing.
- the method further includes: updating the self-routing table, and detecting an intermediate state corresponding to the entry of the self-routing table whose change is changed when the self-routing table before and after the update is changed.
- the indication signal is valid.
- the acknowledgment is changed from the routing table, and the self-routing table is determined to stop changing when the self-routing table does not change within a preset time, and the entry of the self-routing table is marked.
- the corresponding intermediate state indication signal is invalid.
- the obtaining the all-purpose reachable link includes: updating the self-routing table, traversing the updated self-routing table at a preset time interval, and performing the operation of obtaining the self-routing table entry obtained by the traversal to obtain the first a full-purpose reachable link and a second full-reachable link; when the first full-purpose reachable link is identical to the second full-purpose reachable link, the full-purpose reachable link to be stored is stored Updating to the first full-purpose reachable link or the second full-purpose reachable link.
- the embodiment of the invention further provides a route management device, the device comprising: a confirmation module, and a replication module; wherein
- the confirmation module is configured to confirm whether the self-routing table stops changing
- the replication module is configured to: when the confirmation module confirms that the self-routing table stops changing, copy the changed self-routing table to the unicast routing table.
- the device further includes: a first update module, a detection module, and a first marking module;
- the first update module is configured to update the self-routing table
- the detecting module is configured to detect whether a self-routing table before and after the update changes
- the first marking module is configured to: when the detecting module detects that the self-routing table changes, the intermediate state indication signal corresponding to the entry of the self-routing table marked as changed is valid.
- the confirmation module is configured to confirm that the self-routing table stops changing when the self-routing table does not change within a preset time
- the device further includes: a second marking module configured to: when the confirmation module confirms that the self-routing table stops changing, marking the intermediate state indication signal corresponding to the entry of the self-routing table as invalid.
- the device further includes: a first update module and an acquisition module; wherein
- the first update module is configured to update the self-routing table
- the obtaining module is configured to traverse the updated self-routing table at a preset time interval, and perform operations on the traversed self-routing table to obtain the first full-purpose reachable link and the second full-purpose reachable chain.
- the first full-purpose reachable link is the same as the second full-purpose reachable link
- the current full-purpose reachable link is updated to the first full-purpose reachable link or The second full-purpose reachable link.
- the embodiment of the invention further provides another route management method, including: at a preset time interval Traversing the self-routing table, and traversing the obtained entries of the self-routing table to obtain the first full-purpose reachable link and the second full-purpose reachable link;
- the stored full-purpose reachable link is updated to the first full-purpose reachable link or the first Two full-purpose reachable links.
- the embodiment of the present invention further provides another route management device, where the device includes: a traversal module, a comparison module, and a second update module;
- the traversal module is configured to traverse the self-routing table at a preset time interval, and perform operations on the traversed self-routing table to obtain a first full-purpose reachable link and a second full-purpose reachable link;
- the comparing module is configured to compare whether the first full-purpose reachable link and the second full-purpose reachable link are the same;
- the second update module is configured to: when the comparison module compares that the first full-purpose reachable link is the same as the second full-purpose reachable link, the stored full-purpose reachable link is updated.
- the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the foregoing route management method of the embodiment of the present invention.
- the route management method, device, and storage medium provided by the embodiment of the present invention confirm that the self-routing table is copied to the unicast routing table when the routing table stops changing within a preset time; thus, the switching network can be After the unicast cell is forwarded, the packet loss rate of the data packet forwarding in the switching network is reduced, and the data packet transmission efficiency is improved.
- the traversal of the self-routing table entry is performed by traversing the self-routing table at a preset time interval to obtain a first full-purpose reachable link and a second full-purpose reachable link;
- the destination reachable link and the second full destination reachable link At the same time, the stored full-purpose reachable link is updated to the first full-purpose reachable link or the second full-purpose reachable link; thus, the full-purpose reachable can be updated in time at a preset time interval.
- the link reduces the packet loss rate of packet forwarding in the switching network and improves the transmission efficiency of the data packet when the multicast cell forwards the data packet.
- FIG. 1 is a schematic structural diagram of a switching network in the prior art
- FIG. 2 is a schematic diagram of a process flow of route management in the prior art
- FIG. 3 is a schematic flowchart of a basic process of a route management method according to an embodiment of the present invention.
- FIG. 4 is a schematic flowchart of detailed processing of a route management method according to an embodiment of the present invention.
- FIG. 5 is a schematic flowchart of a detailed processing process of a route management method according to Embodiment 2 of the present invention.
- FIG. 6 is a schematic diagram of a basic processing flow of another route management method according to the present invention.
- FIG. 7 is a schematic flowchart of detailed processing of a route management method according to Embodiment 3 of the present invention.
- FIG. 8 is a schematic structural diagram of a route management apparatus according to an embodiment of the present invention.
- FIG. 9 is a schematic structural diagram of another route management apparatus according to an embodiment of the present invention.
- the basic processing flow of a route management method according to an embodiment of the present invention, as shown in FIG. 3, includes the following steps:
- Step 101 confirming that the change from the routing table is stopped
- an intermediate state indication signal is set, the intermediate state indication signal is stored in an intermediate state indication register in the router, the intermediate state indication register has a bit width equal to a sum of SAs in the switching network, and the intermediate state indication signal
- Each bit of the self-routing table corresponds to an entry of the self-routing table; when the content of the entry of the self-routing table changes, the intermediate state indication signal corresponding to the entry of the changed self-routing table also changes;
- the intermediate state indication signal corresponding to the entry of the self-routing table is invalid, and the intermediate state indication signal corresponding to the entry of the self-routing table is "0", that is, all the self-routing tables are
- the intermediate state indication signal corresponding to the entry is pulled low; the preset time may be flexibly set according to the route establishment time of the interaction network;
- the bit width of the intermediate state indication signal and the number of intermediate state counters may also be reduced; for example, the next SA or the next SA may be changed after the change of the topology relationship of one SA or SF ends.
- the intermediate state indication signal with a bit width of 1 bit and an intermediate state counter can be set.
- Step 102 Copy the changed self-routing table to a unicast routing table.
- the entries corresponding to the changed self-routing table may be copied to the unicast routing table, and the entries corresponding to the self-routing table in the unicast routing table are not copied.
- the method further includes:
- step 100 the self-routing table is updated, and when the self-routing table before and after the update is detected, the intermediate state indication signal corresponding to the entry of the self-routing table marked with the change is valid.
- the entry of the self-routing table is read, the bit corresponding to each entry is updated, and the updated entry is rewritten into the self-routing table; If the contents of the entries in the routing table are the same, if the contents of the entries are different, the current switching network changes, that is, the current link topology changes.
- the intermediate status indication corresponding to the entry in the self-routing table marked with the change If the signal is valid, the intermediate state indication signal corresponding to the entry of the self-routing table whose flag is changed is “1”, that is, the entry corresponding to the changed self-routing table is The inter-state indication signal is pulled high, and the count value of the intermediate state counter corresponding to the entry of the changed self-routing table is cleared, and the counter starts counting again; the intermediate state indication signal corresponding to the entry of the changed self-routing table When the value is raised, the entry from the routing table cannot be copied to the unicast routing table.
- the intermediate state indication signal corresponding to the entry in the self-routing table of the change of the label is valid, and the intermediate state indication signal corresponding to the entry of the self-routing table whose label changes is “1”.
- the intermediate state indication signal corresponding to the entry of the self-routing table of the change is pulled up, and the count value of the intermediate state counter corresponding to the entry of the changed self-routing table is cleared, and the self-routing table corresponding to the intermediate state indication signal is recorded.
- the address of the entry when the intermediate state indication signal is pulled high, the entry of the self-routing table of other addresses needs to be updated, and the table of the self-routing table of other addresses can be updated according to the preset setting. Or not updating the entries of the self-routing table of other addresses; if the address table entry corresponding to the intermediate state indication signal needs to be updated, the self-routing table is updated, and when the middle of the indication signal is valid, the corresponding address entry is not need to be updated.
- the unicast routing table and the self-routing table can share one table, and when the routing table is updated, the table of the routing table is read. Item, the bit corresponding to the entry of the routing table is updated, and the updated entry of the self-routing table is written into the self-routing table; if the contents of the self-routing table before and after the update are the same, if they are different, The entry of the self-routing table before the update may be stored in the intermediate state register, the intermediate state indication signal is pulled up, and the address of the changed self-routing table entry is recorded; when the forwarding data packet needs to be queried from the routing table, the query is first determined. Whether the address of the entry is the same as the address of the changed entry, if the same, the entry stored in the intermediate register is output as a query result; if not, the updated self-routing table is queried, and the query result is output.
- the detailed processing flow of the route management method in the embodiment of the present invention, as shown in FIG. 4, includes the following steps:
- Step 201 updating the self-routing table
- the entry of the self-routing table is read, the bit corresponding to each entry is updated, and the updated entry is rewritten into the self-routing table.
- Step 202 When it is detected that the self-routing table before and after the update changes, the intermediate state indication signal corresponding to the entry of the self-routing table marked with the change is valid;
- the contents of the self-routing table before and after the update are the same. If the contents of the entry are different, the current switching network changes, that is, the current link topology changes. If the intermediate state indication signal corresponding to the entry is valid, the intermediate state indication signal corresponding to the entry of the self-routing table of the change of the tag is "1", that is, the intermediate state indication corresponding to the entry of the changed self-routing table The signal is pulled high, and the count value of the intermediate state counter corresponding to the entry of the changed self-routing table is cleared, and the counter starts counting again; when the intermediate state indication signal corresponding to the entry of the changed self-routing table is pulled high You cannot copy an entry from the routing table to a unicast routing table.
- the intermediate state indication signal corresponding to the entry in the self-routing table of the change of the label is valid, and the intermediate state indication signal corresponding to the entry of the self-routing table whose label changes is “1”.
- the intermediate state indication signal corresponding to the entry of the self-routing table of the change is pulled up, and the count value of the intermediate state counter corresponding to the entry of the changed self-routing table is cleared, and the self-routing table corresponding to the intermediate state indication signal is recorded.
- the entries of the self-routing table of other addresses may be updated according to the preset settings or the entries of the self-routing table of other addresses are not updated; If the address entry corresponding to the status indication signal needs to be updated, the self-routing table is updated;
- the unicast routing table and the self-routing table can share one table, and when the routing table is updated, the table of the routing table is read. Item, the bit corresponding to the entry of the routing table is updated, and the updated entry of the self-routing table is written into the self-routing table; if the contents of the self-routing table before and after the update are the same, if they are different, The entry of the self-routing table before the update may be stored in the intermediate state register, the intermediate state indication signal is pulled up, and the address of the changed self-routing table entry is recorded; when the forwarding data packet needs to be queried from the routing table, the query is first determined. Whether the address of the entry is the same as the address of the changed entry, if the same, the entry stored in the intermediate register is output as a query result; if not, the updated self-routing table is queried, and the query result is output.
- Step 203 confirming that the change from the routing table is stopped
- the intermediate state counter corresponding to the changed SA or SF is cleared, and the count value of the intermediate state counter is incremented by one in each clock cycle.
- the counter value reaches the preset threshold, that is, the preset time is reached, the content of the self-routing table does not change, and the self-routing table stops changing, and the entry of the self-routing table is marked.
- the intermediate state indication signal is invalid;
- the intermediate state indication signal corresponding to the entry of the self-routing table is invalid, and the intermediate state indication signal corresponding to the entry of the self-routing table is "0", that is, all the self-routing tables are
- the intermediate state indication signal corresponding to the entry is pulled low; the preset time may be flexibly set according to the route establishment time of the interaction network.
- Step 204 Copy the changed self-routing table to the unicast routing table.
- the entries corresponding to the changed self-routing table may be copied to the unicast routing table, and the entries corresponding to the self-routing table in the unicast routing table are not copied.
- Step 205 Traverse the self-routing table three times to obtain a full-purpose reachable link.
- the router traverses the updated self-routing table at a preset time interval, and performs an operation of traversing the obtained self-routing table entry to obtain a first full-purpose reachable link and a second full-purpose reachable link;
- the first full-purpose reachable link is the same as the second full-purpose reachable link
- the stored all-purpose reachable link is updated to the first full-purpose reachable link or the second Full-purpose reachable link;
- the traversal interval counter is set, that is, when the value of the traversal interval counter reaches a certain threshold, the entry of the self-routing table is traversed once; the threshold is greater than the time when the router completely establishes the self-routing;
- the operation is performed by performing the AND operation on all the entries of the self-routing table obtained by traversing, and does not participate in the operation when the entries of the routing table are all zero.
- Update set B or C to the current full-purpose reachable link, and store it to the first traversal register; when the comparison result is different, A is still the current full-purpose reachable link; store C to the second traversal register And deleting B in the second traversal register; when performing the third traversal of the self-routing table, storing the third full-purpose reachable link D obtained by the third traversal to the second traversal register, and comparing with C According to the comparison result, the current full-purpose reachable link is set; specifically, the pseudo code for obtaining the full-purpose reachable link is as follows:
- steps 202 to 204 and the step 205 are in a parallel relationship, and there is no sequence that must be executed, and may be performed simultaneously or first. Steps 202 to 204 are performed, and step 205 is performed; or step 205 is performed first, and then steps 202 to 204 are performed.
- the detailed processing flow of the route management method in the second embodiment of the present invention, as shown in FIG. 5, includes the following steps:
- Step 301 updating the self-routing table
- the entry of the self-routing table is read, the bit corresponding to each entry is updated, and the updated entry is rewritten into the self-routing table.
- Step 302 When it is detected that the self-routing table changes before and after the update, the intermediate state indication signal corresponding to the entry of the self-routing table marked with the change is valid.
- the contents of the self-routing table before and after the update are the same. If the contents of the entry are different, the current switching network changes, that is, the current link topology changes. If the intermediate state indication signal corresponding to the entry is valid, the intermediate state indication signal corresponding to the entry of the self-routing table of the change of the tag is "1", that is, the intermediate state indication corresponding to the entry of the changed self-routing table The signal is pulled high, and the count value of the intermediate state counter corresponding to the entry of the changed self-routing table is cleared, and the counter starts counting again; when the intermediate state indication signal corresponding to the entry of the changed self-routing table is pulled high You cannot copy an entry from the routing table to a unicast routing table.
- the intermediate state indication signal corresponding to the entry in the self-routing table of the change of the label is valid, and the intermediate state indication signal corresponding to the entry of the self-routing table whose label changes is “1”.
- the corresponding entry in the self-routing table of the change The inter-state indication signal is pulled high, and the count value of the intermediate state counter corresponding to the entry of the changed self-routing table is cleared, and the address of the entry of the self-routing table corresponding to the intermediate state indication signal is recorded; If the entry of the self-routing table of other addresses needs to be updated, the entries of the self-routing table of other addresses may be updated according to the preset settings or the entries of the self-routing table of other addresses are not updated; if the intermediate state indication signal is recorded If the corresponding address entry needs to be updated, the self-routing table is updated.
- the unicast routing table and the self-routing table can share one table, and when the routing table is updated, the table of the routing table is read. Item, the bit corresponding to the entry of the routing table is updated, and the updated entry of the self-routing table is written into the self-routing table; if the contents of the self-routing table before and after the update are the same, if they are different, The entry of the self-routing table before the update may be stored in the intermediate state register, the intermediate state indication signal is pulled up, and the address of the changed self-routing table entry is recorded; when the forwarding data packet needs to be queried from the routing table, the query is first determined. Whether the address of the entry is the same as the address of the changed entry, if the same, the entry stored in the intermediate register is output as a query result; if not, the updated self-routing table is queried, and the query result is output.
- Step 303 confirming that the change from the routing table is stopped
- the intermediate state counter corresponding to the changed SA or SF is cleared, and the count value of the intermediate state counter is incremented by one in each clock cycle.
- the counter value reaches the preset threshold, that is, the preset time is reached, the content of the self-routing table does not change, and the self-routing table stops changing, and the entry of the self-routing table is marked.
- the intermediate state indication signal is invalid;
- the intermediate state indication signal corresponding to the entry of the self-routing table is invalid, and the intermediate state indication signal corresponding to the entry of the self-routing table is "0", that is, all the self-routing tables are
- the intermediate state indication signal corresponding to the entry is pulled low; the preset time may be flexibly set according to the route establishment time of the interaction network.
- Step 304 Copy the changed self-routing table to the unicast routing table.
- the entries corresponding to the changed self-routing table may be copied to the unicast routing table, and the entries corresponding to the self-routing table in the unicast routing table are not copied.
- Step 305 traversing a self-routing table to obtain a full-purpose reachable link
- the router traverses an updated self-routing table to obtain a full-purpose reachable link.
- the basic processing flow of another route management method in the embodiment of the present invention, as shown in FIG. 6, includes the following steps:
- step 401 the self-routing table is traversed at a preset time interval, and the entries of the self-routing table obtained by the traversal are calculated to obtain the first full-purpose reachable link and the second full-purpose reachable link.
- the router updates the self-routing table, traverses the updated self-routing table at a preset time interval, and performs the operation of traversing the obtained self-routing table entry to obtain the first full-purpose reachable link and the second full-purpose Uplink
- the traversal interval counter is set, that is, when the value of the traversal interval counter reaches a certain threshold, the entry of the self-routing table is traversed once; the threshold is greater than the time when the router completely establishes the self-routing;
- the operation is performed by performing the AND operation on all the entries of the self-routing table obtained by traversing, and does not participate in the operation when the entries of the routing table are all zero.
- Step 402 When the first full-purpose reachable link is the same as the second full-purpose reachable link, the stored full-purpose reachable link is updated to the first full-purpose reachable link or The second full-purpose reachable link;
- three traversal registers are set to store the current full-purpose reachable link A to the first traversal register, and the first full-purpose reachable link B obtained by traversing the self-routing table for the first time is stored to the second traversal.
- the register stores the second full-purpose reachable link C obtained from the routing table for a second time to the third traversal register; compares whether the B and the C are the same, and when the comparison result is the same, the self-routing table is updated. If the update is not started, set B or C to the current full-purpose reachable link and store it in the first traversal register.
- A is still the current full-purpose reachable link; after completing the above judgment , store C to the second traversal register, and in the second The traversal register deletes B; when performing the third traversal of the self-routing table, the third full-purpose reachable link D obtained by the third traversal is stored in the second traversal register, and compared with C, and is set according to the comparison result.
- the current full-purpose reachable link specifically, the pseudo code for obtaining the full-purpose reachable link is as follows:
- the detailed processing flow of the route management method in the third embodiment of the present invention, as shown in FIG. 7, includes the following steps:
- Step 501 updating the self-routing table
- the entry of the self-routing table is read, the bit corresponding to each entry is updated, and the updated entry is rewritten into the self-routing table.
- Step 502 Traverse the self-routing table three times to obtain a full-purpose reachable link.
- the router traverses the updated self-routing table at a preset time interval, and performs an operation of traversing the obtained self-routing table entry to obtain a first full-purpose reachable link and a second full-purpose reachable link;
- the first full-purpose reachable link is the same as the second full-purpose reachable link
- the stored all-purpose reachable link is updated to the first full-purpose reachable link or the second Full-purpose reachable link;
- the traversal interval counter is set, that is, when the value of the traversal interval counter reaches a certain threshold, the entry of the self-routing table is traversed once; the threshold is greater than the time when the router completely establishes the self-routing;
- the operation is performed by performing the AND operation on all the entries of the self-routing table obtained by traversing, and does not participate in the operation when the entries of the routing table are all zero.
- the three traversal registers are set to store the current full-purpose reachable link A to the first traversal register, and the first full-purpose reachable link B obtained by traversing the self-routing table for the first time is stored to the second pass.
- the calendar register stores the second full-purpose reachable link C obtained from the routing table for the second time to the third traversal register; compares whether the B and the C are the same, and when the comparison result is the same, the self-routing table is updated. If the update is completed or not, set B or C to the current full-purpose reachable link and store it in the first traversal register. When the comparison result is different, A is still the current full-purpose reachable link; complete the above judgment.
- Step 503 Copy the updated entry of the self-routing table to the unicast routing table.
- step 502 and the step 503 are in a parallel relationship, and there is no sequence that must be executed, and may be performed simultaneously, or step 502 may be performed first, and then step 503 may be performed; In step 503, step 502 is performed.
- an embodiment of the present invention provides a route management apparatus, and the composition of the apparatus, as shown in FIG. 8, includes: a confirmation module 10 and a replication module 20;
- the confirmation module 10 is configured to confirm whether the self-routing table stops changing
- the replication module 20 is configured to: when the confirmation module confirms that the self-routing table stops changing, copy the changed self-routing table to the unicast routing table.
- the device further includes: a first update module 30, a detection module 40, and a first marking module 50;
- the first update module 30 is configured to update the self-routing table
- the detecting module 40 is configured to detect whether a self-routing table before and after the update changes
- the first marking module 50 is configured to: when the detecting module detects that the self-routing table changes, the intermediate state indication signal corresponding to the entry of the self-routing table whose label changes is valid.
- the confirmation module 10 is configured to confirm that the self-routing table stops changing when the self-routing table does not change within a preset time
- the device further includes: a second marking module 60 configured to: when the confirmation module confirms that the self-routing table stops changing, marking the intermediate state indication signal corresponding to the entry of the self-routing table as invalid.
- the device further includes: a first update module 30 and an acquisition module 70; wherein
- the first update module 30 is configured to update the self-routing table
- the obtaining module 70 is configured to traverse the updated self-routing table at a preset time interval, and perform operations on the traversed self-routing table to obtain the first full-purpose reachable link and the second full-purpose reachable a link; when the first full-purpose reachable link is the same as the second full-purpose reachable link, the current full-purpose reachable link is updated to the first full-purpose reachable link or The second full-purpose reachable link.
- an intermediate state indication signal is set, and the intermediate state indication signal is stored in an intermediate state indication register in the router, and the bit width of the intermediate state indication register is equal to the number of SAs in the switching network, where the middle
- Each bit of the state indication signal corresponds to an entry of the self-routing table; when the content of the entry of the self-routing table changes, the intermediate state indication signal corresponding to the entry of the changed self-routing table also occurs.
- the intermediate state indication signal corresponding to the entry of the self-routing table is invalid, and the intermediate state indication signal corresponding to the entry of the self-routing table is "0", that is, all the self-routing tables are
- the intermediate state indication signal corresponding to the entry is pulled low; the preset time may be flexibly set according to the route establishment time of the interaction network;
- the bit width of the intermediate state indication signal and the number of intermediate state counters may also be reduced; for example, the next SA or the next SA may be changed after the change of the topology relationship of one SA or SF ends.
- the intermediate state indication signal with a bit width of 1 bit and an intermediate state counter can be set.
- the replication module 20 can only copy the entries corresponding to the changed self-routing table to the unicast routing table, and the entries corresponding to the self-routing table in the unicast routing table are not copied. .
- the functions performed by the first marking module 50 and the second marking module 50 may be implemented by the same module or by different modules.
- the embodiment of the present invention provides another route management apparatus.
- the composition of the apparatus includes: a traversal module 11, a comparison module 21, and a second update module 31; ,
- the traversing module 11 is configured to traverse the self-routing table at a preset time interval, and perform operations on the traversed self-routing table to obtain the first full-purpose reachable link and the second full-purpose reachable link. ;
- the comparison module 21 is configured to compare whether the first full-purpose reachable link and the second full-purpose reachable link are the same;
- the second update module 31 is configured to: when the comparison module compares that the first full-purpose reachable link is the same as the second full-purpose reachable link, the stored full-purpose reachable link Updating to the first full-purpose reachable link or the second full-purpose reachable link.
- the updated self-routing table is traversed at a preset time interval, and the entries of the self-routing table obtained by the traversal are calculated to obtain the first full-purpose reachable link and the second full-purpose reachable link.
- the first full-purpose reachable link is the same as the second full-purpose reachable link
- the stored full-purpose reachable link is updated to the first full-purpose reachable link or the The second full-purpose reachable link;
- the traversal interval counter is set, that is, when the value of the traversal interval counter reaches a certain threshold, the entry of the self-routing table is traversed once; the threshold is greater than the time when the router completely establishes the self-routing;
- the operation is performed by performing the AND operation on all the entries of the self-routing table obtained by traversing, and does not participate in the operation when the entries of the routing table are all zero.
- Update set B or C to the current full-purpose reachable link, and store it to the first traversal register; when the comparison result is different, A is still the current full-purpose reachable link; after completing the above judgment, C Store to the second traversal register and delete B in the second traversal register; store the third full-purpose reachable link D obtained by the third traversal to the second traversal register when performing the third traversal of the self-routing table And compare with C, set the current full-purpose reachable link according to the comparison result; specifically, obtain the pseudo code of the full-purpose reachable link as follows:
- Both the comparison module 21 and the second update module 31 can be implemented by a processor, and of course, can also be implemented by a specific logic circuit; wherein the processor can be a processor on a router, and in practical applications, the processor can be central Processor (CPU), microprocessor (MPU), digital signal processor (DSP) or field programmable gate array (FPGA).
- CPU central Processor
- MPU microprocessor
- DSP digital signal processor
- FPGA field programmable gate array
- the foregoing route management method is implemented in the form of a software function module, And when sold or used as a stand-alone product, it can also be stored on a computer readable storage medium.
- the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
- a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
- the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
- program codes such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
- the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores a computer program, and the computer program is used to execute the foregoing route management method of the embodiment of the present invention.
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明实施例公开了一种路由管理方法,包括:确认自路由表停止变化时,将变化后的自路由表复制到单播路由表;本发明实施例还公开了另一种路由管理方法、两种路由管理装置及计算机存储介质。
Description
本发明涉及无线通信技术领域,尤其涉及一种路由管理方法、装置及存储介质。
大规模分布式的交换网络是目前大容量高端路由器的核心技术之一,随着网络交换容量需求的增大,产生了多级互联的交换网络,以实现太比特以上容量的网络交换;多级互联的交换网络主要由交换接入(Swich Access,SA)芯片和交换芯片(Swich Fabric,SF)组成。
现有技术中交换网络的组成结构示意图,如图1所示,SA芯片与SF芯片通过多条高速串行总线连接形成链路,所述串行总线可以为Serdes;当数据包从一个源SA经由SF转发至一个目的SA时,通过多条物理连接的链路进行传送;源SA在发送之前数据包需要查询路由表,根据查询的有效链路将数据包发送至SF;同时,SF通过查询数据表再将数据包转发至目的SA;因此,根据链路的变化及时更新路由表成为提高数据包交换效率的一个重要因素。
由于交换网络的链路连接关系可能发生变化,因此,需要采用动态路由的方式管理交换网络;动态路由是指路由器自动地建立路由表,即自路由表,并且能够根据实际情况的变化适时地调整路由表。为了保证信元能够在交换网的输入端口和输出端口之间正确转发,需要构建交换网内部的单播路由表和全目的可达链路;其中,单播路由表用于供单播信元进行路由查找使用,全目的可达链路是将全部自路由表用于多播信元的转发。
现有技术中,路由管理的处理流程,如图2所示,包括:路由器根据
链路的拓扑关系变化实时更新自路由表,将自路由表表项复制到单播路由表,并提取全目的可达链路;因此,在交换网络的组网环境发生变化时,相应的自路由表表项也会发生变化。
当某个SA被插拔后,可用链路数会逐渐增加或减少,其它SA检测到拓扑关系的变化也需要一定的时间;在更新自路由表后,交换网络的组网环境又发生变化时,单播路由表和全目的可达链路并未发生变化,当任意一个SA向被拔掉的SA发送数据包时,由于可用链路的减少,数据包会在SA交接的接口堆积或丢失,从而给前级SA反压,引起发送至其它SA的数据包被堵塞。
发明内容
有鉴于此,本发明实施例期望提供一种路由管理方法、装置及存储介质,能够降低交换网络中数据包转发的丢包率,提高数据包的发送效率。
本发明实施例的技术方案是这样实现的:
本发明实施例提供一种路由管理方法,包括:确认自路由表停止变化时,将变化后的自路由表复制到单播路由表。
上述方案中,所述确认自路由表停止变化之前,所述方法还包括:更新自路由表,检测到更新前后的自路由表发生变化时,标记变化的自路由表的表项对应的中间态指示信号为有效。
上述方案中,所述确认自路由表停止变化,包括:所述自路由表在预设的时间内不再变化时,确认所述自路由表停止变化,并标记所述自路由表的表项对应的中间态指示信号为无效。
上述方案中,所述获取全目的可达链路,包括:更新自路由表,在预设的时间间隔遍历更新的自路由表,将遍历得到的自路由表的表项进行运算,得到第一全目的可达链路和第二全目的可达链路;确认所述第一全目的可达链路与所述第二全目的可达链路相同时,将存储的全目的可达链路
更新为所述第一全目的可达链路或所述第二全目的可达链路。
本发明实施例还提供一种路由管理装置,所述装置包括:确认模块、和复制模块;其中,
所述确认模块,配置为确认自路由表是否停止变化;
所述复制模块,配置为在所述确认模块确认所述自路由表停止变化时,将变化后的自路由表复制到单播路由表。
上述方案中,所述装置还包括:第一更新模块、检测模块、和第一标记模块;其中,
所述第一更新模块,配置为更新自路由表;
所述检测模块,配置为检测更新前后的自路由表是否发生变化;
所述第一标记模块,配置为在检测模块检测到自路由表发生变化时,标记变化的自路由表的表项对应的中间态指示信号为有效。
上述方案中,所述确认模块,具体配置为所述自路由表在预设的时间内不再变化时,确认所述自路由表停止变化;
相应的,所述装置还包括:第二标记模块,配置为在所述确认模块确认所述自路由表停止变化时,标记所述自路由表的表项对应的中间态指示信号为无效。
上述方案中,所述装置还包括:第一更新模块和获取模块;其中,
所述第一更新模块,配置为更新自路由表;
所述获取模块,配置为在预设的时间间隔遍历更新的自路由表,将遍历得到的自路由表的表项进行运算,得到第一全目的可达链路和第二全目的可达链路;确认所述第一全目的可达链路与所述第二全目的可达链路相同时,将当前的全目的可达链路更新为所述第一全目的可达链路或所述第二全目的可达链路。
本发明实施例还提供另一种路由管理方法,包括:在预设的时间间隔
遍历自路由表,将遍历得到的自路由表的表项进行运算,得到第一全目的可达链路和第二全目的可达链路;
确认所述第一全目的可达链路与所述第二全目的可达链路相同时,将存储的全目的可达链路更新为所述第一全目的可达链路或所述第二全目的可达链路。
本发明实施例还提供另一种路由管理装置,所述装置包括:遍历模块、比较模块、和第二更新模块;其中,
所述遍历模块,配置为在预设的时间间隔遍历自路由表,将遍历得到的自路由表的表项进行运算,得到第一全目的可达链路和第二全目的可达链路;
所述比较模块,配置为比较所述第一全目的可达链路与所述第二全目的可达链路是否相同;
所述第二更新模块,配置为在所述比较模块比较得到所述第一全目的可达链路与所述第二全目的可达链路相同时,将存储的全目的可达链路更新为所述第一全目的可达链路或所述第二全目的可达链路。
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行本发明实施例的上述路由管理方法。
本发明实施例所提供的路由管理方法、装置及存储介质,确认自路由表在预设的时间内停止变化时,将变化后的自路由表复制到单播路由表;如此,能在交换网络稳定后,将稳定的交换网络对应的自路由表复制到单播路由表,在单播信元转发数据包时,降低交换网络中数据包转发的丢包率,提高数据包的发送效率。通过在预设的时间间隔遍历自路由表,将遍历得到的自路由表的表项进行运算,得到第一全目的可达链路和第二全目的可达链路;确认所述第一全目的可达链路与所述第二全目的可达链路相
同时,将存储的全目的可达链路更新为所述第一全目的可达链路或所述第二全目的可达链路;如此,可在预设的时间间隔及时更新全目的可达链路,在多播信元转发数据包时,降低交换网络中数据包转发的丢包率,提高数据包的发送效率。
图1为现有技术中交换网络的组成结构示意图;
图2为现有技术中路由管理的处理流程示意图;
图3为本发明实施例一种路由管理方法的基本处理流程示意图;
图4为本发明实施例一路由管理方法的详细处理流程示意图;
图5为本发明实施例二路由管理方法的详细处理流程示意图;
图6为本发明另一种路由管理方法的基本处理流程示意图;
图7为本发明实施例三路由管理方法的详细处理流程示意图;
图8为本发明实施例一种路由管理装置的组成结构示意图;
图9为本发明实施例另一种路由管理装置的组成结构示意图。
本发明实施例一种路由管理方法的基本处理流程,如图3所示,包括以下步骤:
步骤101,确认自路由表停止变化;
具体地,设置中间态指示信号,所述中间态指示信号存储于路由器内的中间态指示寄存器内,所述中间态指示寄存器的位宽等于交换网络内的SA之和,所述中间态指示信号的每个比特位与所述自路由表的一个表项对应;在所述自路由表的表项内容发生变化时,变化的自路由表的表项对应的中间态指示信号也发生变化;
设置多个中间态计数器,分别于交换网络中的SA一一对应,在交换网
络中的任意一个SA或SF发生变化时,将发生变化的SA或SF对应的中间态计数器清零,并且在每个时钟周期内,该中间态计数器的计数值加1,在所述计数器值达到预设的阈值,即达到预设的时间,自路由表的表项内容不再发生变化,确认所述自路由表停止变化,并标记所述自路由表的表项对应的中间态指示信号为无效;
其中,标记所述自路由表的表项对应的中间态指示信号为无效可以指,标记所述自路由表的表项对应的中间态指示信号为“0”,即将所述自路由表的全部表项对应的中间态指示信号拉低;所述预设的时间可根据交互网络的路由建立时间灵活设定;
这里,也可以根据实际的交换网络需求,减少中间态指示信号的位宽及中间态计数器的数量;如每次都是在一个SA或SF的拓扑关系变更结束后,才会更改下一个SA或SF的拓扑关系,则可以只设置位宽为1比特的中间态指示信号及一个中间态计数器。
步骤102,将变化后的自路由表复制到单播路由表;
具体地,可以只将变化的自路由表对应的表项复制到单播路由表,单播路由表中未发生变化的自路由表对应的表项不做复制。
在执行步骤101之前,所述方法还包括:
步骤100,更新自路由表,检测到更新前后的自路由表发生变化时,标记变化的自路由表的表项对应的中间态指示信号为有效;
具体地,更新自路由表时,读取自路由表的表项,将每个表项对应的比特位进行更新,并将更新后的表项重新写入自路由表中;对比更新前后的自路由表的表项内容是否相同,若表项内容不同,说明当前的交换网络发生变化,即当前的链路拓扑结构发生变化;此时,标记变化的自路由表的表项对应的中间态指示信号为有效可以指,标记变化的自路由表的表项对应的中间态指示信号为“1”,即将所述变化的自路由表的表项对应的中
间态指示信号拉高,并将变化的自路由表的表项对应的中间态计数器的计数值清零,计数器重新开始计数;在所述变化的自路由表的表项对应的中间态指示信号拉高时,不能将自路由表的表项复制为单播路由表;
这里,在只设置位宽为1比特的中间态指示信号及一个中间态计数器的情况下,更新自路由表时,读取自路由表的表项,将每个表项对应的比特位进行更新,并将更新后的表项重新写入自路由表中;对比更新前后的自路由表的表项内容是否相同,若表项内容有变化,说明当前的交换网络发生变化,即当前的链路拓扑结构发生变化;此时,标记变化的自路由表的表项对应的中间态指示信号为有效可以指,标记变化的自路由表的表项对应的中间态指示信号为“1”,即将所述变化的自路由表的表项对应的中间态指示信号拉高,并将变化的自路由表的表项对应的中间态计数器的计数值清零,记录中间态指示信号对应的自路由表的表项的地址;在中间态指示信号拉高时,其他地址的自路由表的表项需要更新时,可根据预先的设置更新其他地址的自路由表的表项或不更新其他地址的自路由表的表项;如果记录中间态指示信号对应的地址表项需要更新,则更新自路由表,在中间爱你太指示信号为有效时,对应的地址表项不需要更新。
同时,在只设置位宽为1比特的中间态指示信号及一个中间态计数器的情况下,单播路由表与自路由表可以共用一张表,在更新路由表时,读取路由表的表项,将路由表的表项对应的比特位进行更新,并将更新后的自路由表的表项写入自路由表;对比更新前后的自路由表的表项内容是否相同,不相同时,可以将更新前的自路由表的表项存储至中间态寄存器,将中间态指示信号拉高,记录变更的自路由表的表项的地址;转发数据包需要查询自路由表时,先判断查询的表项地址与变更的表项地址是否相同,若相同,则将中间态寄存器存储的表项作为查询结果输出;若不同,则查询更新后的自路由表,将查询结果输出。
方法实施例一
本发明实施例一路由管理方法的详细处理流程,如图4所示,包括以下步骤:
步骤201,更新自路由表;
具体地,更新自路由表时,读取自路由表的表项,将每个表项对应的比特位进行更新,并将更新后的表项重新写入自路由表中。
步骤202,检测到更新前后的自路由表发生变化时,标记变化的自路由表的表项对应的中间态指示信号为有效;
具体地,对比更新前后的自路由表的表项内容是否相同,若表项内容不同,说明当前的交换网络发生变化,即当前的链路拓扑结构发生变化;此时,标记变化的自路由表的表项对应的中间态指示信号为有效可以指,标记变化的自路由表的表项对应的中间态指示信号为“1”,即将所述变化的自路由表的表项对应的中间态指示信号拉高,并将变化的自路由表的表项对应的中间态计数器的计数值清零,计数器重新开始计数;在所述变化的自路由表的表项对应的中间态指示信号拉高时,不能将自路由表的表项复制为单播路由表;
这里,在只设置位宽为1比特的中间态指示信号及一个中间态计数器的情况下,更新自路由表时,读取自路由表的表项,将每个表项对应的比特位进行更新,并将更新后的表项重新写入自路由表中;对比更新前后的自路由表的表项内容是否相同,若表项内容有变化,说明当前的交换网络发生变化,即当前的链路拓扑结构发生变化;此时,标记变化的自路由表的表项对应的中间态指示信号为有效可以指,标记变化的自路由表的表项对应的中间态指示信号为“1”,即将所述变化的自路由表的表项对应的中间态指示信号拉高,并将变化的自路由表的表项对应的中间态计数器的计数值清零,记录中间态指示信号对应的自路由表的表项的地址;在中间态
指示信号拉高时,其他地址的自路由表的表项需要更新时,可根据预先的设置更新其他地址的自路由表的表项或不更新其他地址的自路由表的表项;如果记录中间态指示信号对应的地址表项需要更新,则更新自路由表;
同时,在只设置位宽为1比特的中间态指示信号及一个中间态计数器的情况下,单播路由表与自路由表可以共用一张表,在更新路由表时,读取路由表的表项,将路由表的表项对应的比特位进行更新,并将更新后的自路由表的表项写入自路由表;对比更新前后的自路由表的表项内容是否相同,不相同时,可以将更新前的自路由表的表项存储至中间态寄存器,将中间态指示信号拉高,记录变更的自路由表的表项的地址;转发数据包需要查询自路由表时,先判断查询的表项地址与变更的表项地址是否相同,若相同,则将中间态寄存器存储的表项作为查询结果输出;若不同,则查询更新后的自路由表,将查询结果输出。
步骤203,确认自路由表停止变化;
具体地,在交换网络中的任意一个SA或SF发生变化时,将发生变化的SA或SF对应的中间态计数器清零,并且在每个时钟周期内,该中间态计数器的计数值加1,在所述计数器值达到预设的阈值,即达到预设的时间,自路由表的表项内容不再发生变化,确认所述自路由表停止变化,并标记所述自路由表的表项对应的中间态指示信号为无效;
其中,标记所述自路由表的表项对应的中间态指示信号为无效可以指,标记所述自路由表的表项对应的中间态指示信号为“0”,即将所述自路由表的全部表项对应的中间态指示信号拉低;所述预设的时间可根据交互网络的路由建立时间灵活设定。
步骤204,将变化后的自路由表复制到单播路由表;
具体地,可以只将变化的自路由表对应的表项复制到单播路由表,单播路由表中未发生变化的自路由表对应的表项不做复制。
步骤205,遍历三次自路由表,获取全目的可达链路;
具体地,路由器在预设的时间间隔遍历更新的自路由表,将遍历得到的自路由表的表项进行运算,得到第一全目的可达链路和第二全目的可达链路;确认所述第一全目的可达链路与所述第二全目的可达链路相同时,将存储的全目的可达链路更新为所述第一全目的可达链路或所述第二全目的可达链路;
这里,设置遍历间隔计数器,即在遍历间隔计数器的值达到一定阈值时,遍历一次自路由表的表项;所述阈值大于路由器完全建立自路由的时间;将遍历得到的自路由表的表项进行运算是指将遍历得到的自路由表的全部表项按位进行与运算,自路由表的表项全为零时不参与运算。
设置三个遍历寄存器,将当前的全目的可达链路A存储至第一遍历寄存器,将第一次遍历自路由表得到的第一全目的可达链路B存储至第二遍历寄存器,将第二次遍历自路由表得到的第二全目的可达链路C存储至第三遍历寄存器;比较所述B与C是否相同,在比较结果为相同时,说明自路由表更新完成或未开始更新,则设置B或C为当前全目的可达链路,并存储至第一遍历寄存器;在比较结果为不同时,A仍为当前全目的可达链路;将C存储至第二遍历寄存器,并在第二遍历寄存器中删除B;在进行第三次遍历自路由表时,将第三次遍历得到的第三全目的可达链路D存储至第二遍历寄存器,并与C进行比较,根据比较结果设置当前的全目的可达链路;具体的,获取全目的可达链路的伪代码如下:
If(B==C)
A<=B;
else
A<=A。
需要说明的是,本发明实施例中,步骤202至步骤204,与步骤205之间属于并列关系,不存在必须执行的先后顺序,可以同时进行,也可以先
执行步骤202至步骤204,再执行步骤205;或者先执行步骤205,再执行步骤202至步骤204。
方法实施例二
本发明实施例二路由管理方法的详细处理流程,如图5所示,包括以下步骤:
步骤301,更新自路由表;
具体地,更新自路由表时,读取自路由表的表项,将每个表项对应的比特位进行更新,并将更新后的表项重新写入自路由表中。
步骤302,检测到更新前后的自路由表发生变化时,标记变化的自路由表的表项对应的中间态指示信号为有效;
具体地,对比更新前后的自路由表的表项内容是否相同,若表项内容不同,说明当前的交换网络发生变化,即当前的链路拓扑结构发生变化;此时,标记变化的自路由表的表项对应的中间态指示信号为有效可以指,标记变化的自路由表的表项对应的中间态指示信号为“1”,即将所述变化的自路由表的表项对应的中间态指示信号拉高,并将变化的自路由表的表项对应的中间态计数器的计数值清零,计数器重新开始计数;在所述变化的自路由表的表项对应的中间态指示信号拉高时,不能将自路由表的表项复制为单播路由表;
这里,在只设置位宽为1比特的中间态指示信号及一个中间态计数器的情况下,更新自路由表时,读取自路由表的表项,将每个表项对应的比特位进行更新,并将更新后的表项重新写入自路由表中;对比更新前后的自路由表的表项内容是否相同,若表项内容有变化,说明当前的交换网络发生变化,即当前的链路拓扑结构发生变化;此时,标记变化的自路由表的表项对应的中间态指示信号为有效可以指,标记变化的自路由表的表项对应的中间态指示信号为“1”,即将所述变化的自路由表的表项对应的中
间态指示信号拉高,并将变化的自路由表的表项对应的中间态计数器的计数值清零,记录中间态指示信号对应的自路由表的表项的地址;在中间态指示信号拉高时,其他地址的自路由表的表项需要更新时,可根据预先的设置更新其他地址的自路由表的表项或不更新其他地址的自路由表的表项;如果记录中间态指示信号对应的地址表项需要更新,则更新自路由表;
同时,在只设置位宽为1比特的中间态指示信号及一个中间态计数器的情况下,单播路由表与自路由表可以共用一张表,在更新路由表时,读取路由表的表项,将路由表的表项对应的比特位进行更新,并将更新后的自路由表的表项写入自路由表;对比更新前后的自路由表的表项内容是否相同,不相同时,可以将更新前的自路由表的表项存储至中间态寄存器,将中间态指示信号拉高,记录变更的自路由表的表项的地址;转发数据包需要查询自路由表时,先判断查询的表项地址与变更的表项地址是否相同,若相同,则将中间态寄存器存储的表项作为查询结果输出;若不同,则查询更新后的自路由表,将查询结果输出。
步骤303,确认自路由表停止变化;
具体地,在交换网络中的任意一个SA或SF发生变化时,将发生变化的SA或SF对应的中间态计数器清零,并且在每个时钟周期内,该中间态计数器的计数值加1,在所述计数器值达到预设的阈值,即达到预设的时间,自路由表的表项内容不再发生变化,确认所述自路由表停止变化,并标记所述自路由表的表项对应的中间态指示信号为无效;
其中,标记所述自路由表的表项对应的中间态指示信号为无效可以指,标记所述自路由表的表项对应的中间态指示信号为“0”,即将所述自路由表的全部表项对应的中间态指示信号拉低;所述预设的时间可根据交互网络的路由建立时间灵活设定。
步骤304,将变化后的自路由表复制到单播路由表;
具体地,可以只将变化的自路由表对应的表项复制到单播路由表,单播路由表中未发生变化的自路由表对应的表项不做复制。
步骤305,遍历一次自路由表,获取全目的可达链路;
具体地,路由器遍历一次更新后的自路由表,得到全目的可达链路。
本发明实施例另一种路由管理方法的基本处理流程,如图6所示,包括以下步骤:
步骤401,在预设的时间间隔遍历自路由表,将遍历得到的自路由表的表项进行运算,得到第一全目的可达链路和第二全目的可达链路;
具体地,路由器更新自路由表,在预设的时间间隔遍历更新的自路由表,将遍历得到的自路由表的表项进行运算,得到第一全目的可达链路和第二全目的可达链路;
这里,设置遍历间隔计数器,即在遍历间隔计数器的值达到一定阈值时,遍历一次自路由表的表项;所述阈值大于路由器完全建立自路由的时间;将遍历得到的自路由表的表项进行运算是指将遍历得到的自路由表的全部表项按位进行与运算,自路由表的表项全为零时不参与运算。
步骤402,确认所述第一全目的可达链路与所述第二全目的可达链路相同时,将存储的全目的可达链路更新为所述第一全目的可达链路或所述第二全目的可达链路;
具体地,设置三个遍历寄存器,将当前的全目的可达链路A存储至第一遍历寄存器,将第一次遍历自路由表得到的第一全目的可达链路B存储至第二遍历寄存器,将第二次遍历自路由表得到的第二全目的可达链路C存储至第三遍历寄存器;比较所述B与C是否相同,在比较结果为相同时,说明自路由表更新完成或未开始更新,则设置B或C为当前全目的可达链路,并存储至第一遍历寄存器;在比较结果为不同时,A仍为当前全目的可达链路;完成一次上述判断后,将C存储至第二遍历寄存器,并在第二
遍历寄存器中删除B;在进行第三次遍历自路由表时,将第三次遍历得到的第三全目的可达链路D存储至第二遍历寄存器,并与C进行比较,根据比较结果设置当前的全目的可达链路;具体的,获取全目的可达链路的伪代码如下:
If(B==C)
A<=B;
else
A<=A。
方法实施例三
本发明实施例三路由管理方法的详细处理流程,如图7所示,包括以下步骤:
步骤501,更新自路由表;
具体地,更新自路由表时,读取自路由表的表项,将每个表项对应的比特位进行更新,并将更新后的表项重新写入自路由表中。
步骤502,遍历三次自路由表,获取全目的可达链路;
具体地,路由器在预设的时间间隔遍历更新的自路由表,将遍历得到的自路由表的表项进行运算,得到第一全目的可达链路和第二全目的可达链路;确认所述第一全目的可达链路与所述第二全目的可达链路相同时,将存储的全目的可达链路更新为所述第一全目的可达链路或所述第二全目的可达链路;
这里,设置遍历间隔计数器,即在遍历间隔计数器的值达到一定阈值时,遍历一次自路由表的表项;所述阈值大于路由器完全建立自路由的时间;将遍历得到的自路由表的表项进行运算是指将遍历得到的自路由表的全部表项按位进行与运算,自路由表的表项全为零时不参与运算。
设置三个遍历寄存器,将当前的全目的可达链路A存储至第一遍历寄存器,将第一次遍历自路由表得到的第一全目的可达链路B存储至第二遍
历寄存器,将第二次遍历自路由表得到的第二全目的可达链路C存储至第三遍历寄存器;比较所述B与C是否相同,在比较结果为相同时,说明自路由表更新完成或未开始更新,则设置B或C为当前全目的可达链路,并存储至第一遍历寄存器;在比较结果为不同时,A仍为当前全目的可达链路;完成一次上述判断后,将C存储至第二遍历寄存器,并在第二遍历寄存器中删除B;在进行第三次遍历自路由表时,将第三次遍历得到的第三全目的可达链路D存储至第二遍历寄存器,并与C进行比较,根据比较结果设置当前的全目的可达链路。
步骤503,复制更新的自路由表的表项到单播路由表。
需要说明的是,本发明实施例中,步骤502与步骤503之间属于并列关系,不存在必须执行的先后顺序,可以同时进行,也可以先执行步骤502,再执行步骤503;也可以先执行步骤503,再执行步骤502。
为实现上述路由管理方法,本发明实施例提供一种路由管理装置,所述装置的组成结构,如图8所示,包括:确认模块10和复制模块20;其中,
所述确认模块10,配置为确认自路由表是否停止变化;
所述复制模块20,配置为在所述确认模块确认所述自路由表停止变化时,将变化后的自路由表复制到单播路由表。
本发明实施例中,所述装置还包括:第一更新模块30、检测模块40、和第一标记模块50;其中,
所述第一更新模块30,配置为更新自路由表;
所述检测模块40,配置为检测更新前后的自路由表是否发生变化;
所述第一标记模块50,配置为在检测模块检测到自路由表发生变化时,标记变化的自路由表的表项对应的中间态指示信号为有效。
本发明实施例中,所述确认模块10,具体配置为所述自路由表在预设的时间内不再变化时,确认所述自路由表停止变化;
相应的,所述装置还包括:第二标记模块60,配置为在所述确认模块确认所述自路由表停止变化时,标记所述自路由表的表项对应的中间态指示信号为无效。
本发明实施例中,所述装置还包括:第一更新模块30和获取模块70;其中,
所述第一更新模块30,配置为更新自路由表;
所述获取模块70,配置为在预设的时间间隔遍历更新的自路由表,将遍历得到的自路由表的表项进行运算,得到第一全目的可达链路和第二全目的可达链路;确认所述第一全目的可达链路与所述第二全目的可达链路相同时,将当前的全目的可达链路更新为所述第一全目的可达链路或所述第二全目的可达链路。
本发明实施例中,设置中间态指示信号,所述中间态指示信号存储于路由器内的中间态指示寄存器内,所述中间态指示寄存器的位宽等于交换网络内的SA的数量,所述中间态指示信号的每个比特位与所述自路由表的一个表项对应;在所述自路由表的表项内容发生变化时,变化的自路由表的表项对应的中间态指示信号也发生变化;设置多个中间态计数器,分别于交换网络中的SA一一对应,在交换网络中的任意一个SA或SF发生变化时,将发生变化的SA或SF对应的中间态计数器清零,并且在每个时钟周期内,该中间态计数器的计数值加1,在所述计数器值达到预设的阈值,即达到预设的时间,自路由表的表项内容不再发生变化,确认所述自路由表停止变化,并标记所述自路由表的表项对应的中间态指示信号为无效;
其中,标记所述自路由表的表项对应的中间态指示信号为无效可以指,标记所述自路由表的表项对应的中间态指示信号为“0”,即将所述自路由表的全部表项对应的中间态指示信号拉低;所述预设的时间可根据交互网络的路由建立时间灵活设定;
这里,也可以根据实际的交换网络需求,减少中间态指示信号的位宽及中间态计数器的数量;如每次都是在一个SA或SF的拓扑关系变更结束后,才会更改下一个SA或SF的拓扑关系,则可以只设置位宽为1比特的中间态指示信号及一个中间态计数器。
本发明实施例中,所述复制模块20,可以只将变化的自路由表对应的表项复制到单播路由表,单播路由表中未发生变化的自路由表对应的表项不做复制。
本发明实施例中,所述第一标记模块50和第二标记模块50执行的功能可以由同一个模块实现,也可以由不同的模块实现。
为实现上述路由管理方法,本发明实施例提供另一种路由管理装置,所述装置的组成结构,如图9所示,包括:遍历模块11、比较模块21、和第二更新模块31;其中,
所述遍历模块11,配置为在预设的时间间隔遍历自路由表,将遍历得到的自路由表的表项进行运算,得到第一全目的可达链路和第二全目的可达链路;
所述比较模块21,配置为比较所述第一全目的可达链路与所述第二全目的可达链路是否相同;
所述第二更新模块31,配置为在所述比较模块比较得到所述第一全目的可达链路与所述第二全目的可达链路相同时,将存储的全目的可达链路更新为所述第一全目的可达链路或所述第二全目的可达链路。
本发明实施例中,在预设的时间间隔遍历更新的自路由表,将遍历得到的自路由表的表项进行运算,得到第一全目的可达链路和第二全目的可达链路;确认所述第一全目的可达链路与所述第二全目的可达链路相同时,将存储的全目的可达链路更新为所述第一全目的可达链路或所述第二全目的可达链路;
这里,设置遍历间隔计数器,即在遍历间隔计数器的值达到一定阈值时,遍历一次自路由表的表项;所述阈值大于路由器完全建立自路由的时间;将遍历得到的自路由表的表项进行运算是指将遍历得到的自路由表的全部表项按位进行与运算,自路由表的表项全为零时不参与运算。
设置三个遍历寄存器,将当前的全目的可达链路A存储至第一遍历寄存器,将第一次遍历自路由表得到的第一全目的可达链路B存储至第二遍历寄存器,将第二次遍历自路由表得到的第二全目的可达链路C存储至第三遍历寄存器;比较所述B与C是否相同,在比较结果为相同时,说明自路由表更新完成或未开始更新,则设置B或C为当前全目的可达链路,并存储至第一遍历寄存器;在比较结果为不同时,A仍为当前全目的可达链路;完成一次上述判断后,将C存储至第二遍历寄存器,并在第二遍历寄存器中删除B;在进行第三次遍历自路由表时,将第三次遍历得到的第三全目的可达链路D存储至第二遍历寄存器,并与C进行比较,根据比较结果设置当前的全目的可达链路;具体的,获取全目的可达链路的伪代码如下:
If(B==C)
A<=B;
else
A<=A。
本发明实施例中提出的路由管理装置中的确认模块10、复制模块20、第一更新模块30、检测模块40、第一标记模块50、第二标记模块60、获取模块70、遍历模块11、比较模块21和第二更新模块31都可以通过处理器来实现,当然也可通过具体的逻辑电路实现;其中所述处理器可以是路由器上的处理器,在实际应用中,处理器可以为中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等。
本发明实施例中,如果以软件功能模块的形式实现上述路由管理方法,
并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本发明实施例不限制于任何特定的硬件和软件结合。
相应地,本发明实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机程序,该计算机程序用于执行本发明实施例的上述路由管理方法。
以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。
Claims (12)
- 一种路由管理方法,所述方法包括:确认自路由表停止变化时,将变化后的自路由表复制到单播路由表。
- 根据权利要求1所述的方法,其中,所述确认自路由表停止变化之前,所述方法还包括:更新自路由表,检测到更新前后的自路由表发生变化时,标记变化的自路由表的表项对应的中间态指示信号为有效。
- 根据权利要求1或2所述的方法,其中,所述确认自路由表停止变化,包括:所述自路由表在预设的时间内不再变化时,确认所述自路由表停止变化,并标记所述自路由表的表项对应的中间态指示信号为无效。
- 根据权利要求1所述的方法,其中,所述获取全目的可达链路,包括:更新自路由表,在预设的时间间隔遍历更新的自路由表,将遍历得到的自路由表的表项进行运算,得到第一全目的可达链路和第二全目的可达链路;确认所述第一全目的可达链路与所述第二全目的可达链路相同时,将存储的全目的可达链路更新为所述第一全目的可达链路或所述第二全目的可达链路。
- 一种路由管理装置,所述装置包括:确认模块、和复制模块;其中,所述确认模块,配置为确认自路由表是否停止变化;所述复制模块,配置为在所述确认模块确认所述自路由表停止变化时,将变化后的自路由表复制到单播路由表。
- 根据权利要求5所述的装置,其中,所述装置还包括:第一更新模块、检测模块、和第一标记模块;其中,所述第一更新模块,配置为更新自路由表;所述检测模块,配置为检测更新前后的自路由表是否发生变化;所述第一标记模块,配置为在检测模块检测到自路由表发生变化时,标记变化的自路由表的表项对应的中间态指示信号为有效。
- 根据权利要求5或6所述的装置,其中,所述确认模块,配置为所述自路由表在预设的时间内不再变化时,确认所述自路由表停止变化;相应的,所述装置还包括:第二标记模块,配置为在所述确认模块确认所述自路由表停止变化时,标记所述自路由表的表项对应的中间态指示信号为无效。
- 根据权利要求5所述的装置,其中,所述装置还包括:第一更新模块和获取模块;其中,所述第一更新模块,配置为更新自路由表;所述获取模块,配置为在预设的时间间隔遍历更新的自路由表,将遍历得到的自路由表的表项进行运算,得到第一全目的可达链路和第二全目的可达链路;确认所述第一全目的可达链路与所述第二全目的可达链路相同时,将当前的全目的可达链路更新为所述第一全目的可达链路或所述第二全目的可达链路。
- 一种路由管理方法,所述方法包括:在预设的时间间隔遍历自路由表,将遍历得到的自路由表的表项进行运算,得到第一全目的可达链路和第二全目的可达链路;确认所述第一全目的可达链路与所述第二全目的可达链路相同时,将存储的全目的可达链路更新为所述第一全目的可达链路或所述第二全目的可达链路。
- 一种路由管理装置,其中,所述装置包括:遍历模块、比较模块、和第二更新模块;所述遍历模块,配置为在预设的时间间隔遍历自路由表,将遍历得到的自路由表的表项进行运算,得到第一全目的可达链路和第二全目的可达链路;所述比较模块,配置为比较所述第一全目的可达链路与所述第二全目的可达链路是否相同;所述第二更新模块,配置为在所述比较模块比较得到所述第一全目的可达链路与所述第二全目的可达链路相同时,将存储的全目的可达链路更新为所述第一全目的可达链路或所述第二全目的可达链路。
- 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行权利要求1至4任一项所述的路由管理方法。
- 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行权利要求9所述的路由管理方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510355425.9 | 2015-06-24 | ||
| CN201510355425.9A CN106330726B (zh) | 2015-06-24 | 2015-06-24 | 一种路由管理方法及装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016206371A1 true WO2016206371A1 (zh) | 2016-12-29 |
Family
ID=57584433
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/071381 Ceased WO2016206371A1 (zh) | 2015-06-24 | 2016-01-19 | 一种路由管理方法、装置及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN106330726B (zh) |
| WO (1) | WO2016206371A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113472701A (zh) * | 2020-03-31 | 2021-10-01 | 深圳市中兴微电子技术有限公司 | 路由信息的处理方法、装置、设备及存储介质 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2006014710A2 (en) * | 2004-07-23 | 2006-02-09 | Cisco Technology, Inc. | System and method for preserving multicast data forwarding during control failures in a router |
| CN101009661A (zh) * | 2007-01-25 | 2007-08-01 | 华为技术有限公司 | 基于流转发的更新流转发表项内容的方法及设备 |
| CN101345698A (zh) * | 2007-07-10 | 2009-01-14 | 中兴通讯股份有限公司 | 一种优雅重启时的同步方法 |
| CN102780623A (zh) * | 2012-07-26 | 2012-11-14 | 杭州华三通信技术有限公司 | 一种多链接透明互联网络中组播路由表项更新方法和装置 |
| CN103746828A (zh) * | 2013-12-17 | 2014-04-23 | 福建星网锐捷网络有限公司 | 一种管理网络节点的方法及装置 |
| CN104426775A (zh) * | 2013-08-19 | 2015-03-18 | 中兴通讯股份有限公司 | 一种路由更新的实现方法及装置 |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101841483B (zh) * | 2010-05-06 | 2013-06-19 | 北京星网锐捷网络技术有限公司 | 硬件路由表管理方法、装置和通讯设备 |
| CN102404818B (zh) * | 2011-12-29 | 2014-05-28 | 西安空间无线电技术研究所 | 一种卫星网络路由表的生成与更新方法 |
-
2015
- 2015-06-24 CN CN201510355425.9A patent/CN106330726B/zh active Active
-
2016
- 2016-01-19 WO PCT/CN2016/071381 patent/WO2016206371A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2006014710A2 (en) * | 2004-07-23 | 2006-02-09 | Cisco Technology, Inc. | System and method for preserving multicast data forwarding during control failures in a router |
| CN101009661A (zh) * | 2007-01-25 | 2007-08-01 | 华为技术有限公司 | 基于流转发的更新流转发表项内容的方法及设备 |
| CN101345698A (zh) * | 2007-07-10 | 2009-01-14 | 中兴通讯股份有限公司 | 一种优雅重启时的同步方法 |
| CN102780623A (zh) * | 2012-07-26 | 2012-11-14 | 杭州华三通信技术有限公司 | 一种多链接透明互联网络中组播路由表项更新方法和装置 |
| CN104426775A (zh) * | 2013-08-19 | 2015-03-18 | 中兴通讯股份有限公司 | 一种路由更新的实现方法及装置 |
| CN103746828A (zh) * | 2013-12-17 | 2014-04-23 | 福建星网锐捷网络有限公司 | 一种管理网络节点的方法及装置 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113472701A (zh) * | 2020-03-31 | 2021-10-01 | 深圳市中兴微电子技术有限公司 | 路由信息的处理方法、装置、设备及存储介质 |
| CN113472701B (zh) * | 2020-03-31 | 2023-10-10 | 深圳市中兴微电子技术有限公司 | 路由信息的处理方法、装置、设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106330726B (zh) | 2020-02-21 |
| CN106330726A (zh) | 2017-01-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9294395B2 (en) | Media access control bridging in a mesh network | |
| CN104012052B (zh) | 用于软件定义网络中的流管理的系统和方法 | |
| CN104243318B (zh) | Vxlan网络中的mac地址学习方法及装置 | |
| CN102412979A (zh) | 降低链路聚合端口报文丢失的方法及通信设备 | |
| CN101150457B (zh) | 以太网的媒体访问控制地址表容量的测试方法 | |
| CN104821916B (zh) | 通过使用旁路隧道减少IPv6路由表的大小 | |
| WO2019201209A1 (zh) | 报文转发 | |
| WO2009074105A1 (fr) | Procédé de détection d'état de liaison et système associé | |
| US20140092725A1 (en) | Method and first network node for managing an ethernet network | |
| US8451842B2 (en) | Media access control bridging in a mesh network | |
| EP4097932B1 (en) | Re-convergence of protocol independent multicast assert states | |
| CN103457756B (zh) | 一种环路路径检测方法、装置及系统 | |
| CN107968753A (zh) | 修改媒体接入控制地址转发表的方法和装置 | |
| CN102118291B (zh) | 环路网络链路故障处理方法、装置以及环路网络 | |
| WO2016197999A1 (zh) | 一种bier边界节点标识方法和装置 | |
| CN101232508B (zh) | 加速多生成树协议网络拓扑收敛的方法及设备 | |
| CN102724098B (zh) | 航空电子设备全双工交换以太网相兼容的通信交换机 | |
| CN110708275B (zh) | 一种协议报文的处理方法和装置 | |
| WO2016206371A1 (zh) | 一种路由管理方法、装置及存储介质 | |
| CN101510837A (zh) | 以太网桥设备、迁移聚合口地址的方法及装置 | |
| CN112491744B (zh) | 一种端口流量镜像方法、设备及介质 | |
| Tong et al. | A novel and efficient link discovery mechanism in SDN | |
| CN101582846A (zh) | 路由下发方法、报文转发方法、转发引擎和报文转发设备 | |
| JPWO2010125859A1 (ja) | ネットワークスイッチ、経路設定方法、プログラムおよび並列計算機システム | |
| CN107276908A (zh) | 一种路由信息处理方法及分组交换设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16813487 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16813487 Country of ref document: EP Kind code of ref document: A1 |