Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making under the creative work prerequisite the every other embodiment obtained, belong to the scope of protection of the invention.
Fig. 2 embodiment of the present invention based on the structural representation of dynamic routing treatment system, as shown in Figure 2, this dynamic routing treatment system mainly comprises PC 21, home gateway 22, telecommunications fixed network Intranet 23, telecommunications mobile Internet 24, Ethernet 25, xPON 26 and the Internet 27 etc.Be provided with dynamic routing device 221, DSL wan interface 222, USB wan interface 223, EthernetWAN interface 224 and xPON wan interface 225 etc. in home gateway 22.Wherein, dynamic routing device 221 is connected with DSL wan interface 222, USB wan interface 223, Ethernet wan interface 224 and xPONWAN interface 225 respectively; DSL wan interface 222 is connected with telecommunications fixed network Intranet 23; USB wan interface 223 is connected with telecommunications mobile Internet 24; Ethernet wan interface 224 is connected with Ethernet 25; XPON wan interface 225 is connected with xPON 26.
In the present embodiment, home gateway 22 can also be provided with dns-proxy server (DNS Proxy), and dynamic routing device 221 can be arranged on this DNS Proxy.
It should be noted that, various embodiments of the present invention are not limited type and the quantity of the wan interface in home gateway and the network in system, and those skilled in the art can arrange arbitrarily according to the needs of actual conditions wan interface in home gateway and type and the quantity of the network in system.
In addition, the dynamic routing method that various embodiments of the present invention provide and dynamic routing device can be realized based on above-mentioned network system.Below by the drawings and specific embodiments, technical scheme of the present invention is described in further detail.
The flow chart of the embodiment that Fig. 3 is dynamic routing processing method of the present invention, as shown in Figure 3, the method for the present embodiment comprises:
Step 101, receiving terminal send carries URL(uniform resource locator) (Uniform/UniversalResource Locator; Be called for short: URL) the dns resolution request of address.
In the present embodiment, when the user inputs the URL address on terminal, terminal is carried at this URL address in the dns resolution request, and sends to the dynamic routing processing unit.Wherein, this URL address also can be referred to as web page address; Terminal can be specially PC; The dynamic routing device can be arranged on home gateway, concrete, can also be arranged on the DNS Proxy of home gateway.
Step 102, the dns resolution request is sent to by wan interface in the dns resolution server in the network be connected with this wan interface, for the dns resolution server in this network, according to the dns resolution request received, judge whether to return the dns resolution response.
In the present embodiment, on home gateway, a plurality of wan interfaces can be set, the dynamic routing device is connected with those wan interfaces respectively.Wherein, this wan interface can specifically comprise DSL wan interface, USB wan interface, Ethernet (Ethernet) wan interface and/or passive optical network (xPON) wan interface.It should be noted that, in various embodiments of the present invention not quantity and the type to the wan interface that arranges in home gateway limited, those skilled in the art can, according to the needs of actual conditions, arrange arbitrarily quantity and the type of the wan interface in home gateway.
In the present embodiment, when a plurality of wan interface is arranged, can carry out with reference to following steps:
The request of domain name system analysis is sent to the domain name system resolution server in the network be connected with described Wide Area Network interface by a Wide Area Network interface, according to the domain name system analysis request received, judge whether to return the domain name system resolution response for the domain name system resolution server in described network;
Return to the domain name system resolution response if do not get within the predetermined time, the request of domain name system analysis is sent to the domain name system resolution server in the connected network of described next Wide Area Network interface by next Wide Area Network interface;
Return to the domain name system resolution response if do not get within the predetermined time, repeat this step, until the request of domain name system analysis is sent to the domain name system resolution server in the connected network of described last Wide Area Network interface by last Wide Area Network interface, domain name system resolution server for described last Wide Area Network interface in connected network, according to the domain name system analysis request received, judges whether to return the domain name system resolution response.
Concrete, after the dynamic routing processing unit receives the dns resolution request, by this dns resolution request by the wan interface arranged in home gateway, send in the dns resolution server in the network corresponding with this wan interface, after dns resolution server in network receives the dns resolution request, obtain the URL address in this dns resolution request, search in the dns resolution server and whether stored purpose Internet Protocol (the Internet Protocol corresponding with this URL address; Be called for short: IP) address, if do not store purpose IP address corresponding to this URL address, does not generate the dns resolution response; If stored purpose IP address corresponding to this URL address, generate dns resolution response, and the dns resolution response that will carry purpose IP address returns to the dynamic routing processing unit.It should be noted that, can purpose IP address corresponding to pre-stored URL address and this URL address in the database in the dns resolution server in each network.
For instance, when the dynamic routing processing unit sends the dns resolution request by the DSL wan interface, this dns resolution request is sent in the dns resolution server in the telecommunications fixed network Intranet be connected with the DSL wan interface, for this dns resolution server according to the URL address in the dns resolution request received, search in database and whether store purpose IP address corresponding to this URL address, if storage, the dns resolution response that will carry purpose IP address returns to the dynamic routing processing unit by the DSL wan interface; If not storage, do not return to the dns resolution response.
If step 103 gets the dns resolution response that the dns resolution server in the connected network of wan interface returns, according to returning to this dns resolution, respond the purpose IP address in corresponding wan interface and this dns resolution response, configuring home gateway routing table.
In the present embodiment, if the DSN resolution server in the connected network of some wan interfaces is according to the URL address in the dns resolution request received, search while getting purpose IP address corresponding to this URL address, by this wan interface, to the dynamic routing processing unit, return to the dns resolution response that carries purpose IP address.The dynamic routing processing unit is from this wan interface receives the dns resolution response, according to the purpose IP address in this wan interface and this dns resolution response, the configuring home gateway routing table, this home gateway routing table comprises the information such as purpose IP address, wan interface title.Thereby realized having determined that according to the dns resolution response of obtaining the user inputs wan interface corresponding to URL address.Simultaneously, the dynamic routing device can also return to terminal by the dns resolution response, and terminal just can, according to the purpose IP address received, connect to this purpose IP address.
In the present embodiment, the dns resolution request that carries the URL address sent by receiving terminal, and this dns resolution request is sent to by each wan interface in the dns resolution server in the network be connected with this wan interface, and get the dns resolution response that the dns resolution server in the connected network of wan interface returns, thereby according to the purpose IP address in this wan interface and dns resolution response, the configuring home gateway routing table, thereby realized according to the dns resolution response of obtaining, determined that the user inputs wan interface corresponding to URL address, and then effectively, reasonably configured the routing table of home gateway.
The flow chart of another embodiment that Fig. 4 is dynamic routing processing method of the present invention, in the present embodiment, take in home gateway and the DSL wan interface is set and the USB wan interface is example, introduce in detail the technical scheme of the present embodiment, as shown in Figure 4, the method for the present embodiment comprises:
The dns resolution request that carries the URL address that step 201, receiving terminal send.
In the present embodiment, shown in the implementation of step 201 and Fig. 3, the implementation of step 101 is similar, does not repeat them here.
Step 202, this dns resolution request is sent in the dns resolution server in the telecommunications fixed network Intranet corresponding with this DSL wan interface by the DSL wan interface, according to the dns resolution request received, judge whether to return the dns resolution response for the dns resolution server in this telecommunications fixed network Intranet.
In the present embodiment, the dynamic routing device can set in advance the order which DNS interface to send the dns resolution response by.Concrete, in the present embodiment, set in advance first and send the dns resolution response by the DSL wan interface, and wait for and obtain the dns resolution response of returning, the dns resolution response of returning if do not get within the predetermined time, by the USB wan interface, send the dns resolution response, and wait for and obtain the dns resolution response of returning.Certainly, can set in advance first and send the dns resolution response by the USB wan interface, and wait for and obtain the dns resolution response of returning, the dns resolution response of returning if do not get within the predetermined time, by the DSL wan interface, send the dns resolution response, and wait for and obtain the dns resolution response of returning.Herein, take first and to describe as example by the DSL wan interface.
Step 203, judge whether to get within the predetermined time the dns resolution response of returning, if receive the dns resolution response, perform step 204; If do not receive the dns resolution response, perform step 205.
If step 204 gets the dns resolution response that the dns resolution server in the connected telecommunications fixed network Intranet of this DSL wan interface returns, according to returning to this dns resolution, respond the purpose IP address in corresponding DSLWAN interface and this dns resolution response, the configuring home gateway routing table, finish.
In the present embodiment, when the dynamic routing processing unit sends the dns resolution request by the DSL wan interface, this dns resolution request is sent in the dns resolution server in the telecommunications fixed network Intranet be connected with the DSL wan interface, for this dns resolution server according to the URL address in the dns resolution request received, search to obtain and whether stored purpose IP address corresponding to this URL address, if the dns resolution response that will carry purpose IP address returns to the dynamic routing processing unit by the DSL wan interface; If not, do not return to the dns resolution response.
When searching purpose IP address corresponding to the URL address that obtained in the dns resolution request, the dns resolution response that will carry purpose IP address returns to the dynamic routing processing unit by the DSL wan interface, dynamic treatment device responds the purpose IP address in corresponding DSL wan interface and dns resolution response, configuring home gateway routing table according to this dns resolution; Simultaneously, this dns resolution response can also be returned to terminal.
If step 205 does not get the dns resolution response of returning within the predetermined time, the dns resolution request is sent in the dns resolution server in the connected telecommunications mobile Internet of this USB wan interface by the USB wan interface, according to the dns resolution request received, judge whether to return the dns resolution response for this dns resolution server.
In the present embodiment, it is similar whether whether the dns resolution server in the telecommunications mobile Internet returns to dns resolution response operation principle according to the dns resolution request received and the dns resolution server in telecommunications fixed network Intranet return to dns resolution responsive operation principle according to the dns resolution request of reception, do not repeat them here.
Step 206, judge whether to receive within the predetermined time the dns resolution response of returning, if receive the dns resolution response, perform step 207; If do not receive the dns resolution response, perform step 208.
If step 207 gets the dns resolution response that the dns resolution server in the connected telecommunications mobile Internet of this USB wan interface returns, according to returning to this dns resolution, respond the purpose IP address in corresponding USBWAN interface and this dns resolution response, the configuring home gateway routing table, finish.
In the present embodiment, when the dynamic routing processing unit sends the dns resolution request by the USB wan interface, this dns resolution request is sent in the dns resolution server in the telecommunications mobile Internet be connected with the USB wan interface, for this dns resolution server according to the URL address in the dns resolution request received, search and whether get purpose IP address corresponding to this URL address, if the dns resolution response that will carry purpose IP address returns to the dynamic routing processing unit by the USB wan interface; If not, do not return to the dns resolution response.
When the URL address in the dns resolution request is the address of this dns resolution server, the dns resolution response that will carry purpose IP address returns to the dynamic routing processing unit by the USB wan interface, dynamic treatment device responds the purpose IP address in corresponding USB wan interface and dns resolution response, configuring home gateway routing table according to this dns resolution; Simultaneously, this dns resolution response can also be returned to terminal.
If step 208 does not get the dns resolution response of returning within the predetermined time, to terminal, send request failure.
In the present embodiment, if the DSL wan interface arranged in home gateway and USB wan interface all do not get the dns resolution response of returning, this visit network failure is described, and returns to terminal by the request failure, ask unsuccessfully so that the user is known this time.
In the present embodiment, the dns resolution request that carries the URL address sent by receiving terminal, and by this dns resolution request by first sending in the dns resolution server in the telecommunications fixed network Intranet be connected with this DSL wan interface by the DSL wan interface, the dns resolution response of returning if get, according to purpose IP address and DSL wan interface in this dns resolution response, configuring home gateway routing table; The dns resolution response of returning if do not get within the predetermined time, the dns resolution request is sent to next wan interface, the USB wan interface, respond if get dns resolution, according to purpose IP address and USB wan interface in this dns resolution response, configuring home gateway routing table; If do not get the dns resolution response, to terminal, send request failure.Thereby realized having determined that the user inputs wan interface corresponding to URL address, and then effectively, reasonably having configured the routing table of home gateway according to the dns resolution response of obtaining.
It should be noted that, in the present embodiment not type and the quantity to the wan interface that arranges in home gateway limited, those skilled in the art can arrange type and the quantity of wan interface according to actual needs in home gateway, and can set in advance the order which wan interface to send the dns resolution response by.Simultaneously, also it should be noted that, in the embodiment of the present invention, the order which DNS interface to send the dns resolution response by is not limited, those skilled in the art can need to arrange arbitrarily the order which DNS interface to send the dns resolution response by according to actual conditions.
The flow chart of another embodiment that Fig. 5 is dynamic routing processing method of the present invention, in the present embodiment, take in home gateway that DSL wan interface, USB wan interface, Ethernet wan interface and xPON wan interface are set is example, introduce in detail the technical scheme of the present embodiment, as shown in Figure 5, the method for the present embodiment comprises:
The dns resolution request that carries the URL address that step 301, receiving terminal send.
In the present embodiment, shown in the implementation of step 301 and Fig. 3, the implementation of step 101 is similar, does not repeat them here.
Step 302, the dns resolution request is sent in the dns resolution server in the network that those wan interfaces are corresponding by DSL wan interface, USB wan interface, Ethernet wan interface and xPON wan interface respectively simultaneously, according to the dns resolution request received, judge whether to return the dns resolution response for those dns resolution servers.
In the present embodiment, the wan interface that the dynamic routing processing unit can configure the dns resolution request of reception by home gateway sends in the dns resolution server in the network that this wan interface is corresponding.So that all dns resolution servers can judge whether to return the dns resolution response according to the dns resolution request received simultaneously, thereby can more effectively improve the operating efficiency of dynamic routing processing unit.
Step 303, judge whether to get within the predetermined time the dns resolution response of returning, the dns resolution of returning if get within the predetermined time response, perform step 304; The dns resolution response of returning if do not get within the predetermined time, perform step 305.
If step 304 gets the dns resolution response that the dns resolution server in the connected network of wan interface returns, according to returning to this dns resolution, respond the purpose IP address in corresponding wan interface and this dns resolution response, the configuring home gateway routing table, finish.
In the present embodiment, the dynamic routing processing unit is simultaneously by the DSL wan interface, the USB wan interface, Ethernet wan interface and xPON wan interface send the dns resolution request, for the dns resolution server in the telecommunications fixed network Intranet corresponding with the DSL wan interface, dns resolution server in telecommunications mobile Internet corresponding to USB wan interface, dns resolution server in xPON corresponding to the dns resolution server in Ethernet corresponding to Ethernet wan interface and xPON wan interface is respectively to the URL address according in this dns resolution request, search and whether get the purpose IP address corresponding with this URL address, if the dns resolution whois lookup in network corresponding to which wan interface gets purpose IP address corresponding to this URL address, generate the dns resolution response, and the dns resolution response that will carry purpose IP address returns to the dynamic routing processing unit.
For instance, if the judgement of the dns resolution server in telecommunications mobile Internet corresponding to USB wan interface URL address is identical with the address of this dns resolution server, return to the dns resolution response, the dynamic routing processing unit is according to the purpose IP address in this USB wan interface and dns resolution response, the configuring home gateway routing table, so that the dynamic routing processing unit can be determined the wan interface that user's access websites is corresponding, thereby make data to send to main frame corresponding to purpose IP address by the USB wan interface, and then effectively, reasonably configured the routing table of home gateway.
If step 305 does not receive the dns resolution response that the dns resolution server in dns resolution server in the Ethernet that dns resolution server, Ethernet wan interface in the telecommunications mobile Internet that dns resolution server, USB wan interface in the telecommunications fixed network Intranet that the DSL wan interface is corresponding is corresponding is corresponding and xPON corresponding to xPONWAN interface returns within the predetermined time, to terminal, send request failure.
In the present embodiment, when the dynamic routing processing unit sends to the dns resolution server in the network be connected with the plurality of wan interface by a plurality of wan interfaces respectively by the dns resolution request simultaneously, the dynamic routing processing unit receives only the dns resolution response that the dns resolution server in the connected network of wan interface returns, and according to this dns resolution response and this wan interface, the routing table of configuring home gateway; Perhaps do not receive the dns resolution response that the dns resolution server in the connected network of all wan interfaces returns, and return to the request failure to terminal.
In the present embodiment, the dns resolution request that carries the URL address sent by receiving terminal, and this dns resolution request is sent to the dns resolution server in the telecommunications fixed network Intranet that the DSL wan interface is corresponding simultaneously, dns resolution server in telecommunications mobile Internet corresponding to USB wan interface, in dns resolution server in xPON corresponding to the dns resolution server in Ethernet corresponding to Ethernet wan interface and xPON wan interface, if receive the dns resolution response that the dns resolution server in the network that some wan interfaces are corresponding returns, according to purpose IP address and this wan interface in this dns resolution response, the configuring home gateway routing table, if do not get within the predetermined time the dns resolution response, to terminal, send request failure.Thereby realized having determined that the user inputs wan interface corresponding to URL address, and then effectively, reasonably having configured the routing table of home gateway according to the dns resolution response of obtaining.
The structural representation of the embodiment that Fig. 6 is dynamic routing processing unit of the present invention, as shown in Figure 6, the dynamic routing processing unit of the present embodiment comprises: receiver module 31, the first sending module 32 and configuration module 33.Wherein, the dns resolution request that carries the URL address that receiver module 31 sends for receiving terminal; The first sending module 32 is for sending in the dns resolution server of the network be connected with this wan interface by the dns resolution request respectively by wan interface, according to the dns resolution request received, judge whether to return the dns resolution response for the dns resolution server in this network; If the dns resolution response that configuration module 33 returns for the dns resolution server that gets the connected network of wan interface, according to returning to dns resolution, respond the purpose IP address in corresponding wan interface and dns resolution response, configuring home gateway routing table.
The dynamic routing processing unit of the present embodiment can be for the technical scheme of embodiment of the method shown in execution graph 3, and it realizes that principle is similar, repeats no more herein.
In the present embodiment, the dns resolution request that carries the URL address sent by receiving terminal, and this dns resolution request is sent to by each wan interface in the dns resolution server in the network be connected with this wan interface, and get the dns resolution response that the dns resolution server in the connected network of wan interface returns, thereby according to the purpose IP address in this wan interface and dns resolution response, the configuring home gateway routing table, thereby realized according to the dns resolution response of obtaining, determined that the user inputs wan interface corresponding to URL address, and then effectively, reasonably configured the routing table of home gateway.
Further, the structural representation of another embodiment that Fig. 7 is dynamic routing processing unit of the present invention, as shown in Figure 7, on the basis of the described embodiment of Fig. 6, the first sending module 32 can specifically comprise: the first transmitting element 321, judging unit 322 and the second transmitting element 323, wherein, this first transmitting element 321 is for sending in the dns resolution server of the network be connected with this wan interface by the dns resolution request by a wan interface, according to the dns resolution request received, judge whether to return the dns resolution response for the dns resolution server in this network, judging unit 322 is for judging whether configuration module 33 receives the dns resolution response of returning within the predetermined time, do not receive if judge configuration module 33 within the predetermined time the dns resolution response of returning, the first transmitting element 321 sends to the dns resolution request in the dns resolution server in the connected network of next wan interface by next wan interface, if configuration module 33 does not receive the dns resolution response of returning within the predetermined time, repeat this step, until the first transmitting element 321 passes through last wan interface by the dns resolution request, the dns resolution server connected for last wan interface is according to the dns resolution request received, judge whether to return the dns resolution response, the second transmitting element 323 is judged in the given time for judging unit 322, and configuration module 33 does not receive the dns resolution response that the dns resolution server in the connected network of last wan interface returns, and to terminal, sends request failure.
It should be noted that, judge in predetermined time and return to the dns resolution response at judging unit 322, trigger configuration module 33, so that configuration module 33 responds the purpose IP address in corresponding wan interface and dns resolution response, configuring home gateway routing table according to returning to dns resolution.
The dynamic routing processing unit of the present embodiment can be for the technical scheme of embodiment of the method shown in execution graph 4, and it realizes that principle is similar, repeats no more herein.
In the present embodiment, the dns resolution request that carries the URL address sent by receiving terminal, and by this dns resolution request by first sending in the dns resolution server in the network be connected with this wan interface by a wan interface, the dns resolution response of returning if get, according to purpose IP address and this wan interface in this dns resolution response, configuring home gateway routing table; The dns resolution response of returning if do not get within the predetermined time, the dns resolution request is sent to next wan interface, if get the dns resolution response, according to purpose IP address and next wan interface in this dns resolution response, configuring home gateway routing table; If do not get the dns resolution response, to terminal, send request failure.Thereby realized having determined that the user inputs wan interface corresponding to URL address, and then effectively, reasonably having configured the routing table of home gateway according to the dns resolution response of obtaining.
Further, in yet another embodiment of the present invention, on the basis of the described embodiment of Fig. 6, the first sending module 32 is specifically for send to the dns resolution request in the dns resolution server in the connected network of at least two wan interfaces by least two wan interfaces respectively simultaneously, dns resolution server at least two wan interfaces in connected network, according to the dns resolution request received, judges whether to return the dns resolution response.
The dynamic routing processing unit of the present embodiment can be for the technical scheme of embodiment of the method shown in execution graph 5, and it realizes that principle is similar, repeats no more herein.
In the present embodiment, the dns resolution request that carries the URL address sent by receiving terminal, and this dns resolution request is sent in the dns resolution server in the connected network of at least two wan interfaces simultaneously, if receive the dns resolution response that the dns resolution server in the network that some wan interfaces are corresponding returns, according to purpose IP address and this wan interface in this dns resolution response, configuring home gateway routing table; If do not get within the predetermined time the dns resolution response, to terminal, send request failure.Thereby realized having determined that the user inputs wan interface corresponding to URL address, and then effectively, reasonably having configured the routing table of home gateway according to the dns resolution response of obtaining.
The structural representation of the embodiment that Fig. 8 is home gateway of the present invention, as shown in Figure 8, the home gateway of the present embodiment comprises: Wide Area Network interface 41 and dynamic routing processing unit 42.
In the present embodiment, dynamic routing processing unit 42 can, for the technical scheme of embodiment of the method shown in execution graph 3 to Fig. 5, not repeat them here.In addition, Wide Area Network interface 41 can specifically comprise: DSL wan interface, USB wan interface, Ethernet wan interface and/or xPON wan interface.
In the present embodiment, the dns resolution request that carries the URL address sent by receiving terminal, and this dns resolution request is sent to by each wan interface in the dns resolution server in the network be connected with this wan interface, and get the dns resolution response that the dns resolution server in the connected network of wan interface returns, thereby according to the purpose IP address in this wan interface and dns resolution response, the configuring home gateway routing table, thereby realized according to the dns resolution response of obtaining, determined that the user inputs wan interface corresponding to URL address, and then effectively, reasonably configured the routing table of home gateway.
One of ordinary skill in the art will appreciate that: realize that the hardware that all or part of step of said method embodiment can be relevant by program command completes, aforesaid program can be stored in a computer read/write memory medium, this program, when carrying out, is carried out the step that comprises said method embodiment; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CDs.
Finally it should be noted that: above embodiment only, in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment, the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: its technical scheme that still can put down in writing aforementioned each embodiment is modified, or part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.