CN103516597A - Method for automatically recommending internet surfing type through gateway and gateway - Google Patents
Method for automatically recommending internet surfing type through gateway and gateway Download PDFInfo
- Publication number
- CN103516597A CN103516597A CN201310363169.9A CN201310363169A CN103516597A CN 103516597 A CN103516597 A CN 103516597A CN 201310363169 A CN201310363169 A CN 201310363169A CN 103516597 A CN103516597 A CN 103516597A
- Authority
- CN
- China
- Prior art keywords
- module
- bag
- gateway
- pppoe
- transmission times
- 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
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a method for automatically recommending an internet surfing type through a gateway and the gateway. The method includes the steps of judging the recommendation of a PPPoE access mode, judging the recommendation of a DHCP access mode and recommending a fixed IP access mode. The gateway sends a PADI packet to a PPPoE server, whether the gateway receives a PADO packet sent back by the PPoE server within time-out duration and a preset number of times of sending or not is judged, if yes, the recommendation of the PPPoE access mode is output, and if not, the judgment of the DHCP access mode is executed. The gateway sends a discover packet to a DHCP server, whether the gateway receives an offer packet sent back by the DHCP server within time-out duration and a preset number of times of sending or not is judged, if yes, the recommendation of the DHCP access mode is output, and if not, the recommendation of the fixed IP is output. The internet surfing type is automatically recommended through the mode that the gateway sends the data packets, and therefore the inconvenience problem caused when a user configures a router is solved.
Description
Technical field
The present invention relates to a kind of method and apparatus of automatic recommendation network access style, relate in particular to method and gateway that a kind of gateway is recommended network access style automatically.
Background technology
Most user's network access style is divided into three kinds, is respectively the point-to-point protocol on PPPoE(Ethernet) dialing, DHCP(DynamicHost arranges agreement) Dynamic Acquisition and fixing IP(Internet protocol) three kinds of access waies.Most of domestic consumers select to be dialled and realized broadband A/D SL(Asymmetrical Digital Subscriber Line by PPPoE so far) mode of access, be secondly by DHCP dynamic obtaining IP address, be finally the situation of fixed ip address again, this kind of situation is relatively less.When user need to surf the Net, first select to be applicable to the network access style of oneself, then by network access style, router is done the configuration of relevant parameter, online smoothly after configuration successful.Yet which kind of network access user does not generally know to select better, and the quality of various network accesses is inquired by traditional method Shi Xiang operator, or three kinds of modes are attempted being respectively configured, and this has caused very large inconvenience to user.
Summary of the invention
The technical problem to be solved in the present invention is to overcome the defect of configuration router inconvenience during net type in the choice of user in prior art, the method and the gateway that provide a kind of gateway automatically to recommend network access style, make user can use the network access style after recommendation to do corresponding configuration to router, without seeking advice from operator or attempting one by one.
The present invention solves above-mentioned technical problem by following technical proposals:
Gateway is recommended a method for network access style automatically, and its feature is, comprises the following steps:
S
1, gateway sends PADI(to PPPoE server and initiatively finds initial package) bag, judge whether to receive that the PADO(that PPPoE server is beamed back initiatively finds to propose bag) bag, if so, export recommendation process ends to PPPoE access, if not, enter S
2;
S
2, gateway sends discover(to Dynamic Host Configuration Protocol server and finds) bag, judge whether to receive that the offer(that Dynamic Host Configuration Protocol server is beamed back provides) bag, if so, export recommendation process ends to DHCP access, if not, enter S
3;
S
3, gateway output is to recommendation that fixedly IP accesses.
By gateway, to PPPoE server and Dynamic Host Configuration Protocol server, send packet, the recommendation of output to user network access style access way, can solve the inconvenience that user surfs the Net and arranges.
Preferably, S
1the first transmission times that middle employing initial value is 0, S
1comprise:
S
11, gateway sends PADI bag to PPPoE server;
S
12, whether judgement receive the PADO bag that PPPoE server beams back in one first time-out time, if so, enters S
13, if not, enter S
14;
S
13, recommendation the process ends of output to PPPoE access;
S
14, the value of the first transmission times is added to one;
S
15, judge that whether the value of the first transmission times reaches one first frequency threshold value, if so, enters S
2, if not, enter S
11.
When gateway sends PADI bag to PPPoE server, just in a time-out time, do not receive for the first time that the PADO bag that PPPoE server is beamed back just stops sending, but again send to guarantee whether really cannot receive that the PADO that PPPoE server is beamed back wraps, thereby improve, recommend feasibility.
Preferably, S
2the second transmission times that middle employing initial value is 0, S
2comprise:
S
21, gateway sends discover bag to Dynamic Host Configuration Protocol server;
S
22, whether judgement receive the offer bag that Dynamic Host Configuration Protocol server beams back in one second time-out time, if so, enters S
23, if not, enter S
24;
S
23, recommendation the process ends of output to DHCP access;
S
24, the value of the second transmission times is added to one;
S
25, judge that whether the value of the second transmission times reaches one second frequency threshold value, if so, enters S
3, if not, enter S
21.
When gateway sends discover bag to Dynamic Host Configuration Protocol server, just in a time-out time, do not receive for the first time that the offer bag that Dynamic Host Configuration Protocol server is beamed back just stops sending, but again send to guarantee whether really cannot receive that the offer that Dynamic Host Configuration Protocol server is beamed back wraps, thereby improve, recommend feasibility.
Preferably, the value of described the first time-out time is set as 2s, and described first number Threshold is 3 times.
Preferably, the value of described the second time-out time is set as 3s, and described second number Threshold is 3 times.
The present invention also provides a kind of gateway, and its feature is, described gateway comprises fixedly IP module of a PPPoE server judge module, a Dynamic Host Configuration Protocol server judge module and,
Described PPPoE server judge module, for send PADI bag to PPPoE server, judges whether to receive that the PADO that PPPoE server is beamed back wraps, and if so, exports the recommendation to PPPoE access, if not, calls described Dynamic Host Configuration Protocol server judge module;
Described Dynamic Host Configuration Protocol server judge module, for send discover bag to Dynamic Host Configuration Protocol server, judges whether to receive that the offer that Dynamic Host Configuration Protocol server is beamed back wraps, and if so, exports the recommendation to DHCP access, if not, calls described fixedly IP module;
Described fixedly IP module is for exporting the fixedly recommendation of IP access.
Preferably, described PPPoE server judge module adopts the first transmission times that initial value is 0, described PPPoE server judge module comprises: PADI bag sending module, PADO bag judge module, PPPoE access recommending module, the first transmission times increase module and first number threshold decision module
Described PADI bag sending module is for sending PADI bag to PPPoE server;
Described PADO bag judge module, for judging the PADO bag of whether receiving that in one first time-out time PPPoE server is beamed back, if so, calls described PPPoE access recommending module, and if not, calling described the first transmission times increases module;
Described PPPoE access recommending module is for exporting the recommendation to PPPoE access;
Described the first transmission times increases module for the value of the first transmission times is added to one, then calls described first number threshold decision module;
Described first number threshold decision module, for judging whether the value of the first transmission times reaches one first frequency threshold value, if so, calls described Dynamic Host Configuration Protocol server judge module, if not, called described PADI bag sending module.
Preferably, described Dynamic Host Configuration Protocol server judge module adopts the second transmission times that initial value is 0, described Dynamic Host Configuration Protocol server judge module comprises: discover bag sending module, offer bag judge module, DHCP access recommending module, the second transmission times increase module and second number threshold decision module
Described discover bag sending module is for sending discover bag to Dynamic Host Configuration Protocol server;
Described offer bag judge module, for judging the offer bag of whether receiving that in one second time-out time Dynamic Host Configuration Protocol server is beamed back, if so, calls described DHCP access recommending module, and if not, calling described the second transmission times increases module;
Described DHCP access recommending module is for exporting the recommendation to DHCP access;
Described the second transmission times increases module for the value of the second transmission times is added to one, then calls described second number threshold decision module;
Described second number threshold decision module, for judging whether the value of the second transmission times reaches one second frequency threshold value, if so, calls described fixedly IP module, if not, called described discover bag sending module.
Preferably, the value of described the first time-out time is set as 2s, and described first number Threshold is 3 times.
Preferably, the value of described the second time-out time is set as 3s, and described second number Threshold is 3 times.
Meeting on the basis of this area general knowledge, above-mentioned each optimum condition, can combination in any, obtains each preferred embodiment of the present invention.
Positive progressive effect of the present invention is: by gateway, to outside PPPoE server, Dynamic Host Configuration Protocol server, send packet, realize the automatic recommendation to user network access style, solved the inconvenience of user when configuration network access style.
Accompanying drawing explanation
Fig. 1 is the method flow diagram that a kind of gateway of the embodiment of the present invention is recommended network access style automatically.
Fig. 2 is the modular structure figure of a kind of gateway of the embodiment of the present invention.
Embodiment
Mode below by embodiment further illustrates the present invention, but does not therefore limit the present invention among described scope of embodiments.
A kind of method that the present embodiment provides gateway automatically to recommend network access style, as shown in Figure 1, comprises the following steps:
Step 10, gateway send PADI bag to PPPoE server, judge whether to receive that the PADO that PPPoE server is beamed back wraps, and if so, export recommendation process ends to PPPoE access, if not, enter step 20;
Step 20, gateway send discover bag to Dynamic Host Configuration Protocol server, judge whether to receive that the offer that Dynamic Host Configuration Protocol server is beamed back wraps, and if so, export recommendation process ends to DHCP access, if not, enter step 30;
In step 10, adopting initial value is the first transmission times of 0, and step 10 comprises:
Whether step 102, judgement received the PADO bag that PPPoE server is beamed back in 2 seconds, if so, entered step 103, if not, entered step 104;
In step 20, adopting initial value is the second transmission times of 0, and step 20 comprises:
Whether step 202, judgement received the offer bag that Dynamic Host Configuration Protocol server is beamed back in 3 seconds, if so, entered step 203, if not, entered step 204;
The present embodiment provides a kind of gateway of automatic recommendation network access style, as shown in Figure 2, comprises fixedly IP module 50 of a PPPoE server judge module 30, a Dynamic Host Configuration Protocol server judge module 40 and.
Described PPPoE server judge module 30, for send PADI bag to PPPoE server, judges whether to receive that the PADO that PPPoE server is beamed back wraps, and if so, exports the recommendation to PPPoE access, if not, calls described Dynamic Host Configuration Protocol server judge module 40;
Described Dynamic Host Configuration Protocol server judge module 40, for send discover bag to Dynamic Host Configuration Protocol server, judges whether to receive that the offer that Dynamic Host Configuration Protocol server is beamed back wraps, and if so, exports the recommendation to DHCP access, if not, calls described fixedly IP module 50;
Described fixedly IP module 50 is for exporting the fixedly recommendation of IP access.
In PPPoE server judge module 30, adopt the first transmission times that initial value is 0, comprise that PADI bag sending module 301, PADO bag judge module 302, PPPoE access recommending module 303, the first transmission times increase module 304 and first number threshold decision module 305.
Described PADI bag sending module 301 is for sending PADI bag to PPPoE server;
Described PADO bag judge module 302, for judging the PADO bag of whether receiving that in 2 seconds PPPoE server is beamed back, if so, calls described PPPoE access recommending module 303, and if not, calling described the first transmission times increases module 304;
Described PPPoE access recommending module 303 is for exporting the recommendation to PPPoE access;
Described the first transmission times increases module 304 for the value of the first transmission times is added to one, then calls described first number threshold decision module 305;
Described first number threshold decision module 305, for judging whether the value of the first transmission times reaches 3 times, if so, calls described Dynamic Host Configuration Protocol server judge module 40, if not, called described PADI bag sending module 301.
In Dynamic Host Configuration Protocol server judge module 40, adopt the second transmission times that initial value is 0, comprise that discover bag sending module 401, offer bag judge module 402, DHCP access recommending module 403, the second transmission times increase module 404 and second number threshold decision module 405.
Described discover bag sending module 401 is for sending discover bag to Dynamic Host Configuration Protocol server;
Described offer bag judge module 402, for judging the offer bag of whether receiving that in 3 seconds Dynamic Host Configuration Protocol server is beamed back, if so, calls described DHCP access recommending module 403, and if not, calling described the second transmission times increases module 404;
Described DHCP access recommending module 403 is for exporting the recommendation to DHCP access;
Described the second transmission times increases module 404 for the value of the second transmission times is added to one, then calls described second number threshold decision module 405;
Described second number threshold decision module 405, for judging whether the value of the second transmission times reaches 3 times, if so, called described fixedly IP module 50, if not, calls described discover bag sending module 401.
Claims (10)
1. gateway is recommended a method for network access style automatically, it is characterized in that, comprises the following steps:
S
1, gateway sends PADI bag to PPPoE server, judges whether the PADO bag of receiving that PPPoE server is beamed back, if so, exports recommendation process ends to PPPoE access, if not, enters S
2;
S
2, gateway sends discover bag to Dynamic Host Configuration Protocol server, judges whether the offer bag of receiving that Dynamic Host Configuration Protocol server is beamed back, if so, exports recommendation process ends to DHCP access, if not, enters S
3;
S
3, gateway output is to recommendation that fixedly IP accesses.
2. gateway as claimed in claim 1 is recommended the method for network access style automatically, it is characterized in that S
1the first transmission times that middle employing initial value is 0, S
1comprise:
S
11, gateway sends PADI bag to PPPoE server;
S
12, whether judgement receive the PADO bag that PPPoE server beams back in one first time-out time, if so, enters S
13, if not, enter S
14;
S
13, recommendation the process ends of output to PPPoE access;
S
14, the value of the first transmission times is added to one;
S
15, judge that whether the value of the first transmission times reaches one first frequency threshold value, if so, enters S
2, if not, enter S
11.
3. gateway as claimed in claim 1 is recommended the method for network access style automatically, it is characterized in that S
2the second transmission times that middle employing initial value is 0, S
2comprise:
S
21, gateway sends discover bag to Dynamic Host Configuration Protocol server;
S
22, whether judgement receive the offer bag that Dynamic Host Configuration Protocol server beams back in one second time-out time, if so, enters S
23, if not, enter S
24;
S
23, recommendation the process ends of output to DHCP access;
S
24, the value of the second transmission times is added to one;
S
25, judge that whether the value of the second transmission times reaches one second frequency threshold value, if so, enters S
3, if not, enter S
21.
4. gateway as claimed in claim 2 is recommended the method for network access style automatically, it is characterized in that, the value of described the first time-out time is set as 2s, and described first number Threshold is 3 times.
5. gateway as claimed in claim 3 is recommended the method for network access style automatically, it is characterized in that, the value of described the second time-out time is set as 3s, and described second number Threshold is 3 times.
6. a gateway, is characterized in that, described gateway comprises fixedly IP module of a PPPoE server judge module, a Dynamic Host Configuration Protocol server judge module and,
Described PPPoE server judge module, for send PADI bag to PPPoE server, judges whether to receive that the PADO that PPPoE server is beamed back wraps, and if so, exports the recommendation to PPPoE access, if not, calls described Dynamic Host Configuration Protocol server judge module;
Described Dynamic Host Configuration Protocol server judge module, for send discover bag to Dynamic Host Configuration Protocol server, judges whether to receive that the offer that Dynamic Host Configuration Protocol server is beamed back wraps, and if so, exports the recommendation to DHCP access, if not, calls described fixedly IP module;
Described fixedly IP module is for exporting the fixedly recommendation of IP access.
7. gateway as claimed in claim 6, it is characterized in that, described PPPoE server judge module adopts the first transmission times that initial value is 0, described PPPoE server judge module comprises: PADI bag sending module, PADO bag judge module, PPPoE access recommending module, the first transmission times increase module and first number threshold decision module
Described PADI bag sending module is for sending PADI bag to PPPoE server;
Described PADO bag judge module, for judging the PADO bag of whether receiving that in one first time-out time PPPoE server is beamed back, if so, calls described PPPoE access recommending module, and if not, calling described the first transmission times increases module;
Described PPPoE access recommending module is for exporting the recommendation to PPPoE access;
Described the first transmission times increases module for the value of the first transmission times is added to one, then calls described first number threshold decision module;
Described first number threshold decision module, for judging whether the value of the first transmission times reaches one first frequency threshold value, if so, calls described Dynamic Host Configuration Protocol server judge module, if not, called described PADI bag sending module.
8. gateway as claimed in claim 6, it is characterized in that, described Dynamic Host Configuration Protocol server judge module adopts the second transmission times that initial value is 0, described Dynamic Host Configuration Protocol server judge module comprises: discover bag sending module, offer bag judge module, DHCP access recommending module, the second transmission times increase module and second number threshold decision module
Described discover bag sending module is for sending discover bag to Dynamic Host Configuration Protocol server;
Described offer bag judge module, for judging the offer bag of whether receiving that in one second time-out time Dynamic Host Configuration Protocol server is beamed back, if so, calls described DHCP access recommending module, and if not, calling described the second transmission times increases module;
Described DHCP access recommending module is for exporting the recommendation to DHCP access;
Described the second transmission times increases module for the value of the second transmission times is added to one, then calls described second number threshold decision module;
Described second number threshold decision module, for judging whether the value of the second transmission times reaches one second frequency threshold value, if so, calls described fixedly IP module, if not, called described discover bag sending module.
9. gateway as claimed in claim 7, is characterized in that, the value of described the first time-out time is set as 2s, and described first number Threshold is 3 times.
10. gateway as claimed in claim 8, is characterized in that, the value of described the second time-out time is set as 3s, and described second number Threshold is 3 times.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310363169.9A CN103516597A (en) | 2013-08-19 | 2013-08-19 | Method for automatically recommending internet surfing type through gateway and gateway |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310363169.9A CN103516597A (en) | 2013-08-19 | 2013-08-19 | Method for automatically recommending internet surfing type through gateway and gateway |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103516597A true CN103516597A (en) | 2014-01-15 |
Family
ID=49898669
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310363169.9A Pending CN103516597A (en) | 2013-08-19 | 2013-08-19 | Method for automatically recommending internet surfing type through gateway and gateway |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103516597A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106059832A (en) * | 2016-08-31 | 2016-10-26 | 上海斐讯数据通信技术有限公司 | Method and system for automatically judging Internet-surfing way of WAN (Wide Area Network) port |
WO2017092519A1 (en) * | 2015-12-04 | 2017-06-08 | 中兴通讯股份有限公司 | Device and method for acquiring ip address of home base station |
CN107592240A (en) * | 2017-09-07 | 2018-01-16 | 上海斐讯数据通信技术有限公司 | A kind of method and system of router automatic detection network access |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003088543A1 (en) * | 2002-04-05 | 2003-10-23 | Actiontec Electronics, Inc. | Router with automatic protocol configuration and methods of use |
US20070058538A1 (en) * | 2005-09-15 | 2007-03-15 | Wei Chiang | Method of setting up a wireless router |
CN102223270A (en) * | 2011-07-14 | 2011-10-19 | 深圳市共进电子有限公司 | Method for detecting net playing mode of router |
-
2013
- 2013-08-19 CN CN201310363169.9A patent/CN103516597A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003088543A1 (en) * | 2002-04-05 | 2003-10-23 | Actiontec Electronics, Inc. | Router with automatic protocol configuration and methods of use |
US20070058538A1 (en) * | 2005-09-15 | 2007-03-15 | Wei Chiang | Method of setting up a wireless router |
CN102223270A (en) * | 2011-07-14 | 2011-10-19 | 深圳市共进电子有限公司 | Method for detecting net playing mode of router |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017092519A1 (en) * | 2015-12-04 | 2017-06-08 | 中兴通讯股份有限公司 | Device and method for acquiring ip address of home base station |
CN106850867A (en) * | 2015-12-04 | 2017-06-13 | 中兴通讯股份有限公司 | A kind of Home eNodeB obtains location device and obtains location method |
CN106059832A (en) * | 2016-08-31 | 2016-10-26 | 上海斐讯数据通信技术有限公司 | Method and system for automatically judging Internet-surfing way of WAN (Wide Area Network) port |
CN107592240A (en) * | 2017-09-07 | 2018-01-16 | 上海斐讯数据通信技术有限公司 | A kind of method and system of router automatic detection network access |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106452917B (en) | PPPOE internet account and password method of automatic configuration and system | |
CN106059954B (en) | A kind of method and device that network bandwidth is adjusted | |
CN103141133B (en) | Data message is carried out to the method and apparatus of policy control | |
RU2556468C2 (en) | Terminal access authentication method and customer premise equipment | |
CN101146047B (en) | A method, system and gateway for controlling quantity of network access terminal under routing mode | |
US9369448B2 (en) | Network security parameter generation and distribution | |
CN103024462B (en) | Method for network detection and digital terminal | |
CN102025792B (en) | Router and IP address setting method thereof | |
US20100121946A1 (en) | Method and device for identifying and selecting an interface to access a network | |
CN106059832A (en) | Method and system for automatically judging Internet-surfing way of WAN (Wide Area Network) port | |
CN108307694B (en) | Network connection information acquisition method and router | |
MX2007001165A (en) | Fast link establishment for network access. | |
EP3145181A1 (en) | Set-top box network switching method, apparatus and set-top box having same | |
CN108650142A (en) | The control method and device of multiple gateway equipment in intelligent domestic system | |
CN103516597A (en) | Method for automatically recommending internet surfing type through gateway and gateway | |
CN107809661A (en) | A kind of startup method for merging set top box and fusion set top box | |
WO2017080335A1 (en) | Pppoe network-based dialing method, dialing system, and router | |
CN102143233A (en) | Customer premise equipment and network accessing method | |
CN105429885A (en) | Adaptive router selection method | |
EP1552650B1 (en) | Method for the automatic configuration of an ip telephony device and/or data, system and device implementing same | |
EP2381626A1 (en) | An access terminal and a method for the terminal binding to the operator | |
CN105721189A (en) | Network port configuration method and device for network equipment | |
CN110149677A (en) | A kind of method and mobile terminal of terminal selection access VoWiFi network | |
CN103795687A (en) | Method and system for realizing multi-user account login and home gateway | |
CN107547467B (en) | Circuit authentication processing method, system and controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20140115 |
|
WD01 | Invention patent application deemed withdrawn after publication |