Summary of the invention
The objective of the invention is to design a kind of method of easy to access portal web site of network service provider, make the user when logining first, visit any website and all be forced to the Portal_Server website, on it, finish authentication and service selection, simultaneously after the user is by authentication, guarantee will can not be forced to when the user visits again any website, just the user can normally surf the Net again.
Any visit that will carry out when how the problem to be solved in the present invention is logined the user just first is forced to the Portal_Server website, and no longer forces after the user is by authentication, guarantees that the user normally surfs the Net.
The technical scheme that realizes the object of the invention is such: a kind of method of easy to access portal web site of network service provider is characterized in that comprising following treatment step:
A. access server does not carry out enforceable destination address conversion by first the up HTTP message before authenticating to the door service user device, the purpose station address that the Portal Service subscriber equipment will be visited replaces to the address of portal site server, and this HTTP message is forced on the portal site server;
B. the portal site server of receiving this HTTP message is set up transmission control protocol and is connected, and sends the back message using that comprises redirection information to the Portal Service subscriber equipment simultaneously;
C. access server carries out the conversion of enforceable source address for the descending HTTP message from portal site server, the address of portal site server is replaced to the Portal Service subscriber equipment wish the purpose station address of visiting originally;
D. the Portal Service subscriber equipment receives the back message using that contains redirection information that is returned by access server, directly visits portal site server with the IP address of portal site server automatically.
Up HTTP message in the described steps A can be the IP message that the Portal Service user forms to any correct domain name, IP address or any numeral back of browser input.
Described steps A takes a step forward and comprises following treatment step:
A1. analyze the uplink message link information by access server,, do directly to transmit to handle for the IP message that is judged as non-door service user device;
A2. access server will be by will from the IP address of the portal site server that has configured on the purpose IP address of Portal Service subscriber equipment uplink message and the access server relatively judging whether its IP message is the message of directly visiting portal site server;
A3. access server also judges whether it is the message that carries out domain name mapping according to the destination slogan of its IP message;
So, do directly to transmit to handle A4. to message of directly visiting portal site server or the message that carries out domain name mapping;
A5. for not being directly to visit the message of portal site server or not being the message that carries out domain name mapping, further judge whether it is that the Portal Service subscriber equipment is not by first the up HTTP message before the authentication, for the IP message that is not the HTTP message, on message, be provided with and abandon sign.
Described step C takes a step forward and comprises following treatment step:
C1. analyze the downlink message link information by access server,, do directly to transmit to handle for the IP message that is judged as non-door service user device;
So C2. access server is to Portal Service user's IP message, judge that according to its destination slogan this IP message is whether from portal site server, the HTTP message of the Portal Service user by authentication;
C3. for not being HTTP message from portal site server, access server also judges whether it is from the IP message of portal site server or the back message using that carries out domain name mapping according to the destination slogan of its IP message;
C4. access server is done directly to transmit to handle to being to come from the IP message of portal site server or the back message using that carries out domain name mapping;
C5. access server is provided with on the IP message and abandons sign for not being from the IP message of portal site server or not being the back message using that carries out domain name mapping.
The technical method of the forced portal/compulsory portal that the present invention proposes, make that the user can be by the custom online of oneself, before not by authentication, import any so long as correct domain name, IP address, perhaps or even any numeral, can be forced on the Portal_Server, realization is to the visit of Portal_Server, and the user just can go to be concerned about domain name or the IP address of this Portal_Server like this, and the user will be directed in this portal website automatically.
Portal_Server portal website as before the Portal service-user online must through the website, realize that this visit automatically is considerable.
Method of the present invention has comprised destination address conversion (DNAT), source address conversion (SNAT) that realizes forced portal/compulsory portal and whole three aspects that are redirected (Redirect), and the Portal that combination realized of these three aspects forces technical scheme.The i.e. forced portal/compulsory portal technical scheme that realizes by DNAT+SNAT+Redirect.
The method one that the present invention is directed to original access websites can only be by directly importing the shortcoming that realize domain name or IP address, realized importing any correct domain name, IP address or any numeral can be forced to the method for Portal_Server website automatically, realize visit to any Portal service portal website, thereby solved the requirement that the professional needed user of this Wideband of Portal must first row access Portal homepage authenticates best, the user is not so long as by authentication, he wants to surf the Net and can be forced to automatically in this portal website of Portal_Server so, after on this, going to finish authentication, just can surf the Net.
Embodiment
For the Portal service-user is not forced on the Portal_Server by the first HTTP message of any website of visit before authenticating, the present invention introduces technology that destination address conversion (DNAT) and source address conversion (SNAT) combine and realizes in the technology that the Portal_Server end is introduced redirected (Redirect) in the normal IP of access server side bag treatment scheme.The technical scheme of DNAT+SNAT+Redirect just.
Referring to Fig. 1, flow process illustrates the body design thought of the inventive method among the figure, comprising:
Step 1, user (PC) imports any correct domain name, IP address or any numeral to browser address bar, if user's input is domain name or IP address, then access server (BAS) can obtain domain name resolution server (DNS) message of this domain name or IP address, if user's input is any numeral, browser can be used as it as character automatically for the IP address input of failing to set up connection, add suffix such as WWW prefix and com, send the IP message that contains the dns resolution message then;
Step 2, on access server (BAS), do not carry out compulsory destination address conversion (DNAT) for Portal service-user (PC) by first HTTP message before authenticating, the address of storage purpose station address and purpose website that the user will be visited replaces to the address of Portal_Server (P.S), thereby this HTTP message is forced on the Portal_Server;
Step 3, after Portal_Server (P.S) receives first such HTTP message, setting up transmission control protocol (TCP) connects, send simultaneously and comprise the back message using of redirected (Redirect) information, so that allow user side can be directly be connected on the Portal_Server with the IP address of Portal_Server to user side;
Step 4, the IP that receives from Portal_Server (P.S) when access server (BAS) wraps (containing redirection information), and its destination address is when not passing through the user of checking, carry out compulsory source address conversion (SNAT), the address of Portal_Server (this moment source address in message) is replaced to the user wishes to make the station address of visiting client can normally set up TCP (transmission control protocol) and connect originally;
Step 5, at last, behind the message of taking back by Portal_Server that contains Redirect that client (PC) receives that access server (BAS) returns, just can directly visit Portal_Server with the IP address of Portal_Server automatically, the processing for the IP bag after this just will be normal flow process.
So also just finished forced portal/compulsory portal.
Based on top body design thought, specific implementation of the present invention can be divided into three parts: access server is to the processing procedure of user uplink message; Access server is to the processing procedure of Portal_Server downlink message; Processing procedure with the Portal_Server end.Below in conjunction with FB(flow block) specific description is made in the realization of this three part.
Referring to Fig. 2, be the processing procedure of access server to the user uplink message, it is the up processing procedure of a forced portal/compulsory portal, mainly be to carry out destination address conversion (DNAT), to the Portal service-user do not carry out enforceable destination address conversion by first HTTP message before authenticating, the address that is about to the purpose website that the user will visit replaces to the address of the Portal_Server of portal website.
Step 201, access server receives the IP message from user side;
Step 202, access server is normally wrapping in the process of processing this IP message, judges according to analyzing the message link information whether it is the Portal service-user, if then continue execution in step 203;
Step 203, the IP address of one or several Portal_Server that has configured on purpose IP address by this user relatively and the access server equipment, judge that whether this user's message is the message of directly visiting Portal_Server (consistent be direct visit), with judge whether it is DNS (domain name resolution server) message that carries out domain name mapping according to the destination slogan, if neither the DNS message, then change step 204 and handle neither directly visit the message of Portal_Server;
Step 204, according to only distributing to the standard port number that the HTTP message uses, whether can further judge is that the Portal service-user is not by the first HTTP message before the authentication, if then continue execution in step 205, if not then change step 206, on this IP message, stamp and abandon sign, go into the transmit queue module and make discard processing;
Step 205 is made forced portal/compulsory portal, preserves the purpose IP address in the IP message, and this purpose IP address is replaced to the address of Portal_Server, upgrades the verification of IP message and (CRC) then, and the normal flow that just can enter step 207 has been handled;
Step 207,208, in the above-mentioned processing procedure, for not being the user's message of the user's message of Portal business or Portal business but directly visiting the message of Portal_Server or the DNS message that carries out domain name mapping, then can directly transmit by access server, needn't make forced portal/compulsory portal, the normal flow that enters step 207 is handled, and goes into the transmit queue module then in step 208.
In the IP of above-mentioned access server message forwarding process, judge earlier whether the IP message of input is the user's message (step 202) of Portal business.If belong to the user of Portal business, then forwarding process is handled by normal forwarding process after will handling by following principle successively again, otherwise handles by normal forwarding process.
These principles comprise: for the IP message of direct visit Portal_Server, or the DNS message that carries out domain name mapping, then directly pass through, needn't do compulsory destination address conversion (DNAT), this point has guaranteed that the user's message of all direct visit Portal_Server can directly pass through access server, being redirected to visit behind the Portal_Server for user side just needn't remake and forced, DNS message for domain name mapping also can directly pass through access server, has guaranteed that the user can obtain corresponding IP address by domain name mapping after the input domain name; For not being that the HTTP message of directly visiting Portal_Server is then caught, preserve original purpose IP address then, and its destination address is replaced to the address of Portal_Server, and again calculation check and, handle by normal forwarding process then, the former purpose IP address of preservation can be used in the downlink message processing procedure of access server to the user; For neither directly visit the message of Portal_Server, be not the message of DNS, other messages that neither HTTP again, make discard processing.
Referring to Fig. 3, Fig. 3 is the downlink processing FB(flow block) (make SNAT) of access server to user's message, is compulsory Portal downlink processing flow process.By carrying out compulsory source address conversion (SNAT), the address of Portal_Server (this moment source address in message) is replaced to the user wish the station address of visiting originally, set up normal TCP for the user and connect.
Step 301, access server receives the IP message from Portal_Server;
Step 302, access server is normally wrapping in the process of processing this IP message, judges according to analyzing the message link information whether it is the Portal service-user, if then continue execution in step 303;
Step 303 according to only distributing to the standard port number that the HTTP message uses, judges that whether this IP message is that to come from Portal_Server and destination address be the HTTP message by authenticated not, if execution in step 304 then, if not execution in step 305 then;
Step 304, make forced portal/compulsory portal, source address in the IP message (address of Portal_Server) is replaced to the purpose station address (according to the event memory of Fig. 2 step 205) that the user will visit originally, upgrade the verification of IP message and (CRC) then, the normal forwarding process that just can enter step 307 has been handled;
Step 305, further whether according to the destination slogan of IP message, judging is to come from the IP message of Portal_Server or the back message using of domain name mapping DNS, if execution in step 307 then, handle by normal forwarding process, if not execution in step 306 then;
Step 306 is stamped on this IP message and is abandoned sign, goes into the transmit queue module and makes discard processing;
Step 307,308, in the above-mentioned processing procedure, for not being to come from the HTTP message of Portal_Server or come from the user's message of Portal_Server or the DNS back message using of domain name mapping, then can be directly by making forced portal/compulsory portal, the normal flow that enters step 307 is handled, and goes into the transmit queue module then in step 308.
In the IP of above-mentioned access server message forwarding process, whether the downstream IP message of judging input earlier is the user of Portal business, if belong to the user of Portal business, then forwarding process is handled by normal forwarding process after will handling by following three principles successively again, otherwise directly handles by normal forwarding process.
These principles comprise: catch the HTTP message from Portal_Server, source IP address (i.e. Ci Shi Portal_Server address) is replaced to the former destination address that will visit of user that is kept in the up processing of Fig. 2 in the access server, and again calculation check and; For the message from Portal_Server, or the back message using of DNS is not then directly by making forced portal/compulsory portal.
Other messages then abandon.
Hold at Portal_Server, Portal_Server responds to first HTTP request message that a TCP who receives connects, be used to notify corresponding user side to initiate the TCP connection request to oneself again, promptly be redirected (Redirect), make down the visit to Portal_Server of user's termination become direct visit and (be equal to the user imports Portal_Server in browser IP address, direct visit to Portal_Server), as shown in Figure 2, to the direct visit message of Portal_Server is not need compulsoryly, just no longer needs to be DNAT+SNAT+Redirect.
Method of the present invention can be used on edge service router (ESR) and broadband IP access device, can reach the requirement of forced portal/compulsory portal fully.