WO2018010616A1 - 基于链路层的网络管理 - Google Patents
基于链路层的网络管理 Download PDFInfo
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network 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
本公开提供了基于链路层的网络管理方法和装置。本公开中,网络设备向所述对端设备发送第一网络管理IP地址修改报文,所述第一网络管理IP地址修改报文携带所述第一IP地址。在设定的监听周期内监听到所述对端设备针对所述第一网络管理IP地址修改报文向所述网络设备返回的网络管理IP地址修改成功响应报文时,所述网络设备确定所述对端设备已将网络管理IP地址从所述第二IP地址修改为所述第一IP地址。
Description
相关申请的交叉引用
本专利申请要求于2016年7月15日提交的、申请号为201610565901.4、发明名称为“基于链路层的网络管理方法和装置”的中国专利申请的优先权,该申请的全文以引用的方式并入本文中。
链路层发现协议(LLDP:Link Layer Discovery Protocol)是一种标准的链路层协议。网络设备可通过LLDP将本端设备的设备信息比如设备标识、接口标识等分别组织成类型/长度/值(TLV:Type/Length/Value)并封装在链路层发现协议数据单元(LLDPDU:Link Layer Discovery Protocol Data Unit)中发布给与自己直连的邻居。
图1为根据本公开一示例提供的基于链路层的网络管理方法的示意性流程图。
图2为根据本公开一示例提供的基于链路层的网络管理方法的示意图。
图3为根据本公开一示例提供的网络设备的硬件结构示意图。
图4为根据本公开一示例提供的图3所示装置的网络管理控制逻辑的功能模块框图。
下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
LLDPDU是封装在LLDP报文数据部分的数据单元。
在网络中,每一网络设备可周期性的向邻居设备发送LLDP报文。如果设备的本地配置发生变化,该网络设备可立即向邻居设备发送LLDP报文。当邻居设备接收到LLDP报文后,可对其进行有效性检查,在有效性检查通过后,可基于该LLDP报文中携带的邻居信息更新邻居信息。
在实际应用中,当需要修改网络设备的网络管理IP地址时,通常可通过串口线登入以修改网络设备的网络管理IP地址。而本公开提供的方法无需通过串口线登入来修改网络设备的网络管理IP地址,而是动态修改网络设备的网络管理IP地址。为了使本发明的目的、技术方案和优点更加清楚,下面结合附图和具体实施例对本发明进行详细描述。
参见图1,图1为根据本公开一示例示出的基于链路层的网络管理方法的示意性流程图。如图1所示,该流程可包括步骤101和步骤102。
步骤101,网络设备可向对端设备发送第一网络管理IP地址修改报文,该第一网络管理IP地址修改报文携带第一IP地址。
为便于描述,这里将网络设备向对端设备发送的网络管理IP地址修改报文记为第一网络管理IP地址修改报文,将网络设备从对端设备接收到的网络管理IP地址修改报文记为第二网络管理IP地址修改报文。这里将对端设备的网络管理IP地址记为第二IP地址。在本步骤101中,网络设备可根据实际需求确定需要修改对端设备的网络管理IP地址,修改后的网络管理IP地址记为第一IP地址。也就是说,网络设备在确定需要将对端设备的网络管理IP地址从第二IP地址修改为第一IP地址时,可向对端设备发送一个网络管理IP地址修改报文,向对端设备发送的网络管理IP地址修改报文携带第一IP地址。
当对端设备收到上述的第一网络管理IP地址修改报文后,可将本设备的IP地址修改为该接收到的第一网络管理IP地址修改报文所指定的第一IP地址,并向上述网络设备返回网络管理IP地址修改成功响应报文。
步骤102,网络设备在设定的监听周期内接收到对端设备针对所述第一网络管理IP地址修改报文向本设备返回的IP地址修改成功响应报文时,可确定对端设备已将IP地址从第二IP地址修改为第一IP地址。
在上面描述中,网络管理IP地址修改报文、网络管理IP地址修改成功响应报文都是为实现本公开而在链路层定义的报文,属于链路层报文。
通过图1所示流程可以看出,在本公开中,网络设备之间通过上述链路层报文可相互动态修改IP地址。
在一公开实施例中,图1所示流程之前,网络设备可进一步动态获取对端设备的IP地址,该获取的网络管理IP地址为所述第二IP地址。在另一公开实施例中,网络设备还可预先配置对端设备的IP地址即上述的第二IP地址,网络设备可基于该配置即可获取对端设备的IP地址即上述的第二IP地址。下面仅以网络设备动态获取对端设备的IP地址为例描述。
作为一个实施例,网络设备动态获取对端设备的网络管理IP地址可包括:网络设备可在网络内广播IP地址请求报文,该IP地址请求报文可携带本设备的网络管理IP地址;网络设备在设定请求周期内接收到对端设备针对该IP地址请求报文返回的IP地址响应报文时,可获取该IP地址响应报文携带的对端设备的网络管理IP地址。
在另一实施例中,网络设备还可进一步接收IP地址请求报文,并可向该接收到的IP地址请求报文的源设备返回IP地址响应报文,该IP地址响应报文携带本设备的IP地址。
在一公开实施例中,网络设备还可接收第二网络管理IP地址修改报文,并将本设备的IP地址修改为该第二网络管理IP地址修改报文指定的IP地址,并向该第二网络管理IP地址修改报文的源设备返回网络管理IP地址修改成功响应报文。
作为一个实施例,将本设备的IP地址修改为接收到的第二网络管理IP地址修改报文指定的IP地址可包括:判断该指定的IP地址是否满足本设备的IP地址修改条件,如果是,将本设备的IP地址修改为该指定的IP地址。
这里,本设备的IP地址修改条件可包括:与本设备的IP地址属于同一网段,或者本设备配置允许IP地址修改等。本发明并不具体限定。
作为一个实施例,本发明中,在将本设备的IP地址修改为接收到的第二网络管理IP地址修改报文指定的IP地址之前,网络设备还可:判断本设备的状态是否为IP地址修改状态,如果否,设置本设备的状态为IP地址修改状态;如果是,向该第二网络管理IP地址修改报文的源设备返回IP地址正在修改报文。
此外,在将本设备的IP地址修改为指定的IP地址之后,网络设备还可进一步:将本设备的状态设置为非IP地址修改状态的设置。这里,作为一个实施例,设置本设备的状态为IP地址修改状态可举例为:将本设备的状态置位第一设定值比如1。对应地,上述将本设备的状态设置为非IP地址修改状态的设置可举例为:将本设备的状态置位第二设定值比如0。
进一步地,在一公开实施例中,若在设定的监听周期内接收到对端设备针对本设备发送的第一网络管理IP地址修改报文而返回的网络管理IP地址正在修改报文时,网络设备还可从接收到该网络管理IP地址正在修改报文起等待预设时间,并在预设时间到达时再次向该对
端设备发送网络管理IP地址修改报文。
其中,上述预设时间可以包括一个以上预先设定的监听周期,也可以是网络管理人员根据实际情况预先设定的时间,这里不对该预设时间进行具体地限定。
下面基于上面描述对本发明提供的方法进行举例描述。
参见图2,图2为本公开一示例示出的基于链路层的网络管理方法的示意图。
在图2所示的实施例中,以网络中存在设备1、设备2、设备3为例对上述基于链路层的网络管理方法进行详细地说明。
在图2中,假设设备1可动态获取对端设备,如设备2、设备3的IP地址。
例如,设备1可在网络内广播IP地址请求报文。
当设备1在网络内广播该IP地址请求报文后,网络内的设备2和设备3都可收到该IP地址请求报文。
当设备2收到设备1广播的IP地址请求报文后,可解析该接收到的IP地址请求报文,获取其所携带的设备1的MAC地址,如MAC1,并可向设备1返回IP地址响应报文。
IP地址当设备3收到设备1广播的IP地址请求报文后,可解析该接收到的IP地址请求报文,获取其所携带的MAC地址,如MAC1,并可向设备1返回IP地址响应报文。
IP地址设备1可在广播IP地址请求报文之后的设定请求周期内监听IP地址响应报文,该设定的请求周期可预先配置。
当设备1在设定请求周期内监听到来自设备2的IP地址响应报文时,可解析该IP地址响应报文,并可获取该IP地址响应报文携带的设备2的IP地址。同理,当设备1在设定请求周期内监听到来自设备3的IP地址响应报文,可解析该IP地址响应报文,并可获取该IP地址响应报文携带的设备3的IP地址。
需要说明的是,当设备1在设定请求周期结束后,如果监听到来自设备2或设备3的IP地址响应报文,则可丢弃该监听到的IP地址响应报文。还需要说明的是,由于IP地址请求报文的发送和IP地址响应报文的发送是异步通信,设备1可能在设定请求周期内监听到同一个设备,比如设备2返回的多份IP地址响应报文。针对此种情况,设备1可以进行IP地址响应报文的过滤,不再赘述。
设备1获取到设备2的IP地址和设备3的IP地址之后,假设设备1发现设备2和设备3的设备类型、设备序列号不同,但IP地址相同,都为IP2。针对这种情况,设备1可确定修
改设备3的IP地址。需要说明的是,其他情况,比如基于设备3的业务规划调整需要修改设备3的IP地址、或者基于用户配置需要修改设备3的IP地址等,均可适用于本公开的技术方案。本实施例并不对触发修改设备3的IP地址的场景进行具体限定。
假如设备3修改后的IP地址为IP3。该IP3与设备1的IP地址如IP1、以及设备1获取的其他任一设备的IP地址不同。作为一个实施例,IP3所属的网段与设备1的IP地址,如IP1所属的网段相同。
设备1可向设备3发送网络管理IP地址修改报文。
设备3可接收设备1发送的网络管理IP地址修改报文,并可判断本设备的状态是否为IP地址修改状态。
设备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。
作为一个实施例,设备3在判断出网络管理IP地址修改报文携带的IP地址IP3不满足本设备3的IP地址修改条件时,可删除本设备的状态为IP地址修改状态的设置,比如将本设备的状态从IP地址修改状态更新为非IP地址修改状态,之后可返回网络管理IP地址修改失败响应报文给设备1。
设备3在判断出本设备的状态为IP地址修改状态时,可向设备1返回网络管理IP地址正在修改报文。
设备1可在设定的监听周期内监听设备3返回的报文。其中,当设备1在设定的监听周期内监听到设备3发送的网络管理IP地址修改成功响应报文时,可确定设备3已将IP地址从IP2成功修改为IP3。
当设备1在设定的监听周期内未监听到设备3针对上述网络管理IP地址修改报文向本设备返回的任何报文时,可再次执行向对端设备发送网络管理IP地址修改报文的步骤。当设备1在设定的监听周期内接收到设备3针对网络管理IP地址修改报文向本设备返回的网络管理IP地址正在修改报文时,设备1可等待一段时间,并在等待时间到达时再次执行向对端设备
发送网络管理IP地址修改报文的步骤。而当设备1在设定的监听周期内监听到设备3发送的网络管理IP地址修改失败响应报文,则重新为设备3确定一个新的IP地址,记为IP4,并按照上述操作再次向设备3发送新的网络管理IP地址修改报文,对此不再赘述。
通过上述实施例可以看出,本公开中,网络设备之间既可以通过报文交互收集彼此的MAC地址、IP地址等,也可以通过报文交互动态修改彼此的IP地址。这实现了修改网络设备的IP地址的目的,方便管理网络中的所有网络设备。
参见图3,图3为根据本公开一示例提供网络设备的硬件结构示意图。该网络设备可包括处理器301,存储有机器可读指令的机器可读存储介质302。处理器401与机器可读存储介质302可经由系统总线303通信。并且,通过读取并执行机器可读存储介质302中与网络管理控制逻辑对应的机器可执行指令,处理器301可执行上文描述的基于链路层的网络管理方法。
本文中提到的机器可读存储介质302可以是任何电子、磁性、光学或者其他物理存储装置,可以包含存储信息,如可执行指令、数据,等等。例如,机器可读存储介质可以是:RAM(Radom Access Memory,随机存取存储器)、易失存储器、非易失性存储器、闪存、存储驱动器(如硬盘驱动器)、固态硬盘、任何类型的存储盘(如光盘、DVD等),或者类似的存储介质,或者它们的组合。
参见图4,图4为根据本公开一示例提供的图3所示装置的网络管理控制逻辑的功能模块框图。从功能上划分,上述网络管理控制逻辑40,可包括:发送模块401、监听模块402。
其中,所述发送模块401,可用于向所述对端设备发送第一网络管理IP地址修改报文,所述第一网络管理IP地址修改报文携带所述第一IP地址;
上述监听模块402,可用于在设定的监听周期内监听到所述对端设备针对所述第一网络管理IP地址修改报文向所述网络设备返回的IP地址修改成功响应报文时,确定所述对端设备已将IP地址从所述第二IP地址修改为所述第一IP地址。
根据一个示例,所述网络管理控制逻辑进一步包括:第一接收模块403和修改模块404。
其中,所述第一接收模块403可用于接收第二网络管理IP地址修改报文;
所述修改模块404,可用于将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址,并向所述第二网络管理IP地址修改报文的源设备返回网络管理IP地址修改成功响应报文。
根据一个示例,所述网络管理控制逻辑进一步包括:获取模块405,可用于获取所述对端
设备的IP地址并记录为所述第二IP地址。
根据一个示例,所述获取模块405可具体用于在网络内广播IP地址请求报文,所述IP地址请求报文携带所述网络设备的IP地址,并在设定请求周期内接收到所述对端设备针对所述IP地址请求报文返回的IP地址响应报文时,根据所述IP地址响应报文获取所述IP地址响应报文携带的所述对端设备的IP地址。
根据一个示例,所述网络管理控制逻辑进一步包括:第二接收模块406,可用于接收IP地址请求报文;所述发送模块401可进一步向该IP地址请求报文的源设备返回IP地址响应报文,其中,所述IP地址响应报文携带所述网络设备的IP地址。
根据一个示例,所述修改模块404可具体用于判断所述第二网络管理IP地址修改报文指定的IP地址是否满足IP地址修改条件,所述IP地址修改条件包括:所述第二网络管理IP地址修改报文指定的IP地址与所述网络设备当前的IP地址属于同一网段;如果是,将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址。
根据一个示例,所述修改模块404,可进一步用于在将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址之前,判断所述网络设备的状态是否为IP地址修改状态;如果否,设置所述网络设备的状态为IP地址修改状态;如果是,向所述第二网络管理IP地址修改报文的源设备返回IP地址正在修改报文;在将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址之后,将所述网络设备的状态设置为非IP地址修改状态的设置。
根据一个示例,所述监听模块402,还可用于在设定的监听周期内接收到所述对端设备针对所述第一网络管理IP地址修改报文向所述网络设备返回的网络管理IP地址正在修改报文时,等待预设时间,并在所述预设时间到达时,、再次向所述对端设备发送网络管理IP地址修改报文。其中,上述预设时间可以包括一个以上上述预先设定的监听周期。
根据本公开的示例,还提供了一种包括机器可执行指令的机器可读存储介质,例如图3中的机器可读存储介质302,所述机器可执行指令可由网络设备中的处理器301执行以实现以上描述的基于链路层的网络管理方法。
所述机器可读存储介质302中与网络管理控制逻辑对应的机器可执行指令,可以促使所述处理器301执行以下操作::向所述对端设备发送第一网络管理IP地址修改报文,所述第一网络管理IP地址修改报文携带所述第一IP地址;在设定的监听周期内监听到所述对端设备针对所述第一网络管理IP地址修改报文向所述网络设备返回的IP地址修改成功响应报文
时,确定所述对端设备已将IP地址从第二IP地址修改为所述第一IP地址。
根据一个示例,所述机器可执行指令可进一步促使所述处理器:接收第二网络管理IP地址修改报文;将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址,并向所述第二网络管理IP地址修改报文的源设备返回网络管理IP地址修改成功响应报文。
根据一个示例,所述机器可执行指令进一步促使所述处理器:获取所述对端设备的IP地址并记录为所述第二IP地址。
根据一个示例,在获取所述对端设备的IP地址并记录为所述第二IP地址时,所述机器可执行指令促使所述处理器:在网络内广播IP地址请求报文,所述IP地址请求报文携带所述网络设备的IP地址;在设定请求周期内接收到对端设备针对所述IP地址请求报文返回的IP地址响应报文时,根据所述IP地址响应报文获取所述IP地址响应报文携带的对端设备的IP地址。
根据一个示例,所述机器可执行指令进一步促使所述处理器:接收IP地址请求报文;向该IP地址请求报文的源设备返回IP地址响应报文,其中,所述IP地址响应报文携带所述网络设备的IP地址。
根据一个示例,在将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址,所述机器可执行指令促使所述处理器:判断所述第二网络管理IP地址修改报文指定的IP地址是否满足IP地址修改条件,所述IP地址修改条件包括:所述第二网络管理IP地址修改报文指定的IP地址与所述网络设备当前的IP地址属于同一网段;如果是,将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址。
根据一个示例,所述机器可执行指令还促使所述处理器:在将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址之前,判断所述网络设备的状态是否为IP地址修改状态,如果否,设置所述网络设备的状态为IP地址修改状态;如果是,向所述第二网络管理IP地址修改报文的源设备返回IP地址正在修改报文;在将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址之后,将所述网络设备的状态设置为非IP地址修改状态。
根据一个示例,所述机器可执行指令进一步促使所述处理器:在设定的监听周期内接收到所述对端设备所述第一网络管理IP地址修改报文向所述网络设备返回的网络管理IP地址正在修改报文时,等待预设时间,并在所述预设时间到达时,再次向所述对端设备发送网络
管理IP地址修改报文。其中,上述预设时间可以是一个以上上述预先设定的监听周期。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上对本发明实施例所提供的方法和装置进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。
Claims (15)
- 一种基于链路层的网络管理方法,包括:网络设备向对端设备发送第一网络管理IP地址修改报文,所述第一网络管理IP地址修改报文携带第一IP地址;在设定的监听周期内监听到所述对端设备针对所述第一网络管理IP地址修改报文向所述网络设备返回的网络管理IP地址修改成功响应报文时,所述网络设备确定所述对端设备已将IP地址从第二IP地址修改为所述第一IP地址。
- 根据权利要求1所述的方法,进一步包括:所述网络设备接收第二网络管理IP地址修改报文;所述网络设备将所述网络设备的IP地址修改为所述第二IP网络管理地址修改报文指定的IP地址;所述网络设备向所述第二网络管理IP地址修改报文的源设备返回网络管理IP地址修改成功响应报文。
- 根据权利要求1所述的方法,进一步包括:所述网络设备获取所述对端设备的IP地址,并记录为所述第二IP地址。
- 根据权利要求3所述的方法,其特征在于,获取所述对端设备的IP地址包括:所述网络设备在网络内广播IP地址请求报文,所述IP地址请求报文携带所述网络设备的IP地址;在设定请求周期内接收到所述对端设备针对所述IP地址请求报文返回的IP地址响应报文时,所述网络设备根据所述IP地址响应报文获取对端设备的IP地址。
- 根据权利要求1所述的方法,进一步包括:所述网络设备接收IP地址请求报文;所述网络设备向该IP地址请求报文的源设备返回IP地址响应报文,其中,所述IP地址响应报文携带所述网络设备的IP地址。
- 根据权利要求2所述的方法,其特征在于,将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址包括:所述网络设备判断所述第二网络管理IP地址修改报文指定的IP地址是否满足IP地址修改条件,所述IP地址修改条件包括:所述第二网络管理IP地址修改报文指定的IP地址与所述网络设备当前的IP地址属于同一网段;如果是,所述网络设备将所述网络设备的IP地址修改为所述第二网络管理IP地址修改 报文指定的IP地址。
- 根据权利要求2所述的方法,还包括:在将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址之前,所述网络设备判断所述网络设备的状态是否为IP地址修改状态,如果否,所述网络设备设置所述网络设备的状态为IP地址修改状态;如果是,所述网络设备向所述第二网络管理IP地址修改报文的源设备返回IP地址正在修改报文;在将所述网络设备的IP地址修改为所述第二IP地址修改报文指定的IP地址之后,所述网络设备将所述网络设备的状态设置为非IP地址修改状态。
- 根据权利要求7所述的方法,进一步包括:在设定的监听周期内接收到所述对端设备针对所述第一网络管理IP地址修改报文向所述网络设备返回的IP地址正在修改报文时,所述网络设备等待预设时间,并在预设时间到达时,所述网络设备再次向所述对端设备发送网络管理IP地址修改报文。
- 一种网络设备,包括处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令,所述处理器被所述机器可执行指令促使:向所述对端设备发送第一网络管理IP地址修改报文,所述第一网络管理IP地址修改报文携带所述第一IP地址;在设定的监听周期内监听到所述对端设备针对所述第一网络管理IP地址修改报文向所述网络设备返回的网络管理IP地址修改成功响应报文时,确定所述对端设备已将网络管理IP地址从第二IP地址修改为所述第一IP地址。
- 根据权利要求9所述的网络设备,所述机器可执行指令进一步促使所述处理器:接收第二网络管理IP地址修改报文;将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址,并向所述第二网络管理IP地址修改报文的源设备返回网络管理IP地址修改成功响应报文。
- 根据权利要求9所述的网络设备,所述机器可执行指令进一步促使所述处理器:获取所述对端设备的IP地址并记录为所述第二IP地址。
- 根据权利要求9所述的网络设备,所述机器可执行指令进一步促使所述处理器:接收IP地址请求报文;向该IP地址请求报文的源设备返回IP地址响应报文,其中,所述IP地址响应报文携带所述网络设备的IP地址。
- 根据权利要求10所述的网络设备,其中,在将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址,所述机器可执行指令促使所述处理器:判断所述第二网络管理IP地址修改报文指定的IP地址是否满足IP地址修改条件,所述IP地址修改条件包括:所述第二网络管理IP地址修改报文指定的IP地址与所述网络设备当前的IP地址属于同一网段;如果是,将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址。
- 根据权利要求10所述的网络设备,所述机器可执行指令还促使所述处理器:在将所述网络设备的网络管理IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址之前,判断所述网络设备的状态是否为IP地址修改状态,如果否,设置所述网络设备的状态为IP地址修改状态;如果是,向所述第二网络管理IP地址修改报文的源设备返回网络管理IP地址正在修改报文;在将所述网络设备的IP地址修改为所述第二网络管理IP地址修改报文指定的IP地址之后,将所述网络设备的状态修改为非IP地址修改状态的设置。
- 一种机器可读存储介质,存储有机器可执行指令,在被处理器调用和执行时,所述机器可执行指令促使所述处理器:向所述对端设备发送第一网络管理IP地址修改报文,所述第一网络管理IP地址修改报文携带所述第一IP地址;在设定的监听周期内监听到所述对端设备针对所述第一网络管理IP地址修改报文向所述网络设备返回的网络管理IP地址修改成功响应报文时,确定所述对端设备已将网络管理IP地址从所述第二IP地址修改为所述第一IP地址。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610565901.4A CN107623752B (zh) | 2016-07-15 | 2016-07-15 | 基于链路层的网络管理方法和装置 |
CN201610565901.4 | 2016-07-15 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018010616A1 true WO2018010616A1 (zh) | 2018-01-18 |
Family
ID=60952263
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/092350 WO2018010616A1 (zh) | 2016-07-15 | 2017-07-10 | 基于链路层的网络管理 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107623752B (zh) |
WO (1) | WO2018010616A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113438166A (zh) * | 2021-06-25 | 2021-09-24 | 新华三信息安全技术有限公司 | 一种任播地址确定方法、装置、网络设备及存储介质 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109150724B (zh) * | 2018-07-02 | 2021-06-29 | 新华三信息技术有限公司 | 一种通信方法和网卡 |
CN109618021B (zh) * | 2018-12-27 | 2023-02-03 | 新华三技术有限公司 | 修改ip地址的方法和刀箱 |
CN110677479B (zh) * | 2019-09-29 | 2022-06-07 | 苏州浪潮智能科技有限公司 | 一种局域网的设备管理方法、系统及存储介质 |
CN111600970B (zh) * | 2020-04-09 | 2022-08-09 | 南瑞集团有限公司 | 一种稳控装置程序集中下载的方法及系统 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1417973A (zh) * | 2002-11-01 | 2003-05-14 | 北京佳讯飞鸿电气有限责任公司 | 通过网管设备修改网络设备ip地址的方法 |
CN101873356A (zh) * | 2010-05-10 | 2010-10-27 | 杭州海康威视系统技术有限公司 | 一种修改设备ip地址的方法及装置 |
CN102164188A (zh) * | 2011-03-31 | 2011-08-24 | 华为技术有限公司 | 网络地址的分配方法、装置和系统 |
-
2016
- 2016-07-15 CN CN201610565901.4A patent/CN107623752B/zh active Active
-
2017
- 2017-07-10 WO PCT/CN2017/092350 patent/WO2018010616A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1417973A (zh) * | 2002-11-01 | 2003-05-14 | 北京佳讯飞鸿电气有限责任公司 | 通过网管设备修改网络设备ip地址的方法 |
CN101873356A (zh) * | 2010-05-10 | 2010-10-27 | 杭州海康威视系统技术有限公司 | 一种修改设备ip地址的方法及装置 |
CN102164188A (zh) * | 2011-03-31 | 2011-08-24 | 华为技术有限公司 | 网络地址的分配方法、装置和系统 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113438166A (zh) * | 2021-06-25 | 2021-09-24 | 新华三信息安全技术有限公司 | 一种任播地址确定方法、装置、网络设备及存储介质 |
CN113438166B (zh) * | 2021-06-25 | 2022-07-22 | 新华三信息安全技术有限公司 | 一种任播地址确定方法、装置、网络设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN107623752B (zh) | 2020-09-08 |
CN107623752A (zh) | 2018-01-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018010616A1 (zh) | 基于链路层的网络管理 | |
US9716620B2 (en) | Constructing a network enabling layer-2 interconnection of data centers | |
US12255771B2 (en) | Packet processing method and device, advertisement method and device, bridge node, source apparatus, storage medium, and packet processing system | |
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 | |
US8929368B2 (en) | Control method of virtual link discovery and system for fibre channel over ethernet protocol | |
WO2016101646A1 (zh) | 以太虚拟网络的接入方法及装置 | |
WO2017054576A1 (zh) | 单播隧道建立方法、装置和系统 | |
WO2012094898A1 (zh) | 一种虚拟机迁移方法、交换机、虚拟机系统 | |
WO2015003566A1 (zh) | 组播域名系统中报文传输的方法、装置及系统 | |
CN103501486A (zh) | 一种消息推送方法及推送服务器 | |
US20200044981A1 (en) | Building and maintaining a network | |
CN102291465B (zh) | 负载均衡方法、装置和系统 | |
CN102186261A (zh) | 一种WLAN中IPv6邻居发现协议的实现方法和装置 | |
US12242750B2 (en) | Ethernet storage system, and information notification method and related apparatus thereof | |
CN111225080B (zh) | 一种网关下挂设备信息的获取方法 | |
EP2218214B1 (en) | Network location service | |
WO2016044990A1 (zh) | 网络拓扑确定方法和装置、集中式网络状态信息存储设备 | |
US9509777B2 (en) | Connection method and management server | |
US9948497B2 (en) | System for and method of automatically discovering and configuring NIDs | |
CN101635656B (zh) | 层次化有序地址分组网络中故障检测的方法、系统及设备 | |
CN111404816B (zh) | 一种跨网络发送组播报文的方法、装置、系统及存储介质 | |
WO2018045949A1 (zh) | 一种报文传输的方法、设备及网络系统 | |
WO2017101028A1 (zh) | 数据传输方法、m2m服务器、pgw、sgw及服务网络节点 | |
WO2016155204A1 (zh) | 报文的测试处理方法及装置 |
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 |