Background technology
Along with the continuous development of IP network, IPv4 exposes increasing shortcoming and defect, and IPv6 becomes the main developing direction of future network owing to possess bigger address space and IP address more accurately.Because IPv4 occupies most real network environment, so network environment develops into the IPv6 network and needs a transitional period, how to make the IPv6 network to communicate with one another in the IPv4 network in the transitional period and seems particularly important.
Tunneling technique is a kind of encapsulation technology that can realize that the IPv6 network communicates with one another in the IPv4 network, as shown in Figure 1, with IPv6 over IPv4 tunnel is example, detailed process is: the IPv6 message is added an IPv4 heading, make that the IPv6 message is able to transmit in the IPv4 network, be reduced to the IPv6 message after arriving the IPv6 network, thereby reach the purpose that communicates between disjunct two IPv6 networks.Traditional tunneling technique is the process of a secondary route, for fear of the requirement of hardware device being supported the secondary route owing to need twice route, the technology that generally adopts is a tunnel integrating routing technology at present, is example with IPv6 over IPv4, has preserved following field in the IPv6 tunnel route:
The IPv6 prefix;
The IPv6 mask;
Target IP v4 address, tunnel is used for IPv4 Target IP encapsulation;
Tunnel source IPv4 address is used for IPv4 source IP encapsulation;
The network equipment of tunnel Target IP v4 routing truly exports;
Tunnel next jumping of Target IP v4 routing;
Next jumps corresponding MAC (Media Access Control, medium access control) address tunnel Target IP v4 routing, is used for IPv4 Destination MAC encapsulation.
According to the above-mentioned information of preserving in the tunnel route, as shown in Figure 2, the process that the IPv6 message is transmitted in the tunnel is as follows:
The tunnel route is hit in step 201, the routing of IPv6 message;
Step 202, according to " the Target IP v4 address, tunnel " of preserving in the tunnel route, " tunnel source IPv4 address " structure IPv4 head, be used for the encapsulation of IPv6 message;
Step 203, according to two layers of head of " next jumps corresponding MAC Address tunnel Target IP v4 routing " of preserving in tunnel route encapsulation IPv4 message;
Step 204, E-Packet according to " network equipment of tunnel Target IP v4 routing truly exports " of preserving in the tunnel route.
Can see that from above flow process twice routing that the tunnel route technology makes original tunnel transmit is reduced to a routing, make the equipment that to realize the secondary routing also can realize the function of equivalent secondary route, improve forward efficiency.Yet in actual applications, because network environment is complicated and changeable, there are problems such as change of IPv4 route and MAC Address change, it all can exert an influence to the IPv6 message forwarding, for example, the change of IPv4 route causes " Target IP v4 address, tunnel " routing change as a result in the tunnel route, and then influence " network equipment of tunnel Target IP v4 routing truly exports ", " tunnel next jumping of Target IP v4 routing " and " next jumps corresponding MAC Address tunnel Target IP v4 routing " field; The MAC Address change causes " next jumps corresponding MAC Address tunnel Target IP v4 routing " field change in the tunnel route.At the changeable situation of network environment, prior art has proposed a kind of IPv6 tunnel forwarding method, and concrete scheme is as follows:
Set up the mutual index between IPv4 route and the IPv6 tunnel route, when the IPv4 route changes, utilize this index upgrade IPv6 tunnel route; And when increase or deletion IPv6 tunnel route, upgrade this index.
Newly-increased route is searched not then in existing index, by " periodically enabling " route, judge whether change of " Target IP v4 address, tunnel " routing result, particularly, in the IPv4 routing table, carry out a routing at interval according to setting-up time, judge whether the routing result changes,, then upgrade tunnel route corresponding field if the routing result changes.
" index mechanism " and " the periodically enabling " mechanism of introducing in this technical scheme is with the changeable situation of reply network environment, but in the practical application, there are the following problems:
1, index mechanism realizes complexity, need bring in constant renewal in the index between IPv4 route and the IPv6 integration route when the route change;
2, periodically enable route and make tunnel route switching delay, the variation of IPv4 route or MAC Address in the response to network rapidly;
3, periodically enable route and need carry out the route querying operation, under the shorter situation network equipment CPU is caused very big processing burden at tunnel route One's name is legion and search cycle, thereby reduce the forwarding performance of the network equipment.
In sum, the existing tunnel route technology needs frequent updating routing index and visit routing table, causes very big processing burden to system, has reduced the forwarding performance of the network equipment, and, make that the route switching delay is bigger because the tunnel routing information renewal is untimely.
Embodiment
In order to provide the implementation of the tunnel routing information that upgrades in time, the embodiment of the invention provides a kind of update method of tunnel routing information, in this method, at first receive routing update information and corresponding action type information, and obtain the update condition corresponding with this action type information; When determining that according to the routing node information of storage the routing update information that receives meets corresponding update condition, upgrade this routing node information according to the action type information and the routing update information that receive, wherein, routing node information is corresponding with tunnel routing information, and comprises at least one routing iinformation in the tunnel routing information corresponding with it; Then according to its corresponding tunnel routing information of routing node information updating after upgrading.
Under the situation of not conflicting, embodiment and the feature among the embodiment among the application can make up mutually.
Below in conjunction with Figure of description the preferred embodiments of the present invention are described, should be appreciated that preferred embodiment described herein only is used for description and interpretation the present invention, and be not used in qualification the present invention.
According to the embodiment of the invention, a kind of tunnel routing information updating device at first is provided, can upgrade tunnel routing information in time by this device.
The structural representation of the tunnel routing information updating device that provides according to the embodiment of the invention is provided Fig. 3, and as shown in Figure 3, this device mainly comprises:
Receiving element 301, renewal judging unit 302 and routing node information updating unit 303.
Alternatively, this device can also comprise: registering unit 304.
Alternatively, this device can also comprise: update notification unit 305.
Wherein:
Receiving element 301 is used to receive routing update information and corresponding action type information;
Upgrade judging unit 302, be used to obtain the corresponding update condition of action type information that receives with receiving element 301, and determine according to the routing node information of storage whether the routing update information that receives meets corresponding update condition;
Routing node updating block 303, be used for when the routing update information of upgrading judging unit 302 definite receptions meet update condition, upgrade this routing node information according to the action type information and the routing update information that receive, wherein, routing node information is corresponding with tunnel routing information, and comprising at least one routing iinformation in the tunnel routing information corresponding with it, the routing node information after the described renewal is used to upgrade its corresponding tunnel routing information.
The registering unit 304 that this device can further include, be used for receiving the monitoring indication, the tunnel Target IP v4 address information that comprises tunnel routing information correspondence to be monitored in this monitoring indication, according to this tunnel to be monitored Target IP v4 address information, configuration routing node information and storage.
Wherein, the routing node information of configuration comprises route prefix, route mask, route outlet and route next jump information, perhaps comprises route next jump information, and the mac address information corresponding with this route next jump information.If also comprise readjustment announcement mode information (promptly feeding back routing update address notified information) in the monitoring indication, then correspondingly preserve the readjustment announcement mode information in this monitoring indication;
The update notification unit 305 that this device can further include is used for obtaining the address information that is used to feed back the routing node information after the renewal from the monitoring indication that registering unit 304 receives, and the routing node information after this address feedback is upgraded.
Among the embodiment, upgrade judging unit 302 and specifically be used for:
If the routing update information that receiving element 301 receives comprises route prefix information, route mask information, route next jump information and route outlet information, and the action type information that receives is for replacing or deletion, then the route prefix that comprises in the routing update information that judge to receive equals the route prefix that comprises in the routing node information, and during the route mask that the route mask that comprises in the routing update information equals to comprise in the routing node information, determine that the routing update information that receiving element 301 receives meets corresponding update condition;
If the routing update information that receiving element 301 receives comprises route prefix information, the route mask information, route next jump information and route outlet information, and the action type information that receives is for adding, the value of the route mask that comprises in greater than routing node information of the value of the route mask that in judging routing update information, comprises then, and the Target IP v4 address, tunnel that comprises in route mask that the route prefix that comprises in the routing update information and route mask and the value that obtains equal to comprise in the routing update information and the routing node information determines that the routing update information that receiving element 301 receives meets corresponding update condition during with the value that obtains;
If the routing update information that receiving element 301 receives comprises route next jump information and corresponding mac address information, and the action type information that receives is for replacing, when then the route next jump information that comprises in the route next jump information of MAC Address correspondence and the routing node information is identical, determine that routing update information that receiving element 301 receives meets the update condition of correspondence in judging routing update information.
Among the embodiment, routing node information updating unit 303 specifically is used for:
If the routing update information that receiving element 301 receives comprises route prefix information, route mask information, route next jump information and route outlet information, and the action type information that receives is for replacing, then after upgrading judging unit 302 and determining that routing update information meet update condition, utilize route next jump information in the routing update information and route outlet information to replace corresponding information in the routing node information respectively;
If the routing update information that receiving element 302 receives comprises route prefix information, the route mask information, route next jump information and route outlet information, and the action type information that receives is deletion, then after renewal judging unit 302 determines that routing update information meet described update condition, route prefix information in the deletion routing node information, the route mask information, route next jump information and the corresponding information deletion of route outlet information, according to the Target IP v4 address, tunnel in this routing node information, determine route prefix information with this tunnel Target IP v4 matching addresses, the route mask information, route next jump information and route outlet information, and be stored as and the corresponding routing node information of this tunnel Target IP v4 address information;
If the routing update information that receiving element 301 receives comprises route prefix information, route mask information, route next jump information and route outlet information, and the action type information that receives is for adding, then after renewal judging unit 302 determined that routing update information meet update condition, route prefix information, route mask information, route next jump information and the route of utilizing route prefix information, route mask information, route next jump information and route outlet information in this routing update information to replace respectively in the routing node information exported information;
If the routing update information that receiving element 301 receives comprises route next jump information and corresponding mac address information, and the action type information that receives is for replacing, then after renewal judging unit 302 determines that routing update information meet update condition, utilize the MAC Address in the MAC Address replacement routing node information in this routing update information.
According to the embodiment of the invention, a kind of update system of tunnel routing information also is provided, as shown in Figure 4, this system comprises:
Register device 401 and tunnel routing information updating device 402.
Wherein:
Register device 401 is used for sending the monitoring indication to tunnel routing information updating device 402, comprises the tunnel Target IP v4 address information of tunnel routing information correspondence to be monitored in this monitoring indication; And, the routing node information after the renewal of reception tunnel routing information updating device 402 feedbacks, and according to the routing node information updating tunnel routing information corresponding with this routing node information after upgrading;
Tunnel routing information updating device 402 is used to receive the monitoring indication that register device 401 sends, according to comprising tunnel Target IP v4 address information configuration routing node information and storage in this monitoring indication; And, receive routing update information and corresponding action type information, and obtain and the corresponding update condition of action type information that receives, when determining that according to the routing node information of storage the routing update information that receives meets corresponding update condition, upgrade routing node information according to this action type information and routing update information, wherein, this routing node information is corresponding with tunnel routing information, and comprise at least one routing iinformation in the tunnel routing information corresponding with it, and the routing node feedback information after will upgrading is given register device 401.
Among the embodiment, above-mentioned tunnel routing information updating device 402 specifically is used for:
From the monitoring indication that register device 401 sends, obtain the address information that is used to feed back the routing node information after the renewal.
Particularly, above-mentioned register device 401 can be the tunnel forwarding module, or in the existing system tunnel routing information is had other module of upgrading demand.
According to Fig. 4, the monitoring indication that registering unit 304 in the tunnel routing information updating device 402 receives is from register device 401 (as being used to transmit the tunnel forwarding module of IPv6 message in the existing system), particularly, this register device 401 is included in the tunnel Target IP v4 address information of the tunnel routing information correspondence of its concern in the monitoring indication tunnel routing information updating device 402 that provides according to above embodiment is provided, and is responsible for the routing node information of this tunnel Target IP v4 address information correspondence is monitored by tunnel routing information updating device 402;
According to Fig. 4, the update notification unit 305 in the tunnel routing information updating device 402 specifically is used for to register device 401 feedback routing updates notice, comprises the routing node information after the renewal in this routing update notice.Wherein, feedback routing update address notified is provided by this register device 401.
In the practical application, the update system of above-mentioned tunnel routing information can be switch or router, if router, then comprise tunnel forwarding module and routing management module, wherein, the tunnel forwarding module is finished the function of register device, and routing management module is finished the function of tunnel routing information updating device; If switch, then comprise the tunnel forwarding module, routing management module and ARP module, wherein, the tunnel forwarding module is finished the function of register device, routing management module and ARP module are finished the function of tunnel routing information updating device, and particularly, routing management module is responsible for comprising tunnel Target IP v4 address information when routing node information, and with the corresponding route prefix information of this tunnel Target IP v4 address information, the route mask information, when route next jump information and route outlet information, the renewal of corresponding tunnel routing information, the ARP module is responsible for comprising route next jump information when routing node information, and during the mac address information corresponding with this route next jump information, the renewal of corresponding tunnel routing information.
Below, the tunnel routing information updating device in conjunction with above embodiment provides is elaborated to the detailed process of in the embodiment of the invention tunnel routing information being upgraded:
At first, aspect according to an embodiment of the invention, for better monitoring mechanism is provided, can set the tunnel Target IP v4 address information of the tunnel routing information correspondence that needs monitoring by register device 401, promptly register at tunnel routing information updating device 402, specifically as shown in Figure 5, comprise step:
Step 501, register device 401 are submitted the monitoring indication to tunnel routing information updating device 402, comprise the tunnel Target IP v4 address information of tunnel routing information correspondence to be monitored in this monitoring indication.
Register device 401 can irregularly be submitted the monitoring indication to tunnel routing information updating device 402 as required in this step, the tunnel Target IP v4 address information that comprises the needs monitoring in this monitoring indication, and can comprise a plurality of tunnels Target IP v4 address information in a monitoring indication.
Step 502, tunnel routing information updating device 402 receive the monitoring indication that register device 401 sends, and therefrom extract tunnel to be monitored Target IP v4 address information.
In this step, the tunnel to be monitored Target IP v4 address information of extraction is one or more.
Step 503, tunnel routing information updating device 402 are determined routing node information corresponding with this tunnel Target IP v4 address information and storage according to the tunnel Target IP v4 address information of extracting.
In this step,, then determine corresponding routing node information at each tunnel Target IP v4 address information respectively if the tunnel Target IP v4 address information of extracting is a plurality of.Wherein, routing node information is corresponding with tunnel routing information, and comprises at least one routing iinformation in the tunnel routing information corresponding with it, and particularly, the routing node information of determining comprises:
Tunnel Target IP v4 address information, and the route prefix information corresponding, route mask information, route next jump information and route outlet information with this tunnel Target IP v4 address information; Perhaps,
Route next jump information, and the mac address information corresponding with this route next jump information.
According to above flow process, register device 401 arrives tunnel routing information updating device 402 with the tunnel Target IP v4 address registration of its concern, and 402 tunnel routes that register device 401 was registered of tunnel routing information updating device are monitored.
A specific implementation process when register device 401 arrives tunnel routing information updating device 402 with the tunnel Target IP v4 address registration of its concern is as follows:
Tunnel routing information updating device 402 can provide following registration interface:
Ipv4_route_change_register(ip_addr,callback_func);
This interface is used for register device 401 and submits relevant informations such as monitored instruction to.
Suppose that tunnel to be monitored destination address is A, the interface of the feedback routing update notice that register device 401 provides is B, and then registration process is as follows:
Ipv4_route_change_register(A,B);
The registration function processing logic that tunnel routing information updating device 402 is carried out is as follows:
According to the A routing, the route prefix that obtains hitting, route mask, route outlet and route next jump information are preserved together with address A and function pointer B.
Function pointer B is the interface IP address of the feedback routing update notice that provides of register device 401, and advice method can be as follows:
B(A,nexthop,out_interface)。
It is to be noted, a kind of mode that above-mentioned registration interface form and registration process only realize for the embodiment of the invention, the registration interface and the function pointer of other form can also be provided as required according to the embodiment of the invention, for example, if a plurality of address A adopt same feedback routing update address notified, it is then corresponding that function pointer can (nexthop out_interface), enumerate herein one by one for B.
According to the embodiment of the invention on the other hand, also can not carry out above-mentioned registration process, and determine the Target IP v4 address, tunnel of monitoring voluntarily and determine routing node information by tunnel routing information updating device 402.
The flow chart of Fig. 6 in the embodiment of the invention tunnel routing information being upgraded as shown in Figure 6, comprises the steps:
Step 601, tunnel routing information updating device receive routing update information and corresponding action type information.
Step 602, obtain and the corresponding update condition of action type information that receives.
Whether step 603, the routing update information that receives according to the routing node information judgement of storing meet the update condition of obtaining, if then execution in step 604, otherwise finish.
Step 604, upgrade routing node information according to the routing update information of action type information that receives and reception.
Step 605, according to its corresponding tunnel routing information of routing node information updating after upgrading.
In the above flow process, if the routing node information of storage is registered by register device, for example register by the tunnel forwarding module, then after upgrading routing node information, also need to assigned address feedback routing update notice, this assigned address is provided by register device, by the routing node information of this register device after according to the renewal that receives, upgrades the tunnel routing information of preserving corresponding with this routing node information then.
According to flow process shown in Figure 6, one more specifically among the embodiment, in the above-mentioned steps 601, the routing update information that the tunnel routing information updating device receives comprises:
Route prefix information, route mask information, route next jump information and route outlet information.
Correspondingly, the action type information of reception is:
A, replacement; Or,
B, interpolation; Or,
C, deletion.
Routing node packets of information explanatory note in brackets volume address 1 (being Target IP v4 address, tunnel), route prefix 1, route mask 1, route next jump 1 and route outlet 1 to preserve below, routing update information comprises that route prefix 2, route mask 2, route next jump 2 and route outlet 2 are example, and the renewal process when respectively action type information being A, B, C describes:
As shown in Figure 7, when the action type information of tunnel routing information updating device reception was A, renewal process was as follows:
According to the characteristics of choosing of tunnel route, the update condition corresponding with action type A of setting is:
A1, route prefix 2 equal route prefix 1;
A2, route mask 2 equal route mask 1;
If satisfy above two conditions simultaneously, then utilize route next jump information in this routing update information and route outlet information to replace corresponding information in the routing node information respectively, soon the route next jump 1 in the routing node information of registered address 1 correspondence is updated to route next jump 2, route in routing node information outlet 1 is updated to route outlet 2, and after upgrading routing node information, routing node feedback information after further will upgrading is given register device, by this register device according to its corresponding tunnel routing information of routing node information updating after upgrading.
When condition A1 and A2 establishment, show and do not have the more route adding of long code mask, and the route that route prefix 1 and route mask 1 match according to longest match principle for routing, therefore need not routing is again carried out in registered address 1, that is: route prefix 1 and route mask 1 still are the longest coupling route of registered address, just outlet and next jumping change, thereby directly upgrade route outlet and route next jump information in the routing node information.
As shown in Figure 8, when the action type information of tunnel routing information updating device reception was B, renewal process was as follows:
According to the characteristics of choosing of tunnel route, the update condition corresponding with action type B of setting is:
B1, route mask 2>route mask 1 promptly compare the value of route mask 2 and the value of route mask 1 herein, and for example, route mask 2 is 255.255.255.0, and route mask 1 is 255.255.0.0, then satisfies the value of the value of route mask 2 greater than route mask 1;
B2, (Zhu Cedizhi ﹠amp; Route mask 2) equals (route prefix 2 ﹠amp; Route mask 2), promptly compare registered address and route mask 2 and the value that obtains herein, and route prefix 2 and route mask 2 and the value that obtains, for example, the registered address is 192.168.195.1, and route mask 2 is 255.255.255.0, route prefix is 192.168.195.0, then the registered address is 192.168.195.0 with route mask 2 and the value that obtains, and route prefix 2 is 192.168.195.0 with route mask 2 with the value that obtains, and satisfies this condition;
If satisfy above two conditions simultaneously, then utilize the route prefix information in the routing update information, the route mask information, route next jump information and route outlet information are replaced the route prefix information in the routing node information respectively, the route mask information, route next jump information and route outlet information, be about to the route prefix 1 in the routing node information of registered address 1 correspondence, route mask 1, route next jump 1 and route outlet 1 replace with route prefix 2, route mask 2, route next jump 2 and route export 2 information, and after upgrading routing node information, routing node feedback information after further will upgrading is given register device, by this register device according to its corresponding tunnel routing information of routing node information updating after upgrading.
When condition B1 sets up, the mask-length of route 2 that shows interpolation is greater than the mask-length of route 1, when condition B2 sets up, the route 2 and the registered address coupling that show interpolation, and therefore the route that route prefix 1 and route mask 1 match according to longest match principle for routing need not routing is again carried out in registered address 1.Can determine based on this logic: after route was added, route 2 was the longest coupling route of registered address.
As shown in Figure 9, when the action type information of tunnel routing information updating device reception was C, renewal process was as follows:
According to the characteristics of choosing of tunnel route, the update condition corresponding with action type C of setting is:
C1, route prefix 2 equal route prefix 1;
C2, route mask 2 equal route mask 1;
If satisfy above two conditions simultaneously, then delete route prefix information, route mask information, route next jump information and route outlet information in the routing node information; According to the Target IP v4 address, tunnel in this routing node information, determine route prefix information, route mask information, route next jump information and route outlet information with this tunnel Target IP v4 matching addresses, and be stored as and the corresponding routing node information of this tunnel Target IP v4 address information, promptly delete route prefix 1, route mask 1, route next jump 1 and route and export 1 information.And for determining routing node information in registered address 1 routing again, and preserve, after upgrading routing node information, the routing node feedback information after further will upgrading is given register device, by this register device its corresponding tunnel routing information of routing node information updating after according to renewal.
Consider actual network struction, above process can be realized by routing management module, promptly realize the function that above-mentioned tunnel routing information updating device is realized by routing management module, by routing management module registration interface is provided, external announcement when safeguarding register node information and the change of routing node information etc.
According to flow process shown in Figure 6, in further embodiment of this invention, in the above-mentioned steps 601, the routing update information that the tunnel routing information updating device receives comprises:
Route next jump information and corresponding mac address information.
Correspondingly, the action type information of tunnel routing information updating device reception is: replace, add or deletion.
With the corresponding update condition of this action type information can for: the route next jump information that comprises in corresponding route next jump information of MAC Address and the routing node information in the routing update information is identical.
Concrete renewal process and the described renewal process of the foregoing description are basic identical, consider actual network struction, the problem that need upgrade at " route next jump information " corresponding MAC Address in the tunnel route, by the ARP module registration interface is provided, external announcement when safeguarding register node information and the change of register node ARP list item etc.
The above technical scheme that provides according to the embodiment of the invention, at first receive routing update information and corresponding action type information, and obtain the update condition corresponding with this action type information, when determining that according to the routing node information corresponding of storage this routing update information meets update condition with tunnel routing information, upgrade this routing node information according to the action type information and the routing update information that receive, and further according to its corresponding tunnel routing information of routing node information updating after upgrading, thereby effectively reduced the delay that route is switched, improved the reliability of network; And, reduced the operation of periodically searching routing table and upgrading routing index, reduce the processing burden of the network equipment (as CPU), thereby improved the forwarding performance of the network equipment.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.