A detection method and device for a three-layer interface state
A technology of interface status and detection method, which is applied in the network field, can solve the problems of poor timeliness of the three-layer interface, and achieve good timeliness effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0037] Such as figure 1 As shown, it is a main flow chart of a method for detecting the state of a three-layer interface provided by Embodiment 1 of the present invention. The method includes the following steps:
[0038] Step 11, receiving the first interrupt message generated by the port hardware interrupt;
[0039] Wherein, the port hardware interrupt is a hardware interrupt triggered by the operation of plugging and unplugging a certain port, and the generated first interrupt message carries the port identifier and the port status identifier of the port whose status has changed.
[0040] Step 12, according to the preset port state oscillation flag, judge whether to shield the received first interrupt message; if the judgment result is yes, execute step 13; if the judgment result is no, execute step 15.
[0041] Step 13, judging whether a second interrupt message carrying the same port identifier as the first interrupt message has been received within the prescribed length...
Embodiment 2
[0057] The embodiment of the present invention is implemented on the premise that the port connection number information is: the number of ports in the Up state among the ports respectively indicated by the identifiers of the ports corresponding to the port connection number information.
[0058] Such as figure 2 As shown in FIG. 2 , it is a flow chart of pre-storing corresponding relationships in practical applications provided by Embodiment 2 of the present invention. Among them, it can be set in advance: vlan_id is the port ID of the ports contained in different Layer 3 interfaces; link_counter is the information on the number of port connections; state indicates the state of the Layer 3 interface; The received first interrupt message needs to be shielded; when off_flag is 0, it means that the received first interrupt message does not need to be shielded. The pre-stored correspondence may specifically include:
[0059] After the Vlan is configured with an IP address, the...
Embodiment 3
[0076] Based on the above detection method for the state of the three-layer interface, Embodiment 3 of the present invention provides a detection device for the state of the three-layer interface, such as Figure 5 As shown, it specifically includes the following functional modules:
[0077] a receiving unit 51, configured to receive a first interrupt message generated by a port hardware interrupt;
[0078] The judging unit 52 is configured to judge whether to shield the first interrupt message received by the receiving unit 51 according to the preset port state oscillation flag;
[0079] The port connection quantity information determining unit 53 is used to determine whether the judgment result of the judging unit 52 is yes and the second interrupt message carrying the same port identifier as the first interrupt message is not received within the specified time length, or the judging unit When the judgment result of 52 is no, according to the port identification contained i...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 