CN100512143C - Method for improving working stability of Ethernet port of communication equipment - Google Patents
Method for improving working stability of Ethernet port of communication equipment Download PDFInfo
- Publication number
- CN100512143C CN100512143C CNB2005100949718A CN200510094971A CN100512143C CN 100512143 C CN100512143 C CN 100512143C CN B2005100949718 A CNB2005100949718 A CN B2005100949718A CN 200510094971 A CN200510094971 A CN 200510094971A CN 100512143 C CN100512143 C CN 100512143C
- Authority
- CN
- China
- Prior art keywords
- network interface
- rcount
- tcount
- self
- zero
- 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.)
- Expired - Fee Related
Links
Abstract
This invention provides a method for increasing work stability of Ethernet interface including the following steps: counting the event setting global variable expressing T/R function of the network interface to Rcount and Tcount separately, periodically checking values of them, if they are not zero, the count is cleared and said step is repeated, if any one of them is zero, then the network interface is designed as a self-ring mode to send a self ring test packet, then to close the self-ring mode after a period of time, if both of them are not zero, then they are returned back, if any one of them is zero, then the closed system is interrupted and the interface is reset to re-initiate related soft and hardware and the interface can restore the normal work then the open system is interrupted and returned back.
Description
Technical field
The present invention relates to the stability techniques of communication field equipment, particularly the Ethernet interface stability techniques of communication apparatus.
Background technology
Ethernet interface (calling network interface in the following text) is the common interfaces in the communication apparatus.Network interface stability has directly determined the stability of a system of communication apparatus.Mainly be responsible for the reception and the transmission of packet during network interface work.
The MAC of the controller of network interface (media interviews control) layer provides MII (Media Independent Interface), generally connects PHY (physical layer) chip.Network interface is generally by DMA (immediate data access) and systems exchange transceive data.In the control system of equipment of band network interface, the network port driving program is arranged all generally, network port driving realizes the initialization, control, interrupt response, transceive data to the network interface controller etc.
It is the performance of network interface job insecurity that network interface " extremely ", " hanging " or network interface " are hung dead ", also is frequent problem in some communication apparatus, especially more is prone in the communication apparatus that adopts low side network interface controller.When the problems referred to above took place, other interface of system such as serial ports etc. were normal, but network interface can't lead to by PING.When this problem occurred, whole system can't operate as normal.Therefore, raising communication apparatus Ethernet interface job stability is very crucial to the steady operation of whole communication system.
Summary of the invention
The problem to be solved in the present invention is the defective that overcomes existing communication apparatus Ethernet interface poor work stability, and then provide a kind of method that improves communication apparatus Ethernet interface job stability, under the prerequisite that does not influence the normal operation of system, eliminate unusual once in a while the having a strong impact on of network interface to system.
The present invention is by the following technical solutions:
A kind of method that improves communication apparatus Ethernet interface job stability may further comprise the steps:
Step 1: the incident that reflects network interface sending and receiving function is provided with global variable counts, note is Rcount, Tcount respectively;
Step 2: make regular check on Rcount, the Tcount value;
Step 3: if Rcount, the Tcount value is all non-vanishing, then will count zero clearing, and repeating step one is to step 2; If arbitrary in Rcount or the Tcount value is zero, then network interface is set as self-ring mode, a concurrent self-looped testing bag;
Step 4:, close self-ring mode through one period time of delay;
Step 5: judge Rcount, the Tcount value; If all non-vanishing, then change step 1; If arbitrary is zero, then shutdown system is interrupted, and the network interface that resets reinitializes relevant soft, hardware, makes network interface can recover operate as normal, and open system is interrupted again, changes step 1.
Further, the incident of described reflection network interface sending and receiving function comprises: the sending and receiving bag of network interface or sending and receiving are interrupted.
Further, described self-looped testing bag is a broadcast packet, and its purpose ip is made as non-existent ip in the system.
Further, described one section multiple that is set to operating system basic time unit time of delay.
Compared with prior art, adopt the inventive method can onlinely detect the abnormal work state of network interface, the network interface that resets in time, and make network interface operate as normal again, thus improved the stability of system.
Embodiment
The following describes concrete enforcement of the present invention:
The present invention the sending and receiving of network port driving interrupt or other flow process in add up sending and receiving bag counting (Rcount respectively, Tcount), utilize existing timing routine in the system, whether declare the sending and receiving bag at set intervals is zero, if it is all non-vanishing, just clear count value is zero if sending and receiving are counted arbitrary, and it is self-ring mode that network interface then is set, from environment-development one specified packet, after waiting for the very short time that this bag can be received by system, whether be zero, if all non-vanishing if declaring the sending and receiving bag again, illustrate that network interface is normal, if it is zero that a counting is arranged, then network interface is resetted, and reinitialize network interface.
Use the present invention, when network interface just often, the broadcast packet that constantly occurs in the network can make that sending and receiving bag counting is non-vanishing, does not therefore influence system and moves normally.When network interface was unusual, network interface will be reset and reinitialize, thereby recovered normal.
For example, in the network port driving program of system, 32 the overall counting variable Rcount that the definition sending and receiving are interrupted, Tcount, initial value are zero, and system whenever enters and once sends out interrupt routine, just Tcount is added 1, system whenever advances once to receive interrupt routine, just Rcount is added 1.In addition, the broadcast packet packet_ff of one 64 byte of definition is made as non-existent ip in the system with its purpose ip, is used for the self-looped testing bag.A submodule scan8 is set, and system's timing routine called once in per 3 to 15 seconds.
Treatment step among the submodule scan8 is as follows:
Whether the first step: declaring Rcount and Tcount is 0, and as not being 0 clear Rcount all, Tcount returns, otherwise carries out for second step;
Second step: from the ring position position, MAC enters from ring status with network interface MAC;
The 3rd step: call router, send bag packet_ff to send from environment-development with what prepare;
The 4th step: postpone one or several tick (operating system basic time unit);
The 5th step: network interface MAC is resetted from the ring position, and MAC breaks away from from ring status;
Whether the 6th step: declaring Rcount and Tcount more is not 0 entirely, if clear Rcount and Tcount return, otherwise carry out for the 7th step;
The 7th step: the pass system interrupts, and the network interface that resets reinitializes the buffer memory of network interface, DMA and MAC, and then network interface can be reworked, and open system is interrupted again, recovers network interface.
In sum, the invention provides a kind of online detection of dynamic network interface and hang extremely and the method for recovering again, under the prerequisite that does not influence the normal operation of system, can solve unusual once in a while the problem that has a strong impact on of network interface system.The present invention is different from static self check, uses when the present invention can move in system.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.
Claims (4)
1. method that improves communication apparatus Ethernet interface job stability may further comprise the steps:
Step 1: the incident that reflects network interface sending and receiving function is provided with global variable counts, note is Rcount, Tcount respectively;
Step 2: regular check Rcount, Tcount value;
Step 3: if Rcount, the Tcount value is all non-vanishing, then will count zero clearing, and repeating step one is to step 2; If arbitrary in Rcount or the Tcount value is zero, then network interface is set as self-ring mode, a concurrent self-looped testing bag;
Step 4:, close self-ring mode through one period time of delay;
Step 5: judge Rcount, the Tcount value; If all non-vanishing, then change step 1; If arbitrary is zero, then shutdown system is interrupted, and the network interface that resets reinitializes relevant soft, hardware, makes network interface can recover operate as normal, and open system is interrupted again, changes step 1.
2. method according to claim 1 is characterized in that, the incident of described reflection network interface sending and receiving function comprises: the sending and receiving bag of network interface or sending and receiving are interrupted.
3. method according to claim 1 is characterized in that, described self-looped testing bag is a broadcast packet, and its purpose ip is made as non-existent ip in the system.
4. method according to claim 1 is characterized in that, described one section multiple that is set to operating system basic time unit time of delay.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005100949718A CN100512143C (en) | 2005-10-24 | 2005-10-24 | Method for improving working stability of Ethernet port of communication equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005100949718A CN100512143C (en) | 2005-10-24 | 2005-10-24 | Method for improving working stability of Ethernet port of communication equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1956387A CN1956387A (en) | 2007-05-02 |
CN100512143C true CN100512143C (en) | 2009-07-08 |
Family
ID=38063503
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2005100949718A Expired - Fee Related CN100512143C (en) | 2005-10-24 | 2005-10-24 | Method for improving working stability of Ethernet port of communication equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100512143C (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102231680B (en) * | 2011-06-30 | 2013-07-17 | 深信服网络科技(深圳)有限公司 | Method and system for restoring default configuration of equipment |
CN109491713B (en) * | 2018-11-02 | 2021-11-26 | 南京贝伦思网络科技股份有限公司 | Detection hang-up recovery method based on network chip |
-
2005
- 2005-10-24 CN CNB2005100949718A patent/CN100512143C/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN1956387A (en) | 2007-05-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101001192B (en) | Method, system and equipment for protecting ring network link | |
US8122494B2 (en) | Apparatus and method of securing network | |
CN100550770C (en) | A kind of method of detection loop and device | |
CN101188527B (en) | A heartbeat detection method and device | |
CN101355466B (en) | Method and apparatus for transmitting continuous check information message | |
AU737333B2 (en) | Active failure detection | |
CN106487679B (en) | The active-standby switch system and switching method of Ethernet switch | |
US20070234425A1 (en) | Multistep integrated security management system and method using intrusion detection log collection engine and traffic statistic generation engine | |
EP0952700A2 (en) | Network equipment such as a network repeater and testing method therefor | |
CN101296135A (en) | Fault information processing method and device | |
CN1996898B (en) | A system and method for real time detection of the data channel states | |
CN104158706A (en) | Method and device of loopback detection | |
CN100512143C (en) | Method for improving working stability of Ethernet port of communication equipment | |
CN100563201C (en) | A kind of method for detecting route unit fault and device | |
CN101625656A (en) | Method and device for processing abnormity of PCI system | |
CN107070739A (en) | A kind of router operation troubles intelligent detecting method and system | |
US7649906B2 (en) | Method of reducing buffer usage by detecting missing fragments and idle links for multilink protocols and devices incorporating same | |
CN102325245A (en) | Method and device for automatically switching lines of television conference system | |
EP0939512A2 (en) | Method and arrangement in a network repeater for automatically changing link speed | |
CN101697519A (en) | Method and device for port mirroring | |
CN101848165A (en) | Method for controlling recovery of interrupted communication link and interface board | |
CN108712333A (en) | A kind of industrial network loop detecting method for preventing communication path from changing | |
US8566634B2 (en) | Method and system for masking defects within a network | |
CN101707589A (en) | Automatic port switching method and device for multiport network card | |
CN201450513U (en) | Network port detection device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090708 Termination date: 20151024 |
|
EXPY | Termination of patent right or utility model |