WO2018010616A1 - Link layer based network management - Google Patents

Link layer based network management Download PDF

Info

Publication number
WO2018010616A1
WO2018010616A1 PCT/CN2017/092350 CN2017092350W WO2018010616A1 WO 2018010616 A1 WO2018010616 A1 WO 2018010616A1 CN 2017092350 W CN2017092350 W CN 2017092350W WO 2018010616 A1 WO2018010616 A1 WO 2018010616A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
network
network management
network device
modification
Prior art date
Application number
PCT/CN2017/092350
Other languages
French (fr)
Chinese (zh)
Inventor
周科特
孙海龙
张飞
顾锦枫
陆亦雄
Original Assignee
紫光华山信息技术有限公司
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 紫光华山信息技术有限公司 filed Critical 紫光华山信息技术有限公司
Publication of WO2018010616A1 publication Critical patent/WO2018010616A1/en

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

Definitions

  • Link Layer Discovery Protocol is a standard link layer protocol.
  • the network device can organize the device information of the local device, such as the device identifier and the interface identifier, into a type/length/value (TLV: Type/Length/Value) and encapsulate the link layer discovery protocol data unit (LLDPDU: Link).
  • TLV Type/Length/Value
  • LLDPDU Link
  • the neighbors that are directly connected to themselves are published in the Layer Discovery Protocol Data Unit.
  • FIG. 1 is a schematic flowchart of a link layer based network management method according to an example of the present disclosure.
  • FIG. 2 is a schematic diagram of a link layer based network management method according to an example of the present disclosure.
  • FIG. 3 is a schematic diagram of a hardware structure of a network device according to an example of the present disclosure.
  • FIG. 4 is a functional block diagram of network management control logic of the apparatus of FIG. 3, provided in accordance with an example of the present disclosure.
  • the LLDPDU is a data unit encapsulated in the data portion of the LLDP message.
  • each network device can periodically send LLDP packets to neighboring devices. If the local configuration of the device changes, the network device can immediately send LLDP packets to the neighbor device. After receiving the LLDP packet, the neighbor device can check the validity of the LLDP packet. After the validity check is passed, the neighbor information can be updated based on the neighbor information carried in the LLDP packet.
  • FIG. 1 is a schematic flowchart of a link layer-based network management method according to an example of the present disclosure. As shown in FIG. 1, the process may include step 101 and step 102.
  • Step 101 The network device may send a first network management IP address modification message to the peer device, where the first network management IP address modification message carries the first IP address.
  • the network management IP address modification message sent by the network device to the peer device is recorded as the first network management IP address modification message, and the network management IP address modification message received by the network device from the peer device is modified. Recorded as the second network management IP address modification message.
  • the network management IP address of the peer device is recorded as the second IP address.
  • the network device can determine that the network management IP address of the peer device needs to be modified according to actual requirements, and the modified network management IP address is recorded as the first IP address. That is, when the network device determines that the network management IP address of the peer device needs to be changed from the second IP address to the first IP address, the network device may send a network management IP address modification packet to the peer device to the peer device.
  • the sent network management IP address modification packet carries the first IP address.
  • the peer device may modify the IP address of the device to the first IP address specified by the received first network management IP address modification packet, and Returning a network management IP address modification success response message to the above network device.
  • Step 102 When the network device receives the IP address modification success response message returned by the peer device to the device in the first network management IP address modification packet, the network device determines that the peer device has The IP address is modified from the second IP address to the first IP address.
  • the network management IP address modification message and the network management IP address modification success response message are all packets defined at the link layer for implementing the disclosure, and belong to the link layer message.
  • the network devices can dynamically modify the IP addresses of each other through the link layer messages.
  • the network device may further dynamically obtain an IP address of the peer device, and the acquired network management IP address is the second IP address.
  • the network device may also pre-configure the IP address of the peer device, that is, the second IP address, and the network device may acquire the IP address of the peer device, that is, the second IP address, based on the configuration. .
  • the following takes the IP address of the peer device dynamically as an example.
  • the network device dynamically acquiring the network management IP address of the peer device may include: the network device may broadcast an IP address request packet in the network, where the IP address request packet may carry the network management IP address of the device; When receiving the IP address response packet returned by the peer device for the IP address request packet, the device can obtain the network management IP address of the peer device carried in the IP address response packet.
  • the network device may further receive an IP address request message, and may return an IP address response message to the source device of the received IP address request message, where the IP address response message carries the device. IP address.
  • the network device may further receive the second network management IP address modification message, and modify the IP address of the device to the IP address specified by the second network management IP address modification message, and The source device of the network management IP address modification packet returns a network management IP address modification success response packet.
  • modifying the IP address of the device to the received IP address specified by the second network management IP address modification message may include: determining whether the specified IP address meets the IP address modification condition of the device, and if , modify the IP address of the device to the specified IP address.
  • the IP address modification condition of the device may include: the same network segment as the IP address of the device, or the device configuration allows the IP address to be modified.
  • the invention is not specifically limited.
  • the network device may further: determine whether the state of the device is an IP address. Modify the status. If no, set the status of the device to the IP address modification status. If yes, return the IP address from the source device that modified the IP address modification packet to the second network.
  • the network device may further set the state of the device to the setting of the non-IP address modification state.
  • setting the state of the device to the IP address modification state may be exemplified by setting the state of the device to a first set value such as 1.
  • the setting of setting the state of the device to the non-IP address modification state may be exemplified by setting the state of the device to a second set value such as 0.
  • the network device may also wait for a preset time from receiving the network management IP address that is modifying the message, and again to the pair when the preset time arrives.
  • the end device sends a network management IP address modification packet.
  • the preset time may include one or more preset monitoring periods, or may be a time preset by the network administrator according to actual conditions, where the preset time is not specifically limited.
  • FIG. 2 is a schematic diagram of a link layer-based network management method according to an example of the present disclosure.
  • the above-mentioned link layer-based network management method is described in detail by taking the device 1, the device 2, and the device 3 in the network as an example.
  • the device 1 can dynamically obtain the IP addresses of the peer devices, such as the device 2 and the device 3.
  • device 1 can broadcast an IP address request message within the network.
  • both the device 2 and the device 3 in the network can receive the IP address request message.
  • the device 2 After receiving the IP address request packet broadcasted by the device 1, the device 2 can parse the received IP address request packet, obtain the MAC address of the device 1 carried by the device 1, such as MAC1, and return an IP address to the device 1. Response message.
  • the device 3 After receiving the IP address request packet broadcasted by the device 1, the device 3 can parse the received IP address request packet, obtain the MAC address carried by the device, such as MAC1, and return an IP address response to the device 1. Message.
  • the IP address device 1 can listen to the IP address response message within the set request period after the broadcast IP address request message, and the set request period can be pre-configured.
  • the device 1 When the device 1 listens to the IP address response message from the device 2 in the set request period, the device 1 can parse the IP address response message and obtain the IP address of the device 2 carried in the IP address response message. Similarly, when the device 1 listens to the IP address response message from the device 3 in the set request period, the device can parse the IP address response message and obtain the IP address of the device 3 carried in the IP address response message.
  • the device 1 may discard the monitored IP address response message. It should be noted that, since the sending of the IP address request message and the sending of the IP address response message are asynchronous communication, the device 1 may listen to the same device within the set request period, for example, multiple IP addresses returned by the device 2 Response message. In this case, the device 1 can filter the IP address response packets, and details are not described here.
  • the device 1 After the device 1 obtains the IP address of the device 2 and the IP address of the device 3, it is assumed that the device 1 finds that the device type and device serial number of the device 2 and the device 3 are different, but the IP addresses are the same, and all are IP2. In response to this situation, device 1 can determine the repair Change the IP address of device 3. It should be noted that other situations, such as adjusting the IP address of the device 3 based on the service plan adjustment of the device 3, or modifying the IP address of the device 3 based on the user configuration, may be applicable to the technical solution of the present disclosure. This embodiment does not specifically limit the scenario in which the IP address of the device 3 is triggered to be modified.
  • the modified IP address of device 3 is IP3.
  • the IP3 is different from the IP address of the device 1 such as IP1 and the IP address of any other device acquired by the device 1.
  • the network segment to which the IP3 belongs is the same as the IP address of the device 1, such as the network segment to which the IP1 belongs.
  • the device 1 can send a network management IP address modification message to the device 3.
  • the device 3 can receive the network management IP address modification packet sent by the device 1, and can determine whether the state of the device is an IP address modification state.
  • the device 3 After the device 3 determines that the state of the device is not the IP address modification state, the device 3 can set the state of the device 3 to the IP address modification state.
  • the device 3 can determine whether the IP address IP3 carried in the network management IP address modification packet meets the IP address modification condition of the device 3.
  • the IP address modification condition is as follows: The IP address of the network management IP address modification packet is the same as the current IP address of the device 3, that is, the network segment to which the IP2 belongs.
  • the device 3 can change the IP address of the device 3 to IP3 and set the state of the device to non- After the IP address is modified, the IP address modification success response packet can be returned to device 1.
  • the device 3 may delete the setting of the state of the device as the IP address modification state, for example, The status of the device is updated from the IP address modification status to the non-IP address modification status, and then the network management IP address modification failure response message is returned to the device 1.
  • the device 3 may return the network management IP address to the device 1 to modify the message.
  • the device 1 can listen to the message returned by the device 3 during the set listening period. When the device 1 monitors the network management IP address modification success response message sent by the device 3 during the set listening period, it can be determined that the device 3 has successfully modified the IP address from IP2 to IP3.
  • the device 1 may perform the network management IP address modification packet to the peer device again. step.
  • the device 1 may wait for a period of time and wait for the time to arrive. Perform the peer device again Steps to send a network management IP address to modify the packet.
  • the device 1 listens to the network management IP address modification failure response message sent by the device 3 in the set listening period, it re-determines a new IP address for the device 3, which is recorded as IP4, and returns to the device according to the above operation. 3 Send a new network management IP address modification packet, which will not be described here.
  • network devices can collect mutual MAC addresses, IP addresses, and the like through packet interaction, and dynamically modify each other's IP addresses through packet interaction. This achieves the purpose of modifying the IP address of the network device to facilitate management of all network devices in the network.
  • FIG. 3 is a schematic diagram of a hardware structure of a network device according to an example of the present disclosure.
  • the network device can include a processor 301, a machine readable storage medium 302 that stores machine readable instructions.
  • Processor 401 and machine readable storage medium 302 can communicate via system bus 303. And, by reading and executing machine executable instructions in the machine readable storage medium 302 corresponding to the network management control logic, the processor 301 can perform the link layer based network management method described above.
  • the machine-readable storage medium 302 referred to herein may be any electronic, magnetic, optical, or other physical storage device, and may contain stored information such as executable instructions, data, and the like.
  • the machine-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid state drive, any type of storage disk. (such as a disc, DVD, etc.), or a similar storage medium, or a combination thereof.
  • FIG. 4 is a functional block diagram of network management control logic of the apparatus shown in FIG. 3 according to an example of the present disclosure.
  • the network management control logic 40 may include a sending module 401 and a listening module 402.
  • the sending module 401 is configured to send, to the peer device, a first network management IP address modification packet, where the first network management IP address modification packet carries the first IP address;
  • the monitoring module 402 is configured to: when the peer device detects the IP address modification success response packet returned by the peer device to the network device in the set listening period, The peer device has modified the IP address from the second IP address to the first IP address.
  • the network management control logic further includes: a first receiving module 403 and a modification module 404.
  • the first receiving module 403 is configured to receive a second network management IP address modification message.
  • the modifying module 404 is configured to modify an IP address of the network device to an IP address specified by the second network management IP address modification packet, and modify a source device of the packet to the second network management IP address. Returns the network management IP address modification success response packet.
  • the network management control logic further includes: an obtaining module 405, configured to acquire the peer end The IP address of the device is recorded as the second IP address.
  • the obtaining module 405 may be specifically configured to broadcast an IP address request message in the network, where the IP address request message carries an IP address of the network device, and receives the And obtaining, by the peer device, the IP address of the peer device carried in the IP address response packet, according to the IP address response packet, in response to the IP address response packet returned by the IP address request packet.
  • the network management control logic further includes: a second receiving module 406, configured to receive an IP address request message; the sending module 401 may further return an IP address response report to the source device of the IP address request message.
  • the IP address response packet carries an IP address of the network device.
  • the modifying module 404 may be specifically configured to determine whether the IP address specified by the second network management IP address modification packet meets an IP address modification condition, where the IP address modification condition includes: the second network management The IP address specified by the IP address modification packet belongs to the same network segment as the current IP address of the network device; if yes, the IP address of the network device is modified to the IP address specified by the second network management IP address modification packet. address.
  • the modifying module 404 may be further configured to determine whether the state of the network device is before modifying an IP address of the network device to an IP address specified by the second network management IP address modification message. Modifying the status of the IP address; if not, setting the status of the network device to the IP address modification status; if yes, returning the IP address to the source device of the second network management IP address modification packet to modify the message; After the IP address of the network device is modified to the IP address specified by the second network management IP address modification message, the state of the network device is set to a setting of a non-IP address modification state.
  • the monitoring module 402 is further configured to receive, during the set listening period, a network management IP address that the peer device returns to the network device for the first network management IP address modification message.
  • the packet When the packet is being modified, it waits for a preset time, and when the preset time arrives, sends a network management IP address modification packet to the peer device again.
  • the preset time may include one or more preset listening periods.
  • machine readable storage medium comprising machine executable instructions, such as machine readable storage medium 302 of FIG. 3, executable by processor 301 in a network device To implement the link layer based network management method described above.
  • the machine-executable instructions in the machine-readable storage medium 302 corresponding to the network management control logic may cause the processor 301 to: send a first network management IP address modification message to the peer device,
  • the first network management IP address modification packet carries the first IP address
  • the peer device is configured to modify the packet for the first network management IP address to the network device during the set listening period.
  • Returned IP address modification success response message And determining that the peer device has modified the IP address from the second IP address to the first IP address.
  • the machine executable instructions may further cause the processor to: receive a second network management IP address modification message; modify the IP address of the network device to the second network management IP address modification message The specified IP address is returned to the source device of the second network management IP address modification packet to return a network management IP address modification success response message.
  • the machine executable instructions further cause the processor to: acquire an IP address of the peer device and record as the second IP address.
  • the machine executable instructions when acquiring an IP address of the peer device and recording as the second IP address, the machine executable instructions cause the processor to: broadcast an IP address request message within the network, the IP The address request message carries the IP address of the network device, and receives the IP address response message returned by the peer device for the IP address request message in the set request period, and obtains the response according to the IP address response message.
  • the IP address of the peer device carried in the IP address response packet.
  • the machine executable instructions further cause the processor to: receive an IP address request message; return an IP address response message to the source device of the IP address request message, wherein the IP address response message Carrying the IP address of the network device.
  • the IP address specified by the network device is modified to an IP address specified by the second network management IP address modification message
  • the machine executable instruction causing the processor to: determine the second network management Whether the IP address specified by the IP address modification packet satisfies the IP address modification condition, and the IP address modification condition includes: the IP address specified by the second network management IP address modification packet is the same as the current IP address of the network device. a network segment; if yes, modifying an IP address of the network device to an IP address specified by the second network management IP address modification message.
  • the machine executable instructions further cause the processor to: determine the network device before modifying an IP address of the network device to an IP address specified by the second network management IP address modification message Whether the status is the IP address modification status, if not, setting the status of the network device to the IP address modification status; if yes, returning the IP address to the source device of the second network management IP address modification message, modifying the message After modifying the IP address of the network device to the IP address specified by the second network management IP address modification message, setting the state of the network device to a non-IP address modification state.
  • the machine executable instructions further cause the processor to: receive the network returned by the peer device the first network management IP address modification message to the network device within a set listening period When the management IP address is modifying the packet, it waits for the preset time, and when the preset time arrives, sends the network to the peer device again.
  • Manage IP address modification packets The preset time may be more than one preset listening period.
  • the device embodiment since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without any creative effort.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Provided are a link layer based network management method and apparatus. In the disclosure, a network device sends, to a peer device, a first network management IP address modification packet, wherein the first network management IP address modification packet carries a first IP address; and in a set monitoring period, when a network management IP address modification success response packet, returned to the network device by the peer device, for the first network management IP address modification packet is monitored, the network device determines that the peer device has modified the network management IP address from the second IP address to the first IP address.

Description

基于链路层的网络管理Link layer based network management
相关申请的交叉引用Cross-reference to related applications
本专利申请要求于2016年7月15日提交的、申请号为201610565901.4、发明名称为“基于链路层的网络管理方法和装置”的中国专利申请的优先权,该申请的全文以引用的方式并入本文中。The present application claims priority to Chinese Patent Application No. 201610565901.4, filed on Jun. Incorporated herein.
背景技术Background technique
链路层发现协议(LLDP:Link Layer Discovery Protocol)是一种标准的链路层协议。网络设备可通过LLDP将本端设备的设备信息比如设备标识、接口标识等分别组织成类型/长度/值(TLV:Type/Length/Value)并封装在链路层发现协议数据单元(LLDPDU:Link Layer Discovery Protocol Data Unit)中发布给与自己直连的邻居。Link Layer Discovery Protocol (LLDP) is a standard link layer protocol. The network device can organize the device information of the local device, such as the device identifier and the interface identifier, into a type/length/value (TLV: Type/Length/Value) and encapsulate the link layer discovery protocol data unit (LLDPDU: Link). The neighbors that are directly connected to themselves are published in the Layer Discovery Protocol Data Unit.
附图说明DRAWINGS
图1为根据本公开一示例提供的基于链路层的网络管理方法的示意性流程图。FIG. 1 is a schematic flowchart of a link layer based network management method according to an example of the present disclosure.
图2为根据本公开一示例提供的基于链路层的网络管理方法的示意图。FIG. 2 is a schematic diagram of a link layer based network management method according to an example of the present disclosure.
图3为根据本公开一示例提供的网络设备的硬件结构示意图。FIG. 3 is a schematic diagram of a hardware structure of a network device according to an example of the present disclosure.
图4为根据本公开一示例提供的图3所示装置的网络管理控制逻辑的功能模块框图。4 is a functional block diagram of network management control logic of the apparatus of FIG. 3, provided in accordance with an example of the present disclosure.
具体实施方式detailed description
下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。The technical solutions in the embodiments of the present disclosure are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present disclosure. It is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present disclosure without making creative labor are within the scope of the present disclosure.
LLDPDU是封装在LLDP报文数据部分的数据单元。 The LLDPDU is a data unit encapsulated in the data portion of the LLDP message.
在网络中,每一网络设备可周期性的向邻居设备发送LLDP报文。如果设备的本地配置发生变化,该网络设备可立即向邻居设备发送LLDP报文。当邻居设备接收到LLDP报文后,可对其进行有效性检查,在有效性检查通过后,可基于该LLDP报文中携带的邻居信息更新邻居信息。In the network, each network device can periodically send LLDP packets to neighboring devices. If the local configuration of the device changes, the network device can immediately send LLDP packets to the neighbor device. After receiving the LLDP packet, the neighbor device can check the validity of the LLDP packet. After the validity check is passed, the neighbor information can be updated based on the neighbor information carried in the LLDP packet.
在实际应用中,当需要修改网络设备的网络管理IP地址时,通常可通过串口线登入以修改网络设备的网络管理IP地址。而本公开提供的方法无需通过串口线登入来修改网络设备的网络管理IP地址,而是动态修改网络设备的网络管理IP地址。为了使本发明的目的、技术方案和优点更加清楚,下面结合附图和具体实施例对本发明进行详细描述。In actual applications, when you need to modify the network management IP address of a network device, you can usually log in through the serial cable to modify the network management IP address of the network device. The method provided by the present disclosure does not need to modify the network management IP address of the network device by using a serial port login, but dynamically modify the network management IP address of the network device. The present invention will be described in detail below with reference to the drawings and specific embodiments.
参见图1,图1为根据本公开一示例示出的基于链路层的网络管理方法的示意性流程图。如图1所示,该流程可包括步骤101和步骤102。Referring to FIG. 1, FIG. 1 is a schematic flowchart of a link layer-based network management method according to an example of the present disclosure. As shown in FIG. 1, the process may include step 101 and step 102.
步骤101,网络设备可向对端设备发送第一网络管理IP地址修改报文,该第一网络管理IP地址修改报文携带第一IP地址。Step 101: The network device may send a first network management IP address modification message to the peer device, where the first network management IP address modification message carries the first IP address.
为便于描述,这里将网络设备向对端设备发送的网络管理IP地址修改报文记为第一网络管理IP地址修改报文,将网络设备从对端设备接收到的网络管理IP地址修改报文记为第二网络管理IP地址修改报文。这里将对端设备的网络管理IP地址记为第二IP地址。在本步骤101中,网络设备可根据实际需求确定需要修改对端设备的网络管理IP地址,修改后的网络管理IP地址记为第一IP地址。也就是说,网络设备在确定需要将对端设备的网络管理IP地址从第二IP地址修改为第一IP地址时,可向对端设备发送一个网络管理IP地址修改报文,向对端设备发送的网络管理IP地址修改报文携带第一IP地址。For the convenience of description, the network management IP address modification message sent by the network device to the peer device is recorded as the first network management IP address modification message, and the network management IP address modification message received by the network device from the peer device is modified. Recorded as the second network management IP address modification message. Here, the network management IP address of the peer device is recorded as the second IP address. In this step 101, the network device can determine that the network management IP address of the peer device needs to be modified according to actual requirements, and the modified network management IP address is recorded as the first IP address. That is, when the network device determines that the network management IP address of the peer device needs to be changed from the second IP address to the first IP address, the network device may send a network management IP address modification packet to the peer device to the peer device. The sent network management IP address modification packet carries the first IP address.
当对端设备收到上述的第一网络管理IP地址修改报文后,可将本设备的IP地址修改为该接收到的第一网络管理IP地址修改报文所指定的第一IP地址,并向上述网络设备返回网络管理IP地址修改成功响应报文。After receiving the first network management IP address modification packet, the peer device may modify the IP address of the device to the first IP address specified by the received first network management IP address modification packet, and Returning a network management IP address modification success response message to the above network device.
步骤102,网络设备在设定的监听周期内接收到对端设备针对所述第一网络管理IP地址修改报文向本设备返回的IP地址修改成功响应报文时,可确定对端设备已将IP地址从第二IP地址修改为第一IP地址。Step 102: When the network device receives the IP address modification success response message returned by the peer device to the device in the first network management IP address modification packet, the network device determines that the peer device has The IP address is modified from the second IP address to the first IP address.
在上面描述中,网络管理IP地址修改报文、网络管理IP地址修改成功响应报文都是为实现本公开而在链路层定义的报文,属于链路层报文。In the above description, the network management IP address modification message and the network management IP address modification success response message are all packets defined at the link layer for implementing the disclosure, and belong to the link layer message.
通过图1所示流程可以看出,在本公开中,网络设备之间通过上述链路层报文可相互动态修改IP地址。 It can be seen from the flow shown in FIG. 1 that in the present disclosure, the network devices can dynamically modify the IP addresses of each other through the link layer messages.
在一公开实施例中,图1所示流程之前,网络设备可进一步动态获取对端设备的IP地址,该获取的网络管理IP地址为所述第二IP地址。在另一公开实施例中,网络设备还可预先配置对端设备的IP地址即上述的第二IP地址,网络设备可基于该配置即可获取对端设备的IP地址即上述的第二IP地址。下面仅以网络设备动态获取对端设备的IP地址为例描述。In a disclosed embodiment, before the process shown in FIG. 1, the network device may further dynamically obtain an IP address of the peer device, and the acquired network management IP address is the second IP address. In another disclosed embodiment, the network device may also pre-configure the IP address of the peer device, that is, the second IP address, and the network device may acquire the IP address of the peer device, that is, the second IP address, based on the configuration. . The following takes the IP address of the peer device dynamically as an example.
作为一个实施例,网络设备动态获取对端设备的网络管理IP地址可包括:网络设备可在网络内广播IP地址请求报文,该IP地址请求报文可携带本设备的网络管理IP地址;网络设备在设定请求周期内接收到对端设备针对该IP地址请求报文返回的IP地址响应报文时,可获取该IP地址响应报文携带的对端设备的网络管理IP地址。As an embodiment, the network device dynamically acquiring the network management IP address of the peer device may include: the network device may broadcast an IP address request packet in the network, where the IP address request packet may carry the network management IP address of the device; When receiving the IP address response packet returned by the peer device for the IP address request packet, the device can obtain the network management IP address of the peer device carried in the IP address response packet.
在另一实施例中,网络设备还可进一步接收IP地址请求报文,并可向该接收到的IP地址请求报文的源设备返回IP地址响应报文,该IP地址响应报文携带本设备的IP地址。In another embodiment, the network device may further receive an IP address request message, and may return an IP address response message to the source device of the received IP address request message, where the IP address response message carries the device. IP address.
在一公开实施例中,网络设备还可接收第二网络管理IP地址修改报文,并将本设备的IP地址修改为该第二网络管理IP地址修改报文指定的IP地址,并向该第二网络管理IP地址修改报文的源设备返回网络管理IP地址修改成功响应报文。In a disclosed embodiment, the network device may further receive the second network management IP address modification message, and modify the IP address of the device to the IP address specified by the second network management IP address modification message, and The source device of the network management IP address modification packet returns a network management IP address modification success response packet.
作为一个实施例,将本设备的IP地址修改为接收到的第二网络管理IP地址修改报文指定的IP地址可包括:判断该指定的IP地址是否满足本设备的IP地址修改条件,如果是,将本设备的IP地址修改为该指定的IP地址。As an embodiment, modifying the IP address of the device to the received IP address specified by the second network management IP address modification message may include: determining whether the specified IP address meets the IP address modification condition of the device, and if , modify the IP address of the device to the specified IP address.
这里,本设备的IP地址修改条件可包括:与本设备的IP地址属于同一网段,或者本设备配置允许IP地址修改等。本发明并不具体限定。Here, the IP address modification condition of the device may include: the same network segment as the IP address of the device, or the device configuration allows the IP address to be modified. The invention is not specifically limited.
作为一个实施例,本发明中,在将本设备的IP地址修改为接收到的第二网络管理IP地址修改报文指定的IP地址之前,网络设备还可:判断本设备的状态是否为IP地址修改状态,如果否,设置本设备的状态为IP地址修改状态;如果是,向该第二网络管理IP地址修改报文的源设备返回IP地址正在修改报文。As an embodiment, in the present invention, before modifying the IP address of the device to the IP address specified by the received second network management IP address modification packet, the network device may further: determine whether the state of the device is an IP address. Modify the status. If no, set the status of the device to the IP address modification status. If yes, return the IP address from the source device that modified the IP address modification packet to the second network.
此外,在将本设备的IP地址修改为指定的IP地址之后,网络设备还可进一步:将本设备的状态设置为非IP地址修改状态的设置。这里,作为一个实施例,设置本设备的状态为IP地址修改状态可举例为:将本设备的状态置位第一设定值比如1。对应地,上述将本设备的状态设置为非IP地址修改状态的设置可举例为:将本设备的状态置位第二设定值比如0。In addition, after modifying the IP address of the device to the specified IP address, the network device may further set the state of the device to the setting of the non-IP address modification state. Here, as an embodiment, setting the state of the device to the IP address modification state may be exemplified by setting the state of the device to a first set value such as 1. Correspondingly, the setting of setting the state of the device to the non-IP address modification state may be exemplified by setting the state of the device to a second set value such as 0.
进一步地,在一公开实施例中,若在设定的监听周期内接收到对端设备针对本设备发送的第一网络管理IP地址修改报文而返回的网络管理IP地址正在修改报文时,网络设备还可从接收到该网络管理IP地址正在修改报文起等待预设时间,并在预设时间到达时再次向该对 端设备发送网络管理IP地址修改报文。Further, in a disclosed embodiment, if the network management IP address returned by the peer device for receiving the first network management IP address modification message sent by the device is being modified within the set listening period, The network device may also wait for a preset time from receiving the network management IP address that is modifying the message, and again to the pair when the preset time arrives. The end device sends a network management IP address modification packet.
其中,上述预设时间可以包括一个以上预先设定的监听周期,也可以是网络管理人员根据实际情况预先设定的时间,这里不对该预设时间进行具体地限定。The preset time may include one or more preset monitoring periods, or may be a time preset by the network administrator according to actual conditions, where the preset time is not specifically limited.
下面基于上面描述对本发明提供的方法进行举例描述。The method provided by the present invention is described below by way of example based on the above description.
参见图2,图2为本公开一示例示出的基于链路层的网络管理方法的示意图。Referring to FIG. 2, FIG. 2 is a schematic diagram of a link layer-based network management method according to an example of the present disclosure.
在图2所示的实施例中,以网络中存在设备1、设备2、设备3为例对上述基于链路层的网络管理方法进行详细地说明。In the embodiment shown in FIG. 2, the above-mentioned link layer-based network management method is described in detail by taking the device 1, the device 2, and the device 3 in the network as an example.
在图2中,假设设备1可动态获取对端设备,如设备2、设备3的IP地址。In FIG. 2, it is assumed that the device 1 can dynamically obtain the IP addresses of the peer devices, such as the device 2 and the device 3.
例如,设备1可在网络内广播IP地址请求报文。For example, device 1 can broadcast an IP address request message within the network.
当设备1在网络内广播该IP地址请求报文后,网络内的设备2和设备3都可收到该IP地址请求报文。After the device 1 broadcasts the IP address request message in the network, both the device 2 and the device 3 in the network can receive the IP address request message.
当设备2收到设备1广播的IP地址请求报文后,可解析该接收到的IP地址请求报文,获取其所携带的设备1的MAC地址,如MAC1,并可向设备1返回IP地址响应报文。After receiving the IP address request packet broadcasted by the device 1, the device 2 can parse the received IP address request packet, obtain the MAC address of the device 1 carried by the device 1, such as MAC1, and return an IP address to the device 1. Response message.
IP地址当设备3收到设备1广播的IP地址请求报文后,可解析该接收到的IP地址请求报文,获取其所携带的MAC地址,如MAC1,并可向设备1返回IP地址响应报文。After receiving the IP address request packet broadcasted by the device 1, the device 3 can parse the received IP address request packet, obtain the MAC address carried by the device, such as MAC1, and return an IP address response to the device 1. Message.
IP地址设备1可在广播IP地址请求报文之后的设定请求周期内监听IP地址响应报文,该设定的请求周期可预先配置。The IP address device 1 can listen to the IP address response message within the set request period after the broadcast IP address request message, and the set request period can be pre-configured.
当设备1在设定请求周期内监听到来自设备2的IP地址响应报文时,可解析该IP地址响应报文,并可获取该IP地址响应报文携带的设备2的IP地址。同理,当设备1在设定请求周期内监听到来自设备3的IP地址响应报文,可解析该IP地址响应报文,并可获取该IP地址响应报文携带的设备3的IP地址。When the device 1 listens to the IP address response message from the device 2 in the set request period, the device 1 can parse the IP address response message and obtain the IP address of the device 2 carried in the IP address response message. Similarly, when the device 1 listens to the IP address response message from the device 3 in the set request period, the device can parse the IP address response message and obtain the IP address of the device 3 carried in the IP address response message.
需要说明的是,当设备1在设定请求周期结束后,如果监听到来自设备2或设备3的IP地址响应报文,则可丢弃该监听到的IP地址响应报文。还需要说明的是,由于IP地址请求报文的发送和IP地址响应报文的发送是异步通信,设备1可能在设定请求周期内监听到同一个设备,比如设备2返回的多份IP地址响应报文。针对此种情况,设备1可以进行IP地址响应报文的过滤,不再赘述。It should be noted that, when the device 1 listens to the IP address response message from the device 2 or the device 3 after the end of the setting request period, the device 1 may discard the monitored IP address response message. It should be noted that, since the sending of the IP address request message and the sending of the IP address response message are asynchronous communication, the device 1 may listen to the same device within the set request period, for example, multiple IP addresses returned by the device 2 Response message. In this case, the device 1 can filter the IP address response packets, and details are not described here.
设备1获取到设备2的IP地址和设备3的IP地址之后,假设设备1发现设备2和设备3的设备类型、设备序列号不同,但IP地址相同,都为IP2。针对这种情况,设备1可确定修 改设备3的IP地址。需要说明的是,其他情况,比如基于设备3的业务规划调整需要修改设备3的IP地址、或者基于用户配置需要修改设备3的IP地址等,均可适用于本公开的技术方案。本实施例并不对触发修改设备3的IP地址的场景进行具体限定。After the device 1 obtains the IP address of the device 2 and the IP address of the device 3, it is assumed that the device 1 finds that the device type and device serial number of the device 2 and the device 3 are different, but the IP addresses are the same, and all are IP2. In response to this situation, device 1 can determine the repair Change the IP address of device 3. It should be noted that other situations, such as adjusting the IP address of the device 3 based on the service plan adjustment of the device 3, or modifying the IP address of the device 3 based on the user configuration, may be applicable to the technical solution of the present disclosure. This embodiment does not specifically limit the scenario in which the IP address of the device 3 is triggered to be modified.
假如设备3修改后的IP地址为IP3。该IP3与设备1的IP地址如IP1、以及设备1获取的其他任一设备的IP地址不同。作为一个实施例,IP3所属的网段与设备1的IP地址,如IP1所属的网段相同。Suppose the modified IP address of device 3 is IP3. The IP3 is different from the IP address of the device 1 such as IP1 and the IP address of any other device acquired by the device 1. As an embodiment, the network segment to which the IP3 belongs is the same as the IP address of the device 1, such as the network segment to which the IP1 belongs.
设备1可向设备3发送网络管理IP地址修改报文。The device 1 can send a network management IP address modification message to the device 3.
设备3可接收设备1发送的网络管理IP地址修改报文,并可判断本设备的状态是否为IP地址修改状态。The device 3 can receive the network management IP address modification packet sent by the device 1, and can determine whether the state of the device is an IP address modification state.
设备3在判断出本设备的状态不为IP地址修改状态后,可将本设备3的状态设置为IP地址修改状态。之后设备3可判断该网络管理IP地址修改报文携带的IP地址IP3是否满足本设备3的IP地址修改条件。这里的IP地址修改条件可举例为:该网络管理IP地址修改报文携带的IP地址IP3所属网段与本设备3当前的IP地址即IP2所属网段相同。设备3在判断出该网络管理IP地址修改报文携带的IP地址IP3满足本设备3的IP地址修改条件时,可将本设备3的IP地址修改为IP3,并将本设备的状态设置为非IP地址修改状态,之后可返回IP地址修改成功响应报文给设备1。After the device 3 determines that the state of the device is not the IP address modification state, the device 3 can set the state of the device 3 to the IP address modification state. The device 3 can determine whether the IP address IP3 carried in the network management IP address modification packet meets the IP address modification condition of the device 3. The IP address modification condition is as follows: The IP address of the network management IP address modification packet is the same as the current IP address of the device 3, that is, the network segment to which the IP2 belongs. The device 3 can change the IP address of the device 3 to IP3 and set the state of the device to non- After the IP address is modified, the IP address modification success response packet can be returned to device 1.
作为一个实施例,设备3在判断出网络管理IP地址修改报文携带的IP地址IP3不满足本设备3的IP地址修改条件时,可删除本设备的状态为IP地址修改状态的设置,比如将本设备的状态从IP地址修改状态更新为非IP地址修改状态,之后可返回网络管理IP地址修改失败响应报文给设备1。As an embodiment, when determining that the IP address IP3 carried in the network management IP address modification packet does not meet the IP address modification condition of the device 3, the device 3 may delete the setting of the state of the device as the IP address modification state, for example, The status of the device is updated from the IP address modification status to the non-IP address modification status, and then the network management IP address modification failure response message is returned to the device 1.
设备3在判断出本设备的状态为IP地址修改状态时,可向设备1返回网络管理IP地址正在修改报文。When the device 3 determines that the state of the device is the IP address modification state, the device 3 may return the network management IP address to the device 1 to modify the message.
设备1可在设定的监听周期内监听设备3返回的报文。其中,当设备1在设定的监听周期内监听到设备3发送的网络管理IP地址修改成功响应报文时,可确定设备3已将IP地址从IP2成功修改为IP3。The device 1 can listen to the message returned by the device 3 during the set listening period. When the device 1 monitors the network management IP address modification success response message sent by the device 3 during the set listening period, it can be determined that the device 3 has successfully modified the IP address from IP2 to IP3.
当设备1在设定的监听周期内未监听到设备3针对上述网络管理IP地址修改报文向本设备返回的任何报文时,可再次执行向对端设备发送网络管理IP地址修改报文的步骤。当设备1在设定的监听周期内接收到设备3针对网络管理IP地址修改报文向本设备返回的网络管理IP地址正在修改报文时,设备1可等待一段时间,并在等待时间到达时再次执行向对端设备 发送网络管理IP地址修改报文的步骤。而当设备1在设定的监听周期内监听到设备3发送的网络管理IP地址修改失败响应报文,则重新为设备3确定一个新的IP地址,记为IP4,并按照上述操作再次向设备3发送新的网络管理IP地址修改报文,对此不再赘述。When the device 1 does not detect any packet that the device 3 returns to the device for the network management IP address modification packet in the set listening period, the device 1 may perform the network management IP address modification packet to the peer device again. step. When the device 1 receives the packet whose network management IP address returned by the device 3 to the device for the network management IP address modification message is being modified within the set listening period, the device 1 may wait for a period of time and wait for the time to arrive. Perform the peer device again Steps to send a network management IP address to modify the packet. When the device 1 listens to the network management IP address modification failure response message sent by the device 3 in the set listening period, it re-determines a new IP address for the device 3, which is recorded as IP4, and returns to the device according to the above operation. 3 Send a new network management IP address modification packet, which will not be described here.
通过上述实施例可以看出,本公开中,网络设备之间既可以通过报文交互收集彼此的MAC地址、IP地址等,也可以通过报文交互动态修改彼此的IP地址。这实现了修改网络设备的IP地址的目的,方便管理网络中的所有网络设备。As can be seen from the foregoing embodiments, in the present disclosure, network devices can collect mutual MAC addresses, IP addresses, and the like through packet interaction, and dynamically modify each other's IP addresses through packet interaction. This achieves the purpose of modifying the IP address of the network device to facilitate management of all network devices in the network.
参见图3,图3为根据本公开一示例提供网络设备的硬件结构示意图。该网络设备可包括处理器301,存储有机器可读指令的机器可读存储介质302。处理器401与机器可读存储介质302可经由系统总线303通信。并且,通过读取并执行机器可读存储介质302中与网络管理控制逻辑对应的机器可执行指令,处理器301可执行上文描述的基于链路层的网络管理方法。Referring to FIG. 3, FIG. 3 is a schematic diagram of a hardware structure of a network device according to an example of the present disclosure. The network device can include a processor 301, a machine readable storage medium 302 that stores machine readable instructions. Processor 401 and machine readable storage medium 302 can communicate via system bus 303. And, by reading and executing machine executable instructions in the machine readable storage medium 302 corresponding to the network management control logic, the processor 301 can perform the link layer based network management method described above.
本文中提到的机器可读存储介质302可以是任何电子、磁性、光学或者其他物理存储装置,可以包含存储信息,如可执行指令、数据,等等。例如,机器可读存储介质可以是:RAM(Radom Access Memory,随机存取存储器)、易失存储器、非易失性存储器、闪存、存储驱动器(如硬盘驱动器)、固态硬盘、任何类型的存储盘(如光盘、DVD等),或者类似的存储介质,或者它们的组合。The machine-readable storage medium 302 referred to herein may be any electronic, magnetic, optical, or other physical storage device, and may contain stored information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid state drive, any type of storage disk. (such as a disc, DVD, etc.), or a similar storage medium, or a combination thereof.
参见图4,图4为根据本公开一示例提供的图3所示装置的网络管理控制逻辑的功能模块框图。从功能上划分,上述网络管理控制逻辑40,可包括:发送模块401、监听模块402。Referring to FIG. 4, FIG. 4 is a functional block diagram of network management control logic of the apparatus shown in FIG. 3 according to an example of the present disclosure. The network management control logic 40 may include a sending module 401 and a listening module 402.
其中,所述发送模块401,可用于向所述对端设备发送第一网络管理IP地址修改报文,所述第一网络管理IP地址修改报文携带所述第一IP地址;The sending module 401 is configured to send, to the peer device, a first network management IP address modification packet, where the first network management IP address modification packet carries the first IP address;
上述监听模块402,可用于在设定的监听周期内监听到所述对端设备针对所述第一网络管理IP地址修改报文向所述网络设备返回的IP地址修改成功响应报文时,确定所述对端设备已将IP地址从所述第二IP地址修改为所述第一IP地址。The monitoring module 402 is configured to: when the peer device detects the IP address modification success response packet returned by the peer device to the network device in the set listening period, The peer device has modified the IP address from the second IP address to the first IP address.
根据一个示例,所述网络管理控制逻辑进一步包括:第一接收模块403和修改模块404。According to an example, the network management control logic further includes: a first receiving module 403 and a modification module 404.
其中,所述第一接收模块403可用于接收第二网络管理IP地址修改报文;The first receiving module 403 is configured to receive a second network management IP address modification message.
所述修改模块404,可用于将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址,并向所述第二网络管理IP地址修改报文的源设备返回网络管理IP地址修改成功响应报文。The modifying module 404 is configured to modify an IP address of the network device to an IP address specified by the second network management IP address modification packet, and modify a source device of the packet to the second network management IP address. Returns the network management IP address modification success response packet.
根据一个示例,所述网络管理控制逻辑进一步包括:获取模块405,可用于获取所述对端 设备的IP地址并记录为所述第二IP地址。According to an example, the network management control logic further includes: an obtaining module 405, configured to acquire the peer end The IP address of the device is recorded as the second IP address.
根据一个示例,所述获取模块405可具体用于在网络内广播IP地址请求报文,所述IP地址请求报文携带所述网络设备的IP地址,并在设定请求周期内接收到所述对端设备针对所述IP地址请求报文返回的IP地址响应报文时,根据所述IP地址响应报文获取所述IP地址响应报文携带的所述对端设备的IP地址。According to an example, the obtaining module 405 may be specifically configured to broadcast an IP address request message in the network, where the IP address request message carries an IP address of the network device, and receives the And obtaining, by the peer device, the IP address of the peer device carried in the IP address response packet, according to the IP address response packet, in response to the IP address response packet returned by the IP address request packet.
根据一个示例,所述网络管理控制逻辑进一步包括:第二接收模块406,可用于接收IP地址请求报文;所述发送模块401可进一步向该IP地址请求报文的源设备返回IP地址响应报文,其中,所述IP地址响应报文携带所述网络设备的IP地址。According to an example, the network management control logic further includes: a second receiving module 406, configured to receive an IP address request message; the sending module 401 may further return an IP address response report to the source device of the IP address request message. The IP address response packet carries an IP address of the network device.
根据一个示例,所述修改模块404可具体用于判断所述第二网络管理IP地址修改报文指定的IP地址是否满足IP地址修改条件,所述IP地址修改条件包括:所述第二网络管理IP地址修改报文指定的IP地址与所述网络设备当前的IP地址属于同一网段;如果是,将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址。According to an example, the modifying module 404 may be specifically configured to determine whether the IP address specified by the second network management IP address modification packet meets an IP address modification condition, where the IP address modification condition includes: the second network management The IP address specified by the IP address modification packet belongs to the same network segment as the current IP address of the network device; if yes, the IP address of the network device is modified to the IP address specified by the second network management IP address modification packet. address.
根据一个示例,所述修改模块404,可进一步用于在将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址之前,判断所述网络设备的状态是否为IP地址修改状态;如果否,设置所述网络设备的状态为IP地址修改状态;如果是,向所述第二网络管理IP地址修改报文的源设备返回IP地址正在修改报文;在将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址之后,将所述网络设备的状态设置为非IP地址修改状态的设置。According to an example, the modifying module 404 may be further configured to determine whether the state of the network device is before modifying an IP address of the network device to an IP address specified by the second network management IP address modification message. Modifying the status of the IP address; if not, setting the status of the network device to the IP address modification status; if yes, returning the IP address to the source device of the second network management IP address modification packet to modify the message; After the IP address of the network device is modified to the IP address specified by the second network management IP address modification message, the state of the network device is set to a setting of a non-IP address modification state.
根据一个示例,所述监听模块402,还可用于在设定的监听周期内接收到所述对端设备针对所述第一网络管理IP地址修改报文向所述网络设备返回的网络管理IP地址正在修改报文时,等待预设时间,并在所述预设时间到达时,、再次向所述对端设备发送网络管理IP地址修改报文。其中,上述预设时间可以包括一个以上上述预先设定的监听周期。According to an example, the monitoring module 402 is further configured to receive, during the set listening period, a network management IP address that the peer device returns to the network device for the first network management IP address modification message. When the packet is being modified, it waits for a preset time, and when the preset time arrives, sends a network management IP address modification packet to the peer device again. The preset time may include one or more preset listening periods.
根据本公开的示例,还提供了一种包括机器可执行指令的机器可读存储介质,例如图3中的机器可读存储介质302,所述机器可执行指令可由网络设备中的处理器301执行以实现以上描述的基于链路层的网络管理方法。According to an example of the present disclosure, there is also provided a machine readable storage medium comprising machine executable instructions, such as machine readable storage medium 302 of FIG. 3, executable by processor 301 in a network device To implement the link layer based network management method described above.
所述机器可读存储介质302中与网络管理控制逻辑对应的机器可执行指令,可以促使所述处理器301执行以下操作::向所述对端设备发送第一网络管理IP地址修改报文,所述第一网络管理IP地址修改报文携带所述第一IP地址;在设定的监听周期内监听到所述对端设备针对所述第一网络管理IP地址修改报文向所述网络设备返回的IP地址修改成功响应报文 时,确定所述对端设备已将IP地址从第二IP地址修改为所述第一IP地址。The machine-executable instructions in the machine-readable storage medium 302 corresponding to the network management control logic may cause the processor 301 to: send a first network management IP address modification message to the peer device, The first network management IP address modification packet carries the first IP address, and the peer device is configured to modify the packet for the first network management IP address to the network device during the set listening period. Returned IP address modification success response message And determining that the peer device has modified the IP address from the second IP address to the first IP address.
根据一个示例,所述机器可执行指令可进一步促使所述处理器:接收第二网络管理IP地址修改报文;将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址,并向所述第二网络管理IP地址修改报文的源设备返回网络管理IP地址修改成功响应报文。According to an example, the machine executable instructions may further cause the processor to: receive a second network management IP address modification message; modify the IP address of the network device to the second network management IP address modification message The specified IP address is returned to the source device of the second network management IP address modification packet to return a network management IP address modification success response message.
根据一个示例,所述机器可执行指令进一步促使所述处理器:获取所述对端设备的IP地址并记录为所述第二IP地址。According to an example, the machine executable instructions further cause the processor to: acquire an IP address of the peer device and record as the second IP address.
根据一个示例,在获取所述对端设备的IP地址并记录为所述第二IP地址时,所述机器可执行指令促使所述处理器:在网络内广播IP地址请求报文,所述IP地址请求报文携带所述网络设备的IP地址;在设定请求周期内接收到对端设备针对所述IP地址请求报文返回的IP地址响应报文时,根据所述IP地址响应报文获取所述IP地址响应报文携带的对端设备的IP地址。According to an example, when acquiring an IP address of the peer device and recording as the second IP address, the machine executable instructions cause the processor to: broadcast an IP address request message within the network, the IP The address request message carries the IP address of the network device, and receives the IP address response message returned by the peer device for the IP address request message in the set request period, and obtains the response according to the IP address response message. The IP address of the peer device carried in the IP address response packet.
根据一个示例,所述机器可执行指令进一步促使所述处理器:接收IP地址请求报文;向该IP地址请求报文的源设备返回IP地址响应报文,其中,所述IP地址响应报文携带所述网络设备的IP地址。According to an example, the machine executable instructions further cause the processor to: receive an IP address request message; return an IP address response message to the source device of the IP address request message, wherein the IP address response message Carrying the IP address of the network device.
根据一个示例,在将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址,所述机器可执行指令促使所述处理器:判断所述第二网络管理IP地址修改报文指定的IP地址是否满足IP地址修改条件,所述IP地址修改条件包括:所述第二网络管理IP地址修改报文指定的IP地址与所述网络设备当前的IP地址属于同一网段;如果是,将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址。According to an example, the IP address specified by the network device is modified to an IP address specified by the second network management IP address modification message, the machine executable instruction causing the processor to: determine the second network management Whether the IP address specified by the IP address modification packet satisfies the IP address modification condition, and the IP address modification condition includes: the IP address specified by the second network management IP address modification packet is the same as the current IP address of the network device. a network segment; if yes, modifying an IP address of the network device to an IP address specified by the second network management IP address modification message.
根据一个示例,所述机器可执行指令还促使所述处理器:在将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址之前,判断所述网络设备的状态是否为IP地址修改状态,如果否,设置所述网络设备的状态为IP地址修改状态;如果是,向所述第二网络管理IP地址修改报文的源设备返回IP地址正在修改报文;在将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址之后,将所述网络设备的状态设置为非IP地址修改状态。According to an example, the machine executable instructions further cause the processor to: determine the network device before modifying an IP address of the network device to an IP address specified by the second network management IP address modification message Whether the status is the IP address modification status, if not, setting the status of the network device to the IP address modification status; if yes, returning the IP address to the source device of the second network management IP address modification message, modifying the message After modifying the IP address of the network device to the IP address specified by the second network management IP address modification message, setting the state of the network device to a non-IP address modification state.
根据一个示例,所述机器可执行指令进一步促使所述处理器:在设定的监听周期内接收到所述对端设备所述第一网络管理IP地址修改报文向所述网络设备返回的网络管理IP地址正在修改报文时,等待预设时间,并在所述预设时间到达时,再次向所述对端设备发送网络 管理IP地址修改报文。其中,上述预设时间可以是一个以上上述预先设定的监听周期。According to an example, the machine executable instructions further cause the processor to: receive the network returned by the peer device the first network management IP address modification message to the network device within a set listening period When the management IP address is modifying the packet, it waits for the preset time, and when the preset time arrives, sends the network to the peer device again. Manage IP address modification packets. The preset time may be more than one preset listening period.
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。For the device embodiment, since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without any creative effort.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply such entities or operations. There is any such actual relationship or order between them. The terms "including", "comprising" or "comprising" or "comprising" are intended to include a non-exclusive inclusion, such that a process, method, article, or device that comprises a plurality of elements includes not only those elements but also other items not specifically listed Elements, or elements that are inherent to such a process, method, item, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
以上对本发明实施例所提供的方法和装置进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。 The method and apparatus provided by the embodiments of the present invention are described in detail above. The principles and implementations of the present invention are described in the specific examples. The description of the above embodiments is only used to help understand the method of the present invention and At the same time, there will be changes in the specific embodiments and the scope of application according to the idea of the present invention, and the contents of the present specification should not be construed as limiting the present invention. .

Claims (15)

  1. 一种基于链路层的网络管理方法,包括:A link layer based network management method, comprising:
    网络设备向对端设备发送第一网络管理IP地址修改报文,所述第一网络管理IP地址修改报文携带第一IP地址;The network device sends a first network management IP address modification message to the peer device, where the first network management IP address modification message carries the first IP address;
    在设定的监听周期内监听到所述对端设备针对所述第一网络管理IP地址修改报文向所述网络设备返回的网络管理IP地址修改成功响应报文时,所述网络设备确定所述对端设备已将IP地址从第二IP地址修改为所述第一IP地址。The network device determines, when the peer device detects the network management IP address modification success response message returned by the peer device to the network device for the first network management IP address modification message in the set listening period. The peer device has modified the IP address from the second IP address to the first IP address.
  2. 根据权利要求1所述的方法,进一步包括:The method of claim 1 further comprising:
    所述网络设备接收第二网络管理IP地址修改报文;Receiving, by the network device, a second network management IP address modification message;
    所述网络设备将所述网络设备的IP地址修改为所述第二IP网络管理地址修改报文指定的IP地址;The network device modifies the IP address of the network device to an IP address specified by the second IP network management address modification message;
    所述网络设备向所述第二网络管理IP地址修改报文的源设备返回网络管理IP地址修改成功响应报文。The network device returns a network management IP address modification success response message to the source device of the second network management IP address modification message.
  3. 根据权利要求1所述的方法,进一步包括:The method of claim 1 further comprising:
    所述网络设备获取所述对端设备的IP地址,并记录为所述第二IP地址。The network device acquires an IP address of the peer device and records the second IP address.
  4. 根据权利要求3所述的方法,其特征在于,获取所述对端设备的IP地址包括:The method of claim 3, wherein obtaining the IP address of the peer device comprises:
    所述网络设备在网络内广播IP地址请求报文,所述IP地址请求报文携带所述网络设备的IP地址;The network device broadcasts an IP address request message in the network, where the IP address request message carries an IP address of the network device;
    在设定请求周期内接收到所述对端设备针对所述IP地址请求报文返回的IP地址响应报文时,所述网络设备根据所述IP地址响应报文获取对端设备的IP地址。The network device obtains an IP address of the peer device according to the IP address response packet, when the IP address response message returned by the peer device for the IP address request message is received.
  5. 根据权利要求1所述的方法,进一步包括:The method of claim 1 further comprising:
    所述网络设备接收IP地址请求报文;Receiving, by the network device, an IP address request message;
    所述网络设备向该IP地址请求报文的源设备返回IP地址响应报文,其中,所述IP地址响应报文携带所述网络设备的IP地址。The network device returns an IP address response message to the source device of the IP address request packet, where the IP address response message carries an IP address of the network device.
  6. 根据权利要求2所述的方法,其特征在于,将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址包括:The method according to claim 2, wherein modifying the IP address of the network device to the IP address specified by the second network management IP address modification message comprises:
    所述网络设备判断所述第二网络管理IP地址修改报文指定的IP地址是否满足IP地址修改条件,所述IP地址修改条件包括:所述第二网络管理IP地址修改报文指定的IP地址与所述网络设备当前的IP地址属于同一网段;The network device determines whether the IP address specified by the second network management IP address modification packet meets the IP address modification condition, and the IP address modification condition includes: the IP address specified by the second network management IP address modification packet And belong to the same network segment as the current IP address of the network device;
    如果是,所述网络设备将所述网络设备的IP地址修改为所述第二网络管理IP地址修改 报文指定的IP地址。If yes, the network device modifies the IP address of the network device to the second network management IP address modification. The IP address specified by the message.
  7. 根据权利要求2所述的方法,还包括:The method of claim 2 further comprising:
    在将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址之前,所述网络设备判断所述网络设备的状态是否为IP地址修改状态,Before the IP address of the network device is modified to the IP address specified by the second network management IP address modification packet, the network device determines whether the state of the network device is an IP address modification state.
    如果否,所述网络设备设置所述网络设备的状态为IP地址修改状态;If not, the network device sets the state of the network device to an IP address modification state;
    如果是,所述网络设备向所述第二网络管理IP地址修改报文的源设备返回IP地址正在修改报文;If yes, the network device returns an IP address to the source device of the second network management IP address modification packet, and the packet is being modified;
    在将所述网络设备的IP地址修改为所述第二IP地址修改报文指定的IP地址之后,所述网络设备将所述网络设备的状态设置为非IP地址修改状态。After modifying the IP address of the network device to the IP address specified by the second IP address modification message, the network device sets the state of the network device to a non-IP address modification state.
  8. 根据权利要求7所述的方法,进一步包括:The method of claim 7 further comprising:
    在设定的监听周期内接收到所述对端设备针对所述第一网络管理IP地址修改报文向所述网络设备返回的IP地址正在修改报文时,所述网络设备等待预设时间,并The network device waits for a preset time when receiving an IP address that the peer device returns to the network device for the first network management IP address modification message is being modified in the set listening period, and
    在预设时间到达时,所述网络设备再次向所述对端设备发送网络管理IP地址修改报文。When the preset time arrives, the network device sends a network management IP address modification message to the peer device again.
  9. 一种网络设备,包括处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令,所述处理器被所述机器可执行指令促使:A network device comprising a processor and a machine readable storage medium storing machine executable instructions executable by the processor, the processor being caused by the machine executable instructions:
    向所述对端设备发送第一网络管理IP地址修改报文,所述第一网络管理IP地址修改报文携带所述第一IP地址;Sending a first network management IP address modification message to the peer device, where the first network management IP address modification message carries the first IP address;
    在设定的监听周期内监听到所述对端设备针对所述第一网络管理IP地址修改报文向所述网络设备返回的网络管理IP地址修改成功响应报文时,确定所述对端设备已将网络管理IP地址从第二IP地址修改为所述第一IP地址。Determining, when the peer device detects the network management IP address modification success response message returned by the peer device to the network device in the set listening period, determining the peer device The network management IP address has been modified from the second IP address to the first IP address.
  10. 根据权利要求9所述的网络设备,所述机器可执行指令进一步促使所述处理器:The network device of claim 9 wherein said machine executable instructions further cause said processor to:
    接收第二网络管理IP地址修改报文;Receiving a second network management IP address modification message;
    将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址,并向所述第二网络管理IP地址修改报文的源设备返回网络管理IP地址修改成功响应报文。Modifying the IP address of the network device to the IP address specified by the second network management IP address modification packet, and returning the network management IP address to the source device of the second network management IP address modification packet to successfully respond to the modification Message.
  11. 根据权利要求9所述的网络设备,所述机器可执行指令进一步促使所述处理器:The network device of claim 9 wherein said machine executable instructions further cause said processor to:
    获取所述对端设备的IP地址并记录为所述第二IP地址。Obtaining an IP address of the peer device and recording the second IP address.
  12. 根据权利要求9所述的网络设备,所述机器可执行指令进一步促使所述处理器:The network device of claim 9 wherein said machine executable instructions further cause said processor to:
    接收IP地址请求报文;Receiving an IP address request message;
    向该IP地址请求报文的源设备返回IP地址响应报文,其中,所述IP地址响应报文携带所述网络设备的IP地址。 And returning, by the source device of the IP address request packet, an IP address response packet, where the IP address response packet carries an IP address of the network device.
  13. 根据权利要求10所述的网络设备,其中,在将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址,所述机器可执行指令促使所述处理器:The network device according to claim 10, wherein said machine executable instructions cause said processor to modify an IP address of said network device to an IP address specified by said second network management IP address modification message :
    判断所述第二网络管理IP地址修改报文指定的IP地址是否满足IP地址修改条件,所述IP地址修改条件包括:所述第二网络管理IP地址修改报文指定的IP地址与所述网络设备当前的IP地址属于同一网段;Determining whether the IP address specified by the second network management IP address modification packet meets the IP address modification condition, where the IP address modification condition includes: the IP address specified by the second network management IP address modification packet and the network The current IP address of the device belongs to the same network segment.
    如果是,将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址。If yes, modify the IP address of the network device to the IP address specified by the second network management IP address modification message.
  14. 根据权利要求10所述的网络设备,所述机器可执行指令还促使所述处理器:The network device of claim 10, the machine executable instructions further causing the processor to:
    在将所述网络设备的网络管理IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址之前,判断所述网络设备的状态是否为IP地址修改状态,Before modifying the network management IP address of the network device to the IP address specified by the second network management IP address modification packet, determining whether the state of the network device is an IP address modification state,
    如果否,设置所述网络设备的状态为IP地址修改状态;If not, setting the state of the network device to an IP address modification state;
    如果是,向所述第二网络管理IP地址修改报文的源设备返回网络管理IP地址正在修改报文;If yes, returning the network management IP address to the source device of the second network management IP address modification packet to modify the packet;
    在将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址之后,将所述网络设备的状态修改为非IP地址修改状态的设置。After modifying the IP address of the network device to the IP address specified by the second network management IP address modification message, the state of the network device is modified to a setting of a non-IP address modification state.
  15. 一种机器可读存储介质,存储有机器可执行指令,在被处理器调用和执行时,所述机器可执行指令促使所述处理器:A machine readable storage medium storing machine executable instructions that, when invoked and executed by a processor, cause the processor to:
    向所述对端设备发送第一网络管理IP地址修改报文,所述第一网络管理IP地址修改报文携带所述第一IP地址;Sending a first network management IP address modification message to the peer device, where the first network management IP address modification message carries the first IP address;
    在设定的监听周期内监听到所述对端设备针对所述第一网络管理IP地址修改报文向所述网络设备返回的网络管理IP地址修改成功响应报文时,确定所述对端设备已将网络管理IP地址从所述第二IP地址修改为所述第一IP地址。 Determining, when the peer device detects the network management IP address modification success response message returned by the peer device to the network device in the set listening period, determining the peer device The network management IP address has been modified from the second IP address to the first IP address.
PCT/CN2017/092350 2016-07-15 2017-07-10 Link layer based network management WO2018010616A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610565901.4 2016-07-15
CN201610565901.4A CN107623752B (en) 2016-07-15 2016-07-15 Network management method and device based on link layer

Publications (1)

Publication Number Publication Date
WO2018010616A1 true WO2018010616A1 (en) 2018-01-18

Family

ID=60952263

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/092350 WO2018010616A1 (en) 2016-07-15 2017-07-10 Link layer based network management

Country Status (2)

Country Link
CN (1) CN107623752B (en)
WO (1) WO2018010616A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438166A (en) * 2021-06-25 2021-09-24 新华三信息安全技术有限公司 Anycast address determination method, anycast address determination device, network equipment and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109150724B (en) * 2018-07-02 2021-06-29 新华三信息技术有限公司 Communication method and network card
CN109618021B (en) * 2018-12-27 2023-02-03 新华三技术有限公司 Method and tool box for modifying IP address
CN110677479B (en) * 2019-09-29 2022-06-07 苏州浪潮智能科技有限公司 Equipment management method, system and storage medium of local area network
CN111600970B (en) * 2020-04-09 2022-08-09 南瑞集团有限公司 Method and system for stably controlling device program centralized downloading

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1417973A (en) * 2002-11-01 2003-05-14 北京佳讯飞鸿电气有限责任公司 Method of altering network equipment IP address via network managing equipment
CN101873356A (en) * 2010-05-10 2010-10-27 杭州海康威视系统技术有限公司 Method and device for modifying IP address of equipment
CN102164188A (en) * 2011-03-31 2011-08-24 华为技术有限公司 Network address allocation method, device and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1417973A (en) * 2002-11-01 2003-05-14 北京佳讯飞鸿电气有限责任公司 Method of altering network equipment IP address via network managing equipment
CN101873356A (en) * 2010-05-10 2010-10-27 杭州海康威视系统技术有限公司 Method and device for modifying IP address of equipment
CN102164188A (en) * 2011-03-31 2011-08-24 华为技术有限公司 Network address allocation method, device and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438166A (en) * 2021-06-25 2021-09-24 新华三信息安全技术有限公司 Anycast address determination method, anycast address determination device, network equipment and storage medium
CN113438166B (en) * 2021-06-25 2022-07-22 新华三信息安全技术有限公司 Anycast address determination method, anycast address determination device, network equipment and storage medium

Also Published As

Publication number Publication date
CN107623752A (en) 2018-01-23
CN107623752B (en) 2020-09-08

Similar Documents

Publication Publication Date Title
WO2018010616A1 (en) Link layer based network management
US11140172B2 (en) Method for automatically applying access control policies based on device types of networked computing devices
US9716620B2 (en) Constructing a network enabling layer-2 interconnection of data centers
US7978631B1 (en) Method and apparatus for encoding and mapping of virtual addresses for clusters
US9173244B2 (en) Methods for establishing and using public path, M2M communication method, and systems thereof
WO2016101646A1 (en) Access method and apparatus for ethernet virtual network
US8929368B2 (en) Control method of virtual link discovery and system for fibre channel over ethernet protocol
WO2017054576A1 (en) Unicast tunnel building method, apparatus and system
WO2012094898A1 (en) Virtual machine migration method, switch, virtual machine system
WO2015003566A1 (en) Method, device and system for transmitting packet in multicast domain name system
EP4142219A1 (en) Message processing method and apparatus, announcement method and apparatus, network bridge node, source device, storage medium, and message processing system
US20200044981A1 (en) Building and maintaining a network
TW201519621A (en) Management server and management method thereof for managing cloud appliances in virtual local area networks
US20160352650A1 (en) Communication Method, Optical Module, and Network Device
US20190319917A1 (en) Methods and apparatus for operating and managing a constrained device within
EP2218214B1 (en) Network location service
US20230111966A1 (en) Ethernet storage system, and information notification method and related apparatus thereof
US9509777B2 (en) Connection method and management server
US9948497B2 (en) System for and method of automatically discovering and configuring NIDs
WO2016044990A1 (en) Method and apparatus for determining network topology, and centralized network state information storage device
CN111225080B (en) Method for acquiring gateway down-hanging equipment information
WO2018045949A1 (en) Message transmission method, device and network system
US9256416B1 (en) Methods and apparatus for automatic session validation for distributed access points
WO2017005118A1 (en) Method, device, terminal and server for maintaining communication connection
WO2017101028A1 (en) Data transmission method, m2m server, pgw, sgw and serving network node

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17826952

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17826952

Country of ref document: EP

Kind code of ref document: A1