The content of the invention
The embodiment of the present invention provides a kind of methods, devices and systems for being used to realize message forwarding, by by SDN controllersOptimal path is selected for message, and each interface code tag on optimal path is pressed into heading according to predetermined wayIn label stack, so that router carries out message routing according to the label of the label stack first floor, while first floor label is ejected.So as toThe occupancy of memory source can be effectively reduced while routing forwarding efficiency is improved.
According to an aspect of the present invention, there is provided a kind of method for realizing message forwarding, including:
For router after the first message is received, inquiry whether there is the routing iinformation corresponding with the first message;
If in the absence of the routing iinformation corresponding with the first message, the first message is forwarded to SDN controllers by router,So that SDN controllers are according to the destination address of the first message, the optimal path from router to destination address is calculated, from the overall situationEach interface label on optimal path is found out in interface coding schedule, and according to the order from destination address to router, by phaseInterface label is answered to be pressed into the label stack of the first message to obtain the second message;
Router after the second message that SND controllers issue is received, by the second message by with the second message labelThe corresponding interface of first layer label in storehouse is forwarded, while by the first layer label bullet in the second message label storehouseGo out.
In one embodiment, router is after the first message is received, and inquiry is with the presence or absence of corresponding with the first messageRouting iinformation include:
Router judges whether include label in the label stack of the first message after the first message is received;
If not including label in the label stack of the first message, further determine whether in the presence of related to the first messageLocal routing information;
If in the absence of the local routing information related to the first message, router is determined in the absence of relative with the first messageThe routing iinformation answered.
In one embodiment, if including label in the label stack of the first message, router passes through the first messageInterface corresponding with the first layer label in the first message label storehouse is forwarded, while by the first message label storehouseFirst layer label ejects.
In one embodiment, if not including label in the label stack of the first message, but exist related to the first messageLocal routing information, then router the first message is forwarded using the local routing information related to the first message.
In one embodiment, local routing information includes route flow table or routing forwarding entry.
According to another aspect of the present invention, there is provided a kind of router for being used to realize message forwarding, including receiving module, look intoModule, label acquisition module and routing module are ask, wherein:
Receiving module, for receiving the first message;
Enquiry module, for after receiving module receives the first message, inquiry to be with the presence or absence of corresponding with the first messageRouting iinformation;
Label acquisition module, in the case of in the absence of the routing iinformation corresponding with the first message, first to be reportedText is forwarded to SDN controllers, so that SDN controllers are according to the destination address of the first message, calculates from router to destinationThe optimal path of location, finds out each interface label on optimal path from global interface coding schedule, and according to from destination addressTo the order of router, the corresponding interface label is pressed into the label stack of the first message to obtain the second message;
Routing module, for receive that SND controllers issue in label acquisition module the second message after, by the second messageForwarded by interface corresponding with the first layer label in the second message label storehouse, while by the second message label storehouseIn first layer label ejection.
In one embodiment, enquiry module judges the label stack of the first message specifically after the first message is receivedIn whether include label, if not including label in the label stack of the first message, further determine whether exist and first reportLiterary related local routing information, if in the absence of the local routing information related to the first message, it is determined that in the absence of with firstThe corresponding routing iinformation of message.
In one embodiment, routing module is additionally operable in the case of including label in the label stack of the first message,First message is forwarded by interface corresponding with the first layer label in the first message label storehouse, while first is reportedFirst layer label ejection in literary label stack.
In one embodiment, routing module is additionally operable to not include label in the label stack of the first message but existedIn the case of the local routing information related to the first message, first is reported using the local routing information related to the first messageText is forwarded.
In one embodiment, local routing information includes route flow table or routing forwarding entry.
According to another aspect of the present invention, there is provided a kind of system for being used to realize message forwarding, including any of the above-described implementationThe router that example is related to, and
SDN controllers, for after the first message that router reports is received, according to the destination address of the first message,The optimal path from router to destination address is calculated, and each connecing on optimal path is found out from global interface coding scheduleMouth label;Order from destination address to router, the corresponding interface label is pressed into the label stack of the first message to obtainSecond message, and the second message is handed down to router.
By referring to the drawings to the present invention exemplary embodiment detailed description, further feature of the invention and itsAdvantage will be made apparent from.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, completeSite preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.BelowDescription only actually at least one exemplary embodiment is illustrative, is never used as to the present invention and its application or makesAny restrictions.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creative work premiseLower obtained every other embodiment, belongs to the scope of protection of the invention.
Unless specifically stated otherwise, the part and positioned opposite, the digital table of step otherwise illustrated in these embodimentsDo not limited the scope of the invention up to formula and numerical value.
Simultaneously, it should be appreciated that for the ease of description, the size of the various pieces shown in accompanying drawing is not according to realityProportionate relationship draw.
It may be not discussed in detail for technology, method and apparatus known to person of ordinary skill in the relevant, but suitableIn the case of, the technology, method and apparatus should be considered as authorizing part for specification.
In shown here and discussion all examples, any occurrence should be construed as merely exemplary, withoutIt is as limitation.Therefore, the other examples of exemplary embodiment can have different values.
It should be noted that:Similar label and letter represents similar terms in following accompanying drawing, therefore, once a certain Xiang YiIt is defined, then it need not be further discussed in subsequent accompanying drawing in individual accompanying drawing.
Fig. 1 is the schematic diagram that the present invention is used to realize method one embodiment of message forwarding.Wherein:
Step 101, router after the first message is received, with the presence or absence of the route corresponding with the first message believe by inquiryBreath.
Step 102, if in the absence of the routing iinformation corresponding with the first message, the first message is forwarded to by routerSDN controllers, so that SDN controllers press respective sequence by the label stack of each interface label press-in message on optimal pathIn.
Wherein SDN controllers calculate the optimal road from router to destination address according to the destination address of the first messageFootpath, find out each interface label on optimal path from global interface coding schedule, and according to from destination address to routerSequentially, the corresponding interface label is pressed into the label stack of the first message to obtain the second message.
Step 103, router is after the second message that SND controllers issue is received, by the second message by with secondThe corresponding interface of first layer label in message label storehouse is forwarded, while by the first layer in the second message label storehouseLabel ejects.
Alternatively, router first determines whether included in the label stack of the first message after the first message is receivedLabel, if not including label in the label stack of the first message, it can further determine whether the sheet related to the first message be presentGround routing iinformation, if in the absence of the local routing information related to the first message, router determines to be not present and the first messageCorresponding routing iinformation, ask SDN controllers to calculate optimal path in this case and provide each on the optimal pathThe label of interface.
The method for being used to realize message forwarding provided based on the above embodiment of the present invention, by being report by SDN controllersSelected works select optimal path, and by each interface code tag on optimal path according to the label in predetermined way press-in headingIn storehouse, so that router carries out message routing according to the label of the label stack first floor, while first floor label is ejected.So as to carryThe occupancy of memory source can be effectively reduced while high routing forwarding efficiency.
Fig. 2 is the schematic diagram that the present invention is used to realize another embodiment of method of message forwarding.Wherein:
Step 201, router receives the first message.
Step 202, router judges whether include label in the label stack of the first message.If the label heap of the first messageLabel is included in stack, then performs step 203;If not including label in the label stack of the first message, step 204 is performed.
Step 203, router connects the first message by corresponding with the first layer label in the first message label storehouseMouth is forwarded, while the first layer label in the first message label storehouse is ejected.Its of the present embodiment is no longer performed afterwardsIts step.
Label is included in label stack, this shows SDN controllers and calculates optimal path for the message, and by pathOn interface label be pressed into label stack, first floor label in the label stack can be used directly in this case and carry outRouting forwarding.
Step 204, router further determines whether the local routing information related to the first message be present.Wherein, originallyGround routing iinformation may include to route flow table or routing forwarding entry.
If in the presence of the local routing information related to the first message, step 205 is performed;If it is not present and the first message phaseThe local routing information of pass, then perform step 206.
Step 205, router is forwarded the first message using the local routing information related to the first message.AfterwardsNo longer perform other steps of the present embodiment.
Step 206, due to being forwarded to the first message in the absence of the routing iinformation corresponding with the first message, routerSDN controllers, so that SDN controllers press respective sequence by the label of each interface label the first message of press-in on optimal pathTo obtain the second message in storehouse.
Step 207, router is after the second message that SND controllers issue is received, by the second message by with secondThe corresponding interface of first layer label in message label storehouse is forwarded, while by the first layer in the second message label storehouseLabel ejects.
Fig. 3 is the schematic diagram that the present invention is used to realize router one embodiment of message forwarding.As shown in figure 3, the roadReceiving module 301, enquiry module 302, label acquisition module 303 and routing module 304 may include by device.Wherein:
Receiving module 301 is used to receive the first message.
Enquiry module 302 is used for after receiving module 301 receives the first message, and inquiry whether there is and the first message phaseCorresponding routing iinformation.
Label acquisition module 303 is used in the case of in the absence of the routing iinformation corresponding with the first message, by firstMessage is forwarded to SDN controllers, so that SDN controllers are according to the destination address of the first message, calculates from router to purposeThe optimal path of address, finds out each interface label on optimal path from global interface coding schedule, and according to from destinationThe corresponding interface label is pressed into the label stack of the first message to obtain the second message by location to the order of router.
Routing module 304 is used for after the second message that label acquisition module 303 receives that SND controllers issue, by theTwo messages are forwarded by interface corresponding with the first layer label in the second message label storehouse, while by the second message markSign the first layer label ejection in storehouse.
The router for being used to realize message forwarding provided based on the above embodiment of the present invention, wherein being by SDN controllersMessage selects optimal path, and by each interface code tag on optimal path according to the mark in predetermined way press-in headingSign in storehouse, so that router carries out message routing according to the label of the label stack first floor, while eject first floor label.So thatThe occupancy of memory source can be effectively reduced while improving routing forwarding efficiency.
Alternatively, enquiry module 302 is specifically after the first message is received, judge in the label stack of the first message whetherComprising label, if not including label in the label stack of the first message, further determine whether in the presence of related to the first messageLocal routing information, if in the absence of the local routing information related to the first message, it is determined that in the absence of with the first message phaseCorresponding routing iinformation.
For example, local routing information may include to route flow table or routing forwarding entry.
Alternatively, routing module 304 is additionally operable in the case of including label in the label stack of the first message, by firstMessage is forwarded by interface corresponding with the first layer label in the first message label storehouse, while by the first message labelFirst layer label ejection in storehouse.
Alternatively, routing module 304 is additionally operable to not include label in the label stack of the first message but existed and firstIn the case of the related local routing information of message, the first message is carried out using the local routing information related to the first messageForwarding.
Fig. 4 is the schematic diagram that the present invention is used to realize system one embodiment of message forwarding.As shown in figure 4, the systemIt may include router 401 and SDN controllers 402, wherein router 401 can be the router that any embodiment is related in Fig. 3.
SDN controllers 402 are used for after the first message that router 401 reports is received, according to the purpose of the first messageAddress, the optimal path from router to destination address is calculated, and found out from global interface coding schedule on optimal pathEach interface label;Order from destination address to router, the corresponding interface label is pressed into the label stack of the first messageTo obtain the second message, and the second message is handed down to router 401.
As an example, a router is illustrate only in Fig. 4.Those skilled in the art are it will be appreciated that SDN is controlledDevice can interact with multiple routers.
Below by a specific example, the present invention will be described.
Wherein, if SDN controllers have link and the real-time performance data of equipment in routed domain, SDN controllers are to Yu Nei roadsGlobal coding is carried out by each interface of device.
1) when message reaches the first router, due to not including label, while first in the label stack of the messageCorresponding route flow table or routing forwarding entry is also not present in router, then the message is forwarded to SDN controls by the first routerDevice.
2) SDN controllers are according to the destination address of the message, and combine obtained network real-time condition, calculate from theOptimal path of one router to the destination address.
For example, be related to 4 routers on the optimal path altogether, i.e., the first router, the second router, third router and4th router.Corresponding system architecture is as shown in Figure 5.
Wherein, the interface label mapping table of the first router is as shown in table 1.
Table 1
The interface label mapping table of the second router is as shown in table 2.
| Int POS1/0 | 10010100 |
| Int E0/0 | 10000101 |
| Int E2/1 | 11001110 |
| Int E1/2 | 10011110 |
Table 2
The interface label mapping table of third router is as shown in table 3.
| Int POS0/1 | 11000100 |
| Int E2/0 | 11000110 |
| Int E2/1 | 10101110 |
| Int E1/1 | 10111110 |
Table 3
The interface label mapping table of 4th router is as shown in table 4.
| Int POS0/1 | 11000100 |
| Int E2/0 | 11000110 |
| Int E2/1 | 10100101 |
| Int E1/1 | 10111110 |
Table 4
3) SDN controllers find out what is passed through on path according to the optimal path calculated from global interface coding scheduleThe coding of each interface, and the label by these codings according to the order press-in heading from the 4th router to the first routerIn storehouse, and message is handed down to the first router.
Now, label stack is as shown in table 5.
Table 5
4) the first router is corresponding from the first router according to the first layer label in the label stack of message10000100 interface is gone out, while ejects the first floor label.
5) after message reaches the direct-connected interface of the second router, because message label storehouse now is as shown in table 6, thereforeThe second router searches the outgoing interface corresponding to 10000101, and message is forwarded to the direct-connected end of third router from the outgoing interfaceMouthful, and eject the first floor label.
Table 6
6) after message reaches the direct-connected interface of third router, because message label storehouse now is as shown in table 7, thereforeThird router searches the outgoing interface corresponding to 11000100, and message is forwarded to the direct-connected end of the 4th router from the outgoing interfaceMouthful, and eject the first floor label.
Table 7
7) after message reaches the direct-connected interface of the 4th router, because message label storehouse now is as shown in table 8, thereforeThird router searches the outgoing interface corresponding to 11000100, message is forwarded into destination address from the outgoing interface, and eject and be somebody's turn to doFirst floor label.
Table 8
After the first floor label is ejected, label stack is sky, as shown in table 9.
Table 9
Theing improvement is that relative to existing Segment routing SR of the invention:
1) message expense contrasts.SR and global interface involved in the present invention (Global interface, abbreviation:GI) markIt is all 4 bytes to sign length.SR is always above spent generally using segmentation, label stack level less than GI in source, SR headerLess than GI;On non-end node, SR is not leant out using segmentation, label, and label stack level is constant, therefore message total length is possible toMore than GI.
2) router memory takes contrast.SR methods neutralize distributed two kinds of router-level topology patterns using collection, and router needsTo store simultaneously route forwarding table, MPLS label forward table,
SR MPLS label forward tables.GI methods router using concentration be router-level topology pattern, only need to store GI labels withThe mapping table of interface, entry number are consistent with router interface number.SR methods EMS memory occupation will be far longer than GI methods.
One of ordinary skill in the art will appreciate that hardware can be passed through by realizing all or part of step of above-described embodimentTo complete, by program the hardware of correlation can also be instructed to complete, described program can be stored in a kind of computer-readableIn storage medium, storage medium mentioned above can be read-only storage, disk or CD etc..