CN106330723B - Discovery method and device of network neighbor equipment - Google Patents

Discovery method and device of network neighbor equipment Download PDF

Info

Publication number
CN106330723B
CN106330723B CN201510331436.3A CN201510331436A CN106330723B CN 106330723 B CN106330723 B CN 106330723B CN 201510331436 A CN201510331436 A CN 201510331436A CN 106330723 B CN106330723 B CN 106330723B
Authority
CN
China
Prior art keywords
communication standard
address
neighbor
network
supporting
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
CN201510331436.3A
Other languages
Chinese (zh)
Other versions
CN106330723A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201510331436.3A priority Critical patent/CN106330723B/en
Priority to PCT/CN2015/092456 priority patent/WO2016201844A1/en
Publication of CN106330723A publication Critical patent/CN106330723A/en
Application granted granted Critical
Publication of CN106330723B publication Critical patent/CN106330723B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a discovery method and a device of network neighbor equipment, wherein in the method, a first device acquires a Media Access Control (MAC) address corresponding to a second device in a network to which the first device belongs from an address table, wherein the address table is established by learning a corresponding relation between a source address of a message and a local interface in the process of receiving or forwarding the message by each device in the network, the source address comprises an MAC address, and under the condition that the MAC address does not belong to the address of the device supporting a first communication standard in the network, the first device confirms that the second device corresponding to the MAC address is the neighbor device not supporting the first communication standard, the problem of how the device discovers the neighbor equipment not supporting the communication standard is solved, and the network device can discover the neighbor equipment not supporting the communication standard.

Description

Discovery method and device of network neighbor equipment
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for discovering network neighbor devices.
Background
In a home network environment, there are a plurality of networking technologies, including an ethernet technology (IEEE (institute for Electrical and Electronic engineers)) 802.3 using a twisted pair as a signal transmission medium, a WiFi technology (IEEE 802.11) using wireless as a transmission medium, a HomePlug technology (IEEE 1901) using a power line as a transmission medium, a Multimedia over coax alliance (MoCA) technology using a cable television coaxial cable as a transmission medium, and the like. Each of these technologies has its advantages and disadvantages, for example, ethernet can provide stable high-speed bandwidth, but the location of the ethernet port is fixed, which limits its coverage and mobility of the device; in contrast, WiFi has good coverage and mobility, but wireless signals are susceptible to interference and collision when transmitted over the air, and the bandwidth is unstable. It can be seen that they have some complementarity. The IEEE organization has proposed a 1905.1 standard for this purpose, which introduces an abstraction layer between a Logical Link Control (LLC) layer and a Media Access Control (MAC) layer, and fig. 1 is a schematic diagram of the position of the abstraction layer defined by the IEEE 1905.1 standard in the related art in a network protocol stack, as shown in fig. 1. If two adjacent devices supporting 1905.1 have multiple physical network interfaces, multiple physical links can be established simultaneously, and each physical link can be aggregated into an abstract link, so that functions of load balancing, link error backup and the like are realized, and communication quality is improved.
In the IEEE 1905.1 standard, topology discovery is an important component. The method has the function of discovering the topological structure of the whole network, including information of which devices exist in the network, which physical interfaces exist on each device, which adjacent devices exist on each device, which physical links are connected between any two adjacent devices, and the like. After the information is collected through the topology discovery process, a reliable basis is provided for the functions of realizing link aggregation, searching the optimal path and the like. The topology discovery process defined in the 1905.1 standard is briefly described as follows:
1) each 1905.1-capable device periodically sends a multicast topology discovery (topology discovery) message to the neighbor, and the 1905.1-capable neighbor device can discover the message after receiving the message.
2) Each 1905.1 capable device may send a unicast Topology Query message to another 1905.1 capable device (whether or not a neighbor) in the network, and the other device may reply with a Topology Response message including its own interface list and its neighbor list after receiving the unicast Topology Query message. Repeating this query/response process, any device in the network can discover the topology of the entire network.
3) When a device supporting 1905.1 finds that there is a change in its own interface or neighbor list, it may actively send a Topology notification (Topology notification) message, which is forwarded by all devices supporting 1905.1 in the network. Then, the device receiving the message can send a topology query message to the source device to acquire new information.
4) By sending an IEEE 802.1 bridge discovery (bridge discovery) message, it can be detected whether a legacy bridge device that does not support 1905.1 exists between the two 1905.1 devices. Since legacy bridge devices will not forward IEEE 802.1 bridge Discovery messages, but will forward IEEE 1905.1 Topology Discovery messages. Thus, the two messages are sent simultaneously, and whether the conventional bridge device exists can be determined according to whether the neighbor device supporting 1905.1 can receive the two messages.
In the related art, both devices supporting 1905.1 and devices not supporting 1905.1 will appear in the home network in the form of a hybrid networking. Especially, the 1905.1 may not be supported by the user terminal devices such as computers and mobile phones in most cases. Only neighbor devices supporting the 1905.1 standard can be discovered through a topology discovery process defined in the 1905.1 standard; although the topology response message includes both the list of the neighbor devices (referred to as 1905.1neighbor devices in the standard) that support 1905.1 and the list of the neighbor devices (referred to as non-1905neighbor devices in the standard) that do not support 1905.1, it is not described in the standard how each device discovers the neighbor devices that do not support 1905.1.
In the related art, an effective solution is not provided at present for the problem of how to discover a neighbor device that does not support the communication standard.
Disclosure of Invention
The invention provides a discovery method and a device of network neighbor equipment, which at least solve the problem of how to discover the neighbor equipment which does not support the communication standard by the equipment in the related technology.
According to an aspect of the present invention, a method for discovering a network neighbor device is provided, in which a first device obtains a MAC address corresponding to a second device in a network to which the first device belongs from an address table, where the address table is established by learning a correspondence between a source address of a packet and a local interface during a process of receiving or forwarding the packet by each device in the network, and the source address includes the MAC address;
and under the condition that the MAC address does not belong to the address of the equipment supporting the first communication standard in the network, the first equipment confirms that the second equipment corresponding to the MAC address is the neighbor equipment not supporting the first communication standard.
Further, when the MAC address does not belong to an address of a device supporting the first communication standard in the network, the determining, by the first device, that the second device corresponding to the MAC address is a neighbor device not supporting the first communication standard includes:
the first device checks whether a device or an interface corresponding to the MAC address exists in a network topology table, wherein the network topology table is obtained through a process of topology discovery, topology query and topology response among the devices in the network;
and under the condition that the MAC address is not in the network topology table, the first device confirms that the second device corresponding to the MAC address is a neighbor device which does not support the first communication standard.
Further, after the first device confirms that the second device corresponding to the MAC address is a neighbor device that does not support the first communication standard, the method further includes:
and under the condition that a third device supporting the first communication standard determines that the second device is a neighbor device not supporting the first communication standard, determining whether the second device is directly connected with the first device according to a first connection relation between the first device and the second device and whether a second connection relation between the third device and the second device is intersected.
Further, after the first device confirms that the second device corresponding to the MAC address is a neighbor device that does not support the first communication standard, if the source address includes an IP address, the method further includes:
and the first equipment sends a detection message to the second equipment according to the IP address, and the first equipment determines whether the second equipment is directly connected with the first equipment according to whether the second equipment responds.
Further, the sending detection packet carries a preset flag bit, where the preset flag bit is used to indicate that all devices supporting the first communication standard are prohibited from forwarding when receiving the detection packet, and the preset flag does not affect the response of the second device not supporting the first communication standard to the detection packet.
Further, before the first device sends the detection packet to the second device, the method further includes:
the first device sends control information to all neighbor devices of the first device that support the first communication standard, where the control information is used to instruct the first device to send the probe packet to the second device within a predetermined time range, all neighbor devices of the first device that support the first communication standard receive the probe packet within the predetermined time range and do not forward the probe packet, and the control information does not affect the response of the second device that does not support the first communication standard to the probe packet.
Further, the network topology table includes:
the device supporting the first communication standard, the device not supporting the first communication standard, a physical interface of the device, the neighbor device supporting the first communication standard, and the neighbor device not supporting the first communication standard.
Further, the first communication standard includes: the 1905.1 standard of the institute of electrical and electronics engineers IEEE.
According to another aspect of the present invention, there is also provided a discovery apparatus of a network neighbor device, including:
an obtaining module, configured to obtain, by a first device, a media access control MAC address corresponding to a second device in a network to which the first device belongs from an address table, where the address table is established in a process in which each device in the network learns a correspondence between a source address of a packet and a local interface in receiving or forwarding the packet, and the source address includes the MAC address;
a first discovery module, configured to, when the MAC address does not belong to an address of a device supporting a first communication standard in the network, determine, by the first device, that a second device corresponding to the MAC address is a neighbor device that does not support the first communication standard.
Further, the first discovery module includes:
a checking unit, configured to check, by the first device, whether a device or an interface corresponding to the MAC address exists in a network topology table, where the network topology table is obtained in a process of topology discovery, topology query, and topology response among the devices in the network;
a confirming unit, configured to, when the MAC address is not in the network topology table, confirm, by the first device, that a second device corresponding to the MAC address is a neighbor device that does not support the first communication standard.
Further, the apparatus further comprises:
a second discovery module, configured to, when a third device that supports the first communication standard determines that the second device is a neighbor device that does not support the first communication standard, determine whether the second device is directly connected to the first device according to a first connection relationship between the first device and the second device and whether a second connection relationship between the third device and the second device has an intersection.
Further, in a case where the source address includes an IP address, the apparatus further includes:
and a third discovery module, configured to send, by the first device, a detection packet to the second device according to the IP address, where the first device determines, according to whether the second device responds, whether the second device is directly connected to the first device.
Further, the third discovery module includes:
a marking unit, configured to carry a preset marking bit in the probe packet, where the preset marking bit is used to indicate that forwarding is prohibited when all devices supporting the first communication standard receive the probe packet, and the preset marking does not affect the response of the second device not supporting the first communication standard to the probe packet.
Further, the third discovery module includes:
a control unit, configured to send, by the first device, control information to all neighbor devices of the first device that support the first communication standard, where the control information is used to instruct the first device to send the probe packet to the second device within a predetermined time range, and all neighbor devices of the first device that support the first communication standard do not forward the probe packet when receiving the probe packet within the predetermined time range, and the control information does not affect the response of the second device that does not support the first communication standard to the probe packet.
According to the invention, the first device acquires the MAC address corresponding to the second device in the network to which the first device belongs from the address table, wherein the address table is established by learning the corresponding relation between the source address of the message and the local interface in the process of receiving or forwarding the message by each device in the network, the source address comprises the MAC address, and under the condition that the MAC address does not belong to the address of the device supporting the first communication standard in the network, the first device confirms that the second device corresponding to the MAC address is the neighbor device not supporting the first communication standard, so that the problem of how the device discovers the neighbor device not supporting the communication standard is solved, and the network device can discover the neighbor device not supporting the communication standard.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a diagram illustrating the location of an abstraction layer defined by the IEEE 1905.1 standard in the related art in a network protocol stack;
fig. 2 is a flowchart of a discovery method of a network neighbor device according to an embodiment of the present invention;
fig. 3 is a block diagram of a discovery apparatus of a network neighbor device according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of the relationship of the modules in the device 1905.1 in accordance with the preferred embodiment of the present invention;
FIG. 5 is a schematic diagram of an exemplary home networking scenario, in accordance with a preferred embodiment of the present invention;
fig. 6 is a flowchart of the main operation of the non-1905.1 neighbor device arbitration module in accordance with the preferred embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
In this embodiment, a discovery method of a network neighbor device is provided, and fig. 2 is a flowchart of a discovery method of a network neighbor device according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, a first device obtains a Media Access Control (MAC) address corresponding to a second device in a network to which the first device belongs from an address table, wherein the address table is established by learning a corresponding relation between a source address of a message and a local interface in the process of receiving or forwarding the message by each device in the network, and the source address comprises the MAC address;
step S204, in case that the MAC address does not belong to an address of a device supporting the first communication standard in the network, the first device confirms that the second device corresponding to the MAC address is a neighbor device that does not support the first communication standard.
Through the steps, the first device obtains the MAC address corresponding to the second device in the network to which the first device belongs from the address table, and under the condition that the MAC address does not belong to the address of the device supporting the first communication standard in the network, the first device confirms that the second device corresponding to the MAC address is the neighbor device not supporting the first communication standard, so that the problem of how the device discovers the neighbor device not supporting the communication standard is solved, and the network device can discover the neighbor device not supporting the communication standard.
In this embodiment, there are various ways to determine that the MAC address does not belong to an address of a device supporting the first communication standard in the network, where the first device may check whether a device or an interface corresponding to the MAC address exists in a network topology table, where the network topology table is obtained in the processes of topology discovery, topology query, and topology response among the devices in the network, and if the MAC address is not in the network topology table, the first device determines that the second device corresponding to the MAC address is a neighboring device that does not support the first communication standard.
In this embodiment, after determining that the second device is a neighbor device that does not support the first communication standard, when a third device that supports the first communication standard in the devices determines that the second device is a neighbor device that does not support the first communication standard, it determines whether the second device is directly connected to the first device according to a first connection relationship between the first device and the second device and whether a second connection relationship between the third device and the second device has an intersection.
In this embodiment, when the source address includes an IP address, the first device sends a probe packet to the second device according to the IP address, and the first device determines whether the second device is directly connected to the first device according to whether the second device responds. The sent detection packet may carry a preset flag bit, where the preset flag bit is used to indicate that all devices supporting the first communication standard are prohibited from forwarding when receiving the detection packet, and the preset flag bit does not affect the response of the second device not supporting the first communication standard to the detection packet. Or before the first device sends the probe packet to the second device, the first device sends control information to all neighboring devices of the first device that support the first communication standard, where the control information is used to instruct the first device to send the probe packet to the second device within a predetermined time range, all neighboring devices that support the first communication standard receive the probe packet within the predetermined time range and do not forward the probe packet, and the control information does not affect the response of the second device that does not support the first communication standard to the probe packet.
In an embodiment of the invention, the network topology table comprises: the device supporting the first communication standard, the device not supporting the first communication standard, a physical interface of the device, the neighbor device supporting the first communication standard, and the neighbor device not supporting the first communication standard.
In an embodiment of the invention, the first communication standard comprises: the 1905.1 standard of the institute of electrical and electronics engineers IEEE.
In this embodiment, a discovery apparatus of a network neighbor device is further provided, where the discovery apparatus is used to implement the foregoing embodiments and preferred embodiments, and details are not repeated for what has been described. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 3 is a block diagram of a discovery apparatus of a network neighbor device according to an embodiment of the present invention, and as shown in fig. 3, the apparatus includes:
an obtaining module 32, configured to obtain, by a first device, a media access control MAC address corresponding to a second device in a network to which the first device belongs from an address table, where the address table is established in a process of receiving or forwarding a message by each device in the network by learning a corresponding relationship between a source address of the message and a local interface, where the source address includes the MAC address;
the first finding module 34 is configured to, when the MAC address does not belong to an address of a device in the network that supports the first communication standard, confirm that the second device corresponding to the MAC address is a neighbor device that does not support the first communication standard.
Through the device, the first equipment acquires the Media Access Control (MAC) address corresponding to the second equipment in the network to which the first equipment belongs from the address table, and under the condition that the MAC address does not belong to the address of the equipment supporting the first communication standard in the network, the first equipment confirms that the second equipment corresponding to the MAC address is the neighbor equipment not supporting the first communication standard, so that the problem of how the equipment discovers the neighbor equipment not supporting the communication standard is solved, and the network equipment can discover the neighbor equipment not supporting the communication standard.
In this embodiment, the first discovery module 34 includes:
a checking unit, configured to check, by the first device, whether a device or an interface corresponding to the MAC address exists in a network topology table, where the network topology table is obtained in a process of topology discovery, topology query, and topology response among the devices in the network;
a confirming unit, configured to, when the MAC address is not in the network topology table, confirm, by the first device, that the second device corresponding to the MAC address is a neighbor device that does not support the first communication standard.
In this embodiment, the apparatus further comprises:
a second discovery module, configured to, when a third device that supports the first communication standard determines that the second device is a neighbor device that does not support the first communication standard, determine whether the second device is directly connected to the first device according to a first connection relationship between the first device and the second device and whether a second connection relationship between the third device and the second device has an intersection.
In this embodiment, in the case that the source address includes an IP address, the apparatus further includes:
a third discovery module, configured to send, by the first device, a detection packet to the second device according to the IP address, where the first device determines, according to whether the second device responds, whether the second device is directly connected to the first device. The third discovery module includes: a marking unit, configured to carry a preset marking bit in the probe packet, where the preset marking bit is used to indicate that forwarding is prohibited when all devices supporting the first communication standard receive the probe packet, and the preset marking bit does not affect the response of the second device not supporting the first communication standard to the probe packet.
The third discovery module may further include: a control unit, configured to send, by the first device, control information to all neighbor devices of the first device that support the first communication standard, where the control information is used to instruct the first device to send the probe packet to the second device within a predetermined time range, and all neighbor devices of the first device that support the first communication standard receive the probe packet within the predetermined time range and do not forward the probe packet, and the control information does not affect the response of the second device that does not support the first communication standard to the probe packet.
The present invention will be described in detail with reference to preferred examples and embodiments.
The preferred embodiment provides a method for discovering network neighbor devices, which is particularly suitable for discovering neighbor devices which do not support 1905.1 in a hybrid network and accurately positioning the positions of the neighbor devices in the network, and can play a beneficial supplementary role in the topology discovery process described by the IEEE 1905.1 standard. The method of the preferred embodiment comprises:
1. when each device supporting 1905.1 receives and forwards a message, it learns the corresponding relationship between the source address of the message and the local interface, and establishes an address table. When a certain MAC address exists in the address table but is not the address of a device supporting 1905.1 found in the network, it can be preliminarily determined to be a non-1905.1 neighbor of the device.
2. If a plurality of 1905.1 devices in the network declare that the same device is a non-1905.1 neighbor device, the position of the non-1905.1 device is determined according to the connection relationship between the 1905.1 devices and the connection relationship between the non-1905.1 device and the non-1905.1 device.
3. If the determination cannot be made, the device sends a detection request message to the non-1905.1 device, and the neighbor 1905.1 device does not forward the detection message after receiving the detection message by inserting the pre-agreed content in the detection message or notifying the neighbor 1905.1 device in advance. Therefore, whether the non-1905.1 equipment is directly connected with the equipment can be judged by whether the detection response message is received or not.
Fig. 4 is a schematic diagram of the relationship between modules in the device 1905.1 according to the preferred embodiment of the present invention, and as shown in fig. 4, the method proposed by the preferred embodiment needs to implement the following modules in the device supporting 1905.1:
1905.1 topology discovery module implementing the topology discovery functionality specified in the IEEE 1905.1 standard.
And the address learning module is used for learning the corresponding relation between the source address of the message and the local interface when receiving the message and establishing an address table.
A non-1905.1 neighbor device decision module that makes a decision based on information gathered by the 1905.1 topology discovery module when there are multiple 1905.1 devices advertising that the same device is a neighbor of their non-1905.1. If the judgment can not be made, triggering a non-1905.1 neighbor device detection module to send a detection message, and making a judgment according to a detection result.
And the non-1905.1 neighbor device detection module sends a detection message to the specified non-1905.1 device. By inserting the pre-agreed content in the probe message or notifying the neighbor 1905.1 device in advance, the neighbor 1905.1 device does not forward the probe message after receiving the probe message.
The address learning module has the same function and function as the acquiring module 22 in the above embodiment, the non-1905.1 neighbor device determining module has the same function and function as the first discovering module 24 in the above embodiment, the second discovering module, and the non-1905.1 neighbor device detecting module has the same function and function as the third discovering module in the above embodiment.
The method proposed by the preferred embodiment does not require any modification to the device that does not support 1905.1. The method and the device for discovering the network neighbor device provided by the preferred embodiment perform judgment by combining the acquired topology information on the basis of address learning and further confirm by sending the detection message, thereby overcoming the defect of inaccurate judgment of a simple address learning mode. Particularly, when a 1905.1 supporting bridge device exists in a network, the method provided by the invention can accurately locate whether the 1905.1 non-supporting device is before or after the bridge, so that the optimal path to the device can be determined. This is described in detail in the following detailed description.
Fig. 5 is a schematic diagram of a typical home networking scenario according to the preferred embodiment of the present invention, and as shown in fig. 5, devices supporting 1905.1 are represented by rectangles, and devices not supporting 1905.1 are represented by ovals. Wherein, the device a and the device B both support 1905, a is a home gateway, and the Local Area Network (LAN) side has plc (powerline communication), WiFi and eth (ethernet) interfaces; b is a wireless expander with a PLC interface, and works in a bridge mode; they are connected by two physical links of PLC and WiFi. Devices C and D are user terminal devices (e.g., computers, cell phones) that do not support 1905.1, device C is connected directly to a through ETH, and device D is connected to B through WiFi. Note that the WiFi link between devices a and B and the WiFi link between devices B and D are typically operating at the same frequency, but not the same link, labeled WiFi-1 and WiFi-2. The device E is a device for accessing the internet through a power line and does not support 1905.1.
Both devices a and B implement the method for discovering neighbor devices that do not support 1905.1 proposed in the preferred embodiment, and both include the modules shown in fig. 5. The relationship between the various modules is also shown in FIG. 5, and will be described in greater detail in the following detailed description.
When any physical interface covered by the 1905 abstract interface on the device receives a message, the address learning module records the corresponding relation between the source address of the message and the local interface, and establishes an address table. Note that not only the source MAC address but also the source IP address is recorded, since the IP address is used later when probing is performed. The content of the entry in the address table is < MAC address, IP address, local interface >, wherein the local interface is the interface used for receiving the message last time. Taking the network topology shown in fig. 5 as an example, the address table learned by the device a includes the following entries:
< MAC Address of device B, IP Address of device B, PLC or WiFi-1>
< MAC Address of device C, IP Address of device C, ETH >
< MAC Address of device D, IP Address of device D, PLC or WiFi-1>
< MAC Address of device E, IP Address of device E, PLC >
The address table learned by device B includes the following entries:
< MAC Address of device A, IP Address of device A, PLC or WiFi-1>
< MAC Address of device C, IP Address of device C, PLC or WiFi-1>
< MAC Address of device D, IP Address of device D, WiFi-2>
< MAC Address of device E, IP Address of device E, PLC >
Note that device B is operating in bridge mode, and the LAN side of device a is also a bridge, so both devices a and B may learn the addresses of devices C and D.
The 1905.1 topology discovery module is primarily to implement the topology discovery process specified by the 1905.1 standard. The method establishes a 1905.1 network topology table by processing topology discovery, topology inquiry and topology response messages, wherein the table comprises 1905.1 supported devices in a network, physical interfaces of each device, 1905.1 supported neighbors and 1905.1 unsupported neighbors.
When the address table established by the address learning module has any change, including adding, deleting and modifying items, the address learning module can inform the non-1905.1 neighbor device judgment module. And if the 1905.1 network topology table established by the 1905.1 topology discovery module has any change, the non-1905.1 neighbor device judgment module is also informed.
Fig. 6 is a flowchart of the main operation of a non-1905.1 neighbor device decision module according to the preferred embodiment of the present invention, which integrates the contents of the address table and the 1905.1 network topology table to make a decision, as shown in fig. 6. The method comprises the following steps:
step 1, reading an entry in an address table to obtain an MAC address
Step 2, checking 1905.1 network topology table, if the MAC address is ALMAC (MAC address defined by 1905.1 abstraction layer) of a device supporting 1905.1 or address of a physical interface on the device, then skipping the following steps.
Step 3, check if this MAC address is in the non-1905.1 neighbor list advertised by a certain 1905.1 device. If not, it can be preliminarily determined to be a non-1905.1 neighbor of the device, skipping step 4.
And 4, judging whether the MAC address is the non-1905.1 neighbor device which can be directly reached by the device or not according to the connection relation among the 1905.1 devices and the connection relation between the MAC address and the non-1905.1 neighbor device of the specified MAC address.
And step 5, if the judgment cannot be made or further confirmation is needed, the non-1905.1 neighbor device is informed to detect the module and execute the detection operation. And making a final judgment according to the detection result.
Take the non-1905.1 neighbor device determination module on device a in fig. 5 as an example. A determination may be made at step 1 as to the MAC address of device B. For the address of device C, if it is not included in the non-1905.1 neighbor list in the 1905.1 topology response message sent by device B, a determination may be made in step 2 that it is a non-1905.1 neighbor device for device a. Otherwise, the device B should announce that the device C is connected to the PLC or WiFi-1 interface, and the interface set is recorded as Iflip _ bc (including PLC or WiFi-1); the device A learns that the device C is connected to the ETH interface and is marked as Iflip _ ac (including ETH); and the device A and the device B are connected through a PLC and a WiFi-1 interface and are marked as Iflit _ ab (comprising the PLC and the WiFi-1). Assuming that device C is intermediate devices a and B, then Iflist _ ac and Iflist _ ab, and Iflist _ bc and Iflist _ ab should all intersect, and now there is no intersection between Iflist _ ac and Iflist _ ab, indicating that device C should not be between devices a and B. Further, since Iflist _ bc is a subset of Iflist _ ab and Iflist _ ac is not a subset of Iflist _ ab, it can be determined that device C is directly connected to the ETH port of device a, rather than directly connected to an interface of device B. For the address of device D, if the non-1905.1 neighbor list sent by device B does not contain it, it will be erroneously determined in step 2 that it is a non-1905.1 neighbor device of device a, but will be corrected later by sending a probe message. If the non-1905.1 neighbor list sent at device B already contains device D, then D can be determined to be the WiFi-2 interface directly connected to B using the same determination method. In the same way, for device E, it can be determined that it is connected between a and B and is on the PLC link.
The non-1905.1 neighbor device detection module detects whether a certain non-1905.1 neighbor device is directly reachable by the device by sending a detection message, in other words, whether other 1905.1 devices exist in the middle. The core is that each 1905.1neighbor device cannot forward the probe message. There are two ways to achieve this. The method is to insert the predetermined content into the probe message. Taking the example that the probe message is a Ping request, specific data that can be carried in a data area of a Control message protocol (Internet Control message protocol, ICMP for short) such as "It's a probe for a non-1905neighbor device" may be used. Each 1905.1 device does not forward any Ping request carrying this data after it detects it. The destination device, not 1905.1, receives this Ping request and also responds normally because it does not care what the data carried in the Ping request is. It is also possible to use the ARP request as a probe message, setting the sender MAC address or IP address contained in the ARP header to a specific value. Other types of detection messages can be adopted, and only after the special value is contained in the message, ordinary terminal equipment which is not 1905.1 can still normally respond to the message.
And the second mode is that before the detection message is sent, each neighbor 1905.1 device is informed through the expanded 1905.1 control message, and the detection message of a specific type sent by the device is not forwarded within a certain time. A message of the Vendor specific type defined in the 1905.1 standard, can implement this extended functionality. A form of neighbor multicast should be used, with each neighbor receiving this extended message. The method does not need to include special data in the detection message, and is more universal.
After the non-1905.1 neighbor device detection module sends the detection message, whether the target device is directly reachable is judged according to whether a response is received. Taking the network topology in fig. 5 as an example, the detection messages sent by the device a to the devices C and E can both receive the response, so that the devices C and E are directly reachable by the device a; when the detection message sent to the device D passes through the device B, the detection message is discarded by the device B, and the device D cannot receive a response unless the device D receives the response, so that the device D is not directly reachable by the device a.
The non-1905.1 neighbor device probing module returns the probing result to the non-1905.1 neighbor device determining module. Instead, the non-1905.1 neighbor device determination module writes the final determination result into the 1905.1 network topology table to indicate whether each non-1905.1 neighbor device of the device is directly reachable. For the neighbor devices that cannot be directly reached, the 1905.1 topology discovery module should update the topology response message sent by the device and remove it from the non-1905.1 neighbor device list.
In such a hybrid network, it is important to find a device that does not support 1905.1 and accurately locate its position in the network for finding an optimal path. Especially, when 1905.1-supporting devices operating in the bridge mode exist in the network, the positions of the 1905.1-supporting devices in the network cannot be accurately located by adopting a simple address learning mode, so that the messages cannot be sent to the devices according to the optimal path.
By using the method, non-1905.1 devices in the network can be discovered and the positions can be accurately determined, especially under the condition that 1905.1 devices operating in a bridge mode exist in the network. What is there? Also for example in fig. 3, if a simple address learning approach is used, device a would likely determine that device D is a device directly connected to it via a PLC or WiFi-1 link. Since device D is not 1905.1 capable, device a will typically choose to send a message to device D over one of the links. If device a determines that device D is WiFi-2, which is directly connected to device B, then it knows that it can send a message to device D using both the PLC and WiFi-1 links, since device B supports 1905.1, link aggregation will occur. This obviously improves the efficiency of traffic forwarding. In addition, when the number of 1905.1 devices working in a bridge mode in the network is more than or equal to 3, the message is forwarded only according to the result of address learning, and a loop is easily formed; after the positions of the devices are accurately positioned, the optimal path to each device can be calculated, and a loop is avoided. Moreover, accurate location of each device within the network topology also lays the foundation for implementing more advanced, location-based functions.
The method provided by the preferred embodiment can find the non-1905.1 devices in the network and accurately position the devices, thereby calculating the optimal transmission path to each device and overcoming the defect of simply forwarding the message according to the address learning result. It should be noted that although the above listed embodiments all describe how to discover non-1905.1 neighbor devices, the method proposed by the present invention is not limited to 1905.1 networks. Any changes or substitutions that may be easily made by those skilled in the art within the technical scope of the present disclosure are intended to be included within the scope of the present disclosure.
The embodiment of the invention also provides a storage medium. Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the steps of the method of the above embodiment:
optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Optionally, in this embodiment, the processor executes the method steps of the above embodiments according to the program code stored in the storage medium.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A method for discovering network neighbor devices, comprising:
the method comprises the steps that a first device obtains a Media Access Control (MAC) address corresponding to a second device in a network to which the first device belongs from an address table, wherein the address table is established by learning a corresponding relation between a source address and a local interface of a message in the process of receiving or forwarding the message by each device in the network, and the source address comprises the MAC address;
and under the condition that the MAC address does not belong to the address of the equipment supporting the first communication standard in the network, the first equipment confirms that the second equipment corresponding to the MAC address is the neighbor equipment not supporting the first communication standard.
2. The method of claim 1, wherein when the MAC address does not belong to an address of a device supporting a first communication standard in the network, the first device determining that a second device corresponding to the MAC address is a neighbor device not supporting the first communication standard comprises:
the first device checks whether a device or an interface corresponding to the MAC address exists in a network topology table, wherein the network topology table is obtained through a process of topology discovery, topology query and topology response among the devices in the network;
and under the condition that the MAC address is not in the network topology table, the first device confirms that the second device corresponding to the MAC address is a neighbor device which does not support the first communication standard.
3. The method according to claim 1, wherein after the first device confirms that the second device corresponding to the MAC address is a neighbor device that does not support the first communication standard, the method further comprises:
and under the condition that a third device supporting the first communication standard determines that the second device is a neighbor device not supporting the first communication standard, determining whether the second device is directly connected with the first device according to a first connection relation between the first device and the second device and whether a second connection relation between the third device and the second device is intersected.
4. The method according to claim 1, wherein after the first device confirms that the second device corresponding to the MAC address is a neighbor device that does not support the first communication standard, if the source address includes an IP address, the method further includes:
and the first equipment sends a detection message to the second equipment according to the IP address, and the first equipment determines whether the second equipment is directly connected with the first equipment according to whether the second equipment responds.
5. The method of claim 4, further comprising:
and carrying a preset mark bit in the sent detection message, wherein the preset mark bit is used for indicating that all the devices supporting the first communication standard are forbidden to forward when receiving the detection message, and the preset mark does not influence the response of the second device not supporting the first communication standard to the detection message.
6. The method of claim 4, wherein before the first device sends the probe packet to the second device, the method further comprises:
the first device sends control information to all neighbor devices of the first device that support the first communication standard, where the control information is used to instruct the first device to send the probe packet to the second device within a predetermined time range, all neighbor devices of the first device that support the first communication standard receive the probe packet within the predetermined time range and do not forward the probe packet, and the control information does not affect the response of the second device that does not support the first communication standard to the probe packet.
7. The method of claim 2, wherein the network topology table comprises:
the device supporting the first communication standard, the device not supporting the first communication standard, a physical interface of the device, the neighbor device supporting the first communication standard, and the neighbor device not supporting the first communication standard.
8. The method of claim 7, wherein the first communication standard comprises: the 1905.1 standard of the institute of electrical and electronics engineers IEEE.
9. An apparatus for discovering a network neighbor device, comprising:
an obtaining module, configured to obtain, by a first device, a media access control MAC address corresponding to a second device in a network to which the first device belongs from an address table, where the address table is established in a process in which each device in the network learns a correspondence between a source address of a packet and a local interface in receiving or forwarding the packet, and the source address includes the MAC address;
a first discovery module, configured to, when the MAC address does not belong to an address of a device supporting a first communication standard in the network, determine, by the first device, that a second device corresponding to the MAC address is a neighbor device that does not support the first communication standard.
10. The apparatus of claim 9, wherein the first discovery module comprises:
a checking unit, configured to check, by the first device, whether a device or an interface corresponding to the MAC address exists in a network topology table, where the network topology table is obtained in a process of topology discovery, topology query, and topology response among the devices in the network;
a confirming unit, configured to, when the MAC address is not in the network topology table, confirm, by the first device, that a second device corresponding to the MAC address is a neighbor device that does not support the first communication standard.
11. The apparatus of claim 9, further comprising:
a second discovery module, configured to, when a third device that supports the first communication standard determines that the second device is a neighbor device that does not support the first communication standard, determine whether the second device is directly connected to the first device according to a first connection relationship between the first device and the second device and whether a second connection relationship between the third device and the second device has an intersection.
12. The apparatus of claim 9, wherein if the source address comprises an IP address, the apparatus further comprises:
and a third discovery module, configured to send, by the first device, a detection packet to the second device according to the IP address, where the first device determines, according to whether the second device responds, whether the second device is directly connected to the first device.
13. The apparatus of claim 12, wherein the third discovery module comprises:
a marking unit, configured to carry a preset marking bit in the probe packet, where the preset marking bit is used to indicate that forwarding is prohibited when all devices supporting the first communication standard receive the probe packet, and the preset marking does not affect the response of the second device not supporting the first communication standard to the probe packet.
14. The apparatus of claim 12, wherein the third discovery module comprises:
a control unit, configured to send, by the first device, control information to all neighbor devices of the first device that support the first communication standard, where the control information is used to instruct the first device to send the probe packet to the second device within a predetermined time range, and all neighbor devices of the first device that support the first communication standard do not forward the probe packet when receiving the probe packet within the predetermined time range, and the control information does not affect the response of the second device that does not support the first communication standard to the probe packet.
CN201510331436.3A 2015-06-15 2015-06-15 Discovery method and device of network neighbor equipment Active CN106330723B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510331436.3A CN106330723B (en) 2015-06-15 2015-06-15 Discovery method and device of network neighbor equipment
PCT/CN2015/092456 WO2016201844A1 (en) 2015-06-15 2015-10-21 Method and apparatus for discovering network neighbouring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510331436.3A CN106330723B (en) 2015-06-15 2015-06-15 Discovery method and device of network neighbor equipment

Publications (2)

Publication Number Publication Date
CN106330723A CN106330723A (en) 2017-01-11
CN106330723B true CN106330723B (en) 2020-03-13

Family

ID=57544809

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510331436.3A Active CN106330723B (en) 2015-06-15 2015-06-15 Discovery method and device of network neighbor equipment

Country Status (2)

Country Link
CN (1) CN106330723B (en)
WO (1) WO2016201844A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107547382B (en) * 2017-05-23 2020-06-09 新华三信息技术有限公司 Neighbor relation discovery method and device
CN110475232A (en) * 2018-05-09 2019-11-19 厦门本能管家科技有限公司 It is a kind of based on bluetooth, the block chain network transmission method of NFC, AIRDROP and system
CN112654028B (en) * 2020-12-15 2022-04-26 烽火通信科技股份有限公司 Easymesh protocol-based networking management method and system
CN113873612B (en) * 2021-10-22 2024-03-01 北京小米移动软件有限公司 Method and device for accessing network and storage medium
TWI788154B (en) * 2021-12-22 2022-12-21 啟碁科技股份有限公司 Topology path obtaining method of mesh network and system thereof
CN115225564B (en) * 2022-07-06 2023-05-26 重庆邮电大学 PLC and wireless heterogeneous network networking method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101374089A (en) * 2007-08-22 2009-02-25 三星电子株式会社 Neighbor discovery method and apparatus for mobile node in heterogeneous network environment
US7633952B2 (en) * 2006-02-27 2009-12-15 Ciena Corporation Discovery of physically adjacent neighbor devices using a unidirectional in-band process coupled with an out-of-band follow-up process
CN102307249A (en) * 2011-09-28 2012-01-04 北京东土科技股份有限公司 IP address automatic configuration method based on link layer topology
CN102710592A (en) * 2011-03-14 2012-10-03 美国博通公司 Convergent network topology discovery and mapping
CN103036725A (en) * 2012-12-17 2013-04-10 华为技术有限公司 Network administration device and method for discovery of network topology
CN103248543A (en) * 2013-04-24 2013-08-14 华为技术有限公司 Code verification method, code verification control equipment and code verification equipment
CN103765835A (en) * 2011-08-30 2014-04-30 高通股份有限公司 Topology discovery in a hybrid network
CN104219153A (en) * 2013-05-31 2014-12-17 中国电信股份有限公司 Network topology self-discovering method and device based on MAC (Media Access Control) address orientation search

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9363723B2 (en) * 2013-11-05 2016-06-07 At&T Mobility Ii Llc Non-persistent heterogeneous neighbors

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7633952B2 (en) * 2006-02-27 2009-12-15 Ciena Corporation Discovery of physically adjacent neighbor devices using a unidirectional in-band process coupled with an out-of-band follow-up process
CN101374089A (en) * 2007-08-22 2009-02-25 三星电子株式会社 Neighbor discovery method and apparatus for mobile node in heterogeneous network environment
CN102710592A (en) * 2011-03-14 2012-10-03 美国博通公司 Convergent network topology discovery and mapping
CN103765835A (en) * 2011-08-30 2014-04-30 高通股份有限公司 Topology discovery in a hybrid network
CN102307249A (en) * 2011-09-28 2012-01-04 北京东土科技股份有限公司 IP address automatic configuration method based on link layer topology
CN103036725A (en) * 2012-12-17 2013-04-10 华为技术有限公司 Network administration device and method for discovery of network topology
CN103248543A (en) * 2013-04-24 2013-08-14 华为技术有限公司 Code verification method, code verification control equipment and code verification equipment
CN104219153A (en) * 2013-05-31 2014-12-17 中国电信股份有限公司 Network topology self-discovering method and device based on MAC (Media Access Control) address orientation search

Also Published As

Publication number Publication date
CN106330723A (en) 2017-01-11
WO2016201844A1 (en) 2016-12-22

Similar Documents

Publication Publication Date Title
CN106330723B (en) Discovery method and device of network neighbor equipment
US9648662B2 (en) Bluetooth networking
KR101604599B1 (en) Providing communication path information in hybrid networks
US9712433B2 (en) Maintaining and communicating nodal neighboring information
US20060285510A1 (en) Method and apparatus for transferring frames in extended wireless LAN
US8335505B2 (en) Method and apparatus for neighbor discovery in IPv6-based mobile system
US8732338B2 (en) Mesh network bridge routing
US20120120919A1 (en) Processing method supporting handover, communication apparatus, and communication system
CN101621414A (en) Method and apparatus for discovering network resource and topology
US7630311B2 (en) Location management server and ethernet-based wireless LAN distribution system having local management server, and embodiment method thereof
CN109218456B (en) Method and device for processing aging time of MAC address table
US10305778B2 (en) Enhanced peer discovery in a mesh network
CN105072038A (en) Method and device for forwarding data message
US8774188B2 (en) Communication apparatus and method of controlling same
CN106900174B (en) Data transmission method, device and system for wireless local area network mesh network
TWI569660B (en) Enhanced formation of mesh-type networks
US20090232021A1 (en) Wireless network automation: network topology learning
WO2018208536A1 (en) Autonomous mesh topology
CN102143164A (en) Message relaying method, message relaying device and base station
CN102710500A (en) Method for processing conflict of identifiers of device groups in network, and route bridge
JP4299343B2 (en) Information transmission method using path in communication system
CN111262787B (en) Data transmission method and electronic equipment
US20120163289A1 (en) Node apparatus, node management apparatus and method, and communication system based on continuous network connectivity-lacking network
Krishnan et al. Link-layer event notifications for detecting network attachments
KR101751891B1 (en) Controller, apparatus and method, for topology discovery and peer detection based on openflow in openflow wireless mesh network environment

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
GR01 Patent grant