WO2014000698A1 - 基于ip层的网络拓扑识别方法和设备 - Google Patents

基于ip层的网络拓扑识别方法和设备 Download PDF

Info

Publication number
WO2014000698A1
WO2014000698A1 PCT/CN2013/078442 CN2013078442W WO2014000698A1 WO 2014000698 A1 WO2014000698 A1 WO 2014000698A1 CN 2013078442 W CN2013078442 W CN 2013078442W WO 2014000698 A1 WO2014000698 A1 WO 2014000698A1
Authority
WO
WIPO (PCT)
Prior art keywords
communication device
address
port
command
network topology
Prior art date
Application number
PCT/CN2013/078442
Other languages
English (en)
French (fr)
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 WO2014000698A1 publication Critical patent/WO2014000698A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/64Hybrid switching systems
    • H04L12/6418Hybrid transport
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies

Definitions

  • the present invention relates to network communication technologies, and in particular, to a network layer identification method and device based on an IP layer. Background technique
  • a host and multiple monitoring devices are usually included, and the management methods that can be adopted include centralized management and distributed management.
  • centralized management the entire network is generally a star structure, and the communication and management of the entire network depends on the host of the center.
  • distributed management the host and multiple monitoring devices are combined into a chain network to jointly complete network communication and management.
  • how to implement network topology identification is an urgent problem to be solved. Summary of the invention
  • Embodiments of the present invention provide a network layer topology identification method and device based on an IP layer, which are used to implement network topology identification in a distributed monitoring management system.
  • an IP layer-based network topology identification method which is applied in a chain network, and includes:
  • the first communication device acquires an IP address of the second communication device, and establishes an IP address list of each port of the first communication device corresponding to the port from which the IP address is derived; the first communication device acquires the second communication device a list of IP addresses of each port; the first communication device establishes a link synthesis based on the IP address list of each port of the first communication device and the IP address list of each port of the second communication device Information: The first communication device determines a network topology relationship and a location of the first communication device and the second communication device in the network according to the integrated information of the link.
  • an IP layer-based network topology identification device which is applied to a chain network, where the device is specifically a first communication device, and the device includes: a first establishing module, configured to acquire an IP address of the second communications device, and establish a list of IP addresses of each port of the first communications device corresponding to the port from which the IP address is obtained;
  • An obtaining module configured to acquire an IP address list of each port of the second communications device
  • a second establishing module configured to use, according to an IP address list of each port of the first communications device, and the second communications A list of IP addresses of each port of the device to establish comprehensive information about the link
  • a determining module configured to determine, according to the comprehensive information of the link, a network topology relationship and a location of the first communications device and the second communications device in the network.
  • the embodiment of the present invention obtains an IP address of another device by using a device, establishes an IP address list, and obtains an IP address list established by other devices, and lists an IP address established according to the IP address list established by the device and other devices.
  • the comprehensive information is established, and the network topology relationship and location identification are determined according to the comprehensive information, so that the network topology identification in the distributed monitoring management system can be realized.
  • FIG. 1 is a schematic diagram of networking of a chain-type network according to the present invention
  • FIG. 2 is a schematic flowchart of a method for identifying a network topology based on an IP layer according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a network topology identification method based on an IP layer according to the present invention
  • FIG. 4 is a schematic diagram of generating an IP address in the present invention
  • FIG. 5 is a schematic diagram of a three-monitoring device forming a chain type network according to the present invention
  • FIG. 6 is a schematic diagram of an IP layer-based network according to the present invention
  • FIG. 7 is a schematic structural diagram of an embodiment of an IP layer-based network topology identification device according to an embodiment of the present invention
  • FIG. 1 is a schematic diagram of networking of a chain-type network according to the present invention
  • FIG. 2 is a schematic flowchart of a method for identifying a network topology based on an IP layer according to an embodiment of
  • FIG. 8 is a schematic structural diagram of another embodiment of an IP layer-based network topology identification device according to the present invention.
  • schematic diagram FIG. 9 is a schematic structural diagram of another embodiment of an IP layer-based network topology identification device according to the present invention.
  • FIG. 10 is a schematic structural diagram of another embodiment of an IP layer-based network topology identification device according to the present invention.
  • each communication unit is connected by a cascading relationship.
  • each monitoring device has at least two Fast Ethernet (FE) ports, which are the access port and the outgoing port.
  • the IP address of the access port and the outgoing port on the device are the same and the two ports are interconnected at Layer 2.
  • the access port of the chain head unit and the take-off port of the chain tail unit are always left floating.
  • the access port of the uplink unit (such as monitoring device _1) is always connected to the access port of the downlink unit (such as monitoring device_2), and is cascaded to form a chain network.
  • the chain network can be applied to the equipment room. In this scenario, multiple monitoring devices in the equipment room form a chain network.
  • each FE After the system is started, the access ports and the outgoing ports of each FE are initialized with IP addresses on the fixed network segment (the 169.254 network segment is shown). The IP addresses obtained by different monitoring devices are different. After the IP address is initialized, each monitoring device uses the Layer 3 IP packet exchange mechanism and the port-based IP learning method to follow the network topology identification process shown in the following embodiment to determine its location in the network topology and the entire network. Identification of the network topology.
  • FIG. 2 is a schematic flowchart of an embodiment of an IP layer-based network topology identification method according to an embodiment of the present invention, including:
  • Step 21 The first communication device acquires an IP address of the second communication device, and establishes an IP address list of each port of the first communication device corresponding to the port from which the IP address is obtained.
  • the first communication device And the second communication device is a device in the chain network, the first communication device is any communication device in the chain network, and the second communication device is any communication device in the chain network different from the first communication device ;
  • Step 22 The first communication device acquires an IP address list of each port of the second communication device;
  • Step 23 The first communication device according to the IP address list of each port of the first communication device, and the second communication A list of IP addresses of each port of the device to establish comprehensive information about the link;
  • Step 24 The first communications device determines, according to the comprehensive information of the link, a network topology relationship and a location of the first communications device and the second communications device in the network.
  • the communication device is a monitoring device
  • the first monitoring device is any monitoring device in the chain network
  • the second monitoring device is any monitoring device in the chain network that is different from the first monitoring device.
  • the monitoring device is taken as an example, and optionally, the other types of communication devices in the chain network may also be used.
  • each monitoring device in the chain network After the startup of each monitoring device in the chain network, it can initialize and generate different IP addresses, and then notify other monitoring devices, so that other monitoring devices can know their own IP addresses, and at the same time, they can also learn other Monitor the IP address of the device and establish a list of IP addresses based on the learned IP address. After the IP address list is established, it can be notified to other monitoring devices, and the IP address list of other monitoring devices can be known. According to the IP address list of the device and the IP address list of other monitoring devices, the network topology relationship and the location of the network can be determined. position.
  • Step 31 After a monitoring device in a chain network is started, each monitoring device generates an IP address, and different monitoring devices generate Different IP addresses.
  • the IP address of the access port and the outgoing port of each monitoring device is the same.
  • the IP address can be generated according to the unique identification code or random number of the device.
  • the unique identifier of the device is used as an example.
  • the unique identifier of the device can be mapped to the last 16 bits of the IP address by using a hash algorithm.
  • the unique identification codes of different devices are mapped to the last 16 bits of different IP addresses.
  • the network bits in the class B IP address are the first 16 bits
  • the host bits are the last 16 bits.
  • the network bits are the same, assuming 169.254, the host bit can be: The 16-bit data obtained by the hash algorithm.
  • the host bit of the above IP address may also be generated according to the random number.
  • Step 32 The monitoring device broadcasts a first command to the other monitoring device, where the first command is used to instruct other monitoring devices to return an IP address corresponding to the other monitoring device. At the same time, each monitoring device also receives the first command broadcast from other monitoring devices.
  • Step 33 The monitoring device receives a response corresponding to the first command sent by the other monitoring device, where the response includes an IP address of the other monitoring device. At the same time, after receiving the first command sent by other monitoring devices, each monitoring device also carries its own IP address in the response and sends it to other monitoring devices.
  • Step 34 The monitoring device establishes a list of IP addresses of each port according to the IP address included in the received response. For example, referring to FIG.
  • the IP addresses generated by the three monitoring devices are IP1, IP2, and IP3, respectively.
  • the monitoring device corresponding to IP2 it receives IP1 from the left port and IP3 from the right port. Therefore, the IP address list of the left port is IP1 and the IP address list of the right port is IP3.
  • the list of IP addresses that can be created for the port is empty (NULL).
  • the monitoring device sends a second command to the other monitoring device, where the second command is used to instruct other monitoring devices to return a list of IP addresses of each port established by the other monitoring device. At the same time, the monitoring device also receives a second command from other monitoring devices.
  • Step 36 The establishing device receives a response corresponding to the second command sent by the other monitoring device, where the response includes a list of IP addresses of each port of the other monitoring device.
  • the device can send the second command to obtain the IP address list of the other monitoring device.
  • the monitoring device corresponding to IP1 can send the second command to the monitoring device corresponding to IP2 with the IP2 as the destination address, and send the second command to the monitoring device corresponding to IP3 with the IP3 as the destination address.
  • the monitoring device corresponding to IP2 sends the IP address list (IP1 on the left port and IP2 on the right port) to the monitoring device corresponding to IP1.
  • Step 37 The monitoring device establishes comprehensive information of the link according to its own IP address list and the obtained IP address list of other monitoring devices. Still taking the structure shown in FIG. 5 as an example, the comprehensive information that each monitoring device can establish can be As shown in Table 1: Table 1
  • Step 38 The monitoring device determines the network topology relationship and the location of the network in the network according to the comprehensive information, and completes the network topology relationship identification. For example, if the IP address list of the left port of IP1 is empty, it can be determined that the device corresponding to IP1 is the link; the IP address list of the left port of IP2 is only IP1, which can be determined as the device of the next level connected to IP1; the IP address of the left port of IP3 The list contains IP1 and IP2, and the right port is empty and can be determined as a chain tail.
  • FIG. 3 only shows the execution flow of one monitoring device, and other monitoring devices can refer to the execution.
  • the review and maintenance can also be performed.
  • the method includes the following steps: Step 61: Determine a network topology relationship. For details, see steps 31 ⁇ 38.
  • the heartbeat packet of the chain monitoring unit is monitored by the chain tail.
  • the unit sends. For example, under the structure shown in Figure 5, if the monitoring device corresponding to IP2 can be received periodically If the monitoring device of the IP1 corresponds to the IP1 heartbeat packet, the monitoring device corresponding to the IP2 can determine that the network topology of the upper level does not change. Otherwise, if the monitoring device corresponding to the IP2 does not receive the received time according to the set time.
  • the heartbeat packet of the monitoring device corresponding to IP1 the monitoring device corresponding to IP2 can determine the change of the network topology, and then restart the process of identifying the network topology, that is, repeat steps 31-38 above.
  • Method 2 Review mechanism.
  • each monitoring device After the network topology identification is completed, each monitoring device periodically broadcasts the network topology relationship learned by itself on the link. Other monitoring units receive the broadcast and check with the self. If the verification error occurs, the network topology identification process is restarted.
  • Mode 3 The packet verification mechanism monitors the source IP address of the exchange packet. The receiving port always checks whether the IP address contained in the interaction packet is received after receiving the exchange packet. The IP address corresponding to the saved receiving port is the same to detect an abnormality such as a topology connection error.
  • the monitoring device sent by the IP1 corresponding to the monitoring device corresponding to IP2 includes IP1, and the interaction packet enters the monitoring device corresponding to IP2 from the left port, and the monitoring device corresponding to IP2 compares the IP1 and the left port.
  • FIG. 7 is a schematic structural diagram of an embodiment of an IP layer-based network topology identification device, which is applied to a chain network, where the device is specifically a first communication device, and the device includes a first establishing module 71, an obtaining module 72, a second establishing module 73 and a determining module 74.
  • the first establishing module 71 is configured to obtain an IP address of the second communications device, and establish an IP address of each port of the first communications device corresponding to the port from which the IP address is derived.
  • the obtaining module 72 is configured to obtain an IP address list of each port of the second communications device, and the second establishing module 73 is configured to use, according to the IP address list of each port of the first communications device, a list of IP addresses of each port of the second communication device, establishing comprehensive information of the link;
  • the determining module 74 is configured to determine a network topology relationship and the first communication device and the second communication according to the comprehensive information of the link The location of the device in the network.
  • the establishing module is specifically configured to: send a first command to the second communications device, and receive a response corresponding to the first command, where the response corresponding to the first command includes the second communications device
  • the IP address of the second communication device is generated by the second communication device after startup.
  • the acquiring module is specifically configured to: send a second command to the second communications device, and receive a response corresponding to the second command, where the response corresponding to the second command includes the second communications device
  • a list of IP addresses of each port, the IP address list of each port of the second communication device is established by the second communication device according to the acquired IP address.
  • the device may further include: a generating module 81, configured to generate an IP address of the first communications device after starting, and after receiving the first command broadcast by the second communications device, The IP address of the first communication device is carried in the response corresponding to the first command and sent to the second communication device.
  • a generating module 81 configured to generate an IP address of the first communications device after starting, and after receiving the first command broadcast by the second communications device, The IP address of the first communication device is carried in the response corresponding to the first command and sent to the second communication device.
  • the generating module is specifically configured to: generate an IP address according to the unique identifier code or a random number of the device, and generate different IP addresses by different communication devices.
  • the device may further include: a sending module 91, configured to: after receiving the second command of the second communications device, send the IP address list in a response of the second command Giving the second communication device.
  • the device may further include: an update module 101, configured to: restart the network topology identification if the heartbeat message of the upper-level communication device is not received within the set time Or the network topology relationship determined by the second communication device is compared with the network topology relationship determined by the second communication device.
  • the network topology identification process is restarted; or the interaction message of the second communication device is received, and the interaction message is received.
  • Contains the source IP address such as The source IP address is inconsistent with the IP address corresponding to the port from which the interaction packet is received in the network topology relationship determined by the first communication device, and the network topology identification process is restarted.
  • a device obtains an IP address of another device and establishes an IP address list, and obtains a list of IP addresses established by other devices, and establishes comprehensive information according to the IP address list established by itself and the IP address list established by other devices, and according to the comprehensive The information determines the network topology relationship and location identification, which can realize the identification of the network topology in the distributed monitoring management system.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the above method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

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

Abstract

本发明实施例提供了一种基于IP层的网络拓扑识别方法和设备。该方法应用在链型网络中,该方法包括第一通信设备获取第二通信设备的IP地址,并对应所述IP地址来自的端口,建立所述第一通信设备的每个端口的IP地址列表;获取所述第二通信设备的每个端口的IP地址列表;根据所述第一通信设备的每个端口的IP地址列表,以及所述第二通信设备的每个端口的IP地址列表,建立链路的综合信息;根据所述链路的综合信息,确定网络拓扑关系和所述第一通信设备和所述第二通信设备在网络中的位置。本发明实施例可以完成对分布式监控管理系统的网络拓扑识别。

Description

基于 IP层的网络拓扑识别方法和设备 技术领域
本发明涉及网络通信技术, 尤其涉及一种基于 IP 层的网络拓扑识别 方法和设备。 背景技术
在当前的监控管理系统中, 通常包括一个主机和多个监控设备, 可以 采用的管理方式包括集中式管理和分布式管理。 集中式管理中, 整个网络 一般为星型结构, 整个网络的通信和管理依赖于中心的主机。 分布式管理 中, 主机与多个监控设备组合成链型网络, 共同完成网络的通信和管理。 在目前的分布式管理系统中, 如何实现网络拓扑识别是亟待解决的问题。 发明内容
本发明实施例是提供一种基于 IP层的网络拓扑识别方法和设备, 用 以实现分布式监控管理系统中网络拓扑的识别。
一方面, 提供了一种基于 IP层的网络拓扑识别方法, 应用在链型网 络中, 包括:
第一通信设备获取第二通信设备的 IP地址, 并对应所述 IP地址来自 的端口, 建立所述第一通信设备的每个端口的 IP地址列表; 第一通信设备获取所述第二通信设备的每个端口的 IP地址列表; 第一通信设备根据所述第一通信设备的每个端口的 IP地址列表, 以 及所述第二通信设备的每个端口的 IP地址列表, 建立链路的综合信息; 第一通信设备根据所述链路的综合信息, 确定网络拓扑关系和所述第 一通信设备和所述第二通信设备在网络中的位置。 另一方面, 提供了一种基于 IP层的网络拓扑识别设备, 应用在链型 网络中, 所述设备具体为第一通信设备, 所述设备包括: 第一建立模块, 用于获取第二通信设备的 IP地址, 并对应所述 IP地 址来自的端口, 建立所述第一通信设备的每个端口的 IP地址列表;
获取模块, 用于获取所述第二通信设备的每个端口的 IP地址列表; 第二建立模块, 用于根据所述第一通信设备的每个端口的 IP地址列 表, 以及所述第二通信设备的每个端口的 IP地址列表, 建立链路的综合 信息;
确定模块, 用于根据所述链路的综合信息, 确定网络拓扑关系和所述 第一通信设备和所述第二通信设备在网络中的位置。 由上述技术方案可知, 本发明实施例通过一设备获取其它设备的 IP 地址并建立 IP地址列表, 以及获取其它设备建立的 IP地址列表, 根据自 身建立的 IP地址列表和其它设备建立的 IP地址列表建立综合信息, 并根 据综合信息确定网络拓扑关系和位置的识别, 可以实现分布式监控管理系 统中网络拓扑的识别。 附图说明 为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述 中所需要使用的附图作一简单地介绍, 显而易见地, 下面描述中的附图是 本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳 动性的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明中链型网络的一种组网示意图; 图 2为本发明基于 IP层的网络拓扑识别方法一实施例的流程示意图; 图 3为本发明基于 IP层的网络拓扑识别方法另一实施例的流程示意图; 图 4为本发明中生成 IP地址的一种示意图; 图 5为本发明中三个监控设备组成链型网络的一种示意图; 图 6为本发明基于 IP层的网络拓扑识别方法另一实施例的流程示意图; 图 7为本发明基于 IP层的网络拓扑识别设备一实施例的结构示意图; 图 8为本发明基于 IP层的网络拓扑识别设备另一实施例的结构示意图; 图 9为本发明基于 IP层的网络拓扑识别设备另一实施例的结构示意图; 图 10为本发明基于 IP层的网络拓扑识别设备另一实施例的结构示意图。 具体实施方式
本发明实施例主要是针对链型网络, 在链型网络中各通信单元采用级 联关系连接。 以级联的通信单元为监控设备为例, 参见图 1, 每个监控设 备都存在至少 2个的快速以太网 (Fast Ethernet, FE) 端口, 分别为接入 端口和接出端口, 每个监控设备上的接入端口和接出端口的 IP地址相同 且两个端口之间为 2层互通。链首单元的接入端口和链尾单元的接出端口 总是悬空。 上行单元 (如监控设备 _1 ) 的接出端口总是连接下行单元 (如 监控设备_2) 的接入端口, 依次级联组成链型网络。 该链型网络可以应用 在机房场景下, 该场景下, 机房中的多个监控设备组成链型网络。
系统启动后, 每个 FE的接入端口和接出端口在固定网段 (图例为 169.254网段)初始化 IP地址, 不同的监控设备初始化得到的 IP地址互不 相同。 初始化 IP地址后, 每个监控设备通过 3层的 IP报文交互机制和基 于端口的 IP学习方法, 遵从下述实施例所示的网络拓扑识别流程, 确定 自身在网络拓扑中的位置和对整个网络拓扑的识别。
图 2为本发明基于 IP层的网络拓扑识别方法一实施例的流程示意图, 包括:
步骤 21 : 第一通信设备获取第二通信设备的 IP地址, 并对应所述 IP 地址来自的端口, 建立所述第一通信设备的每个端口的 IP地址列表; 其中, 所述第一通信设备和第二通信设备为链型网络中的设备, 第一 通信设备为该链型网络中任一通信设备, 第二通信设备是该链型网络中与 该第一通信设备不同的任一通信设备;
步骤 22:第一通信设备获取第二通信设备的每个端口的 IP地址列表; 步骤 23 : 第一通信设备根据所述第一通信设备的每个端口的 IP地址 列表, 以及所述第二通信设备的每个端口的 IP地址列表, 建立链路的综 合信息; 步骤 24: 第一通信设备根据所述链路的综合信息, 确定网络拓扑关系 和所述第一通信设备和所述第二通信设备在网络中的位置。 其中, 以通信设备为监控设备为例, 第一监控设备为链型网络中的任 意一个监控设备, 第二监控设备为该链型网络中与第一监控设备不同的任 意一个监控设备。 本发明实施例以监控设备为例, 可选的, 也可以为链型网络中的其余 类型的通信设备。 链型网络中的每个监控设备在启动后,可以初始化生成互不相同的 IP 地址, 之后通知给其它的监控设备, 使得其它的监控设备可以获知自身的 IP地址, 同时, 自身也可以获知其它监控设备的 IP地址, 根据获知的 IP 地址建立 IP地址列表。 在建立 IP地址列表后可以再通知给其它的监控设 备, 并获知其它监控设备的 IP地址列表, 根据自身的 IP地址列表和其它 监控设备的 IP地址列表就可以确定网络拓扑关系和自身所处的位置。
图 3为本发明基于 IP层的网络拓扑识别方法另一实施例的流程示意 图, 包括: 步骤 31 : 链型网络中的监控设备启动后, 每个监控设备生成一个 IP 地址, 不同的监控设备生成不同的 IP地址。 其中, 每个监控设备的接入端口和接出端口的 IP地址相同, IP地址 可以根据设备唯一标识码或者随机数生成。
参见图 4, 以设备唯一标识码为例, 可以采用哈希算法等将设备唯一 标识码映射为 IP地址的后 16位, 不同的设备唯一标识码映射为不同的 IP 地址的后 16位。 以要生成 B类 IP地址为例, B类 IP地址中网络位为前 16位, 主机位为后 16位, 其中网络位是相同的, 假设为 169.254, 主机位 可以是: 根据上述设备唯一识别码通过哈希算法得到的 16比特的数据。 可选的, 如果没有或者获取不到设备唯一标识码, 也可以根据随机数 生成上述的 IP地址的主机位。
步骤 32: —监控设备向其它监控设备广播第一命令, 该第一命令用于 指示其它监控设备返回其它监控设备对应的 IP地址。 同时, 每个监控设备也会收到来自其它监控设备广播的第一命令。 步骤 33 : 该监控设备接收其它监控设备发送的与第一命令对应的响 应, 该响应中包含其它监控设备的 IP地址。 同时, 每个监控设备在收到其它监控设备发送的第一命令后, 也会将 自身的 IP地址携带在响应中发送给其它的监控设备。 步骤 34: 该监控设备根据接收的响应中包含的 IP地址, 建立每个端 口的 IP地址列表。 例如, 参见图 5, 以三个监控设备组成链型网络为例, 三个监控设备 生成的 IP地址分别为 IP1、 IP2和 IP3。 对于 IP2对应的监控设备, 其会从 左端口接收到 IP1 , 从右端口接收到 IP3 , 因此, 建立的左端口的 IP地址 列表为 IP1 , 右端口的 IP地址列表为 IP3。 另外, 如果某个端口是悬空的, 如 IP1的左端口, 可以对应该端口建 立的 IP地址列表为空 (NULL) 。 步骤 35 : 该监控设备向其它监控设备发送第二命令, 该第二命令用于 指示其它监控设备返回其它监控设备建立的每个端口的 IP地址列表。 同时, 该监控设备也会收到来自其它监控设备的第二命令。 步骤 36: 该建立设备接收其它监控设备发送的与第二命令对应的响 应, 该响应中包含其它监控设备的每个端口的 IP地址列表。 其中, 对于某个监控设备, 当获取到其它监控设备的 IP地址后, 可 以将获取的 IP地址作为目的 IP地址发送上述的第二命令, 以获取其它监 控设备的 IP地址列表。 例如, IP1对应的监控设备, 在右端口获取 IP2、 IP3后, 可以分别以 IP2为目的地址向 IP2对应的监控设备发送第二命令, 以及以 IP3为目的地址向 IP3对应的监控设备发送第二命令, IP2对应的 监控设备收到第二命令后, 将自身建立的 IP地址列表 (左端口为 IP1 , 右 端口为 IP2) 携带在第二命令对应的响应中发送给 IP1对应的监控设备。 步骤 37: 该监控设备根据自身的 IP地址列表以及获取的其它监控设 备的 IP地址列表, 建立链路的综合信息。 依然以图 5所示的结构为例, 每个监控设备可以建立的综合信息可以 如表 1所示: 表 1
Figure imgf000007_0001
步骤 38:监控设备根据综合信息确定网络拓扑关系以及自身在网络中 的位置, 完成网络拓扑关系识别。 例如, IP1的左端口 IP地址列表为空, 则可以确定 IP1对应的设备为 链首; IP2的左端口 IP地址列表只有 IP1 , 可以确定为连接 IP1的下一级 设备; IP3的左端口 IP地址列表包含 IP1和 IP2, 且右端口为空, 可以确 定为链尾。
可以理解的是, 图 3只示出了一个监控设备的执行流程, 其它监控设 备可以参照执行。 进一步的, 当确定网络拓扑关系后, 还可以进行复核和维护。 参见图 6, 包括: 步骤 61 : 确定出网络拓扑关系。 具体内容可以参见步骤 31~38。 步骤 62: 进行网络拓扑关系的维护和更新。 之后, 可以重复执行步骤 61及其后续步骤。 其中, 可以采用下述的方式进行维护和更新: 方式一: 心跳机制。 网络拓扑识别完成后, 通过循环心跳定时检测网络拓扑是否有变化, 即每个监控设备总能定时收到上一级监控设备的心跳报文, 链首监控单元 的心跳报文由链尾的监控单元发送。 例如, 在图 5所示的结构下, 如果 IP2对应的监控设备可以定时收到 IPl对应的监控设备的包含 IPl的心跳报文, 那么 IP2对应的监控设备就 可以确定其上一级的网络拓扑未发生变化; 反之, 如果 IP2对应的监控设 备没有按照设定的时间收到来自 IP1对应的监控设备的心跳报文,那么 IP2 对应的监控设备可以确定出网络拓扑发生变化, 之后可以重启识别网络拓 扑的流程, 也就是重复执行上述的步骤 31~38。 方式二: 复核机制。 网络拓扑识别完成后, 每个监控设备定时在链路上广播自身学习到的 网络拓扑关系, 其它监控单元收到此广播后与自身校验, 校验错误则重启 网络拓扑识别流程。 方式三: 报文校验机制 监控设备之间的交互报文中均带有此交互报文的源 IP地址, 接收端 口收到交互报文后总是检测此交互报文中包含的 IP地址是否与保存的该 接收端口对应的 IP地址一致, 以检测拓扑连线错误等异常。 例如, IP1对应的监控设备向 IP2对应的监控设备发送的交互报文中 包含 IP1 , 并且该交互报文会从左端口进入 IP2对应的监控设备, 那么 IP2 对应的监控设备将比较 IP1与左端口 IP 地址列表, 如果 IP1属于该左端 口 IP地址列表, 如参见表 1, 左端口 IP地址列表中保存的也是 IP1 , 那么 表明拓扑连续正确, 反之, 如果两者不一致, 则重启网络拓扑识别流程。 本实施例通过更新可以更好适应网络变化, 提高网络拓扑识别准确 性。 图 7为本发明基于 IP层的网络拓扑识别设备一实施例的结构示意图, 应用在链型网络中, 所述设备具体为第一通信设备, 该设备包括第一建立 模块 71、 获取模块 72、 第二建立模块 73和确定模块 74; 第一建立模块 71用于获取第二通信设备的 IP地址, 并对应所述 IP地址来自的端口, 建 立所述第一通信设备的每个端口的 IP地址列表; 获取模块 72用于获取所 述第二通信设备的每个端口的 IP地址列表; 第二建立模块 73用于根据所 述第一通信设备的每个端口的 IP地址列表, 以及所述第二通信设备的每 个端口的 IP地址列表, 建立链路的综合信息; 确定模块 74用于根据所述 链路的综合信息, 确定网络拓扑关系和所述第一通信设备和所述第二通信 设备在网络中的位置。 可选的, 所述建立模块具体用于: 向第二通信设备发送第一命令, 并接收与所述第一命令对应的响应, 所述第一命令对应的响应中包含所述第二通信设备的 IP地址, 所述第二 通信设备的 IP地址是所述第二通信设备在启动后生成的。 可选的, 所述获取模块具体用于: 向第二通信设备发送第二命令, 并接收与所述第二命令对应的响应, 所述第二命令对应的响应中包含所述第二通信设备的每个端口的 IP地址 列表, 所述第二通信设备的每个端口的 IP地址列表是所述第二通信设备 根据获取的 IP地址建立的。 可选的, 参见图 8, 该设备还可以包括: 生成模块 81, 用于在启动后生成第一通信设备的 IP地址, 并在接收 到第二通信设备广播的第一命令后, 将所述第一通信设备的 IP地址携带 在所述第一命令对应的响应中发送给所述第二通信设备。
可选的, 所述生成模块具体用于: 根据设备唯一标识码或者随机数, 生成 IP地址, 不同的通信设备生 成不同的 IP地址。 可选的, 参见图 9, 该设备还可以包括: 发送模块 91, 用于在接收到第二通信设备的第二命令后, 将所述 IP 地址列表携带在所述第二命令的响应中发送给所述第二通信设备。 可选的, 参见图 10, 该设备还可以包括: 更新模块 101, 所述更新模块 101用于: 如果未在设定的时间内接收到上一级通信设备的心跳报文, 重启网络 拓扑识别流程; 或者, 比较自身确定的网络拓扑关系与第二通信设备确定的网络拓扑关系, 如果两者不同, 重启网络拓扑识别流程; 或者, 接收第二通信设备的交互报文, 所述交互报文中包含源 IP地址, 如 果所述源 IP地址与第一通信设备确定的网络拓扑关系中所述交互报文来 自的端口对应的 IP地址不一致, 重启网络拓扑识别流程。 本实施例通过一设备获取其它设备的 IP地址并建立 IP地址列表, 以 及获取其它设备建立的 IP地址列表, 根据自身建立的 IP地址列表和其它 设备建立的 IP地址列表建立综合信息, 并根据综合信息确定网络拓扑关 系和位置的识别, 可以实现分布式监控管理系统中网络拓扑的识别。
本领域普通技术人员可以理解: 实现上述各方法实施例的全部或部分 步骤可以通过程序指令相关的硬件来完成。 前述的程序可以存储于一计算 机可读取存储介质中。 该程序在执行时, 执行包括上述各方法实施例的步 骤; 而前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存 储程序代码的介质。 最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非 对其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的 普通技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进 行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或 者替换, 并不使相应技术方案的本质脱离本发明各实施例技术方案的范 围。

Claims

权 利 要 求 书
1、 一种基于 IP层的网络拓扑识别方法, 应用在链型网络中, 其特征 在于, 包括:
第一通信设备获取第二通信设备的 IP地址, 并对应所述 IP地址来自 的端口, 建立所述第一通信设备的每个端口的 IP地址列表; 第一通信设备获取所述第二通信设备的每个端口的 IP地址列表; 第一通信设备根据所述第一通信设备的每个端口的 IP地址列表, 以 及所述第二通信设备的每个端口的 IP地址列表, 建立链路的综合信息; 第一通信设备根据所述链路的综合信息, 确定网络拓扑关系和所述第 一通信设备和所述第二通信设备在网络中的位置。
2、 根据权利要求 1所述的方法, 其特征在于, 所述第一通信设备获 取第二通信设备的 IP地址, 包括: 第一通信设备向第二通信设备发送第一命令, 并接收与所述第一命令 对应的响应, 所述第一命令对应的响应中包含所述第二通信设备的 IP地 址, 所述第二通信设备的 IP地址是所述第二通信设备在启动后生成的。
3、 根据权利要求 1所述的方法, 其特征在于, 所述第一通信设备获 取所述第二通信设备的每个端口的 IP地址列表, 包括: 第一通信设备向第二通信设备发送第二命令, 并接收与所述第二命令 对应的响应, 所述第二命令对应的响应中包含所述第二通信设备的每个端 口的 IP地址列表, 所述第二通信设备的每个端口的 IP地址列表是所述第 二通信设备根据获取的 IP地址建立的。
4、 根据权利要求 1所述的方法, 其特征在于, 还包括: 第一通信设备在启动后生成第一通信设备的 IP地址, 并在接收到第 二通信设备广播的第一命令后, 将所述第一通信设备的 IP地址携带在所 述第一命令对应的响应中发送给所述第二通信设备。
5、 根据权利要求 1所述的方法, 其特征在于, 还包括: 在接收到第二通信设备的第二命令后, 将所述 IP地址列表携带在所 述第二命令的响应中发送给所述第二通信设备。
6根据权利要求 1-5任一项所述的方法, 其特征在于, 还包括: 第一通信设备如果未在设定的时间内接收到上一级通信设备的心跳 报文, 重启网络拓扑识别流程; 或者, 第一通信设备比较自身确定的网络拓扑关系与第二通信设备确定的 网络拓扑关系, 如果两者不同, 重启网络拓扑识别流程; 或者,
第一通信设备接收第二通信设备的交互报文, 所述交互报文中包含源 IP地址, 如果所述源 IP地址与第一通信设备确定的网络拓扑关系中所述 交互报文来自的端口对应的 IP地址不一致, 重启网络拓扑识别流程。
7、根据权利要求 2或 4所述的方法, 其特征在于, 所述生成 IP地址, 包括: 根据设备唯一标识码或者随机数, 生成 IP地址, 不同的通信设备生 成不同的 IP地址。
8、 一种基于 IP层的网络拓扑识别设备, 应用在链型网络中, 其特征 在于, 所述设备具体为第一通信设备, 所述设备包括: 第一建立模块, 用于获取第二通信设备的 IP地址, 并对应所述 IP地 址来自的端口, 建立所述第一通信设备的每个端口的 IP地址列表; 获取模块, 用于获取所述第二通信设备的每个端口的 IP地址列表; 第二建立模块, 用于根据所述第一通信设备的每个端口的 IP地址列 表, 以及所述第二通信设备的每个端口的 IP地址列表, 建立链路的综合 信息; 确定模块, 用于根据所述链路的综合信息, 确定网络拓扑关系和所述 第一通信设备和所述第二通信设备在网络中的位置。
9、 根据权利要求 8所述的设备, 其特征在于, 所述第一建立模块具 体用于: 向第二通信设备发送第一命令, 并接收与所述第一命令对应的响应, 所述第一命令对应的响应中包含所述第二通信设备的 IP地址, 所述第二 通信设备的 IP地址是所述第二通信设备在启动后生成的。
10、 根据权利要求 8所述的设备, 其特征在于, 所述获取模块具体用 于:
向第二通信设备发送第二命令, 并接收与所述第二命令对应的响应, 所述第二命令对应的响应中包含所述第二通信设备的每个端口的 IP地址 列表, 所述第二通信设备的每个端口的 IP地址列表是所述第二通信设备 根据获取的 IP地址建立的。
11、 根据权利要求 8所述的设备, 其特征在于, 还包括: 生成模块, 用于在启动后生成第一通信设备的 IP地址, 并在接收到 第二通信设备广播的第一命令后, 将所述第一通信设备的 IP地址携带在 所述第一命令对应的响应中发送给所述第二通信设备。
12、 根据权利要求 8所述的设备, 其特征在于, 还包括: 发送模块, 用于在接收到第二通信设备的第二命令后, 将所述 IP地 址列表携带在所述第二命令的响应中发送给所述第二通信设备。
13、根据权利要求 8-12任一项所述的设备, 其特征在于, 还包括更新 模块, 所述更新模块用于:
如果未在设定的时间内接收到上一级通信设备的心跳报文, 重启网络 拓扑识别流程; 或者, 比较自身确定的网络拓扑关系与第二通信设备确定的网络拓扑关系, 如果两者不同, 重启网络拓扑识别流程; 或者, 接收第二通信设备的交互报文, 所述交互报文中包含源 IP地址, 如 果所述源 IP地址与第一通信设备确定的网络拓扑关系中所述交互报文来 自的端口对应的 IP地址不一致, 重启网络拓扑识别流程。
14、 根据权利要求 11所述的设备, 其特征在于, 所述生成模块具体 用于: 根据设备唯一标识码或者随机数, 生成 IP地址, 不同的通信设备生 成不同的 IP地址。
PCT/CN2013/078442 2012-06-30 2013-06-28 基于ip层的网络拓扑识别方法和设备 WO2014000698A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210223056.4A CN103516824B (zh) 2012-06-30 2012-06-30 基于ip层的网络拓扑识别方法和设备
CN201210223056.4 2012-06-30

Publications (1)

Publication Number Publication Date
WO2014000698A1 true WO2014000698A1 (zh) 2014-01-03

Family

ID=49782279

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/078442 WO2014000698A1 (zh) 2012-06-30 2013-06-28 基于ip层的网络拓扑识别方法和设备

Country Status (2)

Country Link
CN (1) CN103516824B (zh)
WO (1) WO2014000698A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131477A (zh) * 2019-12-28 2020-05-08 杭州和利时自动化有限公司 一种数据处理方法、装置及设备
CN111966595A (zh) * 2020-08-13 2020-11-20 安徽芯纪元科技有限公司 一种软件调试系统内芯片定位方法及调试报文传输方法
CN113468700A (zh) * 2021-07-08 2021-10-01 安天科技集团股份有限公司 拓扑信息识别方法、装置、计算设备及存储介质

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468290B (zh) * 2014-10-24 2018-07-10 深圳市远望谷信息技术股份有限公司 一种链型通信网络的组网方法及装置
CN106817435A (zh) * 2015-12-02 2017-06-09 国网智能电网研究院 一种基于自协商ip地址的通信设计方法
CN107786373B (zh) * 2017-10-13 2021-08-31 广东电网有限责任公司广州供电局 生成服务器拓扑关系的方法、装置、存储介质及计算机设备
CN112311574B (zh) * 2019-07-30 2023-05-09 中国移动通信有限公司研究院 网络拓扑连线的检查方法、装置及设备
CN112714010B (zh) * 2020-12-07 2023-09-05 大连市共进科技有限公司 一种网络拓扑管理方法、装置、拓展单元及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1885811A (zh) * 2005-06-22 2006-12-27 中国长城计算机深圳股份有限公司 一种快速生成网络设备树状拓扑结构的方法
CN101374086A (zh) * 2007-08-23 2009-02-25 大唐移动通信设备有限公司 分布式通信系统中远端设备的接入方法及设备
CN102064992A (zh) * 2009-11-13 2011-05-18 中兴通讯股份有限公司 一种中继节点、中继节点的分布式网络及其组网方法
CN102104588A (zh) * 2009-12-18 2011-06-22 国基电子(上海)有限公司 多媒体终端适配器及其远程连接的方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1885811A (zh) * 2005-06-22 2006-12-27 中国长城计算机深圳股份有限公司 一种快速生成网络设备树状拓扑结构的方法
CN101374086A (zh) * 2007-08-23 2009-02-25 大唐移动通信设备有限公司 分布式通信系统中远端设备的接入方法及设备
CN102064992A (zh) * 2009-11-13 2011-05-18 中兴通讯股份有限公司 一种中继节点、中继节点的分布式网络及其组网方法
CN102104588A (zh) * 2009-12-18 2011-06-22 国基电子(上海)有限公司 多媒体终端适配器及其远程连接的方法

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131477A (zh) * 2019-12-28 2020-05-08 杭州和利时自动化有限公司 一种数据处理方法、装置及设备
CN111131477B (zh) * 2019-12-28 2022-01-11 杭州和利时自动化有限公司 一种数据处理方法、装置及设备
CN111966595A (zh) * 2020-08-13 2020-11-20 安徽芯纪元科技有限公司 一种软件调试系统内芯片定位方法及调试报文传输方法
CN111966595B (zh) * 2020-08-13 2024-04-05 安徽芯纪元科技有限公司 一种软件调试系统内芯片定位方法及调试报文传输方法
CN113468700A (zh) * 2021-07-08 2021-10-01 安天科技集团股份有限公司 拓扑信息识别方法、装置、计算设备及存储介质

Also Published As

Publication number Publication date
CN103516824B (zh) 2016-12-28
CN103516824A (zh) 2014-01-15

Similar Documents

Publication Publication Date Title
WO2014000698A1 (zh) 基于ip层的网络拓扑识别方法和设备
CN110050448B (zh) 管理多播业务的系统和方法
CN100558051C (zh) 对双向转发链路进行故障检测的方法
CN107612776B (zh) 一种通信连接检测方法及装置
US10326613B2 (en) Method and system for processing spanning tree protocol (STP) state in a multichassis link aggregation (MLAG) domain
JP6633775B2 (ja) パケット伝送
CN104104570A (zh) Irf系统中的聚合处理方法及装置
CN102209064B (zh) 使用vrrp为接入设备提供备份的方法和vrrp网关设备
CN1826769A (zh) 虚拟网络设备
CN108259635B (zh) 一种arp表项学习方法和dr设备
CN103581062A (zh) 用于处理未知单播数据包的方法和系统
WO2017000832A1 (zh) Mac地址的同步方法、装置及系统
Chen et al. DAC: Generic and automatic address configuration for data center networks
WO2015143810A1 (zh) 节点故障检测方法及装置
WO2018059354A1 (zh) 一种处理节点注册通知的方法和系统
WO2015043517A1 (en) Dynamic link aggregation
CN107968751A (zh) 一种信息处理方法及装置
CN105763439B (zh) 一种多链接透明互联网络中数据中心的互联方法及装置
CN1829191A (zh) 实现等价转发类双向转发检测的方法
WO2020010906A1 (zh) 操作系统os批量安装方法、装置和网络设备
WO2013083013A1 (zh) 一种网络设备间的同步方法、网络设备及系统
KR102547701B1 (ko) 네트워크 토폴로지 발견 방법, 디바이스, 및 시스템
US9893979B2 (en) Network topology discovery by resolving loops
WO2016015606A1 (zh) 一种用于定位端口连接错误的方法和相关设备
WO2014029287A1 (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: 13810164

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: 13810164

Country of ref document: EP

Kind code of ref document: A1