Movatterモバイル変換


[0]ホーム

URL:


CN110661903B - Cloud platform route management method and device - Google Patents

Cloud platform route management method and device
Download PDF

Info

Publication number
CN110661903B
CN110661903BCN201910970001.1ACN201910970001ACN110661903BCN 110661903 BCN110661903 BCN 110661903BCN 201910970001 ACN201910970001 ACN 201910970001ACN 110661903 BCN110661903 BCN 110661903B
Authority
CN
China
Prior art keywords
address
routing table
lease
cloud platform
mac address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910970001.1A
Other languages
Chinese (zh)
Other versions
CN110661903A (en
Inventor
王敏
李振辉
樊嘉恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co LtdfiledCriticalSuzhou Inspur Intelligent Technology Co Ltd
Priority to CN201910970001.1ApriorityCriticalpatent/CN110661903B/en
Publication of CN110661903ApublicationCriticalpatent/CN110661903A/en
Application grantedgrantedCritical
Publication of CN110661903BpublicationCriticalpatent/CN110661903B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The invention relates to a method and a device for cloud platform route management, wherein the method comprises the following steps: analyzing all lease information in a DHCP lease database to form a lease list; grouping each row of the lease list according to the MAC address, and determining the allocated current IP address for each MAC address; generating a routing table according to the corresponding relation between each MAC address and the allocated current IP address, and issuing the routing table to each board card in the cloud platform; and each board card queries a routing table according to the MAC address of the board card so as to determine the allocated current IP address. The method solves the problems that IP information can not be captured by using packet capturing software, the error rate of manual checking is high, time and labor are consumed for revising the routing table after each IP updating, the cost of manual participation and the uncertainty and instability of manual operation are reduced, and the DHCP lease database is fully utilized, so that the normal network process of all FPGA board cards in a cloud platform, particularly an FGPA cloud platform is ensured.

Description

Translated fromChinese
一种云平台路由管理的方法及装置Method and device for cloud platform routing management

技术领域technical field

本发明涉及云平台技术领域。本发明进一步涉及一种云平台路由管理的方法及装置。The invention relates to the field of cloud platform technology. The present invention further relates to a method and device for cloud platform routing management.

背景技术Background technique

随着网络规模的不断扩大和网络复杂度的提高,计算机的数量经常超过可供分配的IP地址数量。同时计算机的位置也经常变化,相应的IP地址也必须经常更新,从而导致网络配置越来越复杂。DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)就是为解决这些问题而发展起来的。With the continuous expansion of network scale and the improvement of network complexity, the number of computers often exceeds the number of IP addresses available for allocation. At the same time, the location of the computer changes frequently, and the corresponding IP address must also be updated frequently, which makes the network configuration more and more complicated. DHCP (Dynamic Host Configuration Protocol, Dynamic Host Configuration Protocol) was developed to solve these problems.

DHCP可以提供三种IP地址分配策略。而在FPGA云平台软件的设计中,是采用动态分配IP的方式为网络中所连接的所有FPGA板卡分配IP 地址。因此在当前的FPGA云平台的设计中,会经常遇到IP地址因为各种原因发生变化的情况,例如由于新加入FPGA板卡、更换FPGA板卡、交换机开关机等原因。DHCP can provide three IP address allocation strategies. In the design of FPGA cloud platform software, IP addresses are allocated to all FPGA boards connected in the network by means of dynamic IP allocation. Therefore, in the design of the current FPGA cloud platform, it is often encountered that the IP address changes due to various reasons, such as the addition of new FPGA boards, replacement of FPGA boards, switching on and off of switches, and so on.

当前的FPGA云平台软件中,通过Wireshark抓包软件获得IP信息后,手工记录下所有已有的FPGA板卡IP和MAC,同时修改软件中对应的路由表,继而通过发送帧数据包通知所有网络中FPGA板卡路由表信息。In the current FPGA cloud platform software, after obtaining IP information through Wireshark packet capture software, manually record all existing FPGA board IP and MAC, modify the corresponding routing table in the software, and then notify all networks by sending frame data packets In the FPGA board routing table information.

当前FPGA云平台的设计中,鉴于路由表会经常发生变化,每次都需要参考网络抓包软件(如Wireshark)里面的IP信息手动更新路由表,然后再下发指令通知FPGA其路由表即MAC和IP信息,这样操作的缺点包括以下几个方面:In the current design of the FPGA cloud platform, in view of the frequent changes in the routing table, it is necessary to manually update the routing table with reference to the IP information in the network packet capture software (such as Wireshark) each time, and then issue instructions to notify the FPGA of its routing table, which is the MAC address. and IP information, the disadvantages of this operation include the following aspects:

1)信息捕捉丢失:网络监控抓包软件可能会因为延迟等因素捕捉不到某些板卡的IP。1) Loss of information capture: The network monitoring packet capture software may fail to capture the IP of some boards due to factors such as delay.

2)人工核对出错率较高:由于数字量比较大,每次手动更新软件IP 和MAC表格可能会核对出错,尤其是网络中FPGA板卡较多的情况下尤为突出。2) The error rate of manual verification is high: Due to the relatively large number of numbers, each manual update of the software IP and MAC tables may cause verification errors, especially when there are many FPGA boards in the network.

3)耗时:每次IP更新后,需要耗费时间去重新修改路由表,并且编译。3) Time-consuming: After each IP update, it takes time to re-modify the routing table and compile it.

因此,为了解决上述问题,需要提出一种优化的云平台路由管理的方法使得所有的IP及MAC的获取及配置能够及时、准确、自动地实现。Therefore, in order to solve the above problems, it is necessary to propose an optimized cloud platform routing management method so that the acquisition and configuration of all IPs and MACs can be realized in a timely, accurate and automatic manner.

发明内容Contents of the invention

一方面,本发明基于上述目的提出了一种云平台路由管理的方法,其中该方法包括以下步骤:On the one hand, the present invention proposes a method for cloud platform routing management based on the above-mentioned purpose, wherein the method includes the following steps:

解析DHCP租约数据库中所有租约信息以形成租约列表;Parse all lease information in the DHCP lease database to form a lease list;

将租约列表的各行按MAC地址进行分组,并为各MAC地址确定所分配的当前IP地址;Group the rows of the lease list by MAC address and determine for each MAC address the current IP address assigned;

根据各MAC地址及所分配的当前IP地址的对应关系生成路由表,并将该路由表下发给云平台中的各板卡;Generate a routing table according to the corresponding relationship between each MAC address and the assigned current IP address, and send the routing table to each board in the cloud platform;

各板卡分别根据其MAC地址查询路由表以确定所分配的当前IP地址。Each board checks the routing table according to its MAC address to determine the current assigned IP address.

根据本发明的云平台路由管理的方法的实施例,其中租约列表的各行至少包括相对应的IP地址、占用时间、MAC地址。According to an embodiment of the method for cloud platform routing management of the present invention, each row of the lease list includes at least a corresponding IP address, occupied time, and MAC address.

根据本发明的云平台路由管理的方法的实施例,其中将租约列表的各行按MAC地址进行分组,并为各MAC地址确定所分配的当前IP地址进一步包括:According to an embodiment of the method for cloud platform routing management of the present invention, wherein each row of the lease list is grouped by MAC address, and determining the assigned current IP address for each MAC address further includes:

将所有MAC地址相同的租约列表行分为一组,并在每组中按占用时间先后进行排序;Divide all the lease list lines with the same MAC address into one group, and sort each group according to the occupation time;

以占用时间最新的IP地址作为该组的MAC地址的当前IP地址。Use the IP address with the latest elapsed time as the current IP address of the group's MAC address.

根据本发明的云平台路由管理的方法的实施例,其中根据各MAC地址及所分配的当前IP地址的对应关系生成路由表,并将路由表下发给云平台中的各板卡进一步包括:According to the embodiment of the method for cloud platform routing management of the present invention, wherein according to each MAC address and the corresponding relationship of the assigned current IP address, generate a routing table, and sending the routing table to each board in the cloud platform further includes:

检查云平台中在线的所有板卡的MAC地址;Check the MAC addresses of all boards online in the cloud platform;

将所有在线板卡的MAC地址及所分配的当前IP地址的对应关系生成路由表。Generate a routing table from the correspondence between the MAC addresses of all online boards and the assigned current IP addresses.

根据本发明的云平台路由管理的方法的实施例,其中根据各MAC地址及所分配的当前IP地址的对应关系生成路由表,并将路由表下发给云平台中的各板卡进一步包括:According to the embodiment of the method for cloud platform routing management of the present invention, wherein according to each MAC address and the corresponding relationship of the assigned current IP address, generate a routing table, and sending the routing table to each board in the cloud platform further includes:

通过预定的帧格式将路由表下发给云平台中的各板卡。Send the routing table to each board in the cloud platform through a predetermined frame format.

另一方面,本发明还提出了一种云平台路由管理的装置,其中该装置包括:On the other hand, the present invention also proposes a device for cloud platform routing management, wherein the device includes:

至少一个处理器;和at least one processor; and

存储器,该存储器存储有处理器可运行的程序指令,该程序指令在被处理器运行时执行以下步骤:A memory storing processor-executable program instructions that, when executed by the processor, perform the following steps:

解析DHCP租约数据库中所有租约信息以形成租约列表;Parse all lease information in the DHCP lease database to form a lease list;

将租约列表的各行按MAC地址进行分组,并为各MAC地址确定所分配的当前IP地址;Group the rows of the lease list by MAC address and determine for each MAC address the current IP address assigned;

根据各MAC地址及所分配的当前IP地址的对应关系生成路由表,并将该路由表下发给云平台中的各板卡;Generate a routing table according to the corresponding relationship between each MAC address and the assigned current IP address, and send the routing table to each board in the cloud platform;

各板卡分别根据其MAC地址查询路由表以确定所分配的当前IP 地址。Each board checks the routing table according to its MAC address to determine the current assigned IP address.

根据本发明的云平台路由管理的装置的实施例,其中租约列表的各行至少包括相对应的IP地址、占用时间、MAC地址。According to an embodiment of the device for cloud platform routing management of the present invention, each row of the lease list includes at least a corresponding IP address, occupied time, and MAC address.

根据本发明的云平台路由管理的装置的实施例,其中将所述租约列表的各行按MAC地址进行分组,并为各MAC地址确定所分配的当前IP地址进一步包括:According to an embodiment of the device for cloud platform routing management of the present invention, wherein each line of the lease list is grouped by MAC address, and determining the assigned current IP address for each MAC address further includes:

将所有MAC地址相同的租约列表行分为一组,并在每组中按占用时间先后进行排序;Divide all the lease list lines with the same MAC address into one group, and sort each group according to the occupation time;

以占用时间最新的IP地址作为该组的MAC地址的当前IP地址。Use the IP address with the latest elapsed time as the current IP address of the group's MAC address.

根据本发明的云平台路由管理的装置的实施例,其中根据各MAC地址及所分配的当前IP地址的对应关系生成路由表,并将路由表下发给云平台中的各板卡进一步包括:According to the embodiment of the device of cloud platform routing management of the present invention, wherein according to each MAC address and the corresponding relationship of the assigned current IP address, generate a routing table, and sending the routing table to each board in the cloud platform further includes:

检查云平台中在线的所有板卡的MAC地址;Check the MAC addresses of all boards online in the cloud platform;

将所有在线板卡的MAC地址及所分配的当前IP地址的对应关系生成路由表。Generate a routing table from the correspondence between the MAC addresses of all online boards and the assigned current IP addresses.

根据本发明的云平台路由管理的装置的实施例,其中根据各MAC地址及所分配的当前IP地址的对应关系生成路由表,并将路由表下发给云平台中的各板卡进一步包括:According to the embodiment of the device of cloud platform routing management of the present invention, wherein according to each MAC address and the corresponding relationship of the assigned current IP address, generate a routing table, and sending the routing table to each board in the cloud platform further includes:

通过预定的帧格式将路由表下发给云平台中的各板卡。Send the routing table to each board in the cloud platform through a predetermined frame format.

采用上述技术方案,本发明至少具有如下有益效果:解决了利用抓包软件可能无法捕捉IP信息、人工核对出错率高、每次IP更新后重新修改路由表耗时耗力等问题,充分利用DHCP租约数据库,将其中的数据信息整合提取,有效、及时、准确地确定所有板卡的最新路由信息,同时方法的步骤自动执行也减少了人工参与的成本、人为操作的不确定性和不稳定性,从而保证了云平台尤其是FGPA云平台中的所有FPGA板卡的正常网络进程。By adopting the above-mentioned technical scheme, the present invention has at least the following beneficial effects: it solves the problems that the use of packet capture software may not be able to capture IP information, the error rate of manual verification is high, and the time-consuming and labor-intensive modification of the routing table after each IP update is solved, making full use of DHCP The lease database integrates and extracts the data information in it to effectively, timely and accurately determine the latest routing information of all boards. At the same time, the automatic execution of the steps of the method also reduces the cost of manual participation, uncertainty and instability of manual operation , thereby ensuring the normal network process of all FPGA boards in the cloud platform, especially the FGPA cloud platform.

本发明提供了实施例的各方面,不应当用于限制本发明的保护范围。根据在此描述的技术可设想到其它实施方式,这对于本领域普通技术人员来说在研究以下附图和具体实施方式后将是显而易见的,并且这些实施方式意图被包含在本申请的范围内。The present invention provides various aspects of the embodiments, which should not be used to limit the protection scope of the present invention. Other embodiments are contemplated in light of the techniques described herein, will be apparent to those of ordinary skill in the art upon examination of the following figures and detailed description, and are intended to be included within the scope of this application .

下面参考附图更详细地解释和描述了本发明的实施例,但它们不应理解为对于本发明的限制。Embodiments of the present invention are explained and described in more detail below with reference to the accompanying drawings, but they should not be construed as limiting the present invention.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对现有技术和实施例描述中所需要使用的附图作简单地介绍,附图中的部件不一定按比例绘制,并且可以省略相关的元件,或者在一些情况下比例可能已经被放大,以便强调和清楚地示出本文描述的新颖特征。另外,如本领域中已知的,结构顺序可以被不同地布置。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the prior art and the accompanying drawings that need to be used in the description of the embodiments. The components in the drawings are not necessarily drawn to scale, and related elements, or in some cases may have been exaggerated in proportion, in order to emphasize and clearly show the novel features described herein. Additionally, the structural order may be arranged differently as is known in the art.

图1示出了根据本发明的云平台路由管理的方法的实施例的示意性框图。Fig. 1 shows a schematic block diagram of an embodiment of a method for cloud platform routing management according to the present invention.

具体实施方式detailed description

虽然本发明可以以各种形式实施,但是在附图中示出并且在下文中将描述一些示例性和非限制性实施例,但应该理解的是,本公开将被认为是本发明的示例并不意图将本发明限制于所说明的具体实施例。While the invention may be embodied in various forms, some exemplary and non-limiting embodiments are shown in the drawings and will be described below, it should be understood that the disclosure is to be considered as an example of the invention and not It is intended that the invention be limited to the specific embodiments described.

图1示出了根据本发明的云平台路由管理的方法的实施例的示意性框图。在如图所示的实施例中,该方法至少包括以下步骤:Fig. 1 shows a schematic block diagram of an embodiment of a method for cloud platform routing management according to the present invention. In the embodiment shown in the figure, the method at least includes the following steps:

S1:解析DHCP租约数据库中所有租约信息以形成租约列表;S1: Parse all lease information in the DHCP lease database to form a lease list;

S2:将租约列表的各行按MAC地址进行分组,并为各MAC地址确定所分配的当前IP地址;S2: group each row of the lease list by MAC address, and determine the current IP address allocated for each MAC address;

S3:根据各MAC地址及所分配的当前IP地址的对应关系生成路由表,并将该路由表下发给云平台中的各板卡;S3: Generate a routing table according to the corresponding relationship between each MAC address and the assigned current IP address, and send the routing table to each board in the cloud platform;

S4:各板卡分别根据其MAC地址查询路由表以确定所分配的当前IP地址。S4: Each board checks the routing table according to its MAC address to determine the current IP address allocated.

为了解决利用抓包软件可能无法捕捉IP信息、人工核对出错率高、每次IP更新后重新修改路由表耗时耗力等问题,根据本发明提出了充分利用DHCP租约数据库的构思,解析其中的数据信息并进行整合提取,从而进一步生成所需的路由表,并下发给板卡以通知各板卡其被分配的IP 地址。In order to solve the problems that the use of packet capture software may not be able to capture IP information, the manual check error rate is high, and the routing table is time-consuming and labor-intensive after each IP update, according to the present invention, the concept of making full use of the DHCP lease database is proposed, and the analysis of the The data information is integrated and extracted, so as to further generate the required routing table, and send it to the board to notify each board of its assigned IP address.

具体地,首先步骤S1解析DHCP租约数据库中所有租约信息以形成租约列表。由于DHCP租约数据库中的租约信息通常以一定的格式记录在DHCP客户租约的数据库文件(LINUX下dhcpd.leases是DHCP客户机租约的数据库文件,默认目录在/var/lib/dhcp/,文件包含租约声明)中。所以按照一定的格式解析DHCP租约数据库中的租约信息,并将每一条租约信息解析出来的元素按行生成租约列表。Specifically, first step S1 parses all lease information in the DHCP lease database to form a lease list. Because the lease information in the DHCP lease database is usually recorded in the database file of the DHCP client lease in a certain format (dhcpd. statement). Therefore, the lease information in the DHCP lease database is parsed according to a certain format, and the elements of each piece of lease information are parsed to generate a lease list by row.

每次一个租约被获取、更新或者释放,相应的信息就会重新被记录到该租约文件中。也就是说,DHCP租约数据库记录了所有租约信息,包括历史上曾经有效的以及当前有效的租约信息。所以在整个文件中,对于同一个MAC,可能会查看到多个IP的记录。而实际上对固定的MAC(即 FPGA板卡),当前有效的IP地址只有一个。因此,需要进一步确定哪个IP地址才是当前有效的IP地址。为此,步骤S2将租约列表的各行按 MAC地址进行分组,并为各MAC地址确定所分配的当前IP地址。然后,步骤S3根据各MAC地址及所分配的当前IP地址的对应关系生成路由表,并将该路由表下发给云平台中的各板卡。Every time a lease is acquired, renewed, or released, the corresponding information will be re-recorded in the lease file. That is to say, the DHCP lease database records all lease information, including historically valid and currently valid lease information. Therefore, in the entire file, for the same MAC, multiple IP records may be viewed. In fact, there is only one valid IP address for a fixed MAC (that is, FPGA board). Therefore, it is necessary to further determine which IP address is the currently valid IP address. To this end, step S2 groups the rows of the lease list by MAC address and determines for each MAC address the current IP address assigned. Then, step S3 generates a routing table according to the corresponding relationship between each MAC address and the assigned current IP address, and sends the routing table to each board in the cloud platform.

云平台中在线的板卡在被通知了最新的路由表之后,它们就可以据此获悉分配给它们的当前IP地址,即步骤S4各板卡分别根据其自身的MAC 地址查询路由表以确定所分配的当前IP地址。在得到了当前分配给相应板卡的IP地址后,该板卡就可以进行正常的网络进程。After the online boards in the cloud platform are notified of the latest routing table, they can learn the current IP address assigned to them accordingly, that is, each board in step S4 queries the routing table according to its own MAC address to determine the IP address assigned to it. The current IP address assigned. After obtaining the IP address currently assigned to the corresponding board, the board can perform normal network processes.

下文将说明本发明的进一步实施例,需要注意的是,其中提到的步骤的编号在没有特殊说明的情况下,仅用于便捷明确地指示该步骤,并不限定所述步骤的顺序。Further embodiments of the present invention will be described below. It should be noted that the numbers of the steps mentioned therein are only used for convenient and clear indication of the steps unless otherwise specified, and do not limit the sequence of the steps.

在本发明的云平台路由管理的方法的一个或多个实施例中,租约列表的各行至少包括相对应的IP地址、占用时间、MAC地址。步骤S1中生成的租约列表基于解析DHCP租约数据库中所有租约信息形成。其中,按照一定的格式解析DHCP租约数据库中的租约信息,并将每一条租约信息解析出来的元素按行生成租约列表,而每行中的解析出的元素至少包括IP地址、占用时间、MAC地址。虽然DHCP租约数据库中的租约信息会包含获取、释放时间等多个时间信息,但是由于每一个MAC地址只会占用一个IP地址,并且每一个IP地址只会被一个MAC地址所占用。因此,租约列表中的占用时间优选地为获取时间。In one or more embodiments of the cloud platform routing management method of the present invention, each line of the lease list includes at least a corresponding IP address, occupied time, and MAC address. The lease list generated in step S1 is formed based on parsing all lease information in the DHCP lease database. Among them, the lease information in the DHCP lease database is parsed according to a certain format, and the elements parsed from each piece of lease information are generated into a lease list by row, and the parsed elements in each row include at least IP address, occupied time, and MAC address . Although the lease information in the DHCP lease database will contain multiple time information such as acquisition and release times, each MAC address will only occupy one IP address, and each IP address will only be occupied by one MAC address. Therefore, the occupation time in the lease list is preferably the acquisition time.

在本发明的云平台路由管理的方法的若干实施例中,步骤S2将租约列表的各行按MAC地址进行分组,并为各MAC地址确定所分配的当前 IP地址进一步包括:In some embodiments of the method for cloud platform routing management of the present invention, step S2 groups each row of the lease list by MAC address, and determines that the assigned current IP address for each MAC address further includes:

S21:将所有MAC地址相同的租约列表行分为一组,并在每组中按占用时间先后进行排序;S21: Divide all the lease list rows with the same MAC address into one group, and sort each group according to the occupation time;

S22:以占用时间最新的IP地址作为该组的MAC地址的当前IP 地址。S22: Use the IP address with the latest occupation time as the current IP address of the MAC address of the group.

为了进一步准确地为各MAC从相应所有的IP地址中确定当前有效的IP地址,在这些实施例中,步骤S2租约列表的各行按MAC地址进行分组,并为各MAC地址确定所分配的当前IP地址进一步包括两个步骤,首先步骤S21将所有MAC地址相同的租约列表行分为一组,并在每组的租约列表行中按占用时间先后进行排序。也就是说将包含同一个MAC地址的租约列表行归为同一组,并将各租约列表行按占用时间进行排序,其中优选地占用时间早的在前、占用时间晚的在后。随后,步骤S22以占用时间最新的IP地址作为该组的MAC地址的当前IP地址,优选地在S21 中按占用时间早的在前、占用时间晚的在后进行排序的情况下以每组中处于末位的租约列表行中的IP地址作为该组的MAC地址的当前IP地址,并为两者建立对应关系。In order to further accurately determine the current effective IP address from all corresponding IP addresses for each MAC, in these embodiments, each row of the lease list in step S2 is grouped by MAC address, and the assigned current IP address is determined for each MAC address. The address further includes two steps. First, step S21 divides all lease list lines with the same MAC address into one group, and sorts the lease list lines of each group according to the occupation time. That is to say, the lease list rows containing the same MAC address are grouped into the same group, and the lease list rows are sorted according to the occupation time, wherein preferably the occupation time is earlier and the occupation time is later. Subsequently, step S22 takes the latest IP address of the occupation time as the current IP address of the MAC address of the group, preferably in S21, in the case of sorting by the earlier occupation time and the later occupation time in each group The IP address in the last row of the lease list is used as the current IP address of the group's MAC address, and a corresponding relationship is established between the two.

在本发明的云平台路由管理的方法的一些实施例中,步骤S3根据各 MAC地址及所分配的当前IP地址的对应关系生成路由表,并将路由表下发给云平台中的各板卡进一步包括:In some embodiments of the method for cloud platform routing management of the present invention, step S3 generates a routing table according to the corresponding relationship between each MAC address and the assigned current IP address, and sends the routing table to each board in the cloud platform Further includes:

S31:检查云平台中在线的所有板卡的MAC地址;S31: Check the MAC addresses of all online boards in the cloud platform;

S32:将所有在线板卡的MAC地址及所分配的当前IP地址的对应关系生成路由表。S32: Generate a routing table for the corresponding relationship between the MAC addresses of all online boards and the assigned current IP addresses.

由于DHCP租约数据库记录了所有租约信息,包括历史上曾经有效的以及当前有效的租约信息,因此,其中的租约信息通常包含了遗留的租约信息,这些租约信息中记录的MAC地址对应的板卡并不在线。若将根据这些遗留的租约信息产生的MAC地址及所分配的当前IP地址的对应关系都记录在路由表中会造成不必要的资源浪费,包括对路由表数据量、网络传输链路占用等一系列的非必要负担。因此步骤S3根据各MAC地址及所分配的当前IP地址的对应关系生成路由表时进一步包括两个步骤。首先步骤S31检查云平台中在线的所有板卡的MAC地址,从而确定有必要在路由表中记录的MAC地址及所分配的当前IP地址的对应关系的板卡,剔除遗留的租约信息产生的MAC地址及所分配的当前IP地址的对应关系。随后,步骤S32将所有在线板卡的MAC地址及所分配的当前IP 地址的对应关系生成路由表。这样生成的路由表资源占用最优,即在保证其准确功能的情况下数据量最小、网络传输效率最高。Since the DHCP lease database records all lease information, including historically valid and currently valid lease information, the lease information usually includes legacy lease information, and the boards corresponding to the MAC addresses recorded in the lease information are not not online. If the corresponding relationship between the MAC address generated according to these legacy lease information and the assigned current IP address is recorded in the routing table, it will cause unnecessary waste of resources, including the amount of data in the routing table and the occupation of network transmission links. Series of non-essential burdens. Therefore, step S3 further includes two steps when generating the routing table according to the corresponding relationship between each MAC address and the assigned current IP address. First step S31 checks the MAC addresses of all boards online in the cloud platform, thereby determining the boards that need to be recorded in the routing table and the corresponding relationship between the MAC address and the assigned current IP address, and remove the MAC address generated by the leftover lease information The corresponding relationship between the address and the assigned current IP address. Subsequently, step S32 generates a routing table for the corresponding relationship between the MAC addresses of all online boards and the assigned current IP addresses. The resource occupancy of the routing table generated in this way is optimal, that is, the amount of data is the smallest and the network transmission efficiency is the highest under the condition of ensuring its accurate function.

在本发明的云平台路由管理的方法的进一步实施例中,步骤S3根据各MAC地址及所分配的当前IP地址的对应关系生成路由表,并将路由表下发给云平台中的各板卡进一步包括:通过预定的帧格式将路由表下发给云平台中的各板卡。为了能够不会过多占用网络带宽,在通知板卡路由表时,通过预定的帧格式将路由表中包含的信息下发给所有的板卡。例如,以“MAC地址_IP地址”的格式。In a further embodiment of the method for cloud platform routing management of the present invention, step S3 generates a routing table according to the corresponding relationship between each MAC address and the assigned current IP address, and sends the routing table to each board in the cloud platform It further includes: sending the routing table to each board in the cloud platform through a predetermined frame format. In order not to occupy too much network bandwidth, when the board routing table is notified, the information contained in the routing table is sent to all boards through a predetermined frame format. For example, in the format "MAC address_IP address".

另一方面,本发明还提出了一种云平台路由管理的装置,其中该装置包括:至少一个处理器;和存储器,该存储器存储有处理器可运行的程序指令,该程序指令在被处理器运行时至少执行以下步骤:On the other hand, the present invention also proposes a device for cloud platform routing management, wherein the device includes: at least one processor; and a memory, the memory stores program instructions executable by the processor, and the program instructions are executed by the processor Runtime performs at least the following steps:

S1:解析DHCP租约数据库中所有租约信息以形成租约列表;S1: Parse all lease information in the DHCP lease database to form a lease list;

S2:将租约列表的各行按MAC地址进行分组,并为各MAC地址确定所分配的当前IP地址;S2: group each row of the lease list by MAC address, and determine the current IP address allocated for each MAC address;

S3:根据各MAC地址及所分配的当前IP地址的对应关系生成路由表,并将该路由表下发给云平台中的各板卡;S3: Generate a routing table according to the corresponding relationship between each MAC address and the assigned current IP address, and send the routing table to each board in the cloud platform;

S4:各板卡分别根据其MAC地址查询路由表以确定所分配的当前IP地址。S4: Each board checks the routing table according to its MAC address to determine the current IP address allocated.

在本发明的云平台路由管理的装置的一个或多个实施例中,租约列表的各行至少包括相对应的IP地址、占用时间、MAC地址。In one or more embodiments of the device for cloud platform routing management of the present invention, each line of the lease list includes at least a corresponding IP address, occupied time, and MAC address.

在本发明的云平台路由管理的装置的若干实施例中,步骤S2将租约列表的各行按MAC地址进行分组,并为各MAC地址确定所分配的当前 IP地址进一步包括:In some embodiments of the device of cloud platform routing management of the present invention, step S2 groups each row of the lease list by MAC address, and determines that the assigned current IP address for each MAC address further includes:

S21:将所有MAC地址相同的租约列表行分为一组,并在每组中按占用时间先后进行排序;S21: Divide all the lease list rows with the same MAC address into one group, and sort each group according to the occupation time;

S22:以占用时间最新的IP地址作为该组的MAC地址的当前IP 地址。S22: Use the IP address with the latest occupation time as the current IP address of the MAC address of the group.

在本发明的云平台路由管理的装置的一些实施例中,步骤S3根据各 MAC地址及所分配的当前IP地址的对应关系生成路由表,并将路由表下发给云平台中的各板卡进一步包括:In some embodiments of the device for cloud platform routing management of the present invention, step S3 generates a routing table according to the corresponding relationship between each MAC address and the assigned current IP address, and sends the routing table to each board in the cloud platform Further includes:

S31:检查云平台中在线的所有板卡的MAC地址;S31: Check the MAC addresses of all online boards in the cloud platform;

S32:将所有在线板卡的MAC地址及所分配的当前IP地址的对应关系生成路由表。S32: Generate a routing table for the corresponding relationship between the MAC addresses of all online boards and the assigned current IP addresses.

在本发明的云平台路由管理的装置的进一步实施例中,步骤S3根据各MAC地址及所分配的当前IP地址的对应关系生成路由表,并将路由表下发给云平台中的各板卡进一步包括:通过预定的帧格式将路由表下发给云平台中的各板卡。In a further embodiment of the device for cloud platform routing management of the present invention, step S3 generates a routing table according to the corresponding relationship between each MAC address and the assigned current IP address, and sends the routing table to each board in the cloud platform It further includes: sending the routing table to each board in the cloud platform through a predetermined frame format.

本发明实施例公开所述的装置、设备等可为各种电子终端设备,例如手机、个人数字助理(PDA)、平板电脑(PAD)、智能电视等,也可以是大型终端设备,如服务器等,因此本发明实施例公开的保护范围不应限定为某种特定类型的装置、设备。本发明实施例公开所述的客户端可以是以电子硬件、计算机软件或两者的组合形式应用于上述任意一种电子终端设备中。The devices and equipment disclosed in the embodiments of the present invention can be various electronic terminal equipment, such as mobile phones, personal digital assistants (PDA), tablet computers (PAD), smart TVs, etc., or large terminal equipment, such as servers, etc. , so the scope of protection disclosed in the embodiments of the present invention should not be limited to a specific type of device or equipment. The client disclosed in the embodiments of the present invention may be applied to any of the above-mentioned electronic terminal devices in the form of electronic hardware, computer software, or a combination of the two.

本文所述的计算机可读存储介质(例如存储器)可以是易失性存储器或非易失性存储器,或者可以包括易失性存储器和非易失性存储器两者。作为例子而非限制性的,非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦写可编程 ROM(EEPROM)或快闪存储器。易失性存储器可以包括随机存取存储器(RAM),该RAM可以充当外部高速缓存存储器。作为例子而非限制性的,RAM可以以多种形式获得,比如同步RAM(DRAM)、动态RAM (DRAM)、同步DRAM(SDRAM)、双数据速率SDRAM(DDR SDRAM)、增强SDRAM(ESDRAM)、同步链路DRAM(SLDRAM)、以及直接 Rambus RAM(DRRAM)。所公开的方面的存储设备意在包括但不限于这些和其它合适类型的存储器。The computer readable storage media (eg, memories) described herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example and not limitation, nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory memory. Volatile memory can include random access memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM is available in various forms such as Synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). Storage devices of the disclosed aspects are intended to include, but are not limited to, these and other suitable types of memory.

采用上述技术方案,本发明至少具有如下有益效果:解决了利用抓包软件可能无法捕捉IP信息、人工核对出错率高、每次IP更新后重新修改路由表耗时耗力等问题,充分利用DHCP租约数据库,将其中的数据信息整合提取,有效、及时、准确地确定所有板卡的最新路由信息,同时方法的步骤自动执行也减少了人工参与的成本、人为操作的不确定性和不稳定性,从而保证了云平台尤其是FGPA云平台中的所有FPGA板卡的正常网络进程。By adopting the above-mentioned technical scheme, the present invention has at least the following beneficial effects: it solves the problems that the use of packet capture software may not be able to capture IP information, the error rate of manual verification is high, and the time-consuming and labor-intensive modification of the routing table after each IP update is solved, making full use of DHCP The lease database integrates and extracts the data information in it to effectively, timely and accurately determine the latest routing information of all boards. At the same time, the automatic execution of the steps of the method also reduces the cost of manual participation, uncertainty and instability of manual operation , thereby ensuring the normal network process of all FPGA boards in the cloud platform, especially the FGPA cloud platform.

应当理解的是,在技术上可行的情况下,以上针对不同实施例所列举的技术特征可以相互组合,从而形成本发明范围内的另外实施例。此外,本文所述的特定示例和实施例是非限制性的,并且可以对以上所阐述的结构、步骤及顺序做出相应修改而不脱离本发明的保护范围。It should be understood that, where technically feasible, the technical features listed above for different embodiments can be combined with each other to form other embodiments within the scope of the present invention. In addition, the specific examples and embodiments described herein are non-limiting, and corresponding modifications can be made to the structures, steps and sequences described above without departing from the protection scope of the present invention.

在本申请中,反意连接词的使用旨在包括连接词。定或不定冠词的使用并不旨在指示基数。具体而言,对“该”对象或“一”和“一个”对象的引用旨在表示多个这样对象中可能的一个。然而,尽管本发明实施例公开的元素可以以个体形式描述或要求,但除非明确限制为单数,也可以理解为多个。此外,可以使用连接词“或”来传达同时存在的特征,而不是互斥方案。换句话说,连接词“或”应理解为包括“和/或”。术语“包括”是包容性的并且具有与“包含”相同的范围。In this application, the use of anti-conjunctive conjunctions is intended to include the conjunctions. The use of definite or indefinite articles is not intended to indicate cardinality. In particular, references to "the" object or "a" and "an" objects are intended to mean a possible one of a plurality of such objects. However, although the elements disclosed in the embodiments of the present invention may be described or claimed in an individual form, they may also be understood as a plurality unless explicitly limited to a singular number. Additionally, the conjunction "or" can be used to convey features that exist simultaneously, rather than mutually exclusive solutions. In other words, the conjunction "or" should be read to include "and/or". The term "comprising" is inclusive and has the same scope as "comprising".

上述实施例,特别是任何“优选”实施例是实施方式的可能示例,并且仅仅为了清楚理解本发明的原理而提出。在基本上不脱离本文描述的技术的精神和原理的情况下,可以对上述实施例做出许多变化和修改。所有修改旨在被包括在本公开的范围内。The above-described embodiments, particularly any "preferred" embodiments, are possible examples of implementations, and are merely set forth for a clear understanding of the principles of the invention. Many variations and modifications may be made to the above-described embodiments without departing substantially from the spirit and principles of the technology described herein. All modifications are intended to be included within the scope of this disclosure.

Claims (6)

Translated fromChinese
1.一种云平台路由管理的方法,其特征在于,所述方法包括以下步骤:1. a method for cloud platform route management, is characterized in that, described method comprises the following steps:解析DHCP租约数据库中所有租约信息以形成租约列表,并将每一条租约信息解析出来的元素按行生成租约列表;Parse all the lease information in the DHCP lease database to form a lease list, and generate a lease list by row from the elements parsed from each piece of lease information;将所述租约列表的各行按MAC地址进行分组,并为各MAC地址确定所分配的当前IP地址,具体包括将所有MAC地址相同的所述租约列表行分为一组,并在每组中按占用时间先后进行排序;以占用时间最新的IP地址作为该组的MAC地址的所述当前IP地址;grouping each row of the lease list by MAC address, and determining the assigned current IP address for each MAC address, specifically including grouping all rows of the lease list with the same MAC address into one group, and in each group by The occupation time is sorted successively; the IP address with the latest occupation time is used as the current IP address of the group's MAC address;根据所述各MAC地址及所分配的当前IP地址的对应关系生成路由表,并将所述路由表下发给云平台中的各板卡,具体包括检查所述云平台中在线的所有板卡的MAC地址;将所有在线板卡的MAC地址及所分配的当前IP地址的对应关系生成路由表;Generate a routing table according to the corresponding relationship between each MAC address and the assigned current IP address, and send the routing table to each board in the cloud platform, specifically including checking all boards online in the cloud platform MAC address; generate a routing table for the corresponding relationship between the MAC addresses of all online boards and the assigned current IP addresses;所述各板卡分别根据其MAC地址查询所述路由表以确定所分配的当前IP地址。The respective boards query the routing table according to their MAC addresses to determine the assigned current IP address.2.根据权利要求1所述的方法,其特征在于,所述租约列表的各行至少包括相对应的IP地址、占用时间、MAC地址。2. The method according to claim 1, wherein each line of the lease list at least includes a corresponding IP address, occupation time, and MAC address.3.根据权利要求1所述的方法,其特征在于,所述根据所述各MAC地址及所分配的当前IP地址的对应关系生成路由表,并将所述路由表下发给云平台中的各板卡进一步包括:3. The method according to claim 1, characterized in that, generating a routing table according to the corresponding relationship between each of the MAC addresses and the assigned current IP address, and sending the routing table to the cloud platform. Each board further includes:通过预定的帧格式将所述路由表下发给所述云平台中的各板卡。Send the routing table to each board in the cloud platform through a predetermined frame format.4.一种云平台路由管理的装置,其特征在于,所述装置包括:4. A device for cloud platform routing management, characterized in that the device comprises:至少一个处理器;和at least one processor; and存储器,所述存储器存储有处理器可运行的程序指令,所述程序指令在被处理器运行时执行以下步骤:a memory, the memory stores program instructions executable by the processor, and the program instructions perform the following steps when executed by the processor:解析DHCP租约数据库中所有租约信息以形成租约列表,并将每一条租约信息解析出来的元素按行生成租约列表;Parse all the lease information in the DHCP lease database to form a lease list, and generate a lease list by row from the elements parsed from each piece of lease information;将所述租约列表的各行按MAC地址进行分组,并为各MAC地址确定所分配的当前IP地址,具体包括将所有MAC地址相同的所述租约列表行分为一组,并在每组中按占用时间先后进行排序;以占用时间最新的IP地址作为该组的MAC地址的所述当前IP地址;grouping each row of the lease list by MAC address, and determining the assigned current IP address for each MAC address, specifically including grouping all rows of the lease list with the same MAC address into one group, and in each group by The occupation time is sorted successively; the IP address with the latest occupation time is used as the current IP address of the group's MAC address;根据所述各MAC地址及所分配的当前IP地址的对应关系生成路由表,并将所述路由表下发给云平台中的各板卡,具体包括检查所述云平台中在线的所有板卡的MAC地址;将所有在线板卡的MAC地址及所分配的当前IP地址的对应关系生成路由表;Generate a routing table according to the corresponding relationship between each MAC address and the assigned current IP address, and send the routing table to each board in the cloud platform, specifically including checking all boards online in the cloud platform MAC address; generate a routing table for the corresponding relationship between the MAC addresses of all online boards and the assigned current IP addresses;所述各板卡分别根据其MAC地址查询所述路由表以确定所分配的当前IP地址。The respective boards query the routing table according to their MAC addresses to determine the assigned current IP address.5.根据权利要求4所述的装置,其特征在于,所述租约列表的各行至少包括相对应的IP地址、占用时间、MAC地址。5. The device according to claim 4, wherein each line of the lease list at least includes a corresponding IP address, occupied time, and MAC address.6.根据权利要求4所述的装置,其特征在于所述根据所述各MAC地址及所分配的当前IP地址的对应关系生成路由表,并将所述路由表下发给云平台中的各板卡进一步包括:6. The device according to claim 4, characterized in that the routing table is generated according to the corresponding relationship between each of the MAC addresses and the assigned current IP address, and the routing table is issued to each of the cloud platforms. Boards further include:通过预定的帧格式将所述路由表下发给所述云平台中的各板卡。Send the routing table to each board in the cloud platform through a predetermined frame format.
CN201910970001.1A2019-10-122019-10-12Cloud platform route management method and deviceActiveCN110661903B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910970001.1ACN110661903B (en)2019-10-122019-10-12Cloud platform route management method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910970001.1ACN110661903B (en)2019-10-122019-10-12Cloud platform route management method and device

Publications (2)

Publication NumberPublication Date
CN110661903A CN110661903A (en)2020-01-07
CN110661903Btrue CN110661903B (en)2022-12-06

Family

ID=69040707

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910970001.1AActiveCN110661903B (en)2019-10-122019-10-12Cloud platform route management method and device

Country Status (1)

CountryLink
CN (1)CN110661903B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111737238A (en)*2020-05-182020-10-02深圳震有科技股份有限公司 A MAC table query method, switch and storage medium
CN115994036B (en)*2023-03-222023-06-02北京腾达泰源科技有限公司Cloud platform tenant isolation method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103312708A (en)*2013-06-072013-09-18福建联迪商用设备有限公司Lease file based IP (internet protocol) setting method and system
CN105245629A (en)*2015-09-252016-01-13互联网域名系统北京市工程研究中心有限公司DHCP-based host communication method and device
CN105991791A (en)*2015-05-122016-10-05杭州迪普科技有限公司Message forwarding method and device
CN107766055A (en)*2017-09-292018-03-06郑州云海信息技术有限公司A kind of client linux system installation method based on GUI module
CN110138892A (en)*2019-05-312019-08-16秒针信息技术有限公司Determine the method and device of equipment regional information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103312708A (en)*2013-06-072013-09-18福建联迪商用设备有限公司Lease file based IP (internet protocol) setting method and system
CN105991791A (en)*2015-05-122016-10-05杭州迪普科技有限公司Message forwarding method and device
CN105245629A (en)*2015-09-252016-01-13互联网域名系统北京市工程研究中心有限公司DHCP-based host communication method and device
CN107766055A (en)*2017-09-292018-03-06郑州云海信息技术有限公司A kind of client linux system installation method based on GUI module
CN110138892A (en)*2019-05-312019-08-16秒针信息技术有限公司Determine the method and device of equipment regional information

Also Published As

Publication numberPublication date
CN110661903A (en)2020-01-07

Similar Documents

PublicationPublication DateTitle
CN109064345B (en)Message processing method, system and computer readable storage medium
CN111555963B (en)Message pushing method and device, electronic equipment and storage medium
CN111181800B (en)Test data processing method and device, electronic equipment and storage medium
CN110661903B (en)Cloud platform route management method and device
CN113422707B (en)In-band network remote measuring method and equipment
CN111026767B (en)Block chain data storage method and device and hardware equipment
CN102035738B (en)Method and device for acquiring routing information
CN114430383B (en) Detection node screening method, device, electronic device and storage medium
CN115086001B (en)Sampling data caching method, device and storage medium
CN112395087B (en)Dynamic memory area of embedded equipment without memory management unit and management method
CN108363786A (en)Load method, apparatus, computer equipment and the storage medium of data
CN109241182B (en)Big data real-time synchronization method and device, computer equipment and storage medium
CN110825533B (en) A data transmission method and device
CN111367916B (en)Data storage method and device
CN107092556B (en) Test methods, devices and equipment
CN112671949A (en)Method and system for associating session before and after NAT according to syslog
CN110708209B (en)Virtual machine flow acquisition method and device, electronic equipment and storage medium
CN115499338B (en)Data processing method, device, medium and cloud network observation system
CN112416557A (en) Method and device for determining calling relationship, storage medium and electronic device
CN106445784B (en) An information monitoring method and device
CN104618474A (en)Equipment information storing method and device
CN104836689A (en)Server fault transfer method and system
CN111901454B (en) A Statistical and Verification Method for the Number of Real Users in an IPv6 Network
CN106559439A (en)A kind of method for processing business and equipment
CN102377576A (en)Multicast realization method

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
CP03Change of name, title or address

Address after:Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee after:Suzhou Yuannao Intelligent Technology Co.,Ltd.

Country or region after:China

Address before:Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee before:SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before:China


[8]ページ先頭

©2009-2025 Movatter.jp