CN107888711B - Cross-network-segment equipment searching and communication method - Google Patents

Cross-network-segment equipment searching and communication method Download PDF

Info

Publication number
CN107888711B
CN107888711B CN201610859757.5A CN201610859757A CN107888711B CN 107888711 B CN107888711 B CN 107888711B CN 201610859757 A CN201610859757 A CN 201610859757A CN 107888711 B CN107888711 B CN 107888711B
Authority
CN
China
Prior art keywords
equipment
data packet
information
packet
search
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
CN201610859757.5A
Other languages
Chinese (zh)
Other versions
CN107888711A (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.)
Xiamen Xingzhong Wulian Technology Co ltd
Original Assignee
Xiamen Xingzong Intelligent 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 Xiamen Xingzong Intelligent Technology Co Ltd filed Critical Xiamen Xingzong Intelligent Technology Co Ltd
Priority to CN201610859757.5A priority Critical patent/CN107888711B/en
Publication of CN107888711A publication Critical patent/CN107888711A/en
Application granted granted Critical
Publication of CN107888711B publication Critical patent/CN107888711B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4541Directories for service discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Abstract

The invention provides a method for searching cross-network-segment equipment, which comprises the following steps: defining a data packet structure; the search end sends a detection data packet to the equipment end; when the equipment end receives the detection data packet, a broadcast packet of a data link layer is sent to the search end, and the packet is defined as an information data packet; the search end identifies the information data packet, matches the identification information of the packet, the type of the packet, and the like, and records the MAC address of the device. The method of the invention supports cross-network segment equipment discovery; meanwhile, cross-network communication is supported, and communication can be performed even if IP addresses conflict; the information can be customized, and complete information is attached when equipment is searched.

Description

Cross-network-segment equipment searching and communication method
Technical Field
The invention relates to a method for searching and communicating cross-network-segment equipment.
Background
With the rapid development of IP networks, it is becoming more and more common to build monitoring systems using IP networks. For example, in a security monitoring system, each monitoring device may be in a different network segment. Under the condition, each monitoring device can be automatically and quickly searched and found, the online information and the IP information of the device can be paid attention to in real time, effective communication with the device can be carried out, and the like, and the method is very important for users.
In the prior art, a Universal Plug and Play (UpnP) search device is adopted, and UpnP is a set of protocol framework aiming at realizing mutual seamless connection of various devices in a home network and a company network and simplifying related network realization. The UPnP protocol framework implements a device discovery function by an SSDP protocol (simple service discovery protocol). The control node unit searches the plug-and-play device in a multicast mode, and the plug-and-play device replies the search request of the control node unit in a unicast mode. However, the UpnP method cannot implement the search of the cross-segment device, and when the IP addresses conflict, the device cannot be accurately found.
In addition to UpnP, in the prior art, the WS-Discovery of ONVIF is also used for device Discovery, which sends a SOAP broadcast packet with a broadcast address of 239.255.255.255 and a port of 3702, but this method cannot implement cross-network segment communication.
In the prior art, some other broadcasting methods except the above method exist for device discovery, but generally, information provided after searching for a device is not complete, and information communication after IP address collision cannot be performed.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a cross-network segment equipment searching and communication method, which supports cross-network segment equipment discovery and cross-network segment communication, and can carry out communication even if IP addresses conflict.
The technical scheme adopted by the invention for solving the technical problems is as follows:
the invention provides a method for searching cross-network-segment equipment, which comprises the following steps:
defining a data packet structure;
the search end sends a detection data packet to the equipment end;
when the equipment end receives the detection data packet, a broadcast packet of a data link layer is sent to the search end, and the packet is defined as an information data packet;
the search end identifies the information data packet, matches the identification information of the packet, the type of the packet, and the like, and records the MAC address of the device.
As a further preferred embodiment, the broadcast packet address is 0 xFFFFFF.
As a further preferred embodiment, when the device side sends an information data packet to the search side, the device side sends the information data packet to the search side every 30 seconds.
As a further preferred implementation, the data packet structure includes MAC address information, identification information, and the like.
As a further preferred embodiment, the method for searching for devices across network segments further includes a communication process, which specifically includes the following steps:
after the searching terminal searches the equipment, the equipment terminal sends a control data packet to the searching terminal by taking the obtained equipment MAC address as the unique identification of communication, and the searching terminal modifies the network information of the equipment.
As a further preferred embodiment, after the search end receives the control data packet, the user name and the password need to be input, and the network information of the device can be modified after the verification is passed.
As a further preferred embodiment, further comprising: and the search end judges whether the modification is successful.
As a further preferred embodiment, the operation of the search end for judging whether the modification is successful specifically includes: after the search end carries out the operation of modifying the information, the equipment end returns an information data packet after the information modification to the search end, then the search end compares a return value with a modified value, and if the return value is the same as the modified value, the modification is successful; if the return value is different from the modification value, the modification is failed, and the search end carries out information modification operation on the equipment again.
The invention has the following positive effects:
1. the traditional equipment search is based on network layer to search and communicate, and the invention is based on data link layer in network seven-layer protocol to search and communicate.
2. The invention takes the MAC address as the unique identification, because the MAC address is the unique identification of all network devices, the device which is subject to IP conflict can be distinguished when the communication is carried out in a data link layer.
3. The data packet of the invention is provided with a special identification bit, and further refines the communication protocol.
In summary, the method of the present invention supports cross-segment device discovery; meanwhile, cross-network communication is supported, and communication can be performed even if IP addresses conflict; the information can be customized, and complete information is attached when equipment is searched.
Drawings
FIG. 1 is a schematic diagram of the connection of various devices according to an embodiment of the present invention;
FIG. 2 is a diagram of a packet structure according to an embodiment of the present invention;
FIG. 3 is a diagram of a detection packet according to an embodiment of the present invention;
FIG. 4 is an information packet according to an embodiment of the present invention;
fig. 5 is a control packet according to an embodiment of the present invention.
Detailed Description
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Fig. 1 shows connection diagrams of respective devices, and a preferred embodiment of the present invention provides a method for searching devices across network segments, including the following steps (see fig. 2 to 5):
defining a data packet structure, said data packet structure being as shown in fig. 2;
the search end, i.e. the personal computer, sends a detection data packet to the equipment end, i.e. the network camera, as shown in fig. 3;
when the device side receives the detection data packet, a broadcast packet with an address of 0 xfffffff data link layer is sent to the search side, and the packet is defined as an information data packet, as shown in fig. 4; when the equipment end sends the information data packet to the search end, the equipment end sends the information data packet to the search end every 30 seconds, and the operation effectively prevents the occurrence of packet loss.
The search end identifies the information data packet, matches the identification information of the packet, the type of the packet, and the like, and records the MAC address of the device.
The method for searching the devices across the network segments further comprises a communication process, which comprises the following specific steps:
after the searching terminal searches the equipment, the equipment terminal sends a control data packet to the searching terminal by taking the obtained equipment MAC address as a unique communication identifier, and the searching terminal modifies the network information of the equipment as shown in figure 5;
and the search end judges whether the modification is successful.
After receiving the control data packet, the search end needs to input a user name and a password, and the network information of the equipment can be modified after the user name and the password pass the verification.
The data packet structure specifically comprises:
(1)0 to 5 data bits: the destination MAC address is sent. Such as 0XFFFFFF, for example, as a broadcast address.
(2)6 to 11 data bits: the MAC address of the sending end is used for returning the identification of the opposite side.
(3)12 to 13 data bits: the data filtering and identifying functions are realized, and the receiving end only recognizes the data packet as 0X 89.
(4)14 to 18 data bits: the data identification bits are specially identified to belong to company series data packets.
(5)19 data bits: the type of the packet is identified (search for 0, modification for 1, etc.).
(6)20 to 25 data bits: and the MAC address filter is used for specifying the MAC address needing to be modified when the device side has a plurality of MAC addresses. If two MACs, Lan and WIFI, need to be distinguished.
(7)26 to 245 data bits: data information for transmission includes: IP address, subnet mask, gateway, user name, password and other information, support extension.
(8)246 bits to 253 data bits: is a checksum.
The operation of the search end for judging whether the modification is successful is specifically as follows: after the search end carries out the operation of modifying the information, the equipment end returns an information data packet after the information modification to the search end, then the search end compares a return value with a modified value, and if the return value is the same as the modified value, the modification is successful; if the return value is different from the modification value, the modification is failed, and the search end carries out information modification operation on the equipment again.
The above embodiments are only preferred embodiments of the present invention, and it should be understood that the above embodiments are only for assisting understanding of the method and the core idea of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalents and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (8)

1. A method for searching cross-network-segment equipment is characterized by comprising the following steps:
defining a data packet structure;
the search end sends a detection data packet to the equipment end;
when the equipment end receives the detection data packet, a broadcast packet of a data link layer is sent to the search end, and the packet is defined as an information data packet;
the searching terminal identifies the information data packet, matches the identification information of the packet and the type of the packet, and records the MAC address of the equipment.
2. The method of claim 1, wherein the method comprises: the broadcast packet address is 0 xFFFFFF.
3. The method of claim 1, wherein the method comprises: and when the equipment side sends the information data packet to the search side, the equipment side sends the information data packet to the search side every 30 seconds.
4. The method of claim 1, wherein the method comprises: the data packet structure comprises MAC address information and identification information.
5. The method of claim 1, wherein the method comprises: the method further comprises the following communication operation:
after the searching terminal searches the equipment, the equipment terminal sends a control data packet to the searching terminal by taking the obtained equipment MAC address as the unique identification of communication, and the searching terminal modifies the network information of the equipment.
6. The method of claim 5, wherein the method comprises: and after the search end receives the control data packet, a user name and a password need to be input, and the network information of the equipment can be modified after the verification is passed.
7. The method of claim 5, wherein the method comprises: the method also comprises the step that the search end judges whether the modification is successful.
8. The method of claim 7, wherein the method comprises: the operation of the search end for judging whether the modification is successful is specifically as follows: after the search end carries out the operation of modifying the information, the equipment end returns an information data packet after the information modification to the search end, then the search end compares a return value with a modified value, and if the return value is the same as the modified value, the modification is successful; if the return value is different from the modification value, the modification is failed, and the search end carries out information modification operation on the equipment again.
CN201610859757.5A 2016-09-29 2016-09-29 Cross-network-segment equipment searching and communication method Active CN107888711B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610859757.5A CN107888711B (en) 2016-09-29 2016-09-29 Cross-network-segment equipment searching and communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610859757.5A CN107888711B (en) 2016-09-29 2016-09-29 Cross-network-segment equipment searching and communication method

Publications (2)

Publication Number Publication Date
CN107888711A CN107888711A (en) 2018-04-06
CN107888711B true CN107888711B (en) 2021-06-01

Family

ID=61768742

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610859757.5A Active CN107888711B (en) 2016-09-29 2016-09-29 Cross-network-segment equipment searching and communication method

Country Status (1)

Country Link
CN (1) CN107888711B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131435A (en) * 2019-12-19 2020-05-08 浙江源创建筑智能科技有限公司 Method for discovering and configuring Ethernet link layer equipment
CN111224983A (en) * 2020-01-06 2020-06-02 武汉烽合智达信息技术有限责任公司 Method and device for discovering equipment across network segments
CN114697880B (en) * 2020-12-31 2023-05-12 华为技术有限公司 Cross-network segment discovery method, routing equipment and system
CN114465931B (en) * 2021-12-30 2023-12-29 深信服科技股份有限公司 Network detection method, device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716777A (en) * 2013-12-18 2014-04-09 厦门市美亚柏科信息股份有限公司 Wireless terminal MAC address acquisition method and device
CN104853408B (en) * 2015-04-20 2018-01-30 南车株洲电力机车研究所有限公司 One kind is across marshalling scanning device method
CN104883720A (en) * 2015-05-29 2015-09-02 北京奇虎科技有限公司 Object network access method, object network access guiding and control methods, and corresponding terminals

Also Published As

Publication number Publication date
CN107888711A (en) 2018-04-06

Similar Documents

Publication Publication Date Title
US11201814B2 (en) Configuration of networks using switch device access of remote server
CN107888711B (en) Cross-network-segment equipment searching and communication method
US10142342B2 (en) Authentication of client devices in networks
US9813291B2 (en) Shortest path bridging (SPB) configuration of networks using client device access of remote
JP2018528725A (en) Broadband access
US20180139173A1 (en) Method and apparatus for implementing a fibre channel zone policy
WO2014118622A1 (en) Method of managing zigbee network in the internet of things
WO2013185731A2 (en) Method and system for managing ipv6 address conflict automatically
CN107820262B (en) Parameter configuration method, device and system
US20150271016A1 (en) Configuration of networks with server cluster device
JPWO2004073262A1 (en) RPR equipment
JP2020522190A (en) Packet transfer
EP2218214B1 (en) Network location service
CN102143164B (en) Message relaying method, message relaying device and base station
EP2369791B1 (en) Apparatus and method for establishing connections with a plurality of virtual networks
US7940760B2 (en) Method and apparatus for discovering component in at least one sub-network
CN111064825B (en) Method and device for realizing DPI data acquisition and control based on ARP
CN112367263A (en) Multicast data message forwarding method and equipment
CN103607350A (en) Method and device for generating route
CN111163463A (en) Method, device, equipment and storage medium for accessing wireless equipment to router
KR102092015B1 (en) Method, apparatus and computer program for recognizing network equipment in a software defined network
CN108259292B (en) Method and device for establishing tunnel
US11283755B2 (en) Method for identifying a communication node
US10298481B1 (en) Method and apparatus for testing VLAN
CN107426103B (en) Data transmission method between RapidIO network and Ethernet

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Room 202, no.23-1, No.2, expectation Sea Road, software park, Siming District, Xiamen City, Fujian Province

Applicant after: Xiamen Xingzong Intelligent Technology Co.,Ltd.

Address before: Room 202, no.23-1, No.2, expectation Sea Road, software park, Siming District, Xiamen City, Fujian Province

Applicant before: MILESIGHT TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20221101

Address after: Room 401, No. 37, Xishanwei Road, Phase III, Torch High tech Zone, Xiamen, Fujian, 361000

Patentee after: XIAMEN XINGZHONG WULIAN TECHNOLOGY Co.,Ltd.

Address before: Room 202, no.23-1, No.2, expectation Sea Road, software park, Siming District, Xiamen City, Fujian Province

Patentee before: Xiamen Xingzong Intelligent Technology Co.,Ltd.

TR01 Transfer of patent right