CN101931663B - Method capable of dynamically setting domain name server and wireless communication terminal - Google Patents

Method capable of dynamically setting domain name server and wireless communication terminal Download PDF

Info

Publication number
CN101931663B
CN101931663B CN201010271051.XA CN201010271051A CN101931663B CN 101931663 B CN101931663 B CN 101931663B CN 201010271051 A CN201010271051 A CN 201010271051A CN 101931663 B CN101931663 B CN 101931663B
Authority
CN
China
Prior art keywords
dns
information
wireless communication
communication terminal
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201010271051.XA
Other languages
Chinese (zh)
Other versions
CN101931663A (en
Inventor
赵永刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201010271051.XA priority Critical patent/CN101931663B/en
Publication of CN101931663A publication Critical patent/CN101931663A/en
Application granted granted Critical
Publication of CN101931663B publication Critical patent/CN101931663B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明提供一种可动态设置域名服务器的方法及无线通信装置,当无线通信终端上电时,初始化主DNS缓存变量、辅DNS缓存变量和设置状态变量;当发起拨号连接过程时,检测拨号连接的参数信息,如果在拨号参数信息中包含有主DNS地址和辅DNS地址,则记录DNS地址并置设置状态变量;检测设置状态变量,如果状态变量置位,则在无线通信终端与用户设备进行DHCP或IPCP协商过程时,将缓存的主DNS地址和辅DNS地址返回给用户设备;如果设置状态变量没有置位,则将网络分配的DNS地址返回给用户设备。与现有技术相比较,使用户在通过无线数据卡进行数据业务时,可以通过接口设置指定的DNS地址。

The present invention provides a method and a wireless communication device capable of dynamically setting a domain name server. When the wireless communication terminal is powered on, the primary DNS cache variable, the secondary DNS cache variable and the setting state variable are initialized; when the dial-up connection process is initiated, the dial-up connection is detected If the dialing parameter information includes the primary DNS address and the secondary DNS address, record the DNS address and set the state variable; detect and set the state variable, if the state variable is set, then the wireless communication terminal and the user equipment will During the DHCP or IPCP negotiation process, return the cached primary DNS address and secondary DNS address to the user equipment; if the setting state variable is not set, return the DNS address assigned by the network to the user equipment. Compared with the prior art, the user can set the specified DNS address through the interface when performing data service through the wireless data card.

Description

一种可动态设置域名服务器的方法及无线通信终端Method and wireless communication terminal capable of dynamically setting domain name server

技术领域 technical field

本发明涉及通信技术领域,尤其涉及一种可动态设置域名服务器的方法及移动通信终端。The invention relates to the technical field of communication, in particular to a method for dynamically setting a domain name server and a mobile communication terminal.

背景技术 Background technique

随着移动无线通信技术在全球的广泛应用和逐步普及,无线通信终端产品(手机、各种接口的数据卡、上网本、内置通信模块、路由器等)也从高科技代名词而逐步过渡为普通大众的生活用品(甚或必备品)。市场上各厂家的竞争也日趋激烈,如何更好的增加产品的功能,提高产品的性能,不断满足用户的需求,使终端产品具有更好的用户体验,成为各大厂商关注的热点问题。With the wide application and gradual popularization of mobile wireless communication technology in the world, wireless communication terminal products (mobile phones, data cards with various interfaces, netbooks, built-in communication modules, routers, etc.) Groceries (or even must-haves). The competition among various manufacturers in the market is also becoming increasingly fierce. How to better increase product functions, improve product performance, continuously meet user needs, and make terminal products have a better user experience has become a hot issue that major manufacturers pay attention to.

现有的无线通信终端产品,在进行数据业务前首先需要发起拨号过程,建立与网络的数据连接。在拨号连接成功建立后,由核心网指定DNS服务器地址,用户使用该DNS地址进行域名解析。这种由网络统一分配DNS地址的方式,当在同一时刻有大量的DNS服务需求时,网络指定的DNS服务器会发生阻塞,从而延缓用户浏览网页的速度;在更极端的情况下,如果网络指定的DNS服务器出现故障,不能提供域名解析服务,则将直接导致用户无法正常浏览网页。同时,在实际的应用中,用户也希望可以使用指定的DNS服务器进行域名解析,而不是单一的使用网络分配的DNS地址。所以如果能提供一种途径,让用户可以灵活的选用DNS地址,则可以解决网络统一分配DNS地址存在的问题,同时满足用户的需求,提升用户体验。Existing wireless communication terminal products first need to initiate a dial-up process to establish a data connection with the network before performing data services. After the dial-up connection is successfully established, the core network specifies the DNS server address, and the user uses the DNS address for domain name resolution. This method of uniformly assigning DNS addresses by the network, when there are a large number of DNS service demands at the same time, the DNS server designated by the network will be blocked, thereby delaying the speed of users browsing the web; in more extreme cases, if the network designated If the DNS server fails and cannot provide domain name resolution services, it will directly cause users to be unable to browse the web normally. At the same time, in practical applications, users also hope to use a designated DNS server for domain name resolution, instead of using a single DNS address allocated by the network. Therefore, if a way can be provided to allow users to flexibly select DNS addresses, the problem of uniform distribution of DNS addresses by the network can be solved, while meeting user needs and improving user experience.

无线通信终端设备在拨号前,需要通过UI从PC侧设置拨号连接的参数,例如,APN,电话号码等。可以在PC侧的UI界面提供设置DNS地址的接口,但UI在调用PC侧的API设置移动终端拨号连接的DNS地址时,会遇到操作权限的问题,对于没有管理员权限的用户,在PC侧进行设置DNS地址的操作时,会被PC侧的安全管理策略拒绝掉,从而在PC侧UI设置DNS地址的方法不可行。同时,在最新的操作系统中,如WIN 7操作系统,对无线通信终端设备参数的设置采用OID的方式,而在OID的方式中没有设置DNS的指令,所以在这些系统上必须得开发出能设置DNS的功能。Before dialing, the wireless communication terminal device needs to set the parameters of the dialing connection, such as APN, phone number, etc., from the PC side through the UI. You can provide an interface for setting the DNS address on the UI interface on the PC side, but when the UI calls the API on the PC side to set the DNS address for the dial-up connection of the mobile terminal, it will encounter the problem of operation authority. When the DNS address is set on the PC side, it will be rejected by the security management policy on the PC side, so it is not feasible to set the DNS address on the PC side UI. At the same time, in the latest operating system, such as the WIN 7 operating system, the OID method is used to set the parameters of the wireless communication terminal equipment, but there is no instruction to set DNS in the OID method, so it is necessary to develop a function on these systems. Set the function of DNS.

发明内容 Contents of the invention

本发明的目的是为解决上述问题,而提出的一种可动态设置域名服务器的方法及移动通信终端。The object of the present invention is to solve the above problems, and propose a method and a mobile communication terminal capable of dynamically setting a domain name server.

为实现上述目的,本发明提供一种可动态设置域名服务器的方法,当无线通信终端上电时,初始化主域名服务器(DNS)缓存变量、辅DNS缓存变量和设置状态变量;当发起拨号连接过程时,检测拨号连接的参数信息,如果在拨号参数信息中包含有主DNS地址和辅DNS地址,则记录DNS地址并置设置状态变量;在网络与无线数据卡建立了分组数据协议(PDP)数据连接,返回网络分配给终端的信息时,检测设置状态变量,如果状态变量置位,则在无线通信终端与用户设备进行动态主机设置协议(DHCP)或互联协议控制协议(IPCP)协商过程时,将缓存的主DNS地址和辅DNS地址返回给用户设备;如果设置状态变量没有置位,则将网络分配的DNS地址返回给用户设备。In order to achieve the above object, the present invention provides a method for dynamically setting a domain name server. When a wireless communication terminal is powered on, initialize a primary domain name server (DNS) cache variable, a secondary DNS cache variable, and set a state variable; when initiating a dial-up connection process Detect the parameter information of the dial-up connection, if the dial-up parameter information contains the primary DNS address and the secondary DNS address, then record the DNS address and set the state variable; the packet data protocol (PDP) data is established between the network and the wireless data card Connect, when returning the information that the network assigns to the terminal, detect and set the state variable, if the state variable is set, then when the wireless communication terminal and the user equipment perform Dynamic Host Configuration Protocol (DHCP) or Internet Protocol Control Protocol (IPCP) negotiation process, Return the cached primary DNS address and secondary DNS address to the user equipment; if the setting status variable is not set, return the DNS address allocated by the network to the user equipment.

进一步地,所述主DNS缓存变量、辅DNS缓存变量记录用户最终希望得到的两个DNS服务器的地址。Further, the primary DNS cache variable and the secondary DNS cache variable record the addresses of the two DNS servers that the user finally wishes to obtain.

进一步地,在用户需要域名服务时,先将解析请求发往主DNS地址指向的服务器,如果主DNS服务器没有响应,则将解析请求发往辅DNS服务器;设置状态变量记录用户是否需要设置DNS地址,根据状态变量的值决定最终反馈给用户的DNS地址。Further, when the user needs a domain name service, first send the resolution request to the server pointed to by the primary DNS address, if the primary DNS server does not respond, then send the resolution request to the secondary DNS server; set the status variable to record whether the user needs to set the DNS address , according to the value of the state variable to determine the DNS address that is finally fed back to the user.

进一步地,所述拨号连接发起过程是指拨号开始时,在用户设备和无线通信终端之间的数据链路连接,用户设备将本次拨号的参数信息发送至无线通信终端;设置的DNS地址信息通过这条数据链路发送至无线通信终端,在与网络侧的PDP连接建立完成后,最终确认的DNS地址通过这条数据链路发送至用户设备。Further, the process of initiating a dial-up connection refers to a data link connection between the user equipment and the wireless communication terminal when the dial-up starts, and the user equipment sends the parameter information of this dial-up to the wireless communication terminal; the set DNS address information It is sent to the wireless communication terminal through this data link, and after the PDP connection with the network side is established, the finally confirmed DNS address is sent to the user equipment through this data link.

进一步地,所述PDP数据连接是指无线通信终端收到用户设备发来的参数信息后,与移动通信网络之间建立的一条分组数据传输链路。Further, the PDP data connection refers to a packet data transmission link established between the wireless communication terminal and the mobile communication network after receiving the parameter information sent by the user equipment.

进一步地,无线通信终端将PDP连接的参数信息发往网络侧进行协商,网络侧在对参数信息确认后,以PDP激活消息发给无线通信终端。在PDP信息协商时,无线通信终端会将用户设备发来的DNS地址信息发往网络侧,网络侧直接返回网络侧默认的DNS地址。Further, the wireless communication terminal sends the parameter information of the PDP connection to the network side for negotiation, and the network side sends a PDP activation message to the wireless communication terminal after confirming the parameter information. During PDP information negotiation, the wireless communication terminal will send the DNS address information sent by the user equipment to the network side, and the network side will directly return the default DNS address of the network side.

进一步地,所述DHCP或IPCP协商过程是指无线通信终端在与网络建立了无线连接链路时,将从网络获取的参数信息返回给用户设备。Further, the DHCP or IPCP negotiation process means that when the wireless communication terminal establishes a wireless connection link with the network, it returns parameter information obtained from the network to the user equipment.

另外,本发明还提出一种可动态设置域名服务器的无线通信终端,所述无线通信终端包括设置域名服务器(DNS)应用程序编程接口(API)模块、DNS信息处理模块、网络DNS信息交互模块和DNS信息返回模块;In addition, the present invention also proposes a wireless communication terminal that can dynamically set a domain name server, the wireless communication terminal includes a domain name server (DNS) application programming interface (API) module, a DNS information processing module, a network DNS information interaction module and DNS information return module;

所述设置DNS API接口模块用于使PC机调用该接口设置DNS地址信息;Said setting DNS API interface module is used to make PC call this interface and set DNS address information;

所述DNS信息处理模块用于接受PC设置的DNS信息,初始化DNS信息设置状态;The DNS information processing module is used to accept the DNS information set by the PC, and initialize the DNS information setting state;

所述网络DNS信息交互模块接受拨号的DNS信息,并与网络交互DNS信息参数;The network DNS information interaction module accepts dial-up DNS information, and exchanges DNS information parameters with the network;

所述DNS信息返回模块接受网络侧返回的DNS地址信息,并根据DNS信息处理模块设定的机制,决定最终返回给PC机的DNS地址信息。The DNS information returning module receives the DNS address information returned by the network side, and determines the DNS address information finally returned to the PC according to the mechanism set by the DNS information processing module.

进一步地,所述DNS信息处理模块还用于判断对用户DNS信息的设置流程。Further, the DNS information processing module is also used for judging the process of setting the DNS information of the user.

进一步地,所述网络DNS信息交互模块还用于在拨号开始时将DNS信息发往网络侧,在PDP激活后解析DNS地址信息。Further, the network DNS information interaction module is also used to send DNS information to the network side when dialing starts, and resolve DNS address information after PDP activation.

本发明的有益效果是:与现有技术相比较,本发明通过分析无线通信终端在拨号连接建立时的流程,给用户提供了一种动态设置DNS地址的方法,使用户在通过无线数据卡进行数据业务时,可以通过接口设置指定的DNS地址,从而可以使用特定的DNS服务器进行域名解析。The beneficial effects of the present invention are: compared with the prior art, the present invention provides users with a method for dynamically setting DNS addresses by analyzing the flow of the wireless communication terminal when the dial-up connection is established, so that the user can use the wireless data card to For data services, the specified DNS address can be set through the interface, so that a specific DNS server can be used for domain name resolution.

附图说明 Description of drawings

图1为本发明实施例无线数据卡接口连接模型;Fig. 1 is the wireless data card interface connection model of the embodiment of the present invention;

图2为本发明实施例无线数据卡拨号连接建立流程;FIG. 2 is a process for establishing a dial-up connection of a wireless data card according to an embodiment of the present invention;

图3为本发明实施例无线数据卡DNS信息发送流程;FIG. 3 is a flow of sending DNS information of a wireless data card according to an embodiment of the present invention;

图4为本发明实施例无线数据卡设置DNS处理模块图;4 is a diagram of a DNS processing module set by a wireless data card according to an embodiment of the present invention;

图5为本发明实施例无线数据卡动态设置DNS地址流程图。FIG. 5 is a flow chart of dynamically setting DNS addresses by a wireless data card according to an embodiment of the present invention.

具体实施方式 Detailed ways

本发明公开了一种无线通信终端在建立拨号连接时,可以动态设置DNS地址的方法及所述无线通信终端。The invention discloses a method for dynamically setting a DNS address when a wireless communication terminal establishes a dial-up connection and the wireless communication terminal.

所述动态设置DNS地址的方法主要包括:当无线通信终端上电时,初始化主DNS缓存变量、辅DNS缓存变量和设置状态变量。当发起拨号连接过程时,检测拨号连接的参数信息,如果在拨号参数信息中包含有主DNS地址和辅DNS地址,则说明需要动态设置DNS地址,记录DNS地址并置设置状态变量。在网络与无线数据卡建立了PDP(分组数据协议,Packet Data Protocol)数据连接,返回网络分配给终端的信息时,检测设置状态变量,如果状态变量置位,则在移动终端与用户设备进行动态主机设置协议(Dynamic HostConfiguration Protocol,DHCP)或互联协议控制协议(InterWorking ProtocolControl Protocol,IPCP)协商过程时,将缓存的主DNS地址和辅DNS地址返回给用户设备;如果设置状态变量没有置位,则不做任何修改,将网络分配的DNS地址返回给用户设备。The method for dynamically setting DNS addresses mainly includes: initializing primary DNS cache variables, secondary DNS cache variables and setting state variables when the wireless communication terminal is powered on. When the dial-up connection process is initiated, the parameter information of the dial-up connection is detected. If the dial-up parameter information includes the primary DNS address and the secondary DNS address, it means that the DNS address needs to be dynamically set, and the DNS address is recorded and the state variable is set. When the network and the wireless data card establish a PDP (Packet Data Protocol) data connection and return the information assigned to the terminal by the network, the state variable is detected and set. If the state variable is set, the mobile terminal and the user equipment are dynamically connected. During the negotiation process of the host setting protocol (Dynamic HostConfiguration Protocol, DHCP) or the Internet protocol control protocol (InterWorking Protocol Control Protocol, IPCP), the cached primary DNS address and secondary DNS address are returned to the user equipment; if the setting status variable is not set, then Return the DNS address assigned by the network to the user device without any modification.

所述主DNS缓存变量、辅DNS缓存变量,是指两个变量,记录用户最终希望得到的两个DNS服务器的地址。在用户需要域名解析服务时,先将解析请求发往主DNS地址指向的服务器,如果主DNS服务器没有响应,则将解析请求发往辅DNS服务器。设置状态变量记录用户是否需要设置DNS地址,根据状态变量的值决定最终反馈给用户的DNS地址。The primary DNS cache variable and secondary DNS cache variable refer to two variables, which record the addresses of the two DNS servers that the user ultimately wishes to obtain. When the user needs domain name resolution service, the resolution request is first sent to the server pointed to by the primary DNS address, and if the primary DNS server does not respond, the resolution request is sent to the secondary DNS server. Set the status variable to record whether the user needs to set the DNS address, and determine the DNS address that is finally fed back to the user according to the value of the status variable.

所述拨号连接发起过程是指拨号开始时,在用户设备和无线通信终端之间的数据链路连接,用户设备将本次拨号的参数信息发送至无线通信终端,例如:APN、拨号号码、鉴权方式等。设置的DNS地址信息通过这条数据链路发送至无线通信终端,在与网络侧的PDP连接建立完成后,最终确认的DNS地址也通过这条数据链路发送至用户设备。The dial-up connection initiation process refers to the data link connection between the user equipment and the wireless communication terminal when the dial-up starts, and the user equipment sends the parameter information of this dial-up to the wireless communication terminal, such as: APN, dial-up number, authentication rights, etc. The set DNS address information is sent to the wireless communication terminal through this data link, and after the PDP connection with the network side is established, the finally confirmed DNS address is also sent to the user equipment through this data link.

所述PDP数据连接,是指无线通信终端收到用户设备发来的参数信息后,与移动通信网络之间建立的一条分组数据传输链路。无线通信终端将PDP连接的参数信息发往网络侧进行协商,网络侧在对参数信息确认后,以PDP激活消息发给无线通信终端。在PDP信息协商时,无线通信终端会将用户设备发来的DNS地址信息发往网络侧,但网络测一般不会参考用户的DNS地址,而直接返回网络侧默认的DNS地址。The PDP data connection refers to a packet data transmission link established between the wireless communication terminal and the mobile communication network after receiving the parameter information sent by the user equipment. The wireless communication terminal sends the parameter information of the PDP connection to the network side for negotiation, and the network side sends the PDP activation message to the wireless communication terminal after confirming the parameter information. During PDP information negotiation, the wireless communication terminal will send the DNS address information sent by the user equipment to the network side, but the network test generally does not refer to the user's DNS address, but directly returns the default DNS address on the network side.

所述DHCP或IPCP协商过程,是指无线通信终端在与网络建立了无线连接链路时,将从网络获取的参数信息返回给用户设备,例如:网络为无线通信终端分配的IP地址,DNS地址等。DHCP过程是在NDIS拨号方式时采用,而IPCP过程是在RAS拨号方式中的PDP-IP方式采用。The DHCP or IPCP negotiation process refers to that when the wireless communication terminal establishes a wireless connection link with the network, it returns the parameter information obtained from the network to the user equipment, for example: the IP address assigned by the network to the wireless communication terminal, the DNS address wait. The DHCP process is adopted in the NDIS dial-up mode, and the IPCP process is adopted in the PDP-IP mode in the RAS dial-up mode.

下面结合附图和实施例对本发明的技术方案作进一步详细的说明。本发明技术方案一般采用TE+MT的应用模型,其中终端设备(Terminal Equipment,TE)一般为PC或笔记本电脑,移动终端(Mobile Terminal,MT)一般为数据卡或手机。在下述实施例中,所述无线通信终端以无线数据卡为例说明。The technical solution of the present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments. The technical solution of the present invention generally adopts the application model of TE+MT, wherein the terminal equipment (Terminal Equipment, TE) is generally a PC or a notebook computer, and the mobile terminal (Mobile Terminal, MT) is generally a data card or a mobile phone. In the following embodiments, the wireless communication terminal is described by taking a wireless data card as an example.

如图1所示,为本实施例无线数据卡接口连接模型。数据卡作为一种移动终端,处于终端设备和核心网络之间,在使用无线网络时,先要建立终端设备到数据卡的RM接口的连接,然后再建立数据卡到核心网络的连接。本方法就在该拨号模型上展开。As shown in FIG. 1 , it is a wireless data card interface connection model of this embodiment. As a mobile terminal, the data card is located between the terminal device and the core network. When using the wireless network, the connection between the terminal device and the RM interface of the data card must be established first, and then the connection between the data card and the core network must be established. This method is expanded on the dial model.

如图2所示,为本实施例无线数据卡拨号连接建立流程。如图2所示,在终端设备需要使用无线网络时,先发起拨号过程的拨号指令到无线数据卡,无线数据卡在收到拨号指令后,对拨号的参数信息进行判断,如果可以拨号,则返回开始拨号的响应。As shown in FIG. 2 , it is a process of establishing a dial-up connection of a wireless data card in this embodiment. As shown in Figure 2, when the terminal device needs to use the wireless network, it first initiates the dialing command of the dialing process to the wireless data card. After receiving the dialing command, the wireless data card judges the parameter information of the dialing. Returns a response to start dialing.

然后,TE向无线数据卡发送RM口的链路配置参数信息,在RAS拨号方式中是LCP链路信息,在NDIS拨号方式中是QMI信令信息。无线数据卡收到链路配置信息,如传输块大小、鉴权方式,协议压缩域等等,设置的DNS信息也包含在这个过程中,在对参数信息判断完成后,无线数据卡对参数配置请求进行应答,完成RM口链路的建立。Then, the TE sends the link configuration parameter information of the RM port to the wireless data card, which is the LCP link information in the RAS dial-up mode, and the QMI signaling information in the NDIS dial-up mode. The wireless data card receives link configuration information, such as transmission block size, authentication method, protocol compression field, etc. The DNS information set is also included in this process. After the parameter information is judged, the wireless data card configures the parameters Respond to the request and complete the establishment of the RM port link.

RM口的连接建立后,TE向无线数据卡发送网络参数信息协商请求,包括IP地址、DNS地址,PDP地址、NBNS地址等等。无线数据卡收到请求后,即开始UM口链路建立过程,向GGSN发送Activate PDP Context Request(激活PDP上下文请求),建立PDP上下文的RAB,GGSN对TE的请求通过后,会返回PDP上下文激活接受应答,在应答消息中包含有网络分配给TE的IP地址、DNS地址等等,完成UM口的建立。After the connection of the RM port is established, the TE sends a network parameter information negotiation request to the wireless data card, including IP address, DNS address, PDP address, NBNS address and so on. After the wireless data card receives the request, it starts the UM port link establishment process, sends an Activate PDP Context Request to the GGSN, and establishes the RAB of the PDP context. After the GGSN passes the TE request, it will return the PDP context activation Accept the response, and the response message includes the IP address, DNS address, etc. assigned to the TE by the network, and completes the establishment of the UM port.

无线数据卡在收到网络分配的参数信息后,即将这些信息以网络参数信息应答的消息返回给TE,完成一次拨号建立的过程。After receiving the parameter information allocated by the network, the wireless data card will return the information to the TE with a response message of the network parameter information, and complete a dial-up establishment process.

如图3所示,为本实施例无线数据卡DNS信息发送流程图。As shown in FIG. 3 , it is a flow chart of sending DNS information by the wireless data card in this embodiment.

在每次拨号之初,由用户通过提供的接口,下发需要的DNS地址信息,在用户开始拨号时,这些信息随拨号指令下发到数据卡,数据卡对这些DNS地址信息做处理之后,将PDP激活请求发送至网络侧。At the beginning of each dial-up, the user sends the required DNS address information through the provided interface. When the user starts dialing, the information is sent to the data card along with the dial-up command. After the data card processes the DNS address information, Send the PDP activation request to the network side.

网络对用户的PDP激活请求信息进行判断,如果合法,则给用户分配请求的网络资源,并按自己的策略分配DNS服务器地址信息,以PDP激活接受的信息发送至数据卡。The network judges the user's PDP activation request information, and if it is legal, allocates the requested network resources to the user, and allocates DNS server address information according to its own policy, and sends the PDP activation acceptance information to the data card.

无线数据卡收到网络发回的PDP激活接受信息后,从中获取DNS信息,如果不是用户希望的DNS地址信息,则以用户请求的DNS地址替换网络分配的DNS地址信息,并将这个DNS地址信息组成连接成功的响应消息,返回给用户PC机。After the wireless data card receives the PDP activation acceptance information sent back from the network, it obtains DNS information from it. If it is not the DNS address information desired by the user, it replaces the DNS address information assigned by the network with the DNS address requested by the user, and stores the DNS address information A response message of successful connection is formed and returned to the user's PC.

用户PC机获取数据卡发回的拨号响应消息,从中获取DNS地址信息,作为本次拨号连接的DNS地址,之后浏览网页时,与这个域名服务器交互,进行域名解析服务。The user's PC obtains the dial-up response message sent back by the data card, obtains DNS address information from it, and uses it as the DNS address of this dial-up connection, and then interacts with the domain name server to perform domain name resolution services when browsing web pages.

如图4所示,为本实施例无线数据卡设置DNS处理所包括的模块图。As shown in FIG. 4 , it is a module diagram included in setting DNS processing for the wireless data card of this embodiment.

所述数据卡包括设置DNS API(Application Programming Interface,应用程序编程接口)接口模块、DNS信息处理模块、网络DNS信息交互模块和DNS信息返回模块。The data card includes a DNS API (Application Programming Interface, application programming interface) interface module, a DNS information processing module, a network DNS information interaction module and a DNS information return module.

设置DNS API接口模块:该模块提供设置DNS地址的接口,用于使PC机调用该接口设置DNS地址信息。Set DNS API interface module: This module provides an interface for setting DNS address, which is used to make the PC call this interface to set DNS address information.

DNS信息处理模块:该模块用于接受PC设置的DNS信息,初始化DNS信息设置状态,判断对用户DNS信息的设置流程。DNS information processing module: This module is used to accept the DNS information set by the PC, initialize the DNS information setting state, and judge the setting process of the user's DNS information.

网络DNS信息交互模块:该模块接受本次拨号的DNS信息,并与网络交互DNS信息参数,在拨号开始时将DNS信息发往网络侧,在PDP激活后解析DNS地址信息。Network DNS information interaction module: This module accepts the DNS information of this dial-up, and exchanges DNS information parameters with the network, sends the DNS information to the network side at the beginning of the dial-up, and analyzes the DNS address information after the PDP is activated.

DNS信息返回模块:该模块接受网络侧返回的DNS地址信息,并根据DNS信息处理模块设定的机制,决定最终返回给PC机的DNS地址信息。DNS information return module: This module accepts the DNS address information returned by the network side, and determines the final DNS address information returned to the PC according to the mechanism set by the DNS information processing module.

如图5所示,为本实施例无线数据卡动态设置DNS地址流程图,其包括如下步骤:As shown in FIG. 5, the flow chart of dynamically setting the DNS address for the wireless data card of this embodiment includes the following steps:

步骤501,在无线数据卡上电时,初始化主DNS和辅DNS缓存地址为0,初始化状态变量为空值;Step 501, when the wireless data card is powered on, initialize the cache address of the primary DNS and the secondary DNS to 0, and initialize the state variable to a null value;

步骤502,设置主DNS地址和辅DNS地址信息;Step 502, setting primary DNS address and secondary DNS address information;

在拨号连接建立前,通过提供的接口设置DNS地址信息,本发明共提供了两种接口:AT命令、QMI指令。无线数据卡保存TE设置的主DNS地址和辅DNS地址,并将设置状态位置位。在NDIS拨号中可以通过两种方式设置,在两种方式同时设置时,以拨号开始前的最后一个设置的为准。Before the dial-up connection is established, the DNS address information is set through the provided interface. The present invention provides two kinds of interfaces: AT command and QMI command. The wireless data card saves the primary DNS address and the secondary DNS address set by the TE, and sets the setting status bit to 1. In NDIS dialing, it can be set in two ways. When both ways are set at the same time, the last setting before the dialing starts shall prevail.

步骤503,从链路协商信息中获取DNS地址信息;Step 503, obtaining DNS address information from link negotiation information;

在NDIS拨号方式中,TE设置的DNS地址在链路协商信息中下发到无线数据卡,所以在NDIS拨号方式中,需要从QMI信令中获取设置的主DNS和辅DNS信息。In the NDIS dial-up mode, the DNS address set by the TE is sent to the wireless data card in the link negotiation information, so in the NDIS dial-up mode, the set primary DNS and secondary DNS information need to be obtained from the QMI signaling.

步骤504,PDP上下文激活流程;Step 504, PDP context activation process;

无线数据卡将TE下发的参数信息,组成PDP激活请求消息后发往网络侧,这条消息中包含有DNS信息,但网络侧一般不会采用消息中的DNS地址,而将默认的DNS地址通过PDP激活接受消息返回到无线数据卡。The wireless data card composes the parameter information issued by the TE into a PDP activation request message and sends it to the network side. This message contains DNS information, but the network side generally does not use the DNS address in the message, but uses the default DNS address The PDP Activation Accept message is returned to the wireless data card.

步骤505,判断状态变量是否置位;Step 505, judging whether the state variable is set;

无线数据卡在PDP激活后,判断设置DNS的状态位,如果状态位已置位,则转入步骤506,需要动态设置DNS地址信息,用缓存的主DNS地址和辅DNS地址替换网络分配的DNS地址;如果状态位没有置位,则转入步骤507,不做设置,返回网络分配的DNS地址。After the PDP is activated, the wireless data card judges to set the status bit of the DNS. If the status bit has been set, then go to step 506. It is necessary to dynamically set the DNS address information, and replace the DNS allocated by the network with the cached primary DNS address and secondary DNS address. Address; if the status bit is not set, then proceed to step 507, without setting, return the DNS address assigned by the network.

步骤506,用缓存的DNS地址替换PDP激活消息中分配的DNS地址,并将主DNS缓存、辅DNS缓存、设置状态位清零,使本次的设置不会影响下一次的拨号信息。Step 506, replace the DNS address allocated in the PDP activation message with the cached DNS address, and clear the primary DNS cache, secondary DNS cache, and setting status bit, so that the current setting will not affect the next dialing information.

步骤507,网络参数信息应答;Step 507, network parameter information response;

无线网卡将网络分配的参数信息返回给TE,参数信息包括IP地址,DNS地址,NBNS地址。在RAS拨号方式中,是通过IPCP配置应答消息返回给TE;而在NDIS拨号方式中则是通过DHCP过程,将网络参数信息返回给TE。在网络参数信息中包含的DNS地址信息,即是TE设置的DNS地址,至此完成DNS地址的动态设置。The wireless network card returns the parameter information assigned by the network to the TE, and the parameter information includes IP address, DNS address, and NBNS address. In the RAS dial-up mode, the IPCP configuration reply message is returned to the TE; while in the NDIS dial-up mode, the network parameter information is returned to the TE through the DHCP process. The DNS address information contained in the network parameter information is the DNS address set by the TE, so far the dynamic setting of the DNS address is completed.

通过上述技术方案,就可以实现用户根据自己的需要,自行设置DNS服务器地址的功能,使得无线通信终端更具有可操作性,同时具备如下特点:Through the above technical solution, the user can set the DNS server address according to his own needs, making the wireless communication terminal more operable, and has the following characteristics:

用户静态的设置和网络动态的分配相结合,如果用户需要使用特定的DNS地址,则可以使用本功能进行设置;如果用户不需要指定DNS地址,则不用做任何额外的操作,而直接由网络分配默认的DNS地址,不会为用户增加不便。The user's static setting is combined with the network dynamic allocation. If the user needs to use a specific DNS address, you can use this function to set it; if the user does not need to specify the DNS address, you don't need to do any additional operations, and it is directly allocated by the network. The default DNS address will not inconvenience the user.

操作简单、灵活,用户只需要调用接口设置两个参数即可,在使用中,可以只设置一个DNS地址,而另一个使用网络默认的DNS地址,如设置特定的主DNS,而使用网络分配的辅DNS地址。The operation is simple and flexible. Users only need to call the interface to set two parameters. In use, only one DNS address can be set, while the other uses the network default DNS address, such as setting a specific primary DNS, and using the network-allocated DNS address Secondary DNS address.

用户不受操作权限的限制,在需要的时候,即可进行设置。The user is not restricted by the operation authority, and can make settings when needed.

支持WCDMA的NDIS拨号和RAS PDP-IP拨号方式。Support WCDMA NDIS dial-up and RAS PDP-IP dial-up.

需要说明的是,本发明所涉及的装置,除包括实施例中所涉及的模块及单元之外,还包括本领域技术人员所公知的其它元件,为了突出本发明的发明思想,在本发明的实施例中只对涉及本发明的发明思想的模块进行了描述,对装置中公知的其它元件不再赘述。It should be noted that, in addition to the modules and units involved in the embodiments, the devices involved in the present invention also include other components known to those skilled in the art. In order to highlight the inventive idea of the present invention, the In the embodiment, only the modules related to the inventive idea of the present invention are described, and other known components in the device are not described in detail.

以上所描述的仅为本发明较佳实例,当然不能以此来限定本发明的权利范围,因此,在不背离本发明精神及其实质的情况下,熟悉本领域的技术人员都可根据本发明做出各种相应的改变和变形,但这些相应的改变和变形都应当属于本发明所附的权利要求的保护范围。What has been described above is only a preferred example of the present invention, and certainly cannot limit the scope of rights of the present invention with this. Various corresponding changes and modifications can be made, but these corresponding changes and modifications should all belong to the protection scope of the appended claims of the present invention.

Claims (9)

1.一种可动态设置域名服务器的方法,其特征在于:当无线通信终端上电时,初始化主域名服务器DNS缓存变量、辅DNS缓存变量和设置状态变量;当发起拨号连接过程时,检测拨号连接的参数信息,如果在拨号参数信息中包含有主DNS地址和辅DNS地址,则记录DNS地址并置设置状态变量;在网络与无线通信终端建立了分组数据协议PDP数据连接,返回网络分配给终端的信息时,检测设置状态变量,如果状态变量置位,则在无线通信终端与用户设备进行动态主机设置协议DHCP或互联协议控制协议IPCP协商过程时,将缓存的主DNS地址和辅DNS地址返回给用户设备;如果设置状态变量没有置位,则将网络分配的DNS地址返回给用户设备;1. A method that can dynamically set a domain name server, is characterized in that: when the wireless communication terminal is powered on, initialize the main domain name server DNS cache variable, the auxiliary DNS cache variable and the setting state variable; when initiating a dial-up connection process, detect the dial-up The parameter information of connection, if comprise primary DNS address and secondary DNS address in dialing parameter information, then record DNS address and set state variable; Set up packet data protocol PDP data connection in network and wireless communication terminal, return network to assign to When the information of the terminal is checked, the state variable is detected and set. If the state variable is set, the cached primary DNS address and secondary DNS address will be cached when the wireless communication terminal and the user equipment perform dynamic host configuration protocol DHCP or Internet protocol control protocol IPCP negotiation process. Return to the user equipment; if the setting state variable is not set, return the DNS address assigned by the network to the user equipment; 所述拨号连接发起过程是指拨号开始时,在用户设备和无线通信终端之间的数据链路连接,用户设备将本次拨号的参数信息发送至无线通信终端;设置的DNS地址信息通过这条数据链路发送至无线通信终端,在与网络侧的PDP连接建立完成后,最终确认的DNS地址通过这条数据链路发送至用户设备。The dial-up connection initiation process refers to the data link connection between the user equipment and the wireless communication terminal when the dial-up starts, and the user equipment sends the parameter information of this dial-up to the wireless communication terminal; the DNS address information set through this The data link is sent to the wireless communication terminal, and after the PDP connection with the network side is established, the finally confirmed DNS address is sent to the user equipment through this data link. 2.如权利要求1所述的方法,其特征在于:所述主DNS缓存变量、辅DNS缓存变量记录用户最终希望得到的两个DNS服务器的地址。2. The method according to claim 1, characterized in that: the primary DNS cache variable and the secondary DNS cache variable record the addresses of the two DNS servers that the user finally wishes to obtain. 3.如权利要求1所述的方法,其特征在于:在用户需要域名服务时,先将解析请求发往主DNS地址指向的服务器,如果主DNS服务器没有响应,则将解析请求发往辅DNS服务器;设置状态变量记录用户是否需要设置DNS地址,根据状态变量的值决定最终反馈给用户的DNS地址。3. The method according to claim 1, characterized in that: when the user needs domain name service, the resolution request is first sent to the server pointed to by the primary DNS address, and if the primary DNS server does not respond, the resolution request is sent to the secondary DNS Server; set the state variable to record whether the user needs to set the DNS address, and determine the final DNS address to be fed back to the user according to the value of the state variable. 4.如权利要求1所述的方法,其特征在于:所述PDP数据连接是指无线通信终端收到用户设备发来的参数信息后,与移动通信网络之间建立的一条分组数据传输链路。4. The method according to claim 1, wherein: the PDP data connection refers to a packet data transmission link established between the wireless communication terminal and the mobile communication network after receiving the parameter information sent by the user equipment . 5.如权利要求1所述的方法,其特征在于:无线通信终端将PDP连接的参数信息发往网络侧进行协商,网络侧在对参数信息确认后,以PDP激活消息发给无线通信终端;在PDP信息协商时,无线通信终端会将用户设备发来的DNS地址信息发往网络侧,网络侧直接返回网络侧默认的DNS地址。5. The method according to claim 1, wherein the wireless communication terminal sends the parameter information of the PDP connection to the network side for negotiation, and the network side sends a PDP activation message to the wireless communication terminal after confirming the parameter information; During PDP information negotiation, the wireless communication terminal will send the DNS address information sent by the user equipment to the network side, and the network side will directly return the default DNS address of the network side. 6.如权利要求1所述的方法,其特征在于:所述DHCP或IPCP协商过程是指无线通信终端在与网络建立了无线连接链路时,将从网络获取的参数信息返回给用户设备。6. The method according to claim 1, characterized in that: the DHCP or IPCP negotiation process means that the wireless communication terminal returns parameter information obtained from the network to the user equipment when establishing a wireless connection link with the network. 7.一种可动态设置域名服务器的无线通信终端,其特征在于:所述无线通信终端包括设置域名服务器DNS应用程序编程接口API模块、DNS信息处理模块、网络DNS信息交互模块和DNS信息返回模块;7. A wireless communication terminal capable of dynamically setting a domain name server, characterized in that: the wireless communication terminal includes a domain name server DNS application programming interface API module, a DNS information processing module, a network DNS information interaction module and a DNS information return module ; 所述设置DNSAPI接口模块用于使PC机调用该接口设置DNS地址信息;Said setting DNSAPI interface module is used to make PC call this interface and set DNS address information; 所述DNS信息处理模块用于接受PC设置的DNS信息,初始化DNS信息设置状态;The DNS information processing module is used to accept the DNS information set by the PC, and initialize the DNS information setting state; 所述网络DNS信息交互模块接受拨号的DNS信息,并与网络交互DNS信息参数;The network DNS information interaction module accepts dial-up DNS information, and exchanges DNS information parameters with the network; 所述DNS信息返回模块接受网络侧返回的DNS地址信息,并根据DNS信息处理模块设定的机制,决定最终返回给PC机的DNS地址信息。The DNS information returning module receives the DNS address information returned by the network side, and determines the DNS address information finally returned to the PC according to the mechanism set by the DNS information processing module. 8.如权利要求7所述的无线通信终端,其特征在于:所述DNS信息处理模块还用于判断对用户DNS信息的设置流程。8. The wireless communication terminal according to claim 7, characterized in that: the DNS information processing module is also used for judging the process of setting the DNS information of the user. 9.如权利要求7所述的无线通信终端,其特征在于:所述网络DNS信息交互模块还用于在拨号开始时将DNS信息发往网络侧,在PDP激活后解析DNS地址信息。9. The wireless communication terminal according to claim 7, wherein the network DNS information interaction module is further configured to send DNS information to the network side when dialing starts, and resolve DNS address information after PDP activation.
CN201010271051.XA 2010-08-28 2010-08-28 Method capable of dynamically setting domain name server and wireless communication terminal Active CN101931663B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010271051.XA CN101931663B (en) 2010-08-28 2010-08-28 Method capable of dynamically setting domain name server and wireless communication terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010271051.XA CN101931663B (en) 2010-08-28 2010-08-28 Method capable of dynamically setting domain name server and wireless communication terminal

Publications (2)

Publication Number Publication Date
CN101931663A CN101931663A (en) 2010-12-29
CN101931663B true CN101931663B (en) 2014-06-11

Family

ID=43370587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010271051.XA Active CN101931663B (en) 2010-08-28 2010-08-28 Method capable of dynamically setting domain name server and wireless communication terminal

Country Status (1)

Country Link
CN (1) CN101931663B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761629B (en) * 2012-07-11 2016-01-06 华为终端有限公司 The method of dns server address, Apparatus and system are set
CN102984294A (en) * 2012-12-07 2013-03-20 中兴通讯股份有限公司 IPv6 DNS address distribution and acquisition method and device
CN102984295B (en) * 2012-12-07 2015-08-26 中兴通讯股份有限公司 A kind of mobile terminal and address distribution method thereof
CN103078963A (en) * 2012-12-20 2013-05-01 中兴通讯股份有限公司 Method and equipment for selecting domain name server
CN106302838B (en) * 2015-05-12 2020-06-30 中兴通讯股份有限公司 Domain name system DNS resolution processing method and device
CN106815259B (en) * 2015-12-02 2020-05-01 中国电信股份有限公司 Mobile cache service control method, device and system
CN107343059A (en) * 2017-07-17 2017-11-10 环球智达科技(北京)有限公司 The method for obtaining server address
CN116743442A (en) * 2023-05-29 2023-09-12 北京东方通网信科技有限公司 A DNS domain name resolution system based on cloud computing

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002047415A1 (en) * 2000-12-04 2002-06-13 Nokia Corporation Communication system and method for establishing a connection to a serving network element
US6425003B1 (en) * 1999-01-22 2002-07-23 Cisco Technology, Inc. Method and apparatus for DNS resolution
CN1581114A (en) * 2003-08-14 2005-02-16 华为技术有限公司 Analysis method for user's request
CN101431539A (en) * 2008-12-11 2009-05-13 华为技术有限公司 Domain name resolution method, system and apparatus
CN101677475A (en) * 2008-09-16 2010-03-24 联想(北京)有限公司 Power management method, equipment and mobile terminal thereof
CN101753636A (en) * 2009-12-23 2010-06-23 新太科技股份有限公司 Method and system for realizing dynamic domain name visit through uniform communication

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6425003B1 (en) * 1999-01-22 2002-07-23 Cisco Technology, Inc. Method and apparatus for DNS resolution
WO2002047415A1 (en) * 2000-12-04 2002-06-13 Nokia Corporation Communication system and method for establishing a connection to a serving network element
CN1581114A (en) * 2003-08-14 2005-02-16 华为技术有限公司 Analysis method for user's request
CN101677475A (en) * 2008-09-16 2010-03-24 联想(北京)有限公司 Power management method, equipment and mobile terminal thereof
CN101431539A (en) * 2008-12-11 2009-05-13 华为技术有限公司 Domain name resolution method, system and apparatus
CN101753636A (en) * 2009-12-23 2010-06-23 新太科技股份有限公司 Method and system for realizing dynamic domain name visit through uniform communication

Also Published As

Publication number Publication date
CN101931663A (en) 2010-12-29

Similar Documents

Publication Publication Date Title
CN101931663B (en) Method capable of dynamically setting domain name server and wireless communication terminal
CN105007581B (en) A kind of network access authentication method and client
US7152160B2 (en) Method and arrangement to secure access to a communications network
CN104540189B (en) Equipment for surfing the net provides method and the equipment for surfing the net of wireless network access for mobile device
CN101600224B (en) Realization method for supporting a plurality of PDP contexts by wireless data card and wireless data card
EP2480027B1 (en) Data accessing method for customer premises equipment; and customer premises equipment (cpe)
CN102611750A (en) Double-protocol-stack accessing method and system
WO2015051701A1 (en) Method for realizing multi-channel concurrent internet accessing by synchronizing wifi with apn network, and automatically choosing wifi networking preferentially
CN103078963A (en) Method and equipment for selecting domain name server
JP2013502628A (en) Method and apparatus for obtaining network setting information
CN108307694A (en) A kind of network connection information acquisition methods and router
WO2023221708A1 (en) Pdn dialing method, system and apparatus, multi-pdn dialing configuration method, system and apparatus, and device and storage medium
US11758372B2 (en) Charging policy obtaining method and apparatus
CN102710672B (en) The access method of data card form web page control inerface and system
WO2017166038A1 (en) Communication method and terminal
CN104780229A (en) Method, system and cloud system for setting cloud server IP address through cloud terminal
CN106341374B (en) Method and device for limiting access of unlicensed user equipment to home gateway
WO2024000975A1 (en) Session establishment system and method, electronic device, and storage medium
CN103973753A (en) Data processing method and equipment
EP3641226B1 (en) Address allocation method and related device
CN102932470A (en) Method and system of controlling computer terminal by handheld device
CN102761629B (en) The method of dns server address, Apparatus and system are set
WO2025179892A1 (en) Multi-pdn dialing configuration method, system and apparatus, and communication module and medium
CN101160916A (en) Method and system for realizing automatic service distribution of PPP access terminal
WO2017161866A1 (en) Network connection method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant