A kind of portable terminal utilizes multilink to realize the method for network shunting
Technical field
The present invention relates to communication technical field, relate in particular to a kind of portable terminal and utilize multilink to realize the method for network shunting.
Background technology
Portable terminal is opened the link that the link that uses behind wifi focus and the usb binding focus remains portable terminal itself at present; Same link shared with this machine in the terminal of other accesses; Will cause following problem like this: because other access terminal and the packet that serves as the focus machine is all walked same link; Can cause the carrier server end pressure, owing to share same link with other-end, the networking speed of focus machine can be influenced.
One Chinese patent application discloses a kind of load allocation method of end-to-end multilink parallel transmission for CN201110121399.5 number; Its main thought is: through to the contrast between the sum of errors error threshold value between load allocating theoretical value and the actual transmissions value; Adopt the different service dividing method according to different comparing results; Its advantage can effectively reduce after the data rate of service source end takes place significantly to change, the time delay that reorders of receiving terminal, thereby the whole end to end time delay of control.The deficiency of this method: performing step is comparatively complicated, not too is fit to this type of portable terminal embedded system.
Summary of the invention
The object of the present invention is to provide a kind of portable terminal to utilize multilink to realize the method for network shunting, make the portable terminal that serves as focus use a link, and other other links of use that access terminal, two links are parallel, realize the network shunting.
Another object of the present invention is to provide a kind of portable terminal to utilize multilink to realize the method for network shunting, to reduce the load pressure of carrier server end.
The objective of the invention is to realize through following technical scheme.
A kind of portable terminal utilizes multilink to realize the method for network shunting, may further comprise the steps:
A: set up new link B and open focus;
B: create new routing table to new link B, and said new link B is carried out routing table configuration and ip configuration;
C: Provisioning Policy route implementing network shunting.
Preferably; Said step a specifically comprises: the user selects to open focus; Use new APN parameter to dial up on the telephone, create a new link B and be other uses that accesses terminal, corresponding second Microsoft Loopback Adapter of said new link B; Former portable terminal link A is constant, and former portable terminal accesses terminal with other and sets up into a local area network (LAN).
Preferably, said focus comprises that wifi focus or usb bind focus.
Preferably, said step b specifically comprises:
B1, be that packet in the said local area network (LAN) sends through LAN gateway with destination address;
B2, the packet of destination address for the IP address that connects new link B sent through second Microsoft Loopback Adapter;
B3, default route is set uses second Microsoft Loopback Adapter to send.
Preferably, said step b also comprises: be provided with about the nat map addresses of new link B with open the forward forwarding capability, can send smoothly with the packet that guarantees this local area network (LAN).
Preferably, said step c specifically comprises:
C1, be that the packet of said local area network (LAN) ip address network segment uses new routing table to carry out route with all source addresses;
C2, be that the packet of said local area network (LAN) ip address network segment uses routing table to carry out route with all destination addresses;
C3, use new routing table to carry out route for the packet of the ip address that connects new link B destination address.
The present invention compared with prior art, the present invention adopts and to do flow splitting according to the identity that accesses terminal, through setting up two links; Use two routing tables simultaneously, and be provided with, make it the passage that two links are passless respectively with tactful route; Thereby can so that portable terminal when as focus the time, the data of this machine and the data of forwarding are separated fully, for operator; Doing like this can the balance server load, and for mobile phone users, two links are separate; Be independent of each other, ought access terminal so not to influence the networking speed of this machine too much the time, promotes user experience.
Description of drawings
Fig. 1 is for setting up the flow chart of new link B and unlatching focus in the implementation method of the present invention.
Fig. 2 is the flow chart of configuration link B routing table in the implementation method of the present invention.
Fig. 3 is the flow chart of configuration routing policy in the implementation method of the present invention.
Fig. 4 realizes the method flow diagram of network shunting for portable terminal of the present invention utilizes multilink.
Embodiment
Core concept of the present invention: a newly-built link B before opening focus; Exist simultaneously with original link A; Create new routing table 240 and corresponding routing table 254 correspondences of original link A to link B simultaneously, and link B is carried out the routing table configuration be configured to guarantee that with iptables other packets that access terminal receptions have intact routing channel; Adopt tactful route technology binding link B to use routing table 240 to carry out route at last; Link A uses routing table 254 to carry out route, makes the data of this machine and the data of forwarding separate fully, realizes the network shunting.
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
In the present embodiment, realize that portable terminal utilizes the shunting of multilink network to comprise: create new link B and open focus, link B routing table be set, three processing procedures of collocation strategy route:
See also Fig. 1, the process of creating new link B and opening focus comprises the steps:
101. use new APN parameter to dial up on the telephone, create a new link B (the corresponding second Microsoft Loopback Adapter rmnet1), link B is connected to other machines that access terminal and uses.Link A is that former link is constant, and (the corresponding first Microsoft Loopback Adapter rmnet0, the routing table that its acquiescence is used is No. 254) used in the online of this machine.
102. the APN function is opened, and this chance of back is served as server and other-end is set up a local area network (LAN), can create a Microsoft Loopback Adapter wlan0 simultaneously and be used as the equipment mutual with other-end.
See also Fig. 2, create the process of new routing table, comprise the steps:
201. other are linked the terminal and use for this local area network (LAN) for No. 240, the newly-built routing table of new link B; In routing table 240, be provided with as follows: be that packet in this local area network (LAN) sends (gateway device is corresponding equipment wlan0 in the step 102) through LAN gateway at first destination address; Secondly be that the packet of the IP address of link B sends through equipment rmnet1 with destination address, default route be set at last use equipment rmnet1 to send.
202. nat map addresses and forward chain about link B are set.Packet to guarantee this local area network (LAN) can send smoothly.
See also Fig. 3, the configuration routing policy comprises the steps:
301. all source addresses are carried out route for the packet use routing table 240 of this local area network (LAN) ip address network segment.
302. all destination addresses are carried out route for the packet use routing table 240 of this local area network (LAN) ip address network segment.
303. destination address is carried out route for the packet use routing table 240 of the ip address of connection B.In practical implementation, the priority of these several routing rules is higher than the routing rule (routing table 254 is used for this machine link corresponding A) of routing table 254 correspondences, thereby realizes the network shunting function of link A and link B.
See also Fig. 4, comprise the steps:
401. set up new link B and open focus.
402. the ip address of the new connection B that returns with step 401 and gateway address come newly-built routing table and and take this as a foundation and packet is set transmits rule.
403. on the basis of step 402, shunt with tactful route implementing network.
This enforcement adopts tactful route technology to realize the network shunting of portable terminal after opening the focus function; Article two, link is separated from each other access network; Ought access terminal does not so influence the networking speed of this machine too much the time, can also reduce the load of carrier server simultaneously.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.