CN104202199A - Method and system for detecting interface status and processing interface fault according to interface status - Google Patents

Method and system for detecting interface status and processing interface fault according to interface status Download PDF

Info

Publication number
CN104202199A
CN104202199A CN201410469377.1A CN201410469377A CN104202199A CN 104202199 A CN104202199 A CN 104202199A CN 201410469377 A CN201410469377 A CN 201410469377A CN 104202199 A CN104202199 A CN 104202199A
Authority
CN
China
Prior art keywords
interface
network
status
fault
address value
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.)
Granted
Application number
CN201410469377.1A
Other languages
Chinese (zh)
Other versions
CN104202199B (en
Inventor
蔡丽艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shaanxi Zhongbian Testing 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 CN201410469377.1A priority Critical patent/CN104202199B/en
Publication of CN104202199A publication Critical patent/CN104202199A/en
Application granted granted Critical
Publication of CN104202199B publication Critical patent/CN104202199B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method for detecting interface status and processing interface fault according to the interface status. The method includes: when starting communication terminal equipment, creating a virtual file system; predefining a signal processing function and a socket function; acquiring name of a network card and a first interface status return value through an input and output control request associated to a network socket, and acquiring network card information from the virtual file system; judging whether the acquired network card information is matched with the network card or not; if yes, judging whether a first interface is under a connection status or not according to the first interface status return value, and if not, giving an alarm to prompt a user; if yes, detecting whether the first interface and a second interface are located on a same network segment or not; if the two interfaces are located on the same network segment, invoking the signal processing function, and reconfiguring network parameters. By the method, the problem that client sides cannot access to the internet under the condition that a WAN (wide area network) interface and an LAN (local area network) interface of router equipment are located on the same network segment is solved, and utilization rate of system resources is increased.

Description

Detect Interface status and according to the method and system of Interface status Processing Interface fault
Technical field
The invention belongs to computer communication complex technical field, particularly relate to and a kind ofly detect Interface status and according to the method and system of Interface status Processing Interface fault.
Background technology
Router is a kind of computer network facility, route is provided and forwards two kinds of important mechanisms, and be the equipment that connects local area network (LAN), wide area network.Lan interfaces (LAN interface) is mainly used in router and is connected with local area network (LAN).The interface that router is connected with wide area network is called Wide Area Network interface (wan interface).Router is to connect between local area network (LAN) and wide area network, wide area network and the bridge between local area network (LAN).Router is connected with interface by netting twine, configures or obtain the corresponding network address, could give and normally link the Internet.The network equipment is connected with first line of a couplet equipment by wan interface, if netting twine does not insert or network interface does not get up, network interface is in off-state.If the LAN interface of first line of a couplet equipment and router is in the same network segment, router LAN interface cannot obtain the network address, at this time no matter check wan interface status indicator lamp or check Interface status, router is all normal, but client cannot obtain the network address all the time, be not easy to network management personnel and find.
Whether normal method is to check that whether interface lamp is bright to detect at present the whether normal method of router interface and be the easy detection network interface state of network overhaul personnel.If interface lamp is normally bright, just be difficult for discovering network equipment interface failure cause, if the LAN interface of router and wan interface in the same network segment, the very difficult discovery of this situation, and causing the router all the time cannot address acquisition, second line of a couplet client cannot be surfed the Net.Therefore, can automatically detect Interface status, and repair network failure and can reply proper communication in the shorter time.
Therefore, how to provide a kind of and detect Interface status and according to the method and system of Interface status Processing Interface fault, to solve communication terminal device of the prior art, particularly router is in the situation that connecting LAN interface and wan interface, cannot automatically detect wan interface connection status and know as early as possible network failure, and communication terminal device at LAN interface and wan interface in same network segment situation, cannot solve the defect that client cannot connecting Internet, the real practitioner in the art's technical problem urgently to be resolved hurrily that become.
Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide and a kind ofly detect Interface status and according to the method and system of Interface status Processing Interface fault, be used for solving prior art communication terminal device, particularly router is in the situation that connecting LAN interface and wan interface, cannot automatically detect wan interface connection status and know as early as possible network failure, and communication terminal device in same network segment situation, cannot solve the problem that client cannot connecting Internet at LAN interface and wan interface.
For achieving the above object and other relevant objects, one aspect of the present invention provides a kind of and detects Interface status and according to the method for Interface status Processing Interface fault, be applied to there is first interface, the communication terminal device of the second interface, a plurality of network interface cards, network parameter is configured on described communication terminal device, comprise: step 1 creates a Virtual File System when starting described communication terminal device; Step 2, pre-defined one in order to reconfigure the signal process function of network parameter at described first interface and the second interface during in the same network segment and in order to create the socket function of web socket; Step 3, controls request to obtain title and the first interface state return value of described network interface card by the input and output of described web socket association, and from described Virtual File System, obtains network interface card information; Step 4, according to the network interface card information getting and the title of network interface card, whether the network interface card information that judgement is obtained mates with described network interface card; Step 5, if the network interface card information of obtaining is mated with described network interface card, according to described first interface state return value, judge that whether described first interface is in connection status, if not, send alarm and occur that with first interface described in prompting user interface fault makes user process described interface fault; If so, continue to carry out next step; Whether step 6, detect described first interface and the second interface in the same network segment; If described first interface and the second interface in the same network segment, call described signal process function with reconfigure described communication terminal device network parameter so that described first interface and the second interface not in the same network segment.
Alternatively, described network parameter comprises IP address value and the gateway address value of IP address value and gateway address value and second interface of first interface.
Whether in the same network segment further comprise: IP address value and the gateway address value of obtaining IP address value and gateway address value and second interface of first interface if alternatively, in described step 6, detecting described first interface and the second interface; Respectively the IP address value of described first interface and gateway address value are carried out to logical operation, the IP address value of described the second interface and gateway address value are carried out logical operation to obtain the network segment of first interface and the network segment of the second interface; According to the network segment of the network segment of the first interface getting and the second interface, whether detect described first interface and described the second interface in the same network segment.
Alternatively, described logical operation refers to logical AND operation.
Alternatively, described detection Interface status and according to the method for Interface status Processing Interface fault after reconfiguring the network parameter of described communication terminal device, also comprise: preserve the network parameter reconfiguring, send the enabled instruction of restarting described communication terminal device.
Alternatively, when described first interface state return value is 0x0, represent that described first interface is in off-state; When described first interface state return value is 0x10, represent that described first interface is in connection status.
Alternatively, in described step 5, carry out and send alarm and for described first interface, occur that interface fault makes user process after described interface fault with prompting, enter wait state, in default stand-by period section, wait for the connection status that continues to detect described first interface; In described step 6, carry out call described signal process function with reconfigure described communication terminal device network parameter so that described first interface and the second interface not after the same network segment, enter wait state, in default stand-by period section, wait for the connection status that continues to detect described first interface, return to afterwards step 1.
The present invention also provides on the other hand a kind of and detects Interface status and according to the system of Interface status Processing Interface fault, be applied to there is first interface, the communication terminal device of the second interface and a plurality of network interface cards, network parameter is configured on described communication terminal device, comprise: initialization module, for creating a Virtual File System when starting described communication terminal device; Predefine module, for pre-defined one in order to reconfigure the signal process function of network parameter at described first interface and the second interface during in the same network segment and in order to create the socket function of web socket; Acquisition module, controls request to obtain title and the first interface state return value of described network interface card for the input and output by described web socket association, obtains network interface card information from described Virtual File System; The first judge module, for according to the network interface card information getting and the title of network interface card, judges whether the network interface card information of obtaining mates with described network interface card; The second judge module, while mating with described network interface card for the network interface card information of obtaining in described the first judge module judgement, according to described first interface state return value, judge that whether described first interface is in connection status, if not, call for sending alarm and occur that with first interface described in prompting user interface fault makes user process the alarm module of described interface fault; If so, whether call for detection of described first interface and the second interface the detection module in the same network segment; If described first interface and the second interface in the same network segment, call the signal process function of described predefine module definition reconfigure described communication terminal device network parameter so that described first interface and the second interface not in the same network segment.
Alternatively, in described alarm module execution, sending alarm occurs for described first interface calling a time block after interface fault makes user process described interface fault with prompting, described time block is used for arranging a default stand-by period section, make described communication terminal device in wait state, in default stand-by period section, wait for the connection status that continues to detect described first interface; At described detection module, at call signal, process function and reconfigure described network parameter so that described first interface and the second interface do not call described time block after the same network segment yet, make described communication terminal device in wait state, in default stand-by period section, wait for the connection status that continues to detect described first interface.
Alternatively, described detection module also comprises: acquiring unit, for obtaining IP address value and the gateway address value of IP address value and gateway address value and second interface of first interface; Logical operations unit, for respectively the IP address value of described first interface and gateway address value being carried out to logical operation, the IP address value of described the second interface and gateway address value are carried out logical operation to obtain the network segment of first interface and the network segment of the second interface.
As mentioned above, detection Interface status of the present invention according to the method and system of Interface status Processing Interface fault, there is following beneficial effect: detection Interface status of the present invention has also solved routing device side WAN mouth and LAN mouth in same network segment situation according to the method and system of Interface status Processing Interface fault, client cannot connect the problem of online, can be when WAN mouth connects disconnection, reminding user is plugged netting twine, prevent that user cannot connecting Internet, process better network failure, improved resource utilization ratio.
Accompanying drawing explanation
Fig. 1 is shown as detection Interface status of the present invention and according to the method flow schematic diagram of Interface status Processing Interface fault.
Fig. 2 is shown as that the present invention detects Interface status and according to the idiographic flow schematic diagram of step S7 in the method for Interface status Processing Interface fault.
Fig. 3 is shown as that the present invention detects Interface status and according to the system principle structural representation of Interface status Processing Interface fault.
Fig. 4 is shown as that the present invention detects Interface status and according to the theory structure schematic diagram of detection module in the system of Interface status Processing Interface fault.
Element numbers explanation
10 detect Interface status and according to interface shape
The system of state Processing Interface fault
101 initialization modules
102 predefine modules
103 acquisition modules
104 first judge modules
105 second judge modules
106 alarm modules
107 detection modules
108 time blocks
109 memory modules
100 start module
1071 acquiring units
1072 logical operations unit
1073 detecting units
S1~S10 step
Embodiment
Below, by specific instantiation explanation embodiments of the present invention, those skilled in the art can understand other advantages of the present invention and effect easily by the disclosed content of this specification.The present invention can also be implemented or be applied by other different embodiment, and the every details in this specification also can be based on different viewpoints and application, carries out various modifications or change not deviating under spirit of the present invention.It should be noted that, in the situation that not conflicting, the feature in following examples and embodiment can combine mutually.
It should be noted that, the diagram providing in following examples only illustrates basic conception of the present invention in a schematic way, satisfy and only show with assembly relevant in the present invention in graphic but not component count, shape and size drafting while implementing according to reality, during its actual enforcement, kenel, quantity and the ratio of each assembly can be a kind of random change, and its assembly layout kenel also may be more complicated.
The present invention is directed to communication terminal device, particularly router, is connecting in LAN interface and wan interface situation, a kind of automatic detection Interface status situation is provided and has solved at both sides interface in same network segment situation, and client cannot connect the situation of online.When WAN mouth connects disconnection, reminding user is plugged netting twine.In WAN mouth and LAN interface, under the same network segment, address this problem, prevent that user cannot connecting Internet, process better network failure.Detection Interface status of the present invention does not also need finger daemon according to the method and system of Interface status Processing Interface fault, independently carries out, and has improved resource utilization ratio.
Embodiment mono-
The present embodiment provide a kind of detect Interface status and according to the method for Interface status Processing Interface fault, be applied to there is first interface, the communication terminal device of the second interface and a plurality of network interface cards, network parameter is configured on described communication terminal device.In the present embodiment, described communication terminal device is router, and described first interface is WAN (local area network (LAN)) interface, and the second interface is LAN (wide area network) interface.Refer to Fig. 1, be shown as and detect Interface status and according to the schematic flow sheet of the method for Interface status Processing Interface fault.As shown in Figure 1, described detection Interface status comprising according to the method for Interface status Processing Interface fault:
S1 creates a Virtual File System when starting described communication terminal device.Described Virtual File System is the PROC file system that will create in embedded Linux system start-up course.Described PROC file system is a pseudo-file system, and it only exists in the middle of internal memory, and does not take external space.It take the operation that the mode of file system is access system kernel data provides interface.User and application program can obtain by PROC the information of system, and can change some parameter of kernel.Due to the information of system, as process, be dynamically to change, so when user or application program read PROC file system, PROC file system is dynamically read information needed and submit to from system kernel.
S2, a pre-defined signal process function and socket function, described signal process function is in order to reconfigure the signal process function of network parameter during in the same network segment at described first interface and the second interface.Described socket function is in order to create web socket, i.e. UDP (User Datagram Protocol, User Datagram Protoco (UDP)) socket.Wherein, described signal process function is SIGUSRI signal process function, and described socket function is socket function.
S3, controls request to obtain title and the first interface state return value of described network interface card by the input and output of described web socket association; After described UDP socket creates, just can get the filec descriptor of described PROC file system, the described filec descriptor getting by use is used with the input and output of described UDP sockets associated and controls title and the wan interface state return value that request can get network interface card in described router.In the present embodiment, wan interface state return value is 0x0 or 0x10, wherein, when described first interface state return value is 0x0, represents that described first interface is in off-state.When described first interface state return value is 0x10, represent that described first interface is in connection status.In this step S3, also from described Virtual File System, from described PROC file system, obtain network interface card information.
S4, according to the network interface card information acquiring and the title of network interface card, whether the network interface card information that judgement is obtained mates with network interface card in described routing device; If the network interface card information getting is mated with network interface card in described routing device, continue execution step S5.If the network interface card information getting is not mated with network interface card in described routing device, return to step S1.
S5, if the network interface card information of obtaining is mated with described network interface card, according to described first interface state return value, judge that whether described first interface is in connection status, when if described first interface state return value is 0x0, represent that described first interface is in off-state, perform step S6, send alarm and occur that with first interface described in prompting user interface fault makes user process described interface fault, and proceed to step S10, enter wait state, in default stand-by period section, wait for the connection status that continues to detect described first interface; When if described first interface state return value is 0x10, represent that described first interface is in connection status, continue to carry out next step S7.In the present embodiment, acquiescence the second interface 22, LAN mouth is in connection status.
Whether S7, during in connection status, continue to detect described first interface and described the second interface in the same network segment at described first interface; If described first interface and the second interface is not in the same network segment, proceed to step S10, enter wait state, in default stand-by period section, wait for the connection status that continues to detect described first interface, after executing described step S10, return to step S1, the described default stand-by period can arrange by artificial; If described first interface and the second interface, in the same network segment, perform step S8.Refer to Fig. 2, be shown as the idiographic flow schematic diagram of step S7, step S7 comprises the following steps:
S71, obtains the gateway address value of IP address value and the described first interface of described first interface and the IP address value of described the second interface and the gateway address value of the second interface.
S72, respectively the gateway address value of the IP address value of described first interface and described first interface is carried out to logical AND operation, the IP address value of described the second interface and the gateway address value of the second interface are carried out logical AND operation to obtain the network segment of first interface and the network segment of the second interface.
Whether S73, detect described first interface and described the second interface in the same network segment according to the network segment of the network segment of the first interface getting and the second interface, if so, performs step S8, if not, proceeds to step S10.
S8, call described signal process function with reconfigure described routing device network parameter so that described first interface and the second interface not in the same network segment.
S9, after reconfiguring the network parameter of described routing device, the network parameter that preservation reconfigures, send the enabled instruction of restarting described routing device, return to step S1, circulation is carried out described detection Interface status and according to the method for Interface status Processing Interface fault, until close described routing device.
In the present embodiment, unless close routing device, otherwise described detection Interface status process always and detect first interface connection status according to the method for Interface status Processing Interface fault.
Detection Interface status described in the present embodiment has also solved routing device side WAN mouth and LAN mouth in same network segment situation according to the method for Interface status Processing Interface fault, client cannot connect the problem of online, and can be when WAN mouth connects disconnection, reminding user is plugged netting twine, prevent that user cannot connecting Internet, process better network failure, improved resource utilization ratio.
Embodiment bis-
The present embodiment provide a kind of detect Interface status and according to the system 10 of Interface status Processing Interface fault, be applied to there is first interface, the communication terminal device of the second interface, a plurality of network interface cards, network parameter is configured on described communication terminal device.In the present embodiment, described communication terminal device is router two, and described first interface 21 is WAN (local area network (LAN)) interface, and the second interface 22 is LAN (wide area network) interface.Refer to Fig. 3, be shown as and detect Interface status and according to the theory structure schematic diagram of the system of Interface status Processing Interface fault.As shown in Figure 2, described detection Interface status comprising according to the system 10 of Interface status Processing Interface fault: initialization module 101, predefine module 102, acquisition module 103, the first judge module 104, the second judge module 105, alarm module 106, detection module 107, time block 108, memory module 109, the module 100 that starts.Wherein, described detection module 107 comprises acquiring unit 1071, logical operations unit 1072 and detecting unit 1073.
Described initialization module 101 for creating a Virtual File System when starting described routing device 2.Described Virtual File System is the PROC file system that will create in embedded Linux system start-up course.
The described predefine module 102 being connected with described initialization module 101 for pre-defined one in order to reconfigure the signal process function of network parameter at described first interface 21 and the second interface 22 during in the same network segment and in order to create the socket function of web socket.Wherein, described signal process function is SIGUSRI signal process function, and described socket function is socket function, i.e. UDP (User Datagram Protocol, User Datagram Protoco (UDP)) socket.
The acquisition module 103 connecting with described predefine module 102 is for controlling request to obtain title and the first interface state return value of described network interface card by the associated input and output of described web socket, and obtains network interface card information from described PROC file system;
Described the first judge module 104 being connected with described acquisition module 103 is for judging according to the network interface card information acquiring and the title of network interface card whether obtained network interface card information mates with described network interface card.That is to say if described network interface card information is corresponding with the network interface card in routing device 2, just illustrate that both mate.
The second judge module 105 being connected with described the first judge module 104 judges that according to described first interface state return value whether described first interface 21 is in connection status while mating with described network interface card for the network interface card information of obtaining in described the first judge module judgement, if in off-state, calling for sending alarm, described first interface 21 occurs that with first interface 21 described in prompting user interface fault makes user process the alarm module 106 of described interface fault; If whether described first interface 21 in connection status, calls for detection of described first interface 21 and the second interface 22 detection module 107 in the same network segment; If described first interface 21 and the second interface 22 in the same network segment, call the signal process function of described predefine module 102 definition reconfigure described routing device 2 network parameter so that described first interface 21 and the second interface 22 not in the same network segment.If first interface 21 and the second interface 22 are when the same network segment, so first interface 21 namely WAN mouth cannot obtain IP address, user also just cannot be connected to the Internet so, so still need call signal to process the network parameter that function reconfigures routing device 2.
106 execution of described alarm mould are sent alarm and are occurred can calling a time block 109 being connected with described alarm module 106 after interface fault makes user process described interface fault for described first interface 21 with prompting, described time block 109 is for arranging a default stand-by period section, make described routing device 2 in wait state, in default stand-by period section, wait for the connection status that continues to detect described first interface 21.
Refer to Fig. 4, be shown as the theory structure schematic diagram of detection module, described detection module 107 comprises:
For obtaining the acquiring unit 1071 of the IP address value of first interface 21 and the gateway address value of first interface 21 and the IP address value of the second interface 22 and the gateway address value of the second interface.
For respectively the IP address value of described first interface 21 and first interface 21 gateway address values being carried out to logical operation, the gateway address value of the IP address value of described the second interface 22 and the second interface 22 is carried out logical AND operation to obtain the logical operations unit 1072 of the network segment of first interface 21 and the network segment of the second interface 22.And
For according to described logical operations unit 1072 logical operations to the network segment of first interface 21 and the network segment of the second interface 22 detect the whether detecting unit 1073 in the same network segment of described first interface 21 and the second interface 22.
At described detection module 107, described first interface 21 detected and the second interface 22 does not call described time block 109 after the same network segment yet, make described routing device in wait state, in default stand-by period section, wait for the connection status that continues to detect described first interface 21.Described detection module 107 detect signal process function that described first interface 21 and the second interface 22 calls described predefine module 102 definition after agreeing to the network segment reconfigure described routing device 2 network parameter so that described first interface 21 and the second interface 22 not in the same network segment, make described memory module 109 preserve the network parameter reconfiguring, send the enabled instruction of restarting described routing device 2 and make it restart described routing device 2 to starting module 100.In the present embodiment, described detection Interface status and according to the system 10 of Interface status Processing Interface fault always the state of connection status in detecting WAN mouth until close routing device 2.
Detection Interface status described in the present embodiment has also solved routing device side WAN mouth and LAN mouth in same network segment situation according to the method and system of Interface status Processing Interface fault, client cannot connect the problem of online, and can be when WAN mouth connects disconnection, reminding user is plugged netting twine, prevent that user cannot connecting Internet, process better network failure, improved resource utilization ratio.
So the present invention has effectively overcome various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all can, under spirit of the present invention and category, modify or change above-described embodiment.Therefore, such as in affiliated technical field, have and conventionally know that the knowledgeable, not departing from all equivalence modifications that complete under disclosed spirit and technological thought or changing, must be contained by claim of the present invention.

Claims (10)

1. detect Interface status and according to the method for Interface status Processing Interface fault, be applied to there is first interface, the communication terminal device of the second interface and a plurality of network interface cards, network parameter is configured on described communication terminal device, it is characterized in that, comprising:
Step 1 creates a Virtual File System when starting described communication terminal device;
Step 2, pre-defined one in order to reconfigure the signal process function of network parameter at described first interface and the second interface during in the same network segment and in order to create the socket function of web socket;
Step 3, controls request to obtain title and the first interface state return value of described network interface card by the input and output of described web socket association, and from described Virtual File System, obtains network interface card information;
Step 4, according to the network interface card information getting and the title of network interface card, whether the network interface card information that judgement is obtained mates with described network interface card;
Step 5, if the network interface card information of obtaining is mated with described network interface card, according to described first interface state return value, judge that whether described first interface is in connection status, if not, send alarm and occur that with first interface described in prompting user interface fault makes user process described interface fault; If so, continue to carry out next step;
Whether step 6, detect described first interface and the second interface in the same network segment; If described first interface and the second interface in the same network segment, call described signal process function with reconfigure described communication terminal device network parameter so that described first interface and the second interface not in the same network segment.
2. detection Interface status according to claim 1 according to the method for Interface status Processing Interface fault, is characterized in that: described network parameter comprises IP address value and the gateway address value of IP address value and gateway address value and second interface of first interface.
3. whether detection Interface status according to claim 2 according to the method for Interface status Processing Interface fault, is characterized in that: in described step 6, detect described first interface and the second interface and in the same network segment, further comprise:
Obtain IP address value and the gateway address value of IP address value and gateway address value and second interface of first interface;
Respectively the IP address value of described first interface and gateway address value are carried out to logical operation, the IP address value of described the second interface and gateway address value are carried out logical operation to obtain the network segment of first interface and the network segment of the second interface;
According to the network segment of the network segment of the first interface getting and the second interface, whether detect described first interface and described the second interface in the same network segment.
4. detection Interface status according to claim 3 according to the method for Interface status Processing Interface fault, is characterized in that: described logical operation refers to logical AND operation.
5. detection Interface status according to claim 1 according to the method for Interface status Processing Interface fault, it is characterized in that: described detection Interface status and according to the method for Interface status Processing Interface fault after reconfiguring the network parameter of described communication terminal device, also comprise: preserve the described network parameter reconfiguring, send the enabled instruction of restarting described communication terminal device.
6. detection Interface status according to claim 1 according to the method for Interface status Processing Interface fault, is characterized in that:
When described first interface state return value is 0x0, represent that described first interface is in off-state;
When described first interface state return value is 0x10, represent that described first interface is in connection status.
7. detection Interface status according to claim 1 according to the method for Interface status Processing Interface fault, is characterized in that:
In described step 5, carry out and send alarm and occur that with first interface described in prompting user interface fault makes user process after described interface fault, enter wait state, in default stand-by period section, wait for the connection status that continues to detect described first interface;
In described step 6, carry out call described signal process function with reconfigure described communication terminal device network parameter so that described first interface and the second interface not after the same network segment, enter wait state, in default stand-by period section, wait for the connection status that continues to detect described first interface, return to afterwards step 1.
8. detect Interface status and according to the system of Interface status Processing Interface fault, be applied to there is first interface, the communication terminal device of the second interface and a plurality of network interface cards, network parameter is configured on described communication terminal device, it is characterized in that, comprising:
Initialization module, for creating a Virtual File System when starting described communication terminal device;
Predefine module, for pre-defined one in order to reconfigure the signal process function of network parameter at described first interface and the second interface during in the same network segment and in order to create the socket function of web socket;
Acquisition module, controls request to obtain title and the first interface state return value of described network interface card for the input and output by described web socket association, obtains network interface card information from described Virtual File System;
The first judge module, for according to the network interface card information getting and the title of network interface card, judges whether the network interface card information of obtaining mates with described network interface card;
The second judge module, while mating with described network interface card for the network interface card information of obtaining in described the first judge module judgement, according to described first interface state return value, judge that whether described first interface is in connection status, if not, call for sending alarm and occur that with first interface described in prompting user interface fault makes user process the alarm module of described interface fault; If so, whether call for detection of described first interface and the second interface the detection module in the same network segment; If described first interface and the second interface in the same network segment, call the signal process function of described predefine module definition reconfigure described communication terminal device network parameter so that described first interface and the second interface not in the same network segment.
9. detection Interface status according to claim 8 according to the system of Interface status Processing Interface fault, is characterized in that:
In described alarm module execution, sending alarm occurs for described first interface calling a time block after interface fault makes user process described interface fault with prompting, described time block is used for arranging a default stand-by period section, make described communication terminal device in wait state, in default stand-by period section, wait for the connection status that continues to detect described first interface;
At described detection module, at call signal, process function and reconfigure described network parameter so that described first interface and the second interface do not call described time block after the same network segment yet, make described communication terminal device in wait state, in default stand-by period section, wait for the connection status that continues to detect described first interface.
10. detection Interface status according to claim 8 according to the system of Interface status Processing Interface fault, is characterized in that:
Described detection module also comprises:
Acquiring unit, for obtaining IP address value and the gateway address value of IP address value and gateway address value and second interface of first interface;
Logical operations unit, for respectively the IP address value of described first interface and gateway address value being carried out to logical operation, the IP address value of described the second interface and gateway address value are carried out logical operation to obtain the network segment of first interface and the network segment of the second interface.
CN201410469377.1A 2014-09-16 2014-09-16 Detect Interface status and according to the method and system of Interface status Processing Interface failure Active CN104202199B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410469377.1A CN104202199B (en) 2014-09-16 2014-09-16 Detect Interface status and according to the method and system of Interface status Processing Interface failure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410469377.1A CN104202199B (en) 2014-09-16 2014-09-16 Detect Interface status and according to the method and system of Interface status Processing Interface failure

Publications (2)

Publication Number Publication Date
CN104202199A true CN104202199A (en) 2014-12-10
CN104202199B CN104202199B (en) 2018-05-25

Family

ID=52087429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410469377.1A Active CN104202199B (en) 2014-09-16 2014-09-16 Detect Interface status and according to the method and system of Interface status Processing Interface failure

Country Status (1)

Country Link
CN (1) CN104202199B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105897479A (en) * 2016-04-18 2016-08-24 上海斐讯数据通信技术有限公司 Method of detecting wide area network interface of gateway device and gateway device
CN106021076A (en) * 2016-05-13 2016-10-12 广东欧珀移动通信有限公司 Display method and terminal
CN106126408A (en) * 2016-06-28 2016-11-16 浪潮(北京)电子信息产业有限公司 A kind of its diagnosis processing method based on linux network interface card mistake and system
CN106209391A (en) * 2016-07-13 2016-12-07 上海斐讯数据通信技术有限公司 A kind of wireless router and method for connecting network
CN106850447A (en) * 2017-02-22 2017-06-13 上海斐讯数据通信技术有限公司 Routing device and interface allocation method
CN108199874A (en) * 2017-12-29 2018-06-22 上海司南卫星导航技术股份有限公司 A kind of Network Fault Detection and method, GNSS receiver and the computer-readable medium repaired

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025792A (en) * 2009-09-22 2011-04-20 国基电子(上海)有限公司 Router and IP address setting method thereof
CN103227844A (en) * 2013-04-19 2013-07-31 深圳市吉祥腾达科技有限公司 Method and device for automatically solving secondary route IP conflict in DHCP
CN103401735A (en) * 2013-08-19 2013-11-20 上海斐讯数据通信技术有限公司 Method and system for indicating errors in routing device
CN103812728A (en) * 2014-02-13 2014-05-21 普联技术有限公司 Network diagnostic method, system and router

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025792A (en) * 2009-09-22 2011-04-20 国基电子(上海)有限公司 Router and IP address setting method thereof
CN103227844A (en) * 2013-04-19 2013-07-31 深圳市吉祥腾达科技有限公司 Method and device for automatically solving secondary route IP conflict in DHCP
CN103401735A (en) * 2013-08-19 2013-11-20 上海斐讯数据通信技术有限公司 Method and system for indicating errors in routing device
CN103812728A (en) * 2014-02-13 2014-05-21 普联技术有限公司 Network diagnostic method, system and router

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105897479A (en) * 2016-04-18 2016-08-24 上海斐讯数据通信技术有限公司 Method of detecting wide area network interface of gateway device and gateway device
CN105897479B (en) * 2016-04-18 2019-10-22 上海斐讯数据通信技术有限公司 Detect the method and gateway of the Wide Area Network interface of gateway
CN106021076A (en) * 2016-05-13 2016-10-12 广东欧珀移动通信有限公司 Display method and terminal
CN106126408A (en) * 2016-06-28 2016-11-16 浪潮(北京)电子信息产业有限公司 A kind of its diagnosis processing method based on linux network interface card mistake and system
CN106209391A (en) * 2016-07-13 2016-12-07 上海斐讯数据通信技术有限公司 A kind of wireless router and method for connecting network
CN106850447A (en) * 2017-02-22 2017-06-13 上海斐讯数据通信技术有限公司 Routing device and interface allocation method
CN108199874A (en) * 2017-12-29 2018-06-22 上海司南卫星导航技术股份有限公司 A kind of Network Fault Detection and method, GNSS receiver and the computer-readable medium repaired

Also Published As

Publication number Publication date
CN104202199B (en) 2018-05-25

Similar Documents

Publication Publication Date Title
CN104202199A (en) Method and system for detecting interface status and processing interface fault according to interface status
US10491456B2 (en) Information processing device, information processing program, and information processing method
US20180203437A1 (en) Containerized communications gateway
CN109039829A (en) A kind of network card performance testing method, apparatus, terminal and storage medium
CN108347351B (en) Method, device and system for compatibility of dual Ethernet cards of equipment
CN111669284B (en) OpenStack automatic deployment method, electronic device, storage medium and system
US10579496B2 (en) Information processing device, information processing program, and information processing method
CN111625419B (en) Log acquisition method, system, equipment and computer readable storage medium
CN104901848A (en) Automated testing system and method for startup and shutdown of router
CN109510742A (en) A kind of server network interface card remote test method, device, terminal and storage medium
CN103731663B (en) The testing method of a kind of intelligent television and device
CN105068880A (en) Device resetting method based on watchdog
CN109032888A (en) A kind of server start-up course fault detection method, device and controlled terminal
CN114064208A (en) Method and device for detecting application service state, electronic equipment and storage medium
CN109787864A (en) A kind of network automatic test approach, device, terminal and storage medium based on Netperf
CN102346707A (en) Server system and operation method thereof
CN111130924A (en) Test method, test device and test equipment for Ethernet port of equipment
CN110569154B (en) Chip interface function testing method, system, terminal and storage medium
CN109815076A (en) A kind of network interface card boot option detection method, system, terminal and storage medium
CN108121221B (en) Robot command interface control system and method
CN106506265B (en) Detection fpga chip hangs dead method and device
CN108089968A (en) A kind of method of host's machine monitoring virtual-machine data storehouse state
CN108595297B (en) UPI speed detection method and device
CN116662039A (en) Industrial information parallel detection method, device and medium based on shared memory
CN104007944A (en) Debugging printing method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201202

Address after: 313021 industrial function area of Donglin Town, Huzhou City, Zhejiang Province

Patentee after: ZHEJIANG YUANTE NEW MATERIAL Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right

Effective date of registration: 20210524

Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 313021 industrial functional zone, Donglin Town, Huzhou City, Zhejiang Province

Patentee before: ZHEJIANG YUANTE NEW MATERIAL Co.,Ltd.

TR01 Transfer of patent right
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20141210

Assignee: Hangzhou xiaobuzhixue Information Technology Co.,Ltd.

Assignor: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Contract record no.: X2021330000454

Denomination of invention: Method and system for detecting interface state and handling interface fault according to interface state

Granted publication date: 20180525

License type: Common License

Record date: 20211019

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20141210

Assignee: Hangzhou national software industry base Co.,Ltd.

Assignor: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Contract record no.: X2021330000669

Denomination of invention: Method and system for detecting interface state and handling interface fault according to interface state

Granted publication date: 20180525

License type: Common License

Record date: 20211103

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221228

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240105

Address after: 710077 G1-415, 7th Floor, Xixian Talent Building, Century Avenue, Fengdong New City, Xixian New District, Xi'an City, Shaanxi Province

Patentee after: Shaanxi Zhongbian Testing Technology Co.,Ltd.

Address before: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee before: Huzhou YingLie Intellectual Property Operation Co.,Ltd.