The routing of the more WAN mouthfuls of routers based on strategy in the case of a kind of access of multi-operator
Method
Technical field
The present invention relates to network communication technology fields, in particular, being to be related to being based in the case of a kind of access of multi-operator
The route selecting method of more WAN mouthfuls of routers of strategy.
Background technique
As network is universal and it is more and more extensive to use, the scale of the Web vector graphic of user is increasing, wants to bandwidth
Ask also higher and higher.It is low in cost as the broadband access of the development of China's network construction, low bandwidth of geting started becomes increasingly popular.But
The cost of commercial high bandwidth access is still high.Thus, it is accessed while using multiple low bandwidth, it is wide to improve whole mesh belt, at
The high substitution solution of another cost performance being widely used for medium-sized and small enterprises.
Under the promotion of this demand, Wan mouthfuls of standard list of broadband router equipment be can no longer meet, more Wan mouth widths
Band router device comes into being.
It is compared with single Wan jaws equipment, due to multiple with WAN mouthfuls of power of presence, to equipment in forwarding data packets, to finger
Making mouth has alternative.Only reasonable selection exports and correctly establishes data connection, can be promoted as far as possible more
A whole net improved efficiency of WAN mouthfuls of bring.
Therefore, more Wan mouthfuls of routing devices need the mechanism of complete set maturation in outlet routing.This is not only more Wan
Mouth routing device forwarding performance, accesses the guarantee of correctness, even more measures the important indicator of more Wan mouthfuls of routing device qualities.
If will cause many network applications without effective strategy in the selection of outlet and mistake occur.
Such as: according to ICP/IP protocol characteristic, divided as unit of connecting session between multiple data messages.The same company
It connects in session, the essential characteristics such as IP address, port must be identical.The forwarding of routing device is all to be connected to the network as basic unit
, the selection movement of specified outlet is only had in newly-built connection.Data message in same connection must be complied with identical choosing
Road result is forwarded, and cannot be transmitted with different WAN mouths.
Present many network applications the considerations of due to safety, can be authenticated using multi-enciphering.It, can in verification process
There can be multiple network to jump, have repeatedly connection session establishment and closing motion.If used not in this multiple connection
With WAN port address as outlet, it is possible to the case where authentification failure can be generated.The direct experience of user is exactly that website can not be visited
It asks or connects and go offline.
The user accessed using multiple Wan mouthfuls, very big probability are the services for using multiple and different bandwidth operator simultaneously.
Due to the cause specific in China, the problem that interconnects between each operator is still highlighted.From " northern Netcom, the southern telecommunications " of early stage
Develop to Netcom, connection merges;Again with the arriving in 4G epoch, movement gradually develops after integrating Tie Tong as with telecommunications, connection, shifting
Headed by dynamic three big access, the second-level runners such as education network and various regions Broadcasting Cable Network and the situation deposited.It is accessed from correct operator,
Network access is carried out to specified address, is the primitive rule of more WAN mouthfuls of routing devices.
For the status coping with different operators and depositing, major portal website and the content service provider for having certain scale, all
The network address of multiple and different ownership is prepared, actively so that the user that difference is accessed from different operators there can be good body
It tests.In this case, when multi-operator accesses simultaneously, dns resolution can also have the select permeability of operator.Different operations
There is the dns server of oneself in commercial city, and to the analysis request of the same domain name, meeting preferential answering is with meeting the network of oneself ownership
Location.Therefore, more WAN mouthfuls of routing devices, the routing policy in dns resolution request, it is necessary to be connect with subsequent data access
Routing have correlation.Otherwise it will cause the net for belonging to the operator back by an operator DNS server parsing
Network address has but used the access of another operator to carry out when data access.Probability very big in this way can be due to interconnection
The bottleneck of intercommunication, the Caton for causing network to access, is unable to reach better web experience.
Summary of the invention
In view of the above shortcomings of the prior art, the present invention is provided in the case of a kind of access of multi-operator based on the more of strategy
The route selecting method of WAN mouthfuls of routers.
To achieve the goals above, The technical solution adopted by the invention is as follows:
The route selecting method of the more WAN mouthfuls of routers based on strategy, includes the following steps: in the case of a kind of access of multi-operator
(S1) router receives the dns resolution request that Intranet user is sent, and is according to preset policybased routing rule
Selected a WANx mouthfuls of dns resolution request is used as outlet, and issues dns resolution request, and wherein x is the number of WAN mouthfuls of settings;
(S2) after the router receives the DNS response message that dns server returns, it is corresponding that analytic message obtains domain name
At least one IP address, and configuration is stored in the router by IP address form corresponding with the selected WANx mouth
Routing cache module in, then by the IP address be forwarded to send the dns resolution request user equipment;
(S3) router receives the data packet that the user equipment is sent to any IP address, according to preset
Policybased routing rule judges whether there is specified outlet, if having and outlet that only one is specified, select the WANx mouthfuls as
Data packet outlet jumps to step (S5), if the outlet that do not specify, executes step if there are two outlets specified above
Suddenly (S4);
(S4) it is data packet selection outlet according to the ISP strategy configured in router:
(S4.1) judge whether it belongs to according to the purpose IP address that the user equipment carried in the data packet is selected
In known operator ISP, if so, determining the ownership of the IP address and executing step (S4.2), step (S5) is otherwise jumped to;
(S4.2) judge the operator ISP for whether thering is the IP address to belong in the multi-operator of the router access, if
Have, then selects operator ISP is corresponding WANx mouthfuls and to execute step (S4.3), otherwise jump to step (S5);
(S4.3) judge operator ISP it is corresponding WANx mouthfuls it is whether unique, if so, select the WANx mouthfuls as data
Packet outlet, it is no to then follow the steps (S5);
(S5) what the user equipment that inquiring whether there is in the routing cache module and carry in the data packet was selected
Purpose IP address and selected WANx mouthfuls of corresponding relationship, and if it exists, then select the purpose IP address it is corresponding WANx mouthfuls as number
It is exported according to packet, if it does not exist, thens follow the steps (S6);
(S6) it according to the loading rule selection data packet outlet configured in router, if load imbalance, selects to load
Low WANx mouth is exported as data packet, if load balancing, is randomly choosed a WANx mouthfuls and is exported as data packet.
Wherein specifically, the preset policybased routing rule includes default policy and the manual plan by user's manual configuration
Slightly, when being dns resolution request or data packet selection outlet according to preset policybased routing rule, institute is preferentially judged whether there is
State manual strategy, and if it exists, then select the WANx mouth that strategy is specified manually as outlet, if it does not exist, then according to default policy
Selection outlet.
Further, in the step (S1), when above when there are two specified WANx mouths of the manual strategy, according to institute
The specified outlet that the loading rule configured in router selectes the dns resolution request is stated, if load imbalance, is referred at these
The a WANx mouthfuls of specified outlet as dns resolution request that load is low is selected in fixed WANx mouth, if load balancing,
The a WANx mouthfuls of specified outlet as dns resolution request is randomly choosed in these specified WANx mouths;
In the step (S3), when above when there are two specified WANx mouths of the manual strategy, then step is jumped to
(S5).
Further, the default policy is load balancing preference strategy, specified operator ISP preference strategy and specifies
It is any in WAN mouthfuls of preference strategies;
In the step (S1), when the default policy is load balancing preference strategy, according to matching in the router
The loading rule set selectes the outlet of dns resolution request, if load imbalance, select to load a low WANx mouthfuls as
The outlet of the dns resolution request randomly chooses a WANx mouthfuls of outlet as dns resolution request if load balancing;
When the default policy is specified operator ISP preference strategy or specified WAN mouthfuls of preference strategy, first described in judgement
Specified operator ISP it is corresponding WANx mouthfuls or the specified WAN mouth it is whether unique, if so, this is WANx mouthfuls unique
As the specified outlet of dns resolution request, the DNS is otherwise selected according to the loading rule configured in the router and is solved
Analyse the outlet of request;
In the step (S3), when the default policy is to specify WAN mouthfuls of preference strategies, first judge described specified
Whether WAN mouthfuls unique, if selecting the WANx mouthfuls to export as data packet, otherwise jumps to step (S5);
When the default policy is load balancing preference strategy or specified operator ISP preference strategy, do not specify
Outlet executes step (S4).
More specifically, the router in configure loading rule in load balancing judgment method:
The line bandwidth of the operator ISP accessed according to each WANx mouthfuls, is pre-configured with each WANx mouthfuls of standard flow
Ratio, each WANx mouthfuls of the flow of real-time detection calculate and compare the current real-time flows amount ratio between WANx mouthfuls related
It is load balancing state when its ratio is consistent with the standard flow ratio configured, it is currently real-time when its ratio is inconsistent
The smallest WANx mouthfuls of flow proportional is the low outlet of load.
Wherein, the ratio when load balancing state is consistent, allows each WANx mouthfuls of current real-time flows amount ratio in phase
For floating in 80% ~ 120% range of the accounting of the standard flow ratio configured.
In order to improve routing efficiency, in the step (S2), when the IP address that parsing DNS response message obtains is slow in routing
In the presence of in storing module, then updates corresponding WANx mouthfuls of IP address in routing cache module and be the WANx mouth of newest determination, and brush
This new records the holding time of list item.
Compared with prior art, the invention has the following advantages:
(1) present invention passes through the setting of routing cache module, improves the treatment effeciency for concurrently accessing same service, can make
It obtains routing query and directly selects outlet, avoid router and largely carry out repetitive operation and consume performance, while passing through ISP strategy
Configuration, efficiently solving between domestic different operators route mutually access will appear that domain name mapping failure, response are long etc. to be lacked
Point is truly realized the service for accessing that operator, just sends from that operator's line outlet, and specific aim of the present invention
By force, application is good, and Web vector graphic is flexible, and load is more humanized, is with a wide range of applications, and is suitble to promote and apply.
(2) the problem of accessing a plurality of operator's route present invention efficiently solves an Intranet, especially this plurality of route
When less identical, the present invention accomplishes to solve exchanging visit bottleneck by route routing by ISP strategy from the root, guarantees access line
The determination of selection is errorless.
Detailed description of the invention
Fig. 1 is the routing flow diagram of dns resolution request in the present invention.
Fig. 2 is the routing flow diagram of data packet in the present invention.
Specific embodiment
Present invention will be further explained below with reference to the attached drawings and examples, and embodiments of the present invention include but is not limited to
The following example.
Embodiment
As shown in Figure 1 to Figure 2, the route selecting method based on more WAN mouthfuls of tactful routers in the case of multi-operator access,
Include the following steps:
(S1) router receives the dns resolution request that Intranet user is sent, and is according to preset policybased routing rule
Selected a WANx mouthfuls of dns resolution request is used as outlet, and issues dns resolution request, and wherein x is the number of WAN mouthfuls of settings.
Wherein specifically, the preset policybased routing rule includes default policy and the manual plan by user's manual configuration
Slightly, when being dns resolution request or data packet selection outlet according to preset policybased routing rule, institute is preferentially judged whether there is
State manual strategy, and if it exists, then select the WANx mouth that strategy is specified manually as outlet, if it does not exist, then according to default policy
Selection outlet.
In the step (S1), when above when there are two specified WANx mouths of the manual strategy, according to the router
The loading rule of interior configuration selectes the specified outlet of the dns resolution request, if load imbalance, in these specified WANx
The a WANx mouthfuls of specified outlet as dns resolution request that load is low is selected in mouthful, it is specified at these if load balancing
WANx mouth in randomly choose a WANx mouthfuls as the dns resolution request specified outlet.
The default policy is load balancing preference strategy, specified operator ISP preference strategy and specified WAN mouthfuls of preferential plan
It is any in slightly;
It is selected according to the loading rule configured in the router when the default policy is load balancing preference strategy
The outlet of the dns resolution request selects to load a low WANx mouthfuls as dns resolution request if load imbalance
Outlet, if load balancing, randomly choose a WANx mouthfuls as the dns resolution request outlet;
When the default policy is specified operator ISP preference strategy or specified WAN mouthfuls of preference strategy, first described in judgement
Specified operator ISP it is corresponding WANx mouthfuls or the specified WAN mouth it is whether unique, if so, this is WANx mouthfuls unique
As the specified outlet of dns resolution request, the DNS is otherwise selected according to the loading rule configured in the router and is solved
Analyse the outlet of request.
(S2) after the router receives the DNS response message that dns server returns, it is corresponding that analytic message obtains domain name
At least one IP address, and configuration is stored in the router by IP address form corresponding with the selected WANx mouth
Routing cache module in, then by the IP address be forwarded to send the dns resolution request user equipment.
In order to improve routing efficiency, in the step (S2), when the IP address that parsing DNS response message obtains is slow in routing
In the presence of in storing module, then updates corresponding WANx mouthfuls of IP address in routing cache module and be the WANx mouth of newest determination, and brush
This new records the holding time of list item.
(S3) router receives the data packet that the user equipment is sent to any IP address, according to preset
Policybased routing rule judges whether there is specified outlet, if having and outlet that only one is specified, select the WANx mouthfuls as
Data packet outlet jumps to step (S5), if the outlet that do not specify, executes step if there are two outlets specified above
Suddenly (S4);It is specific as follows:
In the step (S3), when above when there are two specified WANx mouths of the manual strategy, then step is jumped to
(S5);
When the default policy is to specify WAN mouthfuls of preference strategies, first judge whether the specified WAN mouth is unique, if
It is to select the WANx mouthfuls to export as data packet, otherwise jumps to step (S5);
When the default policy is load balancing preference strategy or specified operator ISP preference strategy, do not specify
Outlet executes step (S4).
(S4) it is data packet selection outlet according to the ISP strategy configured in router:
(S4.1) judge whether it belongs to according to the purpose IP address that the user equipment carried in the data packet is selected
In known operator ISP, if so, determining the ownership of the IP address and executing step (S4.2), step (S5) is otherwise jumped to;
(S4.2) judge the operator ISP for whether thering is the IP address to belong in the multi-operator of the router access, if
Have, then selects operator ISP is corresponding WANx mouthfuls and to execute step (S4.3), otherwise jump to step (S5);
(S4.3) judge operator ISP it is corresponding WANx mouthfuls it is whether unique, if so, select the WANx mouthfuls as data
Packet outlet, it is no to then follow the steps (S5);
(S5) what the user equipment that inquiring whether there is in the routing cache module and carry in the data packet was selected
Purpose IP address and selected WANx mouthfuls of corresponding relationship, and if it exists, then select the purpose IP address it is corresponding WANx mouthfuls as number
It is exported according to packet, if it does not exist, thens follow the steps (S6);
(S6) it according to the loading rule selection data packet outlet configured in router, if load imbalance, selects to load
Low WANx mouth is exported as data packet, if load balancing, is randomly choosed a WANx mouthfuls and is exported as data packet.
More specifically, the router in configure loading rule in load balancing judgment method:
The line bandwidth of the operator ISP accessed according to each WANx mouthfuls, is pre-configured with each WANx mouthfuls of standard flow
Ratio, each WANx mouthfuls of the flow of real-time detection calculate and compare the current real-time flows amount ratio between WANx mouthfuls related
It is load balancing state when its ratio is consistent with the standard flow ratio configured, it is currently real-time when its ratio is inconsistent
The smallest WANx mouthfuls of flow proportional is the low outlet of load.
Further, the ratio when load balancing state is consistent, allows each WANx mouthfuls of current real-time flows amount ratio
It floats in 80% ~ 120% range of the accounting relative to the standard flow ratio configured.
Above-described embodiment is merely a preferred embodiment of the present invention, and it is not intended to limit the protection scope of the present invention, as long as using
Design principle of the invention, and the non-creative variation worked and made is carried out on this basis, it should belong to of the invention
Within protection scope.