CN102594800A - Method and device for processing Web authentication server - Google Patents
Method and device for processing Web authentication server Download PDFInfo
- Publication number
- CN102594800A CN102594800A CN2012100085250A CN201210008525A CN102594800A CN 102594800 A CN102594800 A CN 102594800A CN 2012100085250 A CN2012100085250 A CN 2012100085250A CN 201210008525 A CN201210008525 A CN 201210008525A CN 102594800 A CN102594800 A CN 102594800A
- Authority
- CN
- China
- Prior art keywords
- authentication server
- web authentication
- web
- detection
- detection messages
- 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.)
- Pending
Links
Images
Landscapes
- Computer And Data Communications (AREA)
Abstract
本发明提供了一种Web认证服务器处理方法及装置,该方法包括,向该Web认证服务器发送检测报文,其中,该检测报文用于检测该Web认证服务器的功能;在接收到该Web认证服务器对该检测报文的响应报文后,确定对该Web认证服务器的功能的检测,通过本发明,解决了现有技术中存在当Web认证服务器的功能无法正常使用时,而导致用户无法正常进行认证的问题,进而达到了在通过Web认证服务器进行认证之前,确认该Web认证服务器的功能是否可用,从而保证对用户进行认证的Web认证服务器可以成功进行认证的效果。
The present invention provides a method and device for processing a Web authentication server. The method includes sending a detection message to the Web authentication server, wherein the detection message is used to detect the function of the Web authentication server; After the server responds to the detection message, it determines the detection of the function of the Web authentication server. Through the present invention, it solves the problems in the prior art when the function of the Web authentication server cannot be used normally, which causes the user to fail to work normally. The problem of authentication, and then achieve the effect of confirming whether the function of the Web authentication server is available before authentication through the Web authentication server, thereby ensuring that the Web authentication server that authenticates the user can successfully authenticate.
Description
技术领域 technical field
本发明涉及通信领域,具体而言,涉及一种Web认证服务器处理方法及装置。The present invention relates to the communication field, in particular to a processing method and device for a Web authentication server.
背景技术 Background technique
Web认证在当前的WLAN宽带接入中广泛使用。在Web认证过程中,Web认证服务器起着非常重要的作用。Web authentication is widely used in current WLAN broadband access. In the web authentication process, the web authentication server plays a very important role.
图1是相关技术中Web认证的流程图,如图1所示,该流程包括如下步骤:Figure 1 is a flow chart of Web authentication in the related art, as shown in Figure 1, the process includes the following steps:
S1,用户从宽带网络网关(Broadband Network Gateway,简称为BNG)控制设备获取IP地址,用户获取IP地址后由于没有通过认证,因此,并没有通过BNG控制设备访问Internet的权限;S1. The user obtains an IP address from a Broadband Network Gateway (BNG) control device. After obtaining the IP address, the user does not have the right to access the Internet through the BNG control device because he has not passed the authentication;
S2,用户访问任意网页时,BNG(例如,用户接入网关服务器)会通过超文本传输协议(Hype Text Transfer Protocol,简称为HTTP)重定向技术告诉用户运营商Web认证服务器的地址以及认证页面URL信息;S2, when a user visits any web page, BNG (for example, the user access gateway server) will tell the user operator the address of the web authentication server and the URL of the authentication page through the Hypertext Transfer Protocol (Hype Text Transfer Protocol, referred to as HTTP) redirection technology information;
S3,用户根据BNG重定向的内容,访问运营商的Web认证服务器,在Web认证服务器页面输入用户名、密码请求认证;S3, the user accesses the operator's web authentication server according to the content redirected by the BNG, and enters the user name and password on the web authentication server page to request authentication;
S4,Web认证服务器和BNG交互开始用户接入认证过程,用户成功认证后BNG将会放开用户的上网权限,用户可以访问Internet。S4, the Web authentication server interacts with the BNG to start the user access authentication process. After the user is successfully authenticated, the BNG will release the user's access to the Internet, and the user can access the Internet.
Web认证服务器具有Web服务和Portal认证服务两大功能。The Web authentication server has two functions: Web service and Portal authentication service.
在上述S2中,使用的是Web认证服务器的Web服务功能。如果用户的Web认证服务器的Web服务功能不可用,那么服务器将不能成功给用户推出认证提示页面,用户不能进行认证,导致用户一直不能成功上网。In the above S2, the Web service function of the Web authentication server is used. If the Web service function of the user's Web authentication server is unavailable, the server will not be able to launch an authentication prompt page to the user successfully, and the user will not be able to perform authentication, resulting in the user being unable to access the Internet successfully.
在上述S3中,使用的是Web认证服务器的Portal认证服务功能。正常Portal认证用户Web on,Web off交互过程如下:In the above S3, the Portal authentication service function of the Web authentication server is used. Normal Portal authentication user Web on, Web off interaction process is as follows:
S1,用户在认证页面中输入用户名和密码之后,会通过HTTP报文告诉Web认证服务器用户名和密码认证信息;S1, after the user enters the user name and password in the authentication page, the user will tell the Web authentication server the user name and password authentication information through the HTTP message;
S2,Web认证服务器会根据当前的认证方式是PPP(点对点)协议询问握手认证协议(Challenge Handshake Authentication Protocol,简称为CHAP)还是密码认证协议(PasswordAuthentication Protocol,简称为PAP),根据Portal协议构造认证请求报文发送给BNG;S2. The web authentication server will ask whether the current authentication method is PPP (point-to-point) protocol (Challenge Handshake Authentication Protocol, referred to as CHAP) or password authentication protocol (Password Authentication Protocol, referred to as PAP), and constructs an authentication request according to the Portal protocol The message is sent to BNG;
S3,BNG收到Web认证服务器的认证请求报文后,根据认证请求信息进行认证,认证成功后通知运营商的计费服务器开始计费,用户Web on;S3. After BNG receives the authentication request message from the Web authentication server, it performs authentication according to the authentication request information. After the authentication is successful, it notifies the operator's billing server to start billing, and the user Web is on;
S4,用户点击退出登录按扭,通知Web认证服务器Web off操作,Web认证服务器将会根据Portal协议构造Logout报文给BNG;S4, the user clicks the logout button to notify the Web authentication server of the Web off operation, and the Web authentication server will construct a Logout message to the BNG according to the Portal protocol;
S5,BNG收到Web认证服务器发送的Logout报文后,会通知计费服务器对该用户停止计费,关闭用户访问网页的权限。S5. After receiving the Logout message sent by the web authentication server, the BNG will notify the accounting server to stop accounting for the user and close the user's authority to access the webpage.
在上述S3中,如果Web认证服务器的Portal认证功能不可用,则用户输入用户名和密码后服务器不能成功构造认证请求报文给BNG,导致用户不能成功认证上网。而且在用户成功认证后,用户退出登录,Web认证服务器不能成功构建Logout报文给BNG,导致BNG上不能感知用户已Web off,不能及时通知计费服务器停止计费,出现计费不准确的情况。In the above S3, if the Portal authentication function of the Web authentication server is not available, the server cannot successfully construct an authentication request message to the BNG after the user enters the user name and password, resulting in the user being unable to successfully authenticate the Internet. Moreover, after the user is successfully authenticated, the user logs out, and the Web authentication server cannot successfully construct a Logout message to the BNG. As a result, the BNG cannot perceive that the user has been Web-off, and cannot notify the billing server in time to stop billing, resulting in inaccurate billing. .
因此,现有技术中存在当Web认证服务器的功能无法正常使用时,而导致用户无法正常进行认证的问题。Therefore, there is a problem in the prior art that when the function of the web authentication server cannot be used normally, the user cannot be authenticated normally.
发明内容 Contents of the invention
本发明提供了一种Web认证服务器处理方法及装置,以至少解决现有技术中存在当Web认证服务器的功能无法正常使用时,而导致用户无法正常进行认证的问题。The present invention provides a processing method and device for a Web authentication server to at least solve the problem in the prior art that when the function of the Web authentication server cannot be used normally, the user cannot be authenticated normally.
根据本发明的一个方面,提供了一种Web认证服务器处理方法,包括:向所述Web认证服务器发送检测报文,其中,所述检测报文用于检测所述Web认证服务器的功能;在接收到所述Web认证服务器对所述检测报文的响应报文后,确定对所述Web认证服务器的功能的检测。According to one aspect of the present invention, a method for processing a Web authentication server is provided, including: sending a detection message to the Web authentication server, wherein the detection message is used to detect the function of the Web authentication server; After receiving the response message from the Web authentication server to the detection message, it is determined to detect the function of the Web authentication server.
优选地,还包括,设置计时器,在向所述Web认证服务器发送所述检测报文之后,并在所述计时器到时时还未接收到所述Web认证服务器对所述检测报文的响应报文的情况下,确定所述Web认证服务器不可用。Preferably, it also includes setting a timer, after sending the detection message to the Web authentication server, and when the timer expires, no response from the Web authentication server to the detection message has been received message, it is determined that the Web authentication server is unavailable.
优选地,在所述计时器到时时还未接收到所述Web认证服务器对所述检测报文的响应报文的情况下,确定所述Web认证服务器不可用包括,计算向所述Web认证服务器发送所述检测报文的次数;在所述计时器到时时,判断发送所述检测报文的次数是否超过预定次数;在发送所述检测报文的次数超过所述预定次数还未接收到所述Web认证服务器对所述检测报文的响应报文的情况下,确定所述Web认证服务器不可用。Preferably, when the timer expires and the response message from the Web authentication server to the detection message has not been received, determining that the Web authentication server is unavailable includes calculating and sending to the Web authentication server The number of times the detection message is sent; when the timer expires, it is judged whether the number of times the detection message is sent exceeds the predetermined number of times; If the Web authentication server does not respond to the detection packet, it is determined that the Web authentication server is unavailable.
优选地,在确定所述Web认证服务器的功能的检测之后还包括,在确定所述Web认证服务器可用的情况下,通过所述Web认证服务器对用户进行认证。Preferably, after determining the detection of the function of the Web authentication server, the method further includes, when it is determined that the Web authentication server is available, authenticating the user through the Web authentication server.
优选地,所述检测报文为以下至少之一:传输控制协议同步TCP SYN报文,其中,所述TCP SYN报文用于检测所述Web认证服务器的Web服务功能;强制下线NTF_LOGOUT报文,其中,所述NTF_LOGOUT报文用于检测所述Web认证服务器的Portal认证功能。Preferably, the detection message is at least one of the following: transmission control protocol synchronous TCP SYN message, wherein, the TCP SYN message is used to detect the Web service function of the Web authentication server; forced offline NTF_LOGOUT message , wherein the NTF_LOGOUT message is used to detect the Portal authentication function of the Web authentication server.
优选地,向所述Web认证服务器发送检测报文之前,对所述检测报文中的源IP地址进行配置,所述源IP地址为非实际有效用户的IP地址。Preferably, before sending the detection message to the Web authentication server, the source IP address in the detection message is configured, and the source IP address is not the IP address of the actual valid user.
优选地,还包括设置开关,所述开关用于对是否向所述Web认证服务器发送检测报文进行控制。Preferably, a setting switch is also included, and the switch is used to control whether to send a detection message to the Web authentication server.
根据本发明的另一方面,提供了一种Web认证服务器处理装置,包括:发送模块,用于向所述Web认证服务器发送检测报文,其中,所述检测报文用于检测所述Web认证服务器的功能;确定模块,用于在接收到所述Web认证服务器对所述检测报文的响应报文后,确定对所述Web认证服务器的功能的检测。According to another aspect of the present invention, a processing device for a Web authentication server is provided, including: a sending module, configured to send a detection message to the Web authentication server, wherein the detection message is used to detect the Web authentication The function of the server; a determining module, configured to determine the detection of the function of the Web authentication server after receiving the response message from the Web authentication server to the detection message.
优选地,还包括,设置模块,用于设置计时器,在向所述Web认证服务器发送所述检测报文之后,并在所述计时器到时时还未接收到所述Web认证服务器对所述检测报文的响应报文的情况下,确定所述Web认证服务器不可用。Preferably, it also includes a setting module, configured to set a timer, after sending the detection message to the Web authentication server, and when the timer expires, the Web authentication server has not received the In the case of the response packet of the detection packet, it is determined that the web authentication server is unavailable.
优选地,所述确定模块包括,计算模块,用于计算向所述Web认证服务器发送所述检测报文的次数;判断模块,用于在所述计时器到时时,判断发送所述检测报文的次数是否超过预定次数;第二确定模块,在发送所述检测报文的次数超过所述预定次数还未接收到所述Web认证服务器对所述检测报文的响应报文的情况下,确定所述Web认证服务器不可用。Preferably, the determination module includes a calculation module, configured to calculate the number of times the detection message is sent to the Web authentication server; a judging module, configured to determine whether to send the detection message when the timer expires Whether the number of times exceeds the predetermined number of times; the second determination module, in the case that the number of times the detection message is sent exceeds the predetermined number of times and no response message from the Web authentication server to the detection message is received, determine The web authentication server is unavailable.
通过本发明,采用向所述Web认证服务器发送检测报文,其中,所述检测报文用于检测所述Web认证服务器的功能;在接收到所述Web认证服务器对所述检测报文的响应报文后,确定对所述Web认证服务器的功能的检测,解决了现有技术中存在当Web认证服务器的功能无法正常使用时,而导致用户无法正常进行认证的问题,进而达到了在通过Web认证服务器进行认证之前,确认该Web认证服务器的功能是否可用,从而保证对用户进行认证的Web认证服务器可以成功进行认证的效果。According to the present invention, a detection message is sent to the Web authentication server, wherein the detection message is used to detect the function of the Web authentication server; after receiving the response of the Web authentication server to the detection message After the message, it is determined to detect the function of the Web authentication server, which solves the problem in the prior art that the user cannot be authenticated normally when the function of the Web authentication server cannot be used normally, and then achieves the authentication through the Web. Before the authentication server performs authentication, it is confirmed whether the function of the Web authentication server is available, so as to ensure that the Web authentication server that authenticates the user can successfully perform authentication.
附图说明 Description of drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described here are used to provide a further understanding of the present invention and constitute a part of the application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations to the present invention. In the attached picture:
图1是相关技术中Web认证的流程图;FIG. 1 is a flow chart of Web authentication in the related art;
图2是根据本发明实施例的Web认证服务器处理方法的流程图;Fig. 2 is the flow chart of the Web authentication server processing method according to the embodiment of the present invention;
图3是根据本发明实施例的Web认证服务器处理装置的结构框图;Fig. 3 is a structural block diagram of a Web authentication server processing device according to an embodiment of the present invention;
图4是根据本发明优选实施例的Web认证服务器处理装置的结构框图;Fig. 4 is a structural block diagram of a Web authentication server processing device according to a preferred embodiment of the present invention;
图5是根据本发明优选实施例的确定模块34的结构框图;Fig. 5 is a structural block diagram of a determining module 34 according to a preferred embodiment of the present invention;
图6是根据本发明实施的检测Web认证服务器功能方法的流程图;Fig. 6 is a flowchart of a method for detecting the function of a Web authentication server implemented according to the present invention;
图7是根据本发明实施例的TCP强推建链功能检测方法的流程图;FIG. 7 is a flow chart of a method for detecting a TCP forced chain building function according to an embodiment of the present invention;
图8是根据本发明实施例的UDP认证功能检测方法的流程图;Fig. 8 is the flowchart of the UDP authentication function detection method according to the embodiment of the present invention;
图9是根据本发明实施例的对Web认证服务器定时检测方法的流程图;Fig. 9 is a flowchart of a method for timing detection of a Web authentication server according to an embodiment of the present invention;
图10是根据本发明优选实施例的使用TCP+HTTP组合方式探测Web认证服务器的Web服务功能的流程图;Fig. 10 is a flow chart of detecting the Web service function of the Web authentication server using a TCP+HTTP combination method according to a preferred embodiment of the present invention;
图11是根据本发明优选实施例的Portal协议报文NTF_LOGOUT报文探测Web认证服务器的Portal认证功能的流程图。Fig. 11 is a flow chart of the Portal authentication function of the Web authentication server detected by the Portal protocol message NTF_LOGOUT message according to the preferred embodiment of the present invention.
具体实施方式 Detailed ways
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the present invention will be described in detail with reference to the drawings and examples. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
针对当前发布的Portal协议中并没有主动探测报文机制,而且业界暂时也没有相关的Web认证服务器探测机制提出。本实施例提出了一种主动探测机制对Web认证服务器的Web服务功能进行检测,保证BNG给用户选择的服务器可以成功推出认证页面,并且,提出的主动探测机制对Web服务器的Portal认证功能进行检测,保证BNG给用户选择的服务器可以成功认证。下面对该主动探测Web认证功能的机制进行说明。There is no active packet detection mechanism in the currently released Portal protocol, and there is no relevant Web authentication server detection mechanism proposed in the industry for the time being. This embodiment proposes an active detection mechanism to detect the Web service function of the Web authentication server to ensure that the server selected by the BNG for the user can successfully launch the authentication page, and the proposed active detection mechanism detects the Portal authentication function of the Web server , to ensure that the server selected by BNG for the user can be successfully authenticated. The mechanism for actively detecting the web authentication function is described below.
在本实施例中提供了一种Web认证服务器处理方法,图2是根据本发明实施例的Web认证服务器处理方法的流程图,如图2所示,该流程包括如下步骤:In this embodiment, a method for processing a Web authentication server is provided. FIG. 2 is a flowchart of a method for processing a Web authentication server according to an embodiment of the present invention. As shown in FIG. 2 , the process includes the following steps:
步骤S202,向Web认证服务器发送检测报文,其中,该检测报文用于检测该Web认证服务器的功能;;Step S202, sending a detection message to the Web authentication server, wherein the detection message is used to detect the function of the Web authentication server;
步骤S204,在接收到该Web认证服务器对该检测报文的响应报文后,确定对该Web认证服务器的功能的检测。Step S204, after receiving the response message from the Web authentication server to the detection message, determine the function detection of the Web authentication server.
通过上述步骤,向Web服务器发送检测报文,以检测该Web服务器的功能是否是可用的,通过这样的步骤,使得在通过Web认证服务器对用户进行认证时,可以预先知道该Web认证服务器是否可用,从而保证认证的成功性,相对于现有技术中,事先并不对该Web认证服务器进行探测,即不确知该Web服务器是否真正可用就进行认证,既浪费资源又使用户的体验受到影响。通过上述步骤的检测,获得该Web认证服务器的功能状态,可以为用户提供可靠的Web认证服务器,顺利进行认证,提高用户体验。Through the above steps, a detection message is sent to the Web server to detect whether the function of the Web server is available. Through such steps, when the user is authenticated by the Web authentication server, it is possible to know in advance whether the Web authentication server is available. , so as to ensure the success of the authentication. Compared with the prior art, the Web authentication server is not detected in advance, that is, the authentication is performed without knowing whether the Web server is really available, which wastes resources and affects the user experience. Obtaining the functional status of the Web authentication server through the detection of the above steps can provide users with a reliable Web authentication server, perform authentication smoothly, and improve user experience.
为提高对Web认证服务器的检测效率,可以设置计时器,计时器设定的时间可以根据具体的需要而定,检测时,在向该Web认证服务器发送该检测报文之后,并在该计时器到时时还未接收到该Web认证服务器对该检测报文的响应报文的情况下,确定该Web认证服务器不可用。较优地,还可以通过在预定的时间内发送预定次数的检测来确定Web认证服务器是否可用,例如,计算向Web认证服务器发送检测报文的次数;在该计时器到时时,判断发送该检测报文的次数是否超过预定次数;在发送该检测报文的次数超过预定次数还未接收到Web认证服务器对该检测报文的响应报文的情况下,确定该Web认证服务器不可用,即可以放弃通过该Web认证服务器来对用户进行认证。相反,在预定的时间内接受到了该检测报文的响应报文,即,在确定该Web认证服务器可用的情况下,通过该Web认证服务器对用户进行认证。In order to improve the detection efficiency of the Web authentication server, a timer can be set, and the time set by the timer can be determined according to specific needs. If the response message to the detection message from the web authentication server has not been received by then, it is determined that the web authentication server is unavailable. Preferably, it is also possible to determine whether the Web authentication server is available by sending a predetermined number of detections within a predetermined time, for example, calculating the number of times the detection message is sent to the Web authentication server; when the timer expires, it is determined to send the detection Whether the number of times of the message exceeds the predetermined number of times; when the number of times the detection message is sent exceeds the predetermined number of times and the response message to the detection message of the Web authentication server has not been received, it is determined that the Web authentication server is unavailable, that is, Give up authenticating the user through the Web authentication server. On the contrary, the response message of the detection message is received within a predetermined time, that is, when it is determined that the Web authentication server is available, the user is authenticated through the Web authentication server.
对Web认证服务器进行探测的检测报文可以多种,可以是TCP报文,也可以是TCP+HTTP的组合报文,例如,该检测报文为传输控制协议同步TCP SYN报文,其中,该TCP SYN报文用于检测该Web认证服务器的Web服务功能;该检测报文也可以是强制下线NTF_LOGOUT报文,其中,该NTF_LOGOUT报文用于检测该Web认证服务器的Portal认证功能。The detection message that detects the Web authentication server can be various, it can be a TCP message, and it can also be a combined message of TCP+HTTP. For example, the detection message is a Transmission Control Protocol synchronous TCP SYN message, wherein the The TCP SYN message is used to detect the Web service function of the Web authentication server; the detection message can also be a forced offline NTF_LOGOUT message, where the NTF_LOGOUT message is used to detect the Portal authentication function of the Web authentication server.
需要说明的,为了使对Web认证服务器的检测更为准确,可以在向Web认证服务器发送检测报文之前,进行一系列的配置准备工作,例如,可以对Web认证服务器的检测设置开关,该开关用于对是否向该Web认证服务器发送检测报文进行控制。需要检测时打开开关,不需要检测时使开关处理闭合状态。也可以对该检测报文中的源IP地址进行配置,该源IP地址不能配置为实际用户的地址,即为非实际有效用户的IP地址,配置后的该源IP地址用作该Web认证服务器主动探测报文中的用户IP地址字段。通过这样的处理可以使得检测更为方便与有效。It should be noted that in order to make the detection of the Web authentication server more accurate, a series of configuration preparations can be performed before sending the detection packet to the Web authentication server. For example, the detection switch of the Web authentication server can be set. It is used to control whether to send detection packets to the web authentication server. The switch is turned on when detection is required, and the switch is closed when detection is not required. You can also configure the source IP address in the detection message. The source IP address cannot be configured as the address of the actual user, that is, the IP address of the non-actual and valid user. The configured source IP address is used as the Web authentication server The user IP address field in the active detection packet. Such processing can make detection more convenient and effective.
在本实施例中还提供了一种Web认证服务器处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a processing device for a Web authentication server is also provided, which is used to implement the above embodiments and preferred implementation modes, and what has been explained will not be repeated here. As used below, the term "module" may be a combination of software and/or hardware that realizes a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
图3是根据本发明实施例的Web认证服务器处理装置的结构框图,如图3所示,该装置包括发送模块32和确定模块34。下面对该装置进行说明。FIG. 3 is a structural block diagram of a Web authentication server processing device according to an embodiment of the present invention. As shown in FIG. 3 , the device includes a sending module 32 and a determining module 34 . The device will be described below.
发送模块32,用于向Web认证服务器发送检测报文,其中,该检测报文用于检测该Web认证服务器的功能;确定模块34,连接至该发送模块32,用于在接收到该Web认证服务器对该检测报文的响应报文后,确定对该Web认证服务器的功能的检测。The sending module 32 is configured to send a detection message to the Web authentication server, wherein the detection message is used to detect the function of the Web authentication server; the determination module 34 is connected to the sending module 32 and is used to receive the Web authentication After the server sends a response message to the detection message, it is determined to test the function of the web authentication server.
图4是根据本发明优选实施例的Web认证服务器处理装置的结构框图,如图4所示,该装置包括图3的所有模块外,还包括设置模块42。下面对该装置进行说明。设置模块42,用于设置计时器,在向该Web认证服务器发送该检测报文之后,并在计时器到时时还未接收到Web认证服务器对该检测报文的响应报文的情况下,确定该Web认证服务器不可用。FIG. 4 is a structural block diagram of a Web authentication server processing device according to a preferred embodiment of the present invention. As shown in FIG. 4 , the device includes not only all the modules in FIG. 3 , but also a setting module 42 . The device will be described below. The setting module 42 is used to set the timer, after sending the detection message to the Web authentication server, and under the situation that the response message of the detection message of the Web authentication server has not been received when the timer expires, determine The web authentication server is unavailable.
图5是根据本发明优选实施例的确定模块34的结构框图,如图5所示,该确定模块34包括,计算模块342,用于计算向该Web认证服务器发送该检测报文的次数;判断模块344,连接至计算模块342,用于在该计时器到时时,判断发送该检测报文的次数是否超过预定次数;第二确定模块346,连接至判断模块344,在发送该检测报文的次数超过该预定次数的情况下,确定该Web认证服务器不可用。Fig. 5 is the structural block diagram of determining module 34 according to the preferred embodiment of the present invention, as shown in Fig. 5, this determining module 34 comprises, calculating module 342, is used for calculating the number of times that this detection message is sent to this Web authentication server; Module 344, is connected to calculation module 342, is used for when this timer expires, judges whether the number of times that sends this detection message exceeds predetermined number of times; The second determination module 346, is connected to judging module 344, when sending this detection message When the number of times exceeds the predetermined number of times, it is determined that the Web authentication server is unavailable.
在本实施例中提供了一种Web认证服务器主动探测机制。基于该机制提供了一种涉及Web认证场景下对Web认证服务器进行主动探测的方法及装置。该方案不仅可以检测Web认证服务器的Web服务功能是否可用,而且可以检测Web认证服务器的Portal认证功能是否可用。下面对该机制的主要步骤进行说明。In this embodiment, an active detection mechanism of a Web authentication server is provided. Based on the mechanism, a method and device for actively detecting a Web authentication server in a Web authentication scenario are provided. This scheme can not only detect whether the Web service function of the Web authentication server is available, but also detect whether the Portal authentication function of the Web authentication server is available. The main steps of this mechanism are described below.
S1,BNG构造TCP SYN报文,来判断Web认证服务器的Web服务功能是否可用;S1, BNG constructs a TCP SYN message to determine whether the Web service function of the Web authentication server is available;
S2,如果Web认证服务器响应,则BNG认为Web认证服务器Web服务可用,BNG结束TCP连接;S2, if the Web authentication server responds, then the BNG considers that the Web service of the Web authentication server is available, and the BNG terminates the TCP connection;
S3,如果Web服务可用,BNG构造NTF_LOGOUT报文作为主动探测报文来检测Web认证服务器Portal认证服务是否可用;S3, if the Web service is available, the BNG constructs an NTF_LOGOUT message as an active detection message to detect whether the Web authentication server Portal authentication service is available;
S4,如果BNG收到Web认证服务器回应的ACK_NTF_LOGOUT(强制下线确认)报文,则BNG认为Web认证服务器Portal服务可用,BNG将该Portal服务器置为可用。S4. If the BNG receives the ACK_NTF_LOGOUT (forced logout confirmation) message responded by the Web authentication server, the BNG considers that the Portal service of the Web authentication server is available, and the BNG sets the Portal server as available.
另外,需要说明的是Web认证服务器主动探测机制中的BNG可以通过开关控制BNG是否需要打开这种检测机制;在探测Web认证服务器的Web服务是否可用时,TCP连接的源IP可以是BNG配置的一个IP;在探测Web认证服务器的Portal服务是否可用时,发送的Portal协议的源IP可以是BNG配置的一个IP;在探测Web认证服务器的Web服务是否可用时,BNG可以构造TCP报文探测,可以使用TCP+HTTP的组合去探测;In addition, it should be noted that the BNG in the active detection mechanism of the Web authentication server can control whether the BNG needs to open this detection mechanism through a switch; when detecting whether the Web service of the Web authentication server is available, the source IP of the TCP connection can be configured by the BNG An IP; when detecting whether the Portal service of the Web authentication server is available, the source IP of the Portal protocol sent can be an IP configured by BNG; when detecting whether the Web service of the Web authentication server is available, BNG can construct a TCP message detection, A combination of TCP+HTTP can be used to detect;
通过上述机制既可以检测Web认证服务器的TCP强推建链功能,又可以检测Web认证服务器的UDP认证功能,较好地保证了检测后选择的服务器可以满足用户正常的Web认证,使用户上网不受影响。Through the above mechanism, it is possible to detect not only the function of TCP forced chain building of the Web authentication server, but also the UDP authentication function of the Web authentication server, which ensures that the server selected after the detection can satisfy the normal Web authentication of the user, so that the user cannot access the Internet. Affected.
下面结合附图对本发明的实施例及优选实施例进行说明。Embodiments and preferred embodiments of the present invention will be described below in conjunction with the accompanying drawings.
图6是根据本发明实施的检测Web认证服务器功能方法的流程图,如图6所示,该流程包括如下步骤:Fig. 6 is the flow chart of the detection Web authentication server function method implemented according to the present invention, as shown in Fig. 6, this flow process comprises the following steps:
步骤S602,BNG接收到访问网页的用户请求;Step S602, BNG receives a user request to visit a web page;
步骤S604,找到可用的服务器,主动检测服务器是否可用,启动超时时间定时器;Step S604, finding an available server, actively detecting whether the server is available, and starting a timeout timer;
步骤S606,超时时间到,判断是否收到服务器的响应报文,在判断为是的情况下,进入步骤S608,否则,进入步骤S610;Step S606, when the timeout expires, judge whether a response message from the server has been received, and if it is judged to be yes, go to step S608, otherwise, go to step S610;
步骤S608,将服务器的状态置为可用;Step S608, setting the status of the server as available;
步骤S610,将服务器的状态置为不可用,启动恢复(deadtime)定时器;Step S610, setting the status of the server as unavailable, and starting a recovery (deadtime) timer;
步骤S612,恢复时间到,服务器复活,服务器状态恢复到可用。Step S612, when the recovery time is up, the server is revived, and the server status is restored to usable.
图7是根据本发明实施例的TCP强推建链功能检测方法的流程图,如图7所示,该流程包括如下步骤:Fig. 7 is a flow chart of a method for detecting a TCP forcibly pushing a link building function according to an embodiment of the present invention. As shown in Fig. 7, the process includes the following steps:
步骤S702,打开主动探测开关,配置检测IP;Step S702, turn on the active detection switch, and configure the detection IP;
步骤S704,把当前配置的检测IP作为TCP报文的源地址,服务器地址作为目的地址,构造TCP SYN报文发送给Portal服务器;Step S704, the detection IP of current configuration is used as the source address of the TCP message, and the server address is used as the destination address to construct a TCP SYN message and send it to the Portal server;
步骤S706,判断是否收到Portal服务器响应的TCP SYN+ACK报文,在判断为是的情况下,进入步骤S708,否则进入步骤S710;Step S706, judge whether to receive the TCP SYN+ACK message that Portal server responds, under the situation that judges as yes, enter step S708, otherwise enter step S710;
步骤S708,确定Portal服务器可用;Step S708, determining that the Portal server is available;
步骤S710,确定Portal服务器不可用。Step S710, determining that the Portal server is unavailable.
图8是根据本发明实施例的UDP认证功能检测方法的流程图,如图8所示,该流程包括如下步骤:Fig. 8 is a flow chart of the UDP authentication function detection method according to an embodiment of the present invention, as shown in Fig. 8, the process includes the following steps:
步骤S802,打开主动探测开关,配置检测IP;Step S802, turn on the active detection switch, and configure the detection IP;
步骤S804,使用配置的检测IP作为用户IP,构造NTF_LOGOUT报文发给服务器;Step S804, using the configured detection IP as the user IP, constructing an NTF_LOGOUT message and sending it to the server;
步骤S806,判断是否收到Portal服务器响应的ACK_NTF_LOGOUT报文,在判断为是的情况下,进入步骤S808,否则进入步骤S810;Step S806, judge whether to receive the ACK_NTF_LOGOUT message that Portal server responds, in the situation that judges as yes, enter step S808, otherwise enter step S810;
步骤S808,确定Portal服务器可用;Step S808, determining that the Portal server is available;
步骤S810,确定Portal服务器不可用。Step S810, determining that the Portal server is unavailable.
图9是根据本发明实施例的对Web认证服务器定时检测方法的流程图,如图9所示,该流程包括如下步骤:Fig. 9 is a flowchart of a method for timing detection of a Web authentication server according to an embodiment of the present invention. As shown in Fig. 9, the process includes the following steps:
步骤S902,打开主动探测开关,使能主动探测;Step S902, turning on the active detection switch to enable active detection;
步骤S904,使用服务器配置的侦听端口号构造主动探测报文发送,从主侦听端口号开始;Step S904, using the listening port number configured by the server to construct an active detection message to send, starting from the main listening port number;
步骤S906,启动检测定时器;Step S906, start the detection timer;
步骤S908,检测间隔时间到,判断是否收到服务器的检测确认报文,在判断为是的情况下,进入步骤S910,否则进入步骤S916;Step S908, when the detection interval time is up, judge whether a detection confirmation message from the server has been received, and if it is judged to be yes, proceed to step S910, otherwise proceed to step S916;
步骤S910,记录当前的侦听端口号,以该侦听端口号构造主动探测报文继续检测启动检测定时器;Step S910, recording the current listening port number, using the listening port number to construct an active detection message to continue detection and start a detection timer;
步骤S912,达到检测次数后,判断是否收到服务器的响应报文,在判断为是的情况下,进入步骤S914,将服务器状态置为可用(ALIVE),否则,返回步骤S904;Step S912, after reaching the number of detections, judge whether to receive the response message of the server, if judged to be yes, enter step S914, set the server status as available (ALIVE), otherwise, return to step S904;
步骤S914,将服务器状态置为可用(ALIVE);Step S914, setting the server status as ALIVE;
步骤S916,判断是否是服务器配置的最后侦听端口号;在判断为是的情况下,进入步骤S918,否则,返回步骤S904。Step S916, judging whether it is the last listening port number configured by the server; if it is judged yes, go to step S918, otherwise, go back to step S904.
图10是根据本发明优选实施例的使用TCP+HTTP组合方式探测Web认证服务器的Web服务功能的流程图,如图10所示,该流程包括如下步骤:需要说明的是,在图10中BNG使用TCP+HTTP组合方式去探测Web认证服务器的Web服务,发现Web认证服务器的Web服务功能不可用。Fig. 10 is a flow chart of detecting the Web service function of the Web authentication server using the TCP+HTTP combination method according to a preferred embodiment of the present invention. As shown in Fig. 10, the process includes the following steps: It should be noted that in Fig. Use the combination of TCP and HTTP to detect the Web service of the Web authentication server, and find that the Web service function of the Web authentication server is unavailable.
步骤S1002,BNG上打开Web认证服务器主动检测开关,配置检测IP,检测次数和检测间隔;Step S1002, turn on the active detection switch of the Web authentication server on the BNG, configure the detection IP, detection times and detection interval;
步骤S1004;BNG上采用检测IP作为TCP连接的源地址,构造TCP SYN报文与Web认证服务器建链;Step S1004; on the BNG, adopt detection IP as the source address of the TCP connection, construct a TCP SYN message and build a chain with the Web authentication server;
步骤S1006;Web认证服务器没有回复SYN+ACK报文;Step S1006; the web authentication server does not reply the SYN+ACK message;
步骤S1008;BNG在检测间隔时间到的情况下,没有收到服务器的SYN+ACK报文,在检测次数不为0的情况下继续检测,当检测次数为0时,如果服务器还未响应,认为该服务器的Web服务功能不可用。Step S1008; BNG does not receive the SYN+ACK message from the server when the detection interval time is up, and continues to detect when the number of detections is not 0. When the number of detections is 0, if the server has not responded yet, it is considered The web service function of this server is not available.
图11是根据本发明优选实施例的Portal协议报文NTF_LOGOUT报文探测Web认证服务器的Portal认证功能的流程图,如图11所示,该流程包括如下步骤:需要说明的是,在图11中BNG使用Portal协议报文NTF_LOGOUT报文去探测Web认证服务器的Portal认证功能,发现Web认证服务器的Portal认证功能不可用。Fig. 11 is the flow chart of Portal authentication function that the Portal agreement message NTF_LOGOUT message detects Web authentication server according to the preferred embodiment of the present invention, as shown in Fig. 11, this flow process comprises the following steps: It should be noted that, in Fig. 11 The BNG uses the Portal protocol packet NTF_LOGOUT to detect the Portal authentication function of the Web authentication server, and finds that the Portal authentication function of the Web authentication server is not available.
步骤S1102;BNG上打开Web认证服务器主动检测开关,配置检测IP,检测次数和检测间隔;Step S1102; Turn on the active detection switch of the Web authentication server on the BNG, configure the detection IP, detection times and detection interval;
步骤S1104;BNG上采用检测IP作为用户IP,根据Portal协议构造NTF_LOGOUT报文发送给Web认证服务器;Step S1104; The detection IP is used as the user IP on the BNG, and the NTF_LOGOUT message is constructed according to the Portal protocol and sent to the Web authentication server;
步骤S1106;Web认证服务器没有回复ACK_NTF_LOGOUT报文;Step S1106; the web authentication server does not reply the ACK_NTF_LOGOUT message;
步骤S1108;BNG在检测间隔时间到的情况下,没有收到服务器的ACK_NTF_LOGOUT报文,在检测次数不为0的情况下继续检测,当检测次数为0时,如果服务器还未响应,认为该服务器的Portal认证功能不可用。Step S1108: BNG does not receive the ACK_NTF_LOGOUT message from the server when the detection interval time is up, and continues to detect when the number of detections is not 0. When the number of detections is 0, if the server has not responded, it is considered that the server The Portal authentication function is not available.
应用上述探测机制所实施的实施例及优选实施例不仅可以成功检测Web认证服务器的TCP强推建链功能,也可以成功检测Web认证服务器的UDP认证功能。同时,上述实施例及优选实施例还采用了定时检测的机制,有效地避免了Web认证服务器状态变化导致检测状态不正确的情况,保证当前检测状态的正确性。正确检测Web认证服务器的当前状态,并给用户提供可用的服务器,可以保证用户正常地进行Web认证,最终达到正常上网的目的。另外,本发明兼容当前Portal协议的所有应用场景,可以实现与不同的Web认证服务器的成功对接,并不影响用户的正常Web认证。The embodiments and preferred embodiments implemented by applying the above detection mechanism can not only successfully detect the TCP forced chain building function of the Web authentication server, but also successfully detect the UDP authentication function of the Web authentication server. At the same time, the above-mentioned embodiments and preferred embodiments also adopt a timing detection mechanism, which effectively avoids the situation that the detection state is incorrect due to the change of the status of the Web authentication server, and ensures the correctness of the current detection state. Correctly detecting the current status of the Web authentication server and providing an available server to the user can ensure that the user can perform Web authentication normally and finally achieve the goal of normal Internet access. In addition, the present invention is compatible with all application scenarios of the current Portal protocol, can realize successful docking with different Web authentication servers, and does not affect normal Web authentication of users.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the above-mentioned present invention can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network formed by multiple computing devices Alternatively, they may be implemented in program code executable by a computing device so that they may be stored in a storage device to be executed by a computing device, and in some cases in an order different from that shown here The steps shown or described are carried out, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2012100085250A CN102594800A (en) | 2012-01-11 | 2012-01-11 | Method and device for processing Web authentication server |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2012100085250A CN102594800A (en) | 2012-01-11 | 2012-01-11 | Method and device for processing Web authentication server |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN102594800A true CN102594800A (en) | 2012-07-18 |
Family
ID=46483003
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2012100085250A Pending CN102594800A (en) | 2012-01-11 | 2012-01-11 | Method and device for processing Web authentication server |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102594800A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104865838A (en) * | 2015-05-29 | 2015-08-26 | 四川长虹电器股份有限公司 | Information processing method and intelligent home control equipment |
| CN105188059A (en) * | 2015-09-30 | 2015-12-23 | 上海斐讯数据通信技术有限公司 | Authentication method based on Portal server abnormity, and wireless access point |
| CN105592038A (en) * | 2015-07-13 | 2016-05-18 | 杭州华三通信技术有限公司 | Portal authentication method and device |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101174997A (en) * | 2007-11-21 | 2008-05-07 | 中兴通讯股份有限公司 | Device and method for detecting availability of RADIUS server on BRAS equipment |
| CN102098308A (en) * | 2011-02-18 | 2011-06-15 | 杭州华三通信技术有限公司 | Method and equipment for portal authentication |
-
2012
- 2012-01-11 CN CN2012100085250A patent/CN102594800A/en active Pending
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101174997A (en) * | 2007-11-21 | 2008-05-07 | 中兴通讯股份有限公司 | Device and method for detecting availability of RADIUS server on BRAS equipment |
| CN102098308A (en) * | 2011-02-18 | 2011-06-15 | 杭州华三通信技术有限公司 | Method and equipment for portal authentication |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104865838A (en) * | 2015-05-29 | 2015-08-26 | 四川长虹电器股份有限公司 | Information processing method and intelligent home control equipment |
| CN104865838B (en) * | 2015-05-29 | 2017-10-27 | 四川长虹电器股份有限公司 | A kind of information processing method and smart home control device |
| CN105592038A (en) * | 2015-07-13 | 2016-05-18 | 杭州华三通信技术有限公司 | Portal authentication method and device |
| CN105592038B (en) * | 2015-07-13 | 2018-10-09 | 新华三技术有限公司 | Portal authentication method and device |
| CN105188059A (en) * | 2015-09-30 | 2015-12-23 | 上海斐讯数据通信技术有限公司 | Authentication method based on Portal server abnormity, and wireless access point |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR101741866B1 (en) | Method and system for reliable protocol tunneling over http | |
| TWI624165B (en) | Method and multi-homed equipment for establishing a multipath connection | |
| CN104811462B (en) | A kind of access gateway reorientation method and access gateway | |
| EP2981022B1 (en) | Method and system for transmitting and receiving data, method and device for processing message | |
| CN101582856B (en) | Session setup method of portal server and BAS (broadband access server) device and system thereof | |
| US10530644B2 (en) | Techniques for establishing a communication connection between two network entities via different network flows | |
| CN103763156A (en) | Network speed measurement method and system | |
| TW201626759A (en) | Method for detecting the number of devices of a plurality of client terminals selected by a network server having an additional non-designated domain name for the Internet requesting service from the shared public IP address, and for Selective detection system | |
| WO2017215492A1 (en) | Device detection method and apparatus | |
| CN111491351B (en) | A method and system for sensing WiFi terminal online based on authentication information | |
| WO2017181801A1 (en) | Hypertext transfer protocol request identification system and method | |
| CN102917082B (en) | Penetrate information push method and the system of network address translation | |
| CN104837134B (en) | A kind of web authentication user login method, equipment and system | |
| CN102594800A (en) | Method and device for processing Web authentication server | |
| CN102546633A (en) | Selection method and device for Web authentication server | |
| CN113630447B (en) | Web-based cloud service providing method, system and storage medium | |
| CN102523134A (en) | Method for detecting abnormal exit of client terminal and website server | |
| JP5722906B2 (en) | Method and apparatus for implementing stand-alone software communication | |
| JP5723808B2 (en) | COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM | |
| CN115529359A (en) | Network packet identification method, client, device, equipment and storage medium | |
| US9674319B2 (en) | Detection method in network system and related apparatus | |
| US20060010486A1 (en) | Network security active detecting system and method thereof | |
| JP4099774B2 (en) | Call connection request relay apparatus and relay method in call connection relay system, and operation program thereof | |
| Yadav et al. | Proxy Server for Hybrid TCP/IP and UDP | |
| CN118944920A (en) | Authentication 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 |