CN109120557A - A kind of intelligent router WAN mouthfuls of dynamic switching method and system - Google Patents

A kind of intelligent router WAN mouthfuls of dynamic switching method and system Download PDF

Info

Publication number
CN109120557A
CN109120557A CN201810768389.2A CN201810768389A CN109120557A CN 109120557 A CN109120557 A CN 109120557A CN 201810768389 A CN201810768389 A CN 201810768389A CN 109120557 A CN109120557 A CN 109120557A
Authority
CN
China
Prior art keywords
network interface
wired network
server
wan mouthfuls
cable
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
Application number
CN201810768389.2A
Other languages
Chinese (zh)
Inventor
唐荣华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Feixun Data Communication Technology Co Ltd
Original Assignee
Shanghai Feixun Data Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201810768389.2A priority Critical patent/CN109120557A/en
Publication of CN109120557A publication Critical patent/CN109120557A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/253Routing or path finding in a switch fabric using establishment or release of connections between ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/60Router architectures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a kind of intelligent router WAN mouthfuls of dynamic switching method and systems, and the dynamic switching method is comprising steps of S1: whether the wired network interface of real-time monitoring router is inserted into cable;S2: it if so, being based on above-mentioned wired network interface, sends the discovery message of server and judges whether to receive the response message that server is fed back;S3: if so, above-mentioned wired network interface is switched to WAN mouthfuls.It wherein, for the real-time monitoring of wired network interface is realized based on Linux hot plug mechanism.Technical solution of the present invention can be realized when cable is inserted into any wired network interface by user can automatic identification and be WAN mouthful by the wired network interface switching at runtime inserted with cable effect, with preferable practicability.

Description

A kind of intelligent router WAN mouthfuls of dynamic switching method and system
Technical field
The present invention relates to router technology field more particularly to a kind of intelligent router WAN mouthfuls of dynamic switching method and System.
Background technique
A fixed WAN mouth is both provided on conventional router, without IT (Information Technology) background Domestic consumer when being configured to router, often can the cable of outer net be inserted on non-WAN mouth and lead to router cluster Failure.Although this is a kind of more rudimentary common mistake, it annoyings many users for a certainty, and it is unnecessary to cause Technical support.
Based on causing networking to fail due to the cable of outer net is accidentally accessed non-wan interface by user in the presence of actual life The problem of, setting of many manufacturers all to WAN mouthfuls is made that many optimizations and improves.Such as:
The multiple WAN mouthfuls effects to realize load balancing are set on a router, application No. is 201810046003.3 Chinese invention patent discloses circuit selecting method, system and the road of a kind of router with multiple WAN interfaces By device, circuit selecting method includes: A, receives the request signal of LAN subscriber access Internet resources, above-mentioned request signal Carry the source IP address data information of user;Whether B inquires in the database according to the source IP address data information of user and deposits Data are recorded in access corresponding with IP, access record data include that the source IP address data being used for and its access before this are mutual Used WAN goes aboard for visit interface data information when networked resources;C, when inquiring corresponding access record data, with the access Visit interface of the WAN visit interface as this orientation Internet resources of the user in record;Otherwise, according to load balancing plan Slightly this visit request selecting WAN of user goes aboard for visit interface.The existing patent is selected using the history access data of user Select suitable WAN visit interface.
And the simplification setting of network is realized using Linux network data communication technology, application No. is 201510105056.8 Chinese invention patent discloses the method for facilitating user's easy configuration router WAN connection type, should The first step of method is that router issues DHCP discover message search Dynamic Host Configuration Protocol server, and the second cloth carries out DHCP type WAN connection business, jumps to the 4th step;Third step carries out the WAN connection business of PPPoE type, and midway prompts user's input The username and password of PPPoE jumps to the 4th step;4th step completes the configuration of WAN connection.The existing patent is to utilize to order DHCP discover message realizes WAN connection business to search for the mode of Dynamic Host Configuration Protocol server.
It is above-mentioned to be not directed in the prior art: how to make user by any one wired network interface of cable insertion When, automatic identification can be carried out to each wired network interface state and switches the wired network interface inserted with cable Be WAN mouthfuls, to avoid because user by cable access it is WAN mouthfuls non-due to cause networking failure the problem of.
Summary of the invention
In view of the above-mentioned problems, the invention discloses a kind of intelligent router WAN mouthfuls of dynamic switching method, the switching at runtime Method includes the following steps:
S1: whether the wired network interface of real-time monitoring router is inserted into cable;
S2: it if so, being based on above-mentioned wired network interface, sends the discovery message of server and judges whether to receive clothes The response message that business device is fed back;
S3: if so, above-mentioned wired network interface is switched to WAN mouthfuls.
Further, above-mentioned steps S1 comprising steps of
S11: Linux hot plug mechanism, the status information of the above-mentioned wired network interface of real-time monitoring are based on;
S12: identifying the status information of above-mentioned wired network interface, and judges whether above-mentioned wired network interface is inserted into net Line.
Further, above-mentioned steps S12 comprising steps of
S121: the status information based on above-mentioned wired network interface judges whether the state of above-mentioned wired network interface deposits Changing;
S122: if so, generating the hot plug message event of the state change of wired network interface containing router;
S123: it is based on above-mentioned hot plug message event, judges whether above-mentioned wired network interface is inserted into cable.
Further, above-mentioned server includes: Dynamic Host Configuration Protocol server, PPPoE server.
Further, above-mentioned steps S2 includes:
S21: it is based on above-mentioned wired network interface, sends the discovery message of Dynamic Host Configuration Protocol server;
S22: judge whether to receive the response message that Dynamic Host Configuration Protocol server is fed back;If so, thening follow the steps S3;If it is not, Then follow the steps S23;
S23: being based on above-mentioned wired network interface, sends the discovery message of PPPoE server;
S24: judge whether to receive the response message that above-mentioned PPPoE server is fed back;If so, thening follow the steps S3; If it is not, then keeping above-mentioned wired network interface is current type.
Corresponding based on a kind of intelligent router WAN mouthfuls of dynamic switching method disclosed in this invention, the present invention is also A kind of intelligent router WAN mouthfuls of switching at runtime system is disclosed, which includes:
Whether the first monitoring modular, the wired network interface for real-time detection router are inserted into cable;
Judgment module is sent, for being based on above-mentioned wired network interface, the discovery message of server is sent and judges whether Receive the response message that server is fed back;
Interface switching module, for above-mentioned wired network interface to be switched to WAN mouthfuls.
Further, above-mentioned first monitoring modular includes:
Second monitoring modular, for according to Linux hot plug mechanism, real-time monitoring to obtain the shape of above-mentioned wired network interface State information;
It identifies judgment module, the status information of above-mentioned wired network interface and judges above-mentioned wired network interface for identification Whether cable is inserted into.
Further, above-mentioned identification judgment module includes:
First judgment module judges above-mentioned wired network interface for the status information according to above-mentioned wired network interface State with the presence or absence of variation;
Event generation module, for generating the hot plug message event of the state change of wired network interface containing router;
Second judgment module, for judging whether above-mentioned wired network interface is inserted into according to above-mentioned hot plug message event Cable.
Further, the server in above-mentioned switching at runtime system includes Dynamic Host Configuration Protocol server, PPPoE server.
Further, above-mentioned transmission judgment module includes:
First sending module sends the discovery message of Dynamic Host Configuration Protocol server for being based on above-mentioned wired network interface;
Third judgment module, the response message fed back for judging whether to receive Dynamic Host Configuration Protocol server;
Second sending module sends the discovery message of PPPoE server for being based on above-mentioned wired network interface;
4th judgment module, the response message fed back for judging whether to receive above-mentioned PPPoE server;
Type keeps module, is current type for keeping above-mentioned wired network interface.
The beneficial effects of the present invention are:
A kind of intelligent router WAN mouthfuls of dynamic switching method disclosed in this invention and system are inserted using Linux heat On drawing machine real-time monitoring router the state change of wired network interface and send server discovery message by way of Type of server is obtained, which is switched to WAN mouthfuls, user is can be realized cable is inserted into any network and connect Mouthful when can intelligent recognition should wired network interface inserted with cable and by the wired network interface switching at runtime be routing The effect that WAN mouthfuls of device has preferable practicability.
Detailed description of the invention
Fig. 1 is the dynamic switching method flow chart of WAN mouthfuls of intelligent router of one of embodiment one;
Fig. 2 is the method flow diagram for real-time monitoring router wired network interface state in embodiment one;
Fig. 3 is the status information of wired network interface for identification in embodiment one to judge router wired network interface The method flow diagram of state change;
Fig. 4 is that the module of WAN mouthfuls of intelligent router of switching at runtime system of one of embodiment one forms figure;
Fig. 5 is that the module of the first monitoring modular in embodiment one forms figure;
Fig. 6 is that the module of the identification judgment module in embodiment one forms figure;
Fig. 7 is method flow diagram of the discovery message to switch WAN mouthfuls for sending server in embodiment two;
Fig. 8 is that the module of the transmission judgment module in embodiment two forms figure.
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specification Other advantages and efficacy of the present invention can be easily understood for disclosed content.The present invention can also pass through in addition different specific realities The mode of applying is embodied or practiced, the various details in this specification can also based on different viewpoints and application, without departing from Various modifications or alterations are carried out under spirit of the invention.It should be noted that in the absence of conflict, following embodiment and implementation Feature in example can be combined with each other.
It should be noted that illustrating the basic structure that only the invention is illustrated in a schematic way provided in following embodiment Think, only shown in schema then with related component in the present invention rather than component count, shape and size when according to actual implementation Draw, when actual implementation kenel, quantity and the ratio of each component can arbitrarily change for one kind, and its assembly layout kenel It is likely more complexity.
Embodiment one
Referring to Fig.1, a kind of intelligent router WAN mouthfuls of dynamic switching method, the switching at runtime side are present embodiments provided Method includes the following steps:
S1: whether the wired network interface of real-time monitoring router is inserted into cable;
S2: it if so, being based on above-mentioned wired network interface, sends the discovery message of server and judges whether to receive clothes The response message that business device is fed back;If it is not, then showing to be not inserted into cable on the wired network interface, without executing subsequent operation;
S3: if so, above-mentioned wired network interface is switched to WAN mouthfuls;If it is not, then without cutting the wired network interface WAN mouthfuls are changed to, that is, keeping the wired network interface is current type.
It should be noted that referring to Fig. 2, for " cable network of real-time monitoring router connects involved in step S1 Mouthful whether be inserted into cable " process specifically comprise the following steps:
S11: Linux hot plug mechanism, the status information of the above-mentioned wired network interface of real-time monitoring are based on;
S12: identifying the status information of above-mentioned wired network interface, and judges whether above-mentioned wired network interface is inserted into net Line.
It should be noted that being accurately to obtain for the effect of Linux hot plug mechanism involved in step S11 The status information of each wired network interface on router.Its hot plug mechanism can elaborate are as follows:
When user adds or deletes equipment to system, the kernel of operating system will generate a hot plug events, and The user space program of processing equipment connection, this user's space are searched in "/proc/sys/kernel/hotplug " file Program, that is, "/sbin/hotplug " script, the script can be searched for all with " hotplug " under "/etc/hotplug.d " catalogue For the program and calling of suffix.
When user is inserted into cable on any interface, the kernel of operating system will generate a hot plug message thing Part, " the $ ACTION " of the message event can be " ifup (cable insertion) " or " ifdown (cable extraction) ", the event " $ INTERFACE " is exactly wired network interface title, such as " eth0.1 ".
It should be noted that referring to Fig. 3, for " identifying the state of above-mentioned wired network interface involved in step S12 The process of information, and judge whether above-mentioned wired network interface is inserted into cable " includes the following steps:
S121: the status information based on above-mentioned wired network interface judges whether the state of above-mentioned wired network interface deposits Changing;
S122: if so, generating the hot plug message event of the state change of wired network interface containing router;
S123: it is based on above-mentioned hot plug message event, judges whether above-mentioned wired network interface is inserted into cable.
Wherein, for " judging the state of above-mentioned wired network interface with the presence or absence of variation " involved in step S121 Judging result, the operation that should be taken is other than step S122, further includes: if it is not, then needing to continue to execute step S1, with reality When monitor router wired network interface status information.
The process of step S1 can be described in detail are as follows: switching at runtime system utilizes Linux hot plug mechanism, supervises in real time Survey the status information of wired network interface on router;In turn, it can identify to obtain the wired network interface by the status information State with the presence or absence of variation, change if it exists, then further generate corresponding hot plug message event, it is slotting by the heat Pulling out message event can get which wired network interface state changes, and state change includes two kinds: cable insertion, Cable is extracted;Finally, it can judge whether the wired network interface is inserted into cable by hot plug message event.
It should be noted that in the present embodiment for the wired network interface on router whether the judgement inserted with cable It is only the first step, needs to send the discovery message of server by the wired network interface also thereafter to judge the switching at runtime system Whether system can receive the response message that server is fed back;If the response message that server is fed back can be received, It can be WAN mouthfuls by the wired network interface switching at runtime;If not receiving the response message that the server is fed back, being not necessarily to will The wired network interface is switched to WAN mouthfuls, and wired network interface is maintained as current type.
Based on a kind of WAN mouthfuls of intelligent router provided by the present embodiment of dynamic switching method, corresponding, this implementation Example additionally provides a kind of intelligent router WAN mouthfuls of switching at runtime system, and referring to Fig. 4, which includes:
Whether the first monitoring modular, the wired network interface for real-time detection router are inserted into cable;
Judgment module is sent, for being based on above-mentioned wired network interface, the discovery message of server is sent and judges whether Receive the response message that server is fed back;
Interface switching module, for above-mentioned wired network interface to be switched to WAN mouthfuls.
It should be noted that referring to Fig. 5, which includes:
Second monitoring modular, for according to Linux hot plug mechanism, real-time monitoring to obtain the shape of above-mentioned wired network interface State information;
It identifies judgment module, the status information of above-mentioned wired network interface and judges above-mentioned wired network interface for identification Whether cable is inserted into.
It should be noted that referring to Fig. 6, which includes:
First judgment module judges above-mentioned wired network interface for the status information according to above-mentioned wired network interface State with the presence or absence of variation;
Event generation module, for generating the hot plug message event of the state change of wired network interface containing router;
Second judgment module, for judging whether above-mentioned wired network interface is inserted into according to above-mentioned hot plug message event Cable.
A kind of intelligent router WAN mouthfuls of dynamic switching method and system provided by the present embodiment are to utilize Linux heat The side of the state change of wired network interface and the discovery message by sending server on plug mechanism real-time monitoring router Formula obtains type of server, which is switched to WAN mouthfuls, user is can be realized by cable and is inserted into any network When interface can intelligent recognition should wired network interface inserted with cable and by the wired network interface switching at runtime be road By WAN mouthfuls of effect of device, there is preferable practicability.
Embodiment two
Similar to shown in Fig. 1 in embodiment one, present embodiments providing a kind of intelligent router WAN mouthfuls of switching at runtime Method, the dynamic switching method include:
S1: whether the wired network interface of real-time monitoring router is inserted into cable;
S2: it if so, being based on above-mentioned wired network interface, sends the discovery message of server and judges whether to receive clothes The response message that business device is fed back;If it is not, then showing to be not inserted into cable on the wired network interface, without executing subsequent operation;
S3: if so, above-mentioned wired network interface is switched to WAN mouthfuls;If it is not, then without cutting the wired network interface WAN mouthfuls are changed to, that is, keeping the wired network interface is current type.
It should be noted that shown in the Fig. 2 being similar in embodiment one, for " real-time monitoring involved in step S1 Whether the wired network interface of router is inserted into cable " process specifically comprise the following steps:
S11: Linux hot plug mechanism, the status information of the above-mentioned wired network interface of real-time monitoring are based on;
S12: identifying the status information of above-mentioned wired network interface, and judges whether above-mentioned wired network interface is inserted into net Line.
It should be noted that being accurately to obtain for the effect of Linux hot plug mechanism involved in step S11 The status information of each wired network interface on router.
It should be noted that shown in the Fig. 3 being similar in embodiment one, for " identification is above-mentioned involved in step S12 The process of the status information of wired network interface, and judge whether above-mentioned wired network interface is inserted into cable " includes the following steps:
S121: the status information based on above-mentioned wired network interface judges whether the state of above-mentioned wired network interface deposits Changing;
S122: if so, generating the hot plug message event of the state change of wired network interface containing router;
S123: it is based on above-mentioned hot plug message event, judges whether above-mentioned wired network interface is inserted into cable.
Wherein, for " judging the state of above-mentioned wired network interface with the presence or absence of variation " involved in step S121 Judging result, the operation that should be taken is other than step S122, further includes: if it is not, then needing to continue to execute step S1, with reality When monitor router wired network interface status information.
The process of step S1 can be described in detail are as follows: switching at runtime system utilizes Linux hot plug mechanism, supervises in real time Survey the status information of wired network interface on router;In turn, it can identify to obtain the wired network interface by the status information State with the presence or absence of variation, change if it exists, then further generate corresponding hot plug message event, it is slotting by the heat Pulling out message event can get which wired network interface state changes, and state change includes two kinds: cable insertion, Cable is extracted;Finally, it can judge whether the wired network interface is inserted into cable by hot plug message event.
It should be noted that in the present embodiment for the wired network interface on router whether the judgement inserted with cable It is only the first step, needs to send the discovery message of server by the wired network interface also thereafter to judge the switching at runtime system Whether system can receive the response message that server is fed back;If the response message that server is fed back can be received, It can be WAN mouthfuls by the wired network interface switching at runtime;If not receiving the response message that the server is fed back, being not necessarily to will The wired network interface is switched to WAN mouthfuls, and wired network interface is maintained as current type.
It should be noted that type of server involved in this embodiment includes Dynamic Host Configuration Protocol server, PPPoE server. Specifically comprise the following steps: referring to Fig. 7, step S2
S21: it is based on above-mentioned wired network interface, sends the discovery message of Dynamic Host Configuration Protocol server;
S22: judge whether to receive the response message that Dynamic Host Configuration Protocol server is fed back;If so, thening follow the steps S3;If it is not, Then follow the steps S23;
S23: being based on above-mentioned wired network interface, sends the discovery message of PPPoE server;
S24: judge whether to receive the response message that above-mentioned PPPoE server is fed back;If so, thening follow the steps S3; If it is not, then keeping above-mentioned wired network interface is current type.
It should be noted that the process of step S2-S3 can be described in detail are as follows: the switching at runtime system connects in the cable network Under the premise of mouth is inserted with cable, the discovery message of Dynamic Host Configuration Protocol server will be sent in a broadcast manner by the wired network interface Dynamic Host Configuration Protocol server is found, i.e., sends specific broadcast message to address 255.255.255.255, and only Dynamic Host Configuration Protocol server is The discovery message can be responded;In turn, the response report that can be fed back by judging whether to receive Dynamic Host Configuration Protocol server Text, to choose whether for the wired network interface to be switched to WAN mouthfuls;If receiving the response message that Dynamic Host Configuration Protocol server is fed back, The wired network interface is then switched to WAN mouthfuls;It, will be after supervention if not receiving the response message that Dynamic Host Configuration Protocol server is fed back The discovery message of PPPoE server is sent, to select by judging whether to receive the response message that PPPoE server is fed back Whether the wired network interface is switched to WAN mouthfuls, it, will when even receiving the response message that the PPPoE server is fed back The wired network interface is switched to WAN mouthfuls;If do not receive the response message that PPPoE server is fed back, without switching The wired network interface is WAN mouthfuls, and wired network interface is maintained as current type.
Based on a kind of WAN mouthfuls of intelligent router provided by the present embodiment of dynamic switching method, corresponding, this implementation Example additionally provides a kind of intelligent router WAN mouthfuls of switching at runtime system, and similar to shown in Fig. 4 in embodiment one, this is dynamically Switching system includes:
Whether the first monitoring modular, the wired network interface for real-time detection router are inserted into cable;
Judgment module is sent, for being based on above-mentioned wired network interface, the discovery message of server is sent and judges whether Receive the response message that server is fed back;
Interface switching module, for above-mentioned wired network interface to be switched to WAN mouthfuls.
Wherein, which includes:
Second monitoring modular, for according to Linux hot plug mechanism, real-time monitoring to obtain the shape of above-mentioned wired network interface State information;
It identifies judgment module, the status information of above-mentioned wired network interface and judges above-mentioned wired network interface for identification Whether cable is inserted into.
Wherein, which includes:
First judgment module judges above-mentioned wired network interface for the status information according to above-mentioned wired network interface State with the presence or absence of variation;
Event generation module, for generating the hot plug message event of the state change of wired network interface containing router;
Second judgment module, for judging whether above-mentioned wired network interface is inserted into according to above-mentioned hot plug message event Cable.
It should be noted that referring to Fig. 8, which includes:
First sending module sends the discovery message of Dynamic Host Configuration Protocol server for being based on above-mentioned wired network interface;
Third judgment module, the response message fed back for judging whether to receive Dynamic Host Configuration Protocol server;
Second sending module sends the discovery message of PPPoE server for being based on above-mentioned wired network interface;
4th judgment module, the response message fed back for judging whether to receive above-mentioned PPPoE server;
Type keeps module, is current type for keeping above-mentioned wired network interface.
A kind of intelligent router WAN mouthfuls of dynamic switching method and system provided by the present embodiment are to utilize Linux heat The side of the state change of wired network interface and the discovery message by sending server on plug mechanism real-time monitoring router Formula obtains type of server, which is switched to WAN mouthfuls, user is can be realized by cable and is inserted into any network When interface can intelligent recognition should wired network interface inserted with cable and by the wired network interface switching at runtime be road By WAN mouthfuls of effect of device, there is preferable practicability.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of intelligent router WAN mouthfuls of dynamic switching method, which is characterized in that the dynamic switching method comprising steps of
S1: whether the wired network interface of real-time monitoring router is inserted into cable;
S2: it if so, being based on the wired network interface, sends the discovery message of server and judges whether to receive server The response message fed back;
S3: if so, the wired network interface is switched to WAN mouthfuls.
2. a kind of intelligent router WAN mouthfuls of dynamic switching method as described in claim 1, which is characterized in that the step S1 includes:
S11: being based on Linux hot plug mechanism, and real-time monitoring obtains the status information of the wired network interface;
S12: identifying the status information of the wired network interface, and judges whether the wired network interface is inserted into cable.
3. a kind of intelligent router WAN mouthfuls of dynamic switching method as claimed in claim 2, which is characterized in that the step S12 includes:
S121: the status information based on the wired network interface judges the state of the wired network interface with the presence or absence of change Change;
S122: if so, generating the hot plug message event of the state change of wired network interface containing router;
S123: it is based on the hot plug message event, judges whether the wired network interface is inserted into cable.
4. a kind of intelligent router WAN mouthfuls of dynamic switching method as described in any one of claims 1-3, which is characterized in that The server includes Dynamic Host Configuration Protocol server, PPPoE server.
5. a kind of intelligent router WAN mouthfuls of dynamic switching method as claimed in claim 4, which is characterized in that the step S2 includes:
S21: it is based on the wired network interface, sends the discovery message of Dynamic Host Configuration Protocol server;
S22: judge whether to receive the response message that Dynamic Host Configuration Protocol server is fed back;If so, thening follow the steps S3;If it is not, then holding Row step S23;
S23: being based on the wired network interface, sends the discovery message of PPPoE server;
S24: judge whether to receive the response message that the PPPoE server is fed back;If so, thening follow the steps S3;If it is not, Then keeping the wired network interface is current type.
6. a kind of intelligent router WAN mouthfuls of switching at runtime system, which is characterized in that the switching at runtime system includes:
Whether the first monitoring modular, the wired network interface for real-time detection router are inserted into cable;
Judgment module is sent, for being based on the wired network interface, the discovery message of server is sent and judges whether to receive The response message fed back to server;
Interface switching module, for the wired network interface to be switched to WAN mouthfuls.
7. a kind of intelligent router WAN mouthfuls of switching at runtime system as claimed in claim 6, which is characterized in that described first Monitoring modular includes:
Second monitoring modular, for according to Linux hot plug mechanism, real-time monitoring to obtain the state letter of the wired network interface Breath;
It identifies judgment module, the status information of the wired network interface and whether judges the wired network interface for identification It is inserted into cable.
8. a kind of intelligent router WAN mouthfuls of switching at runtime system as claimed in claim 7, which is characterized in that the identification Judgment module includes:
First judgment module judges the shape of the wired network interface for the status information according to the wired network interface State is with the presence or absence of variation;
Event generation module, for generating the hot plug message event of the state change of wired network interface containing router;
Second judgment module, for judging whether the wired network interface is inserted into cable according to the hot plug message event.
9. such as a kind of described in any item intelligent router WAN mouthfuls of the switching at runtime systems of claim 6-8, which is characterized in that The server includes Dynamic Host Configuration Protocol server, PPPoE server.
10. a kind of intelligent router WAN mouthfuls of switching at runtime system as claimed in claim 9, which is characterized in that the transmission Judgment module includes:
First sending module sends the discovery message of Dynamic Host Configuration Protocol server for being based on the wired network interface;
Third judgment module, the response message fed back for judging whether to receive Dynamic Host Configuration Protocol server;
Second sending module sends the discovery message of PPPoE server for being based on the wired network interface;
4th judgment module, the response message fed back for judging whether to receive the PPPoE server;
Type keeps module, is current type for keeping the wired network interface.
CN201810768389.2A 2018-07-13 2018-07-13 A kind of intelligent router WAN mouthfuls of dynamic switching method and system Pending CN109120557A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810768389.2A CN109120557A (en) 2018-07-13 2018-07-13 A kind of intelligent router WAN mouthfuls of dynamic switching method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810768389.2A CN109120557A (en) 2018-07-13 2018-07-13 A kind of intelligent router WAN mouthfuls of dynamic switching method and system

Publications (1)

Publication Number Publication Date
CN109120557A true CN109120557A (en) 2019-01-01

Family

ID=64862931

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810768389.2A Pending CN109120557A (en) 2018-07-13 2018-07-13 A kind of intelligent router WAN mouthfuls of dynamic switching method and system

Country Status (1)

Country Link
CN (1) CN109120557A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112087375A (en) * 2020-08-28 2020-12-15 上海中觅通信技术有限公司 WAN port switching method of WAN port standby router, storage medium and router
CN114244704A (en) * 2021-12-31 2022-03-25 四川天邑康和通信股份有限公司 Router LANWAN self-adaptation method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112087375A (en) * 2020-08-28 2020-12-15 上海中觅通信技术有限公司 WAN port switching method of WAN port standby router, storage medium and router
CN114244704A (en) * 2021-12-31 2022-03-25 四川天邑康和通信股份有限公司 Router LANWAN self-adaptation method and system

Similar Documents

Publication Publication Date Title
JP4882036B1 (en) Information processing apparatus, method, and server for determining type of electrical appliance
CN105827494B (en) Add the methods, devices and systems of equipment
CN104954506B (en) A kind of account management method, terminal device and system
CN112221121A (en) Application software networking acceleration method and device and storage medium
US10757195B2 (en) Device interconnection and service discovery via a communication cloud
CN107113892A (en) A kind of method and device of gateway device automatic network-building
CN101772920A (en) Method and apparatus for discovering universal plug and play device using resource information
CN104040538B (en) A kind of the Internet, applications exchange method, apparatus and system
CN109189386A (en) A kind of application access method and device based on micro services
CN106550030B (en) A kind of data sharing method, apparatus and system
CN104660597A (en) Three-layer authentication method and device as well as three-layer authentication exchanger
CN109120557A (en) A kind of intelligent router WAN mouthfuls of dynamic switching method and system
CN105872121A (en) Method for connecting terminal with server, terminal and domain name server
CN105592169B (en) Terminal identification method and device
CN106970843A (en) remote invocation method and device
CN104137068A (en) Electronic device and electronic device control program
US20170070403A1 (en) User terminal, operator server, remote support method, and program for user terminal
CN111385324A (en) Data communication method, device, equipment and storage medium
JP2011108122A (en) Information processing apparatus, program, system and method for displaying information according to type of electric appliance
CN105681055A (en) Access method, device and system of shared file server
CN110830305B (en) Method and device for wireless device to access WIFI network, electronic device and storage medium
CN105808418B (en) Test machine register method, apparatus and system
US10764147B1 (en) Intermediate switch identification
CN112260942A (en) Application acceleration method and device based on gateway equipment and storage medium
KR20170096081A (en) Device group control system and method for controlling the same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190101

WD01 Invention patent application deemed withdrawn after publication