A data packet routing device, comprising a processor and a storage device, wherein the storage device stores processor-executable programs, and the programs comprise:
- a route resolution request message acquiring module configured to receive and resolve an initial route resolution request message to obtain a requested domain name in the initial route resolution request message;
- a specified domain name resolution server acquiring module configured to determine whether there is a specified domain name resolution server corresponding to the requested domain name according to preset domain name configuration information and the requested domain name, wherein the preset domain name configuration information comprises a correspondence between a domain name, a specified domain name resolution server and an address of the specified domain name resolution server;
- a routing information request message acquiring module configured to modify a default destination address of the initial route resolution request message to an address of the specified domain name resolution server if there is the specified domain name resolution server corresponding to the requested domain name, so as to obtain a routing information request message;
- a routing information acquiring module configured to search for request routing information corresponding to the routing information request message according to the routing information request message and preset routing information, wherein the preset routing information comprises a correspondence between mark information and routing information;
- and
- a sending module configured to send a data packet to a destination address corresponding to the requested domain name according to the routing information;
- wherein the routing information request message acquiring module is further configured to:
- after the routing information request message acquiring module modifies the default destination address to the address of the specified domain name resolution server, send the initial route resolution request message to the address of the specified domain name resolution server, so as to obtain the routing information request message from the specified domain name resolution server, wherein the routing information request message comprises an IP address corresponding to the requested domain name;
- and
- wherein the routing information acquiring module comprises a mark information acquisition unit and a routing information acquisition unit, wherein
- the mark information acquisition unit is configured to determine whether the IP address corresponding to the requested domain name in the routing information request message is included in preset filtering information according to the preset filtering information and the routing information request message, and set mark information in the routing information request message if a determination result is yes, wherein the preset filtering information comprises a correspondence between an IP address corresponding to a domain name in the preset domain name configuration information and mark information, and
- the routing information acquisition unit is configured to when the mark information is set in the routing information request message, search for the request routing information corresponding to the routing information request message according to the preset routing information and the mark information in the routing information request message, when the mark information is not set in the routing information request message, search for the request routing information corresponding to the routing information request message according to the preset routing information and the IP address corresponding to the requested domain name in the routing information request message.