CN104468280B - The method that standby upper down status rapid detection is hung under realizing in intelligent gateway - Google Patents

The method that standby upper down status rapid detection is hung under realizing in intelligent gateway Download PDF

Info

Publication number
CN104468280B
CN104468280B CN201410809500.XA CN201410809500A CN104468280B CN 104468280 B CN104468280 B CN 104468280B CN 201410809500 A CN201410809500 A CN 201410809500A CN 104468280 B CN104468280 B CN 104468280B
Authority
CN
China
Prior art keywords
application layer
finger daemon
equipment
layer finger
entry
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.)
Active
Application number
CN201410809500.XA
Other languages
Chinese (zh)
Other versions
CN104468280A (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.)
Shanghai Gongjin Communication Technology Co Ltd
Original Assignee
Shanghai Gongjin 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 Gongjin Communication Technology Co Ltd filed Critical Shanghai Gongjin Communication Technology Co Ltd
Priority to CN201410809500.XA priority Critical patent/CN104468280B/en
Publication of CN104468280A publication Critical patent/CN104468280A/en
Application granted granted Critical
Publication of CN104468280B publication Critical patent/CN104468280B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Communication Control (AREA)

Abstract

The present invention relates to a kind of method that standby upper down status rapid detection is hung under realize in intelligent gateway, and be connected simultaneously monitored link layer data bag after starting including application layer finger daemon with the forwarding database based on kernel;Described application layer finger daemon is notified when the entry of forwarding database based on kernel changes;Described application layer finger daemon is changed items for information and changed in online list database in facility information corresponding to entry;Described application layer finger daemon initiates detection and according to whether receiving link layer data bag corresponding to equipment judges whether equipment is online to corresponding equipment.The method that standby upper down status rapid detection is hung under being realized using this kind in intelligent gateway, fast and accurately identify equipment for surfing the net current state, on the one hand the efficiency of application layer inquiry gateway equipment for surfing the net can be improved, on the other hand also solve the problems, such as that DHCP protocol can not identify static IP device, there is wider application.

Description

The method that standby upper down status rapid detection is hung under realizing in intelligent gateway
Technical field
The present invention relates to network equipment application process technical field, more particularly to intelligent gateway application process technical field, A kind of method for specifically referring to hang standby upper down status rapid detection under realize in intelligent gateway.
Background technology
As the progressively development of the concepts such as smart home, intelligent gateway is with ripe, Related product also steps into people's Life, some functions of conventional gateway can not meet intelligentized demand, it is impossible to be brought convenience to user, effective experience.This is specially The content that profit is related to is the improvement to traditional function, is allowed to more quick, effectively with intellectuality.Conventional gateway is to LAN Offline record mainly uses DHCP (Dynamic Host on (Local Area Network, LAN) side apparatus Configuration Protocol, DHCP) respectively core A RP (Address are inquired about in combination to agreement Resolution Protocol, address resolution protocol) list item realizes, it is exactly passive query the defects of the method, needs every time When obtaining relevant information, just inquired about, efficiency comparison is low.And because ARP has cache-time, after equipment off-line, meeting The buffer time of clock in a measure, the detection for causing gateway offline to equipment for surfing the net are less sensitive.
The content of the invention
The purpose of the present invention is the shortcomings that overcoming above-mentioned prior art, there is provided one kind, which can be realized, rapidly and accurately to be known Other equipment for surfing the net current state, solve the problems, such as that DHCP protocol can not identify static IP device, have broader applications scope The method that standby upper down status rapid detection is hung under realizing in intelligent gateway.
To achieve these goals, it is of the invention realize in intelligent gateway under hang the side of standby upper down status rapid detection Method has following form:
This hangs the method for standby upper down status rapid detection under realizing in intelligent gateway, it is mainly characterized by, described Method comprises the following steps:
The method that standby upper down status rapid detection is hung under realizing in intelligent gateway, it is characterised in that described method Comprise the following steps:
(1) be connected simultaneously monitored link layer data after the startup of application layer finger daemon with the forwarding database based on kernel Bag;
(2) notice described application layer finger daemon when the entry of the forwarding database based on kernel changes;
(3) the application layer finger daemon described in is changed items for information and changed in online list database corresponding to entry Facility information;
(4) the application layer finger daemon described in initiates detection and according to whether receiving corresponding to equipment to corresponding equipment Link layer data bag judges whether equipment is online.
It is preferred that described application layer is notified to guard when the entry of the forwarding database based on kernel changes Process, it is specially:
Notified when the entry of forwarding database based on kernel changes by way of NETLINK sockets described Application layer finger daemon.
It is preferred that described application layer finger daemon modification items for information and the modification entry pair in online list database The facility information answered, comprises the following steps:
Application layer finger daemon described in (3-1) judges that entry changes state in forwarding database, if addition entry, Then continue step (3-2), if deleting entry, then continue step (3-3);
Application layer finger daemon described in (3-2) adds items for information and set in online list database corresponding to addition It is standby, then proceed to step (4);
Application layer finger daemon described in (3-3) is deleted items for information and set in online list database corresponding to removal It is standby, then proceed to step (4).
It is preferred that described application layer finger daemon initiates to detect to corresponding equipment, it is specially:
Described application layer finger daemon is initiated to detect and sets timer to corresponding equipment.
More preferably, it is described according to whether receiving link layer data bag corresponding to equipment judges whether equipment online, bag Include following steps:
Application layer finger daemon described in (4-1) judges link layer corresponding to equipment whether is received before timer expiry Packet, if it is, continuing step (4-2), otherwise continue step (4-3);
It is presence that application layer finger daemon described in (4-2), which keeps this equipment state,;
This equipment state is arranged to off-line state by the application layer finger daemon described in (4-3).
Further, it is presence that described application layer finger daemon, which keeps this equipment state, is comprised the following steps:
Application layer finger daemon described in (4-2-1) is parsed the link layer data bag received;
Application layer finger daemon described in (4-2-2) reset the timer of detection and set detection information send interval and time Number.
It is preferred that after described step (4), it is further comprising the steps of:
(5) client inquires about the efficiency of equipment for surfing the net in intelligent gateway by described application layer finger daemon.
Employ the method that standby upper down status rapid detection is hung under realizing in intelligent gateway in the invention, there is provided A kind of method based on kernel FDB proactive notifications Yu link layer timing on-line water flushing technology, fast and accurately identifies equipment for surfing the net On the one hand current state, kernel FDB proactive notifications can be improved on application layer (such as cell-phone customer terminal) inquiry gateway to application layer The efficiency of net equipment, on the other hand also solve the problems, such as that DHCP protocol can not identify static IP device, link layer on-line water flushing Technology then can effectively detect whether equipment has been off, and have wider application.
Brief description of the drawings
Fig. 1 is the flow chart for the method that standby upper down status rapid detection is hung under the realizing in intelligent gateway of the present invention.
Fig. 2 is the method that standby upper down status rapid detection is hung under the realizing in intelligent gateway of the present invention
Embodiment
In order to more clearly describe the technology contents of the present invention, carried out with reference to specific embodiment further Description.
To achieve these goals, it is necessary to design application layer finger daemon, it is used for and kernel communication.Use NETLINK skills Art is completed and kernel communication, and FDB (Forwarding DataBase, forwarding database) changes message can be made to pass through NETLINK Mode passes to application layer.Using layer process by monitored link layer Socket, judge whether equipment is also online.
The method that standby upper down status rapid detection is hung under the realizing in intelligent gateway of the present invention comprises the following steps:
(1) be connected simultaneously monitored link layer data after the startup of application layer finger daemon with the forwarding database based on kernel Bag;
(2) notice described application layer finger daemon when the entry of the forwarding database based on kernel changes;
(3) the application layer finger daemon described in is changed items for information and changed in online list database corresponding to entry Facility information;
(4) the application layer finger daemon described in initiates detection and according to whether receiving corresponding to equipment to corresponding equipment Link layer data bag judges whether equipment is online.
In a kind of preferably embodiment, the entry of the forwarding database based on kernel notifies when changing Described application layer finger daemon, it is specially:
Notified when the entry of forwarding database based on kernel changes by way of NETLINK sockets described Application layer finger daemon.
In a kind of preferably embodiment, described application layer finger daemon changes items for information and in online list number According to facility information corresponding to modification entry in storehouse, comprise the following steps:
Application layer finger daemon described in (3-1) judges that entry changes state in forwarding database, if addition entry, Then continue step (3-2), if deleting entry, then continue step (3-3);
Application layer finger daemon described in (3-2) adds items for information and set in online list database corresponding to addition It is standby, then proceed to step (4);
Application layer finger daemon described in (3-3) is deleted items for information and set in online list database corresponding to removal It is standby, then proceed to step (4).
In a kind of preferably embodiment, described application layer finger daemon initiates to detect to corresponding equipment, specifically For:
Described application layer finger daemon is initiated to detect and sets timer to corresponding equipment.
It is described to judge according to whether receiving link layer data bag corresponding to equipment in a kind of more preferably embodiment Whether equipment is online, comprises the following steps:
Application layer finger daemon described in (4-1) judges link layer corresponding to equipment whether is received before timer expiry Packet, if it is, continuing step (4-2), otherwise continue step (4-3);
It is presence that application layer finger daemon described in (4-2), which keeps this equipment state,;
This equipment state is arranged to off-line state by the application layer finger daemon described in (4-3).
In a kind of further embodiment, it is in wire that described application layer finger daemon, which keeps this equipment state, State, comprise the following steps:
Application layer finger daemon described in (4-2-1) is parsed the link layer data bag received;
Application layer finger daemon described in (4-2-2) reset the timer of detection and set detection information send interval and time Number.
It is further comprising the steps of after described step (4) in a kind of preferably embodiment:
(5) client inquires about the efficiency of equipment for surfing the net in intelligent gateway by described application layer finger daemon.
Below, the present invention is further described with specific embodiment.As shown in figure 1, comprise the following steps that.
(1) after application layer finger daemon starts, it is proposed that it is connected with the NETLINK of kernel, and monitored link layer Socket.So Enter select blocked states afterwards, wait message to be received.
(2) (addition, deleted) when kernel FDB entries change, notify application layer finger daemon using NETLINK, keep Shield process, message post processing addition entry message is received, equipment is added in online list database.
(3) after finger daemon receives link layer data bag (arp, icmp_v6), packet is parsed, is existed according to MAC Address Database finds relevant entry, and resets the timer for sending ARP or ICMP_V6.In order to increase the reliability of operation, Ke Yishe Put transmission interval and number.
(4) if receiving link layer data bag before timer expiry, timer is reset, continues to initiate detection.Such as Fruit at the appointed time, does not receive down and hangs standby response, i.e. timer expiry, then this equipment state is arranged into offline.
(5) for the equipment of off-line state, if being received again by its link layer data bag, then it is assumed that it reaches the standard grade again, keeps Shield process updates the presence of this equipment.
(6) after FDB sends FDB entries deletion message, then application layer finger daemon also deletes corresponding entry.Equipment is again Meeting repeat step (2) operation when reaching the standard grade, into new detection.
Each Symbol explanation is as follows in Fig. 2:
1:Client query information channel;
2:Application layer finger daemon, realized for completing offline information processing in equipment with the core that data preserve;
3:Lower extension equipment information database, it is on the one hand logical for 1 inquiry for preserving the upper offline essential information of all devices Road provides information, and on the other hand using passage in 6, timing sends detection bag;
4:NETLINK passages-FDB is notified, for transmitting kernel active reporting FDB entry modification informations;
5:Link layer SOCKET monitors passage, monitors ARP or ICMP_V6 information and is used for inquiring about timer in updating 3;
6:Bag timing sendaisle is detected, equipment regularly sends the socket passages that detection is wrapped in 3.
Employ the method that standby upper down status rapid detection is hung under realizing in intelligent gateway in the invention, there is provided A kind of method based on kernel FDB proactive notifications Yu link layer timing on-line water flushing technology, fast and accurately identifies equipment for surfing the net On the one hand current state, kernel FDB proactive notifications can be improved on application layer (such as cell-phone customer terminal) inquiry gateway to application layer The efficiency of net equipment, on the other hand also solve the problems, such as that DHCP protocol can not identify static IP device, link layer on-line water flushing Technology then can effectively detect whether equipment has been off, and have wider application.
In this description, the present invention is described with reference to its specific embodiment.But it is clear that it can still make Various modifications and alterations are without departing from the spirit and scope of the present invention.Therefore, specification and drawings are considered as illustrative It is and nonrestrictive.

Claims (6)

1. it is a kind of realize in intelligent gateway under hang the method for standby upper down status rapid detection, it is characterised in that described side Method comprises the following steps:
(1) be connected simultaneously monitored link layer data bag after the startup of application layer finger daemon with the forwarding database based on kernel;
(2) notice described application layer finger daemon when the entry of the forwarding database based on kernel changes;
(3) equipment that the items for information that the application layer finger daemon described in is sent according to kernel is updated in online list database is believed Breath;
(4) the application layer finger daemon described in initiates detection and according to whether receiving link corresponding to equipment to corresponding equipment Layer data bag judges whether equipment is online.
2. it is according to claim 1 realize in intelligent gateway under hang the method for standby upper down status rapid detection, it is special Sign is, described application layer finger daemon, tool are notified when the entry of the forwarding database based on kernel changes Body is:
Described application is notified when the entry of forwarding database based on kernel changes by way of NETLINK sockets Layer finger daemon.
3. it is according to claim 1 realize in intelligent gateway under hang the method for standby upper down status rapid detection, it is special Sign is that the equipment that the items for information that described application layer finger daemon is sent according to kernel is updated in online list database is believed Breath, comprises the following steps:
Application layer finger daemon described in (3-1) judges in forwarding database that entry changes state, if addition entry, then after Continuous step (3-2), if deleting entry, then continue step (3-3);
Application layer finger daemon addition items for information described in (3-2) and the equipment corresponding to addition in online list database, Then proceed to step (4);
Application layer finger daemon described in (3-3) deletes items for information and the equipment corresponding to removal in online list database, Then proceed to step (4).
4. it is according to claim 1 realize in intelligent gateway under hang the method for standby upper down status rapid detection, it is special Sign is that described application layer finger daemon initiates to detect to corresponding equipment, is specially:
Described application layer finger daemon is initiated to detect and sets timer to corresponding equipment.
5. it is according to claim 4 realize in intelligent gateway under hang the method for standby upper down status rapid detection, it is special Sign is, described according to whether receiving link layer data bag corresponding to equipment judges whether equipment is online, including following step Suddenly:
Application layer finger daemon described in (4-1) judges link layer data corresponding to equipment whether is received before timer expiry Bag, if it is, continuing step (4-2), otherwise continue step (4-3);
It is presence that application layer finger daemon described in (4-2), which keeps this equipment state,;
This equipment state is arranged to off-line state by the application layer finger daemon described in (4-3).
6. it is according to claim 5 realize in intelligent gateway under hang the method for standby upper down status rapid detection, it is special Sign is that it is presence that described application layer finger daemon, which keeps this equipment state, is comprised the following steps:
Application layer finger daemon described in (4-2-1) is parsed the link layer data bag received;
Application layer finger daemon described in (4-2-2) resets the timer of detection and sets detection information to send interval and number.
CN201410809500.XA 2014-12-19 2014-12-19 The method that standby upper down status rapid detection is hung under realizing in intelligent gateway Active CN104468280B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410809500.XA CN104468280B (en) 2014-12-19 2014-12-19 The method that standby upper down status rapid detection is hung under realizing in intelligent gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410809500.XA CN104468280B (en) 2014-12-19 2014-12-19 The method that standby upper down status rapid detection is hung under realizing in intelligent gateway

Publications (2)

Publication Number Publication Date
CN104468280A CN104468280A (en) 2015-03-25
CN104468280B true CN104468280B (en) 2018-04-06

Family

ID=52913687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410809500.XA Active CN104468280B (en) 2014-12-19 2014-12-19 The method that standby upper down status rapid detection is hung under realizing in intelligent gateway

Country Status (1)

Country Link
CN (1) CN104468280B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104869553A (en) * 2015-05-22 2015-08-26 上海斐讯数据通信技术有限公司 Electronic equipment discovery method and apparatus, and router
CN111083055B (en) * 2019-11-26 2022-03-22 深圳市共进电子股份有限公司 Client device management method and device, router and storage medium
CN114039897A (en) * 2021-10-29 2022-02-11 四川天邑康和通信股份有限公司 Method for identifying offline of relay router down-hanging device based on home gateway

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159614A (en) * 2007-10-23 2008-04-09 中兴通讯股份有限公司 Gateway and method of implementing centralized management to equipment
CN101212372A (en) * 2006-12-26 2008-07-02 深圳Tcl工业研究院有限公司 Method and system for interworking between digital household equipment networks
CN101489300A (en) * 2009-02-11 2009-07-22 深圳华为通信技术有限公司 Method and equipment for service notification in personal network
CN101557405A (en) * 2009-06-01 2009-10-14 杭州华三通信技术有限公司 Portal authentication method and corresponding gateway equipment and server thereof
WO2010099680A1 (en) * 2009-03-06 2010-09-10 中兴通讯股份有限公司 Method and system for enabling private network user to access private network device at the same side
CN102209043A (en) * 2011-07-22 2011-10-05 杭州华三通信技术有限公司 Media access control address table entry updating method and network equipment
CN103560961A (en) * 2013-11-04 2014-02-05 神州数码网络(北京)有限公司 Method for dynamically updating host routing table entries of Ethernet switch and switch

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100499494C (en) * 2005-09-13 2009-06-10 华为技术有限公司 System for tele-managing local network device and realization method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212372A (en) * 2006-12-26 2008-07-02 深圳Tcl工业研究院有限公司 Method and system for interworking between digital household equipment networks
CN101159614A (en) * 2007-10-23 2008-04-09 中兴通讯股份有限公司 Gateway and method of implementing centralized management to equipment
CN101489300A (en) * 2009-02-11 2009-07-22 深圳华为通信技术有限公司 Method and equipment for service notification in personal network
WO2010099680A1 (en) * 2009-03-06 2010-09-10 中兴通讯股份有限公司 Method and system for enabling private network user to access private network device at the same side
CN101557405A (en) * 2009-06-01 2009-10-14 杭州华三通信技术有限公司 Portal authentication method and corresponding gateway equipment and server thereof
CN102209043A (en) * 2011-07-22 2011-10-05 杭州华三通信技术有限公司 Media access control address table entry updating method and network equipment
CN103560961A (en) * 2013-11-04 2014-02-05 神州数码网络(北京)有限公司 Method for dynamically updating host routing table entries of Ethernet switch and switch

Also Published As

Publication number Publication date
CN104468280A (en) 2015-03-25

Similar Documents

Publication Publication Date Title
CN105591974B (en) Message processing method, apparatus and system
CN104184708B (en) Suppress the method and edge device ED of MAC Address attack in EVI networks
CN104468280B (en) The method that standby upper down status rapid detection is hung under realizing in intelligent gateway
CN104580107B (en) malicious attack detection method and controller
CN105247831A (en) Flow table modifying method, flow table modifying device, and openflow network system
CN105323736A (en) IMSI obtaining method and device, and signal monitoring system
CN106302230B (en) A kind of data transmission method and device
CN110493366A (en) The method and device of network management is added in a kind of access point
CN106533973A (en) Method and system for distributing service message, and equipment
CN104601561B (en) Register method, registration equipment and the domestic network system of network
CN104486217B (en) The message forwarding method and equipment of across a network
JP2006261827A (en) Network apparatus, management apparatus thereof, network connection method, and network connection management method thereof
CN107528677A (en) Information sends failure way to play for time and device
CN104009961B (en) A kind of pppoe session mark distributing method and equipment
CN105049452B (en) Switching method, device and the intelligent terminal of resource downloading mode
CN104468158B (en) The method and apparatus of state advertisement between a kind of node
CN108259442B (en) Slow protocol message processing method and related device
CN102859947A (en) Method, apparatus and system for neighbor discovery
CN106330712B (en) A kind of control method and device of MAC address learning
CN107528929A (en) The processing method and processing device of arp entry
CN103227733A (en) Topology discovery method and topology discovery system
CN103457934B (en) Virus defense method based on gateway device, gateway device and server
CN109120557A (en) A kind of intelligent router WAN mouthfuls of dynamic switching method and system
CN106131046B (en) anti-attack processing method and device
CN107302803B (en) A kind of GTP-U tunnel error processing method and processing device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant