CN111817969B - Method and equipment for adjusting switch mode of switch - Google Patents
Method and equipment for adjusting switch mode of switch Download PDFInfo
- Publication number
- CN111817969B CN111817969B CN202010692454.5A CN202010692454A CN111817969B CN 111817969 B CN111817969 B CN 111817969B CN 202010692454 A CN202010692454 A CN 202010692454A CN 111817969 B CN111817969 B CN 111817969B
- Authority
- CN
- China
- Prior art keywords
- priority
- switch
- mode
- threshold
- current priority
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/56—Routing software
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域technical field
本领域涉及计算机领域,并且更具体地涉及一种交换机交换模式调整的方法和设备。The field relates to the field of computers, and more particularly to a method and device for adjusting the switching mode of a switch.
背景技术Background technique
当前数据中心为了降低成本,越来越愿意采用白盒交换机作为解决方案。白牌交换机和传统交换机相比,前者可以实现硬件和软件解耦,自主编程,进而实现降低成本、提供更多灵活性。对于用户而言,白牌交换机的操作系统、软件特性等方面都有更多的选择,组网更加灵活。In order to reduce costs, data centers are increasingly willing to use white-box switches as a solution. Compared with traditional switches, white-brand switches can realize hardware and software decoupling and self-programming, thereby reducing costs and providing more flexibility. For users, white-brand switches have more choices in terms of operating systems and software features, and the networking is more flexible.
当前SONIC(针对云计算开放网络的操作系统)版本交换机只能使用交换芯片性能默认表项,既不能手工调整,更不能随着流量的变化,自适应调整SDK(软件开发工具包)交换模式。MAC(物理地址)表,IPV4(网际互连协议版本4)路由表,IPV6(网际互连协议版本6)等表项大小都只能采用芯片默认的设置,大小固定不变。由于芯片表项资源使用固定的默认分配,这样当二层环境单播MAC(物理地址)条目过大,或者三层环境IPV4(网际互连协议版本4)路由表项过大,或处在IPV6(网际互连协议版本6)场景下,交换机因为没有不能调整SDK交换模式,合理分配相应芯片表项资源,报文到达交换机之后,交换机因为没有相应芯片表项资源处理报文,导致报文不能转发,严重影响客户体验。The current SONIC (Operating System for Cloud Computing Open Network) version switches can only use the default switch chip performance table entries, which can neither be adjusted manually, nor can the SDK (software development kit) switching mode be adaptively adjusted with traffic changes. The MAC (physical address) table, IPV4 (Internet Protocol version 4) routing table, IPV6 (Internet Protocol version 6) and other table entries can only use the default settings of the chip, and the size is fixed. Since the chip table entry resource uses a fixed default allocation, when the unicast MAC (physical address) entry in the Layer 2 environment is too large, or the IPV4 (Internet Protocol Version 4) routing table entry in the Layer 3 environment is too large, or the IPV6 In the scenario of (Internet Protocol Version 6), the switch cannot adjust the SDK switching mode and allocate the corresponding chip table entry resources reasonably. After the packet reaches the switch, the switch does not have the corresponding chip table entry resource to process the packet, resulting in the packet cannot be processed. Forwarding seriously affects the customer experience.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明实施例的目的在于提出一种交换机交换模式调整的方法和设备,通过使用本发明的方法,能够合理分配交换机芯片表项资源,无需运维人员手工调整,防止了交换机因为没有相应芯片表项资源处理,导致报文不能转发的情况,保证了交换机业务的正常运行。In view of this, the purpose of the embodiments of the present invention is to provide a method and device for adjusting the switching mode of a switch. By using the method of the present invention, the table entry resources of the switch chip can be reasonably allocated without manual adjustment by operation and maintenance personnel, which prevents the switch from There is no corresponding chip table entry resource processing, resulting in the situation that packets cannot be forwarded, which ensures the normal operation of switch services.
基于上述目的,本发明的实施例的一个方面提供了一种交换机交换模式调整的方法,包括以下步骤:Based on the above object, an aspect of the embodiments of the present invention provides a method for adjusting the switching mode of a switch, including the following steps:
将交换机的交换模式定义为若干交换模式,并设定若干交换模式的优先级;Define the switching mode of the switch as several switching modes, and set the priority of several switching modes;
由最高优先级向最低优先级查询每个优先级对应的路由软件表,并判断当前优先级对应的软件表中的路由表项是否超过当前优先级对应的交换模式的最高门限;Query the routing software table corresponding to each priority from the highest priority to the lowest priority, and determine whether the routing table entry in the software table corresponding to the current priority exceeds the highest threshold of the switching mode corresponding to the current priority;
响应于当前优先级对应的软件表中的路由表项超过当前优先级对应的交换模式的最高门限并且持续超过阈值时间,将交换机切换到当前优先级对应的交换模式并将交换机重启。In response to the routing table entry in the software table corresponding to the current priority exceeding the highest threshold of the switching mode corresponding to the current priority and continuously exceeding the threshold time, the switch is switched to the switching mode corresponding to the current priority and the switch is restarted.
根据本发明的一个实施例,还包括:According to an embodiment of the present invention, it also includes:
由最高优先级向最低优先级查询每个优先级对应的路由软件表,并判断当前优先级对应的软件表中的路由表项是否低于当前优先级对应的交换模式的最低门限;Query the routing software table corresponding to each priority from the highest priority to the lowest priority, and determine whether the routing table entry in the software table corresponding to the current priority is lower than the lowest threshold of the switching mode corresponding to the current priority;
响应于当前优先级对应的软件表中的路由表项低于当前优先级对应的交换模式的最低门限,生成告警并上报。In response to the routing table entry in the software table corresponding to the current priority being lower than the lowest threshold of the switching mode corresponding to the current priority, an alarm is generated and reported.
根据本发明的一个实施例,若干交换模式为适用于2层网络的Layer2模式、适用于3层网络的Layer3模式、支持IPV4或IPV6双栈的IPV6模式和保持系统所有特性均衡的default模式。According to an embodiment of the present invention, several switching modes are Layer2 mode suitable for Layer 2 network, Layer3 mode suitable for Layer 3 network, IPV6 mode supporting IPV4 or IPV6 dual stack, and default mode keeping all features of the system balanced.
根据本发明的一个实施例,交换模式的优先级为IPV6模式>Layer3模式>Layer2模式>default模式。According to an embodiment of the present invention, the priority of the switching mode is IPV6 mode>Layer3 mode>Layer2 mode>default mode.
根据本发明的一个实施例,IPV6模式的最低门限为100条路由表项,最高门限为1000条路由表项;Layer3模式的最低门限为4k条路由表项,最高门限为5k条路由表项;Layer2模式的最低门限为65k条路由表项,最高门限为66k条路由表项。According to an embodiment of the present invention, the minimum threshold of the IPV6 mode is 100 routing table entries, and the maximum threshold is 1000 routing table entries; the minimum threshold of the Layer3 mode is 4k routing table entries, and the maximum threshold is 5k routing table entries; The minimum threshold of Layer2 mode is 65k routing entries, and the maximum threshold is 66k routing entries.
根据本发明的一个实施例,还包括:响应于当前优先级对应的软件表中的路由表项均未超过当前优先级对应的交换模式的最高门限或者超过所述当前优先级对应的交换模式的最高门限未持续超过阈值时间,将交换机切换到最低优先级对应的交换模式并将交换机重启。According to an embodiment of the present invention, the method further includes: in response to none of the routing table entries in the software table corresponding to the current priority exceeding the highest threshold of the switching mode corresponding to the current priority or exceeding the maximum threshold of the switching mode corresponding to the current priority If the highest threshold does not last longer than the threshold time, switch the switch to the switching mode corresponding to the lowest priority and restart the switch.
本发明的实施例的另一个方面,还提供了一种交换机交换模式调整的设备,设备包括:Another aspect of the embodiments of the present invention further provides a device for adjusting the switching mode of a switch, the device comprising:
设定模块,设定模块配置为将交换机的交换模式定义为若干交换模式,并设定若干交换模式的优先级;a setting module, the setting module is configured to define the switching mode of the switch as several switching modes, and set the priorities of the several switching modes;
判断模块,判断模块配置为由最高优先级向最低优先级查询每个优先级对应的路由软件表,并判断当前优先级对应的软件表中的路由表项是否超过当前优先级对应的交换模式的最高门限;Judging module, the judging module is configured to query the routing software table corresponding to each priority from the highest priority to the lowest priority, and determine whether the routing table entry in the software table corresponding to the current priority exceeds the switching mode corresponding to the current priority. the highest threshold;
切换模块,切换模块配置为响应于当前优先级对应的软件表中的路由表项超过当前优先级对应的交换模式的最高门限并且持续超过阈值时间,将交换机切换到当前优先级对应的交换模式并将交换机重启。The switching module is configured to switch the switch to the switching mode corresponding to the current priority in response to the routing table entry in the software table corresponding to the current priority exceeding the highest threshold of the switching mode corresponding to the current priority and continuing to exceed the threshold time. Reboot the switch.
根据本发明的一个实施例,还包括告警模块,告警模块配置为:According to an embodiment of the present invention, an alarm module is further included, and the alarm module is configured as:
由最高优先级向最低优先级查询每个优先级对应的路由软件表,并判断当前优先级对应的软件表中的路由表项是否低于当前优先级对应的交换模式的最低门限;Query the routing software table corresponding to each priority from the highest priority to the lowest priority, and determine whether the routing table entry in the software table corresponding to the current priority is lower than the lowest threshold of the switching mode corresponding to the current priority;
响应于当前优先级对应的软件表中的路由表项低于当前优先级对应的交换模式的最低门限,生成告警并上报。In response to the routing table entry in the software table corresponding to the current priority being lower than the lowest threshold of the switching mode corresponding to the current priority, an alarm is generated and reported.
根据本发明的一个实施例,若干交换模式为适用于2层网络的Layer2模式、适用于3层网络的Layer3模式、支持IPV4或IPV6双栈的IPV6模式和保持系统所有特性均衡的default模式。According to an embodiment of the present invention, several switching modes are Layer2 mode suitable for Layer 2 network, Layer3 mode suitable for Layer 3 network, IPV6 mode supporting IPV4 or IPV6 dual stack, and default mode keeping all features of the system balanced.
根据本发明的一个实施例,还包括选择模块,选择模块配置为:响应于当前优先级对应的软件表中的路由表项均未超过当前优先级对应的交换模式的最高门限或者超过所述当前优先级对应的交换模式的最高门限未持续超过阈值时间,将交换机切换到最低优先级对应的交换模式并将交换机重启。According to an embodiment of the present invention, it further includes a selection module, the selection module is configured to: in response to the fact that none of the routing table entries in the software table corresponding to the current priority level exceeds the highest threshold of the switching mode corresponding to the current priority level or exceeds the current priority level If the highest threshold of the switching mode corresponding to the priority does not continuously exceed the threshold time, switch the switch to the switching mode corresponding to the lowest priority and restart the switch.
本发明具有以下有益技术效果:本发明实施例提供的交换机交换模式调整的方法,通过将交换机的交换模式定义为若干交换模式,并设定若干交换模式的优先级;由最高优先级向最低优先级查询每个优先级对应的路由软件表,并判断当前优先级对应的软件表中的路由表项是否超过当前优先级对应的交换模式的最高门限;响应于当前优先级对应的软件表中的路由表项超过当前优先级对应的交换模式的最高门限并且持续超过阈值时间,将交换机切换到当前优先级对应的交换模式并将交换机重启的技术方案,能够合理分配交换机芯片表项资源,无需运维人员手工调整,防止了交换机因为没有相应芯片表项资源处理,导致报文不能转发的情况,保证了交换机业务的正常运行。The present invention has the following beneficial technical effects: in the method for adjusting the switching mode of a switch provided by the embodiment of the present invention, by defining the switching mode of the switch as several switching modes, and setting the priorities of several switching modes; from the highest priority to the lowest priority Query the routing software table corresponding to each priority, and judge whether the routing table entry in the software table corresponding to the current priority exceeds the highest threshold of the switching mode corresponding to the current priority; The routing table entry exceeds the highest threshold of the switching mode corresponding to the current priority and continues to exceed the threshold time, the switch is switched to the switching mode corresponding to the current priority and the switch is restarted. The maintenance personnel manually adjusted to prevent the switch from failing to forward packets because the switch did not have the corresponding chip table entry resources to process it, and ensured the normal operation of the switch service.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other embodiments can also be obtained according to these drawings without creative efforts.
图1为根据本发明一个实施例的交换机交换模式调整的方法的示意性流程图;1 is a schematic flowchart of a method for adjusting a switching mode of a switch according to an embodiment of the present invention;
图2为根据本发明一个实施例的交换机交换模式调整的设备的示意图。FIG. 2 is a schematic diagram of a device for adjusting the switching mode of a switch according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本发明实施例进一步详细说明。In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention will be further described in detail below with reference to the specific embodiments and the accompanying drawings.
基于上述目的,本发明的实施例的第一个方面,提出了一种交换机交换模式调整的方法的一个实施例。图1示出的是该方法的示意性流程图。Based on the above objective, in the first aspect of the embodiments of the present invention, an embodiment of a method for adjusting the switching mode of a switch is provided. Figure 1 shows a schematic flow chart of the method.
如图1中所示,该方法可以包括以下步骤:As shown in Figure 1, the method may include the following steps:
S1将交换机的交换模式定义为若干交换模式,并设定若干交换模式的优先级;S1 defines the switching mode of the switch as several switching modes, and sets the priorities of several switching modes;
S2由最高优先级向最低优先级查询每个优先级对应的路由软件表,并判断当前优先级对应的软件表中的路由表项是否超过当前优先级对应的交换模式的最高门限,最初由最高优先级开始查询最高优先级对应的交换模式中的路由软件表,判断路由表项是否超过该软件表项的最高门限,如果没有继续判断第二高优先级,直到全部优先级判断完成;S2 queries the routing software table corresponding to each priority from the highest priority to the lowest priority, and judges whether the routing table entry in the software table corresponding to the current priority exceeds the highest threshold of the switching mode corresponding to the current priority. The priority starts to query the routing software table in the switching mode corresponding to the highest priority, and determines whether the routing table entry exceeds the highest threshold of the software table entry, and if not, continues to determine the second highest priority until all priority determinations are completed;
S3响应于当前优先级对应的软件表中的路由表项超过当前优先级对应的交换模式的最高门限并且持续超过阈值时间,将交换机切换到当前优先级对应的交换模式并将交换机重启,阈值时间优选为1分钟,如果只是突发流量(小于1分钟),暂不切换。S3 responds that the routing table entry in the software table corresponding to the current priority exceeds the highest threshold of the switching mode corresponding to the current priority and continues to exceed the threshold time, switches the switch to the switching mode corresponding to the current priority and restarts the switch, the threshold time It is preferably 1 minute. If it is only a burst of traffic (less than 1 minute), no switching is required for the time being.
通过使用本发明的技术方案,能够合理分配交换机芯片表项资源,无需运维人员手工调整,防止了交换机因为没有相应芯片表项资源处理,导致报文不能转发的情况,保证了交换机业务的正常运行。By using the technical solution of the present invention, the switch chip table entry resources can be reasonably allocated without manual adjustment by operation and maintenance personnel, which prevents the switch from being unable to forward the message because the switch does not have the corresponding chip table entry resource for processing, and ensures the normal operation of the switch business. run.
在本发明的一个优选实施例中,还包括:In a preferred embodiment of the present invention, it also includes:
由最高优先级向最低优先级查询每个优先级对应的路由软件表,并判断当前优先级对应的软件表中的路由表项是否低于当前优先级对应的交换模式的最低门限;Query the routing software table corresponding to each priority from the highest priority to the lowest priority, and determine whether the routing table entry in the software table corresponding to the current priority is lower than the lowest threshold of the switching mode corresponding to the current priority;
响应于当前优先级对应的软件表中的路由表项低于当前优先级对应的交换模式的最低门限,生成告警并上报,提示网络管理员该交换机交换芯片已经不能满足客户业务场景。每个优先级对应的交换模式都有不同最低门限,判断不同的交换模式需要根据不同的最低门限值进行判断,告警也需要带有交换模式的信息。In response to the routing table entry in the software table corresponding to the current priority being lower than the lowest threshold of the switching mode corresponding to the current priority, an alarm is generated and reported, prompting the network administrator that the switch chip of the switch can no longer meet the customer service scenario. The switching modes corresponding to each priority have different minimum thresholds. The judgment of different switching modes needs to be judged according to different minimum thresholds, and the alarm also needs to have the information of the switching mode.
在本发明的一个优选实施例中,若干交换模式为适用于2层网络的Layer2模式,可最大限度的支持MAC条目、适用于3层网络的Layer3模式、支持IPV4或IPV6双栈的IPV6模式和保持系统所有特性均衡的default模式,共四种。Layer2模式适用于2层网络,可最大限度的支持MAC条目。Layer3模式适用于3层网络,可最大限度的支持IPV4路由条目。IPV6模式支持IPV4或IPV6双栈,可最大限度的支持IPV6路由。defaul模式不支持IPV6,将MAC和IPV4路由表项平均分配,保持系统所有特性均衡。In a preferred embodiment of the present invention, several switching modes are Layer 2 modes suitable for Layer 2 networks, which can support MAC entries to the greatest extent, Layer 3 modes suitable for Layer 3 networks, IPV6 modes that support IPV4 or IPV6 dual stack, and There are four default modes to keep all features of the system balanced. Layer 2 mode is suitable for Layer 2 networks and can support MAC entries to the maximum extent. Layer3 mode is suitable for Layer 3 network and can support IPV4 routing entries to the greatest extent. IPV6 mode supports IPV4 or IPV6 dual stack, which can support IPV6 routing to the greatest extent. The defaul mode does not support IPV6, and distributes the MAC and IPV4 routing table entries equally to keep all features of the system balanced.
在本发明的一个优选实施例中,交换模式的优先级为IPV6模式>Layer3模式>Layer2模式>default模式。也就是说进行判断时,首先查看IPV6模式的路由软件表,并判断该软件表中的路由表项是否超过IPV6模式的最高门限,如果超过则切换为IPV6模式,如果没有则判断Layer3模式,以此类推。In a preferred embodiment of the present invention, the priority of the switching mode is IPV6 mode>Layer3 mode>Layer2 mode>default mode. That is to say, when judging, first check the routing software table of IPV6 mode, and judge whether the routing table entry in the software table exceeds the highest threshold of IPV6 mode, if so, switch to IPV6 mode, if not, judge Layer3 mode, with And so on.
在本发明的一个优选实施例中,IPV6模式的最低门限为100条路由表项,最高门限为1000条路由表项;In a preferred embodiment of the present invention, the minimum threshold of the IPV6 mode is 100 routing table entries, and the maximum threshold is 1000 routing table entries;
Layer3模式的最低门限为4k条路由表项,最高门限为5k条路由表项;The minimum threshold of Layer3 mode is 4k routing table entries, and the highest threshold is 5k routing table entries;
Layer2模式的最低门限为65k条路由表项,最高门限为66k条路由表项。可以根据芯片规格定义IPV6模式,将芯片性格规格最大分配给IPV6的路由表资源定义为最低门限100条路由表项,最高门限1000条路由表项,持续时间1分钟。因为不同品牌交换芯片性能大小不同,客户可以依据实际具体芯片品牌适当调整。可以根据芯片规格定义Layer3模式,将芯片性格规格最大分配给IPV4的路由表资源定义为最低门限4k路由表项,最高门限5K路由表项,持续时间1分钟。可以根据芯片规格定义Layer2模式,将芯片性格规格最大分配MAC资源定义为最低门限65K路由表项,最高门限66K路由表项,持续时间1分钟。The minimum threshold of Layer2 mode is 65k routing entries, and the maximum threshold is 66k routing entries. The IPV6 mode can be defined according to the chip specifications, and the maximum routing table resources allocated to IPV6 by the chip specifications are defined as the minimum threshold of 100 routing table entries and the maximum threshold of 1000 routing table entries, and the duration is 1 minute. Because the performance of different brands of switching chips is different, customers can adjust them according to the actual specific chip brand. The Layer3 mode can be defined according to the chip specifications, and the maximum routing table resources allocated to IPV4 by the chip specifications are defined as the minimum threshold of 4k routing table entries and the maximum threshold of 5K routing table entries, and the duration is 1 minute. The Layer2 mode can be defined according to the chip specification, and the maximum allocation of MAC resources by the chip specification is defined as the minimum threshold of 65K routing entries and the maximum threshold of 66K routing entries, and the duration is 1 minute.
在本发明的一个优选实施例中,还包括:响应于当前优先级对应的软件表中的路由表项均未超过当前优先级对应的交换模式的最高门限或者超过所述当前优先级对应的交换模式的最高门限未持续超过阈值时间,将交换机切换到最低优先级对应的交换模式并将交换机重启。In a preferred embodiment of the present invention, the method further includes: responding that none of the routing entries in the software table corresponding to the current priority exceeds the highest threshold of the switching mode corresponding to the current priority or exceeds the switching mode corresponding to the current priority If the highest threshold of the mode does not last longer than the threshold time, switch the switch to the switching mode corresponding to the lowest priority and restart the switch.
实施例Example
下面是使用本发明的方法调整交换机的交换模式的一个示例性实施例,主要包括以下步骤:The following is an exemplary embodiment of using the method of the present invention to adjust the switching mode of the switch, which mainly includes the following steps:
1.根据交换机应用场景,预先定义四种SDK交换模式为Layer2模式、Layer3模式、IPV6模式和defaul模式,并定义交换模式的优先级为IPV6模式大于Layer3模式大于Layer2模式大于default模式;1. According to the switch application scenario, four SDK switching modes are pre-defined as Layer2 mode, Layer3 mode, IPV6 mode and default mode, and the priority of the switching mode is defined as IPV6 mode greater than Layer3 mode greater than Layer2 mode greater than default mode;
2.查询IPV6模式对应的IPV6路由软件表,判断路由表项是否超过最高门限和最低门限,如果超过最低门限,上报告警信息给网管,如果超过最高门限且持续时间超过时间阈值(默认1分钟),则将交换机启动芯片性能模式切换到IPV6模式并重启交换机,如果路由表项未超过最高门限或持续时间小于时间阈值(默认1分钟),则进行第3步;2. Query the IPV6 routing software table corresponding to the IPV6 mode, and determine whether the routing table entry exceeds the maximum threshold and the minimum threshold. If it exceeds the minimum threshold, an alarm message is reported to the network management. If it exceeds the maximum threshold and the duration exceeds the time threshold (default 1 minute) ), switch the switch startup chip performance mode to IPV6 mode and restart the switch, if the routing table entry does not exceed the maximum threshold or the duration is less than the time threshold (default 1 minute), go to step 3;
3.查询Layer3模式对应的IPV4路由软件表,判断路由表项是否超过最高门限和最低门限,如果超过最低门限,上报告警信息给网管,如果超过最高门限且持续时间超过时间阈值(默认1分钟),则将交换机启动芯片性能模式切换到Layer3模式并重启交换机,如果路由表项未超过最高门限或持续时间小于时间阈值(默认1分钟),则进行第4步;3. Query the IPV4 routing software table corresponding to the Layer3 mode to determine whether the routing table entry exceeds the maximum threshold and the minimum threshold. If it exceeds the minimum threshold, report an alarm to the network management. If it exceeds the maximum threshold and the duration exceeds the time threshold (default 1 minute) ), switch the switch startup chip performance mode to Layer3 mode and restart the switch. If the routing table entry does not exceed the highest threshold or the duration is less than the time threshold (default 1 minute), go to step 4;
4.查询Layer2模式对应的MAC软件表,判断路由表项是否超过最高门限和最低门限,如果超过最低门限,上报告警信息给网管,如果超过最高门限且持续时间超过时间阈值(默认1分钟),则将交换机启动芯片性能模式切换到Layer2模式并重启交换机,如果路由表项未超过最高门限或持续时间小于时间阈值(默认1分钟),则进行第5步;4. Query the MAC software table corresponding to Layer 2 mode to determine whether the routing table entry exceeds the maximum threshold and the minimum threshold. If it exceeds the minimum threshold, report an alarm message to the network management. If it exceeds the maximum threshold and the duration exceeds the time threshold (default 1 minute) , then switch the switch startup chip performance mode to Layer2 mode and restart the switch. If the routing table entry does not exceed the maximum threshold or the duration is less than the time threshold (default 1 minute), go to step 5;
5.将交换机启动芯片性能模式切换到defaul模式。5. Switch the switch boot chip performance mode to defaul mode.
通过本发明的技术方案,能够合理分配交换机芯片表项资源,动态完成交换芯片自适应,无需运维人员手工调整,防止了SONIC白盒交换机因为没有相应芯片表项资源处理,导致报文不能转发的情况,保证了交换机业务的正常运行。Through the technical solution of the present invention, the switch chip table entry resources can be reasonably allocated, the self-adaptation of the switch chip can be dynamically completed, and manual adjustment by operation and maintenance personnel is not required, which prevents the SONIC white box switch from not processing the corresponding chip table entry resources, resulting in the failure of forwarding of messages. This ensures the normal operation of switch services.
需要说明的是,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关硬件来完成,上述的程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中存储介质可为磁碟、光盘、只读存储器(Read-Only Memory,ROM)或随机存取存储器(Random AccessMemory,RAM)等。上述计算机程序的实施例,可以达到与之对应的前述任意方法实施例相同或者相类似的效果。It should be noted that those of ordinary skill in the art can understand that all or part of the processes in the methods of the above-mentioned embodiments can be implemented by instructing relevant hardware through a computer program. The above-mentioned programs can be stored in a computer-readable storage medium. When the program is executed, it may include the flow of the embodiments of the above-mentioned methods. The storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM) or the like. The above computer program embodiments can achieve the same or similar effects as any of the foregoing method embodiments corresponding thereto.
此外,根据本发明实施例公开的方法还可以被实现为由CPU执行的计算机程序,该计算机程序可以存储在计算机可读存储介质中。在该计算机程序被CPU执行时,执行本发明实施例公开的方法中限定的上述功能。In addition, the methods disclosed according to the embodiments of the present invention may also be implemented as a computer program executed by the CPU, and the computer program may be stored in a computer-readable storage medium. When the computer program is executed by the CPU, the above-mentioned functions defined in the methods disclosed in the embodiments of the present invention are executed.
基于上述目的,本发明的实施例的第二个方面,提出了一种交换机交换模式调整的设备,如图2所示,设备200包括:Based on the above purpose, in a second aspect of the embodiments of the present invention, a device for adjusting the switching mode of a switch is provided. As shown in FIG. 2 , the
设定模块,设定模块配置为将交换机的交换模式定义为若干交换模式,并设定若干交换模式的优先级;a setting module, the setting module is configured to define the switching mode of the switch as several switching modes, and set the priorities of the several switching modes;
判断模块,判断模块配置为由最高优先级向最低优先级查询每个优先级对应的路由软件表,并判断当前优先级对应的软件表中的路由表项是否超过当前优先级对应的交换模式的最高门限;Judging module, the judging module is configured to query the routing software table corresponding to each priority from the highest priority to the lowest priority, and determine whether the routing table entry in the software table corresponding to the current priority exceeds the switching mode corresponding to the current priority. the highest threshold;
切换模块,切换模块配置为响应于当前优先级对应的软件表中的路由表项超过当前优先级对应的交换模式的最高门限并且持续超过阈值时间,将交换机切换到当前优先级对应的交换模式并将交换机重启。The switching module is configured to switch the switch to the switching mode corresponding to the current priority in response to the routing table entry in the software table corresponding to the current priority exceeding the highest threshold of the switching mode corresponding to the current priority and continuing to exceed the threshold time. Reboot the switch.
在本发明的一个优选实施例中,还包括告警模块,告警模块配置为:In a preferred embodiment of the present invention, an alarm module is further included, and the alarm module is configured as:
由最高优先级向最低优先级查询每个优先级对应的路由软件表,并判断当前优先级对应的软件表中的路由表项是否低于当前优先级对应的交换模式的最低门限;Query the routing software table corresponding to each priority from the highest priority to the lowest priority, and determine whether the routing table entry in the software table corresponding to the current priority is lower than the lowest threshold of the switching mode corresponding to the current priority;
响应于当前优先级对应的软件表中的路由表项低于当前优先级对应的交换模式的最低门限,生成告警并上报。In response to the routing table entry in the software table corresponding to the current priority being lower than the lowest threshold of the switching mode corresponding to the current priority, an alarm is generated and reported.
在本发明的一个优选实施例中,若干交换模式为适用于2层网络的Layer2模式、适用于3层网络的Layer3模式、支持IPV4或IPV6双栈的IPV6模式和保持系统所有特性均衡的default模式。In a preferred embodiment of the present invention, several switching modes are Layer 2 mode suitable for Layer 2 networks, Layer 3 mode suitable for Layer 3 networks, IPV6 mode supporting IPV4 or IPV6 dual stack, and default mode keeping all features of the system balanced .
在本发明的一个优选实施例中,还包括选择模块,选择模块配置为:响应于当前优先级对应的软件表中的路由表项均未超过当前优先级对应的交换模式的最高门限或者超过所述当前优先级对应的交换模式的最高门限未持续超过阈值时间,将交换机切换到最低优先级对应的交换模式并将交换机重启。In a preferred embodiment of the present invention, a selection module is further included, and the selection module is configured to respond that none of the routing table entries in the software table corresponding to the current priority exceeds the highest threshold of the switching mode corresponding to the current priority or exceeds all If the highest threshold of the switching mode corresponding to the current priority does not continuously exceed the threshold time, switch the switch to the switching mode corresponding to the lowest priority and restart the switch.
需要特别指出的是,上述系统的实施例采用了上述方法的实施例来具体说明各模块的工作过程,本领域技术人员能够很容易想到,将这些模块应用到上述方法的其他实施例中。It should be particularly pointed out that the embodiments of the above system use the embodiments of the above method to specifically describe the working process of each module, and those skilled in the art can easily think of applying these modules to other embodiments of the above method.
上述实施例,特别是任何“优选”实施例是实现的可能示例,并且仅为了清楚地理解本发明的原理而提出。可以在不脱离本文所描述的技术的精神和原理的情况下对上述实施例进行许多变化和修改。所有修改旨在被包括在本公开的范围内并且由所附权利要求保护。The above-described embodiments, particularly any "preferred" embodiments, are possible examples of implementations, and are presented merely for a clear understanding of the principles of the invention. Numerous changes and modifications may be made to the above-described embodiments without departing from the spirit and principles of the technology described herein. All modifications are intended to be included within the scope of this disclosure and protected by the appended claims.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010692454.5A CN111817969B (en) | 2020-07-17 | 2020-07-17 | Method and equipment for adjusting switch mode of switch |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010692454.5A CN111817969B (en) | 2020-07-17 | 2020-07-17 | Method and equipment for adjusting switch mode of switch |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111817969A CN111817969A (en) | 2020-10-23 |
| CN111817969B true CN111817969B (en) | 2022-06-21 |
Family
ID=72866428
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010692454.5A Active CN111817969B (en) | 2020-07-17 | 2020-07-17 | Method and equipment for adjusting switch mode of switch |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111817969B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114978788B (en) * | 2022-05-25 | 2023-04-18 | 西安电子科技大学 | Network switch based on dual-mode switching |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103095573A (en) * | 2013-02-07 | 2013-05-08 | 杭州华三通信技术有限公司 | Method for virtual router redundancy protocol backup set switching and switch |
| CN104184708A (en) * | 2013-05-22 | 2014-12-03 | 杭州华三通信技术有限公司 | Method of inhabiting MAC address attack in EVI (Ethernet Virtualization Interconnection) network and ED (edge device) |
| CN105393511A (en) * | 2014-06-30 | 2016-03-09 | 华为技术有限公司 | Method, device and system for switching switch modes |
| CN105450525A (en) * | 2014-05-28 | 2016-03-30 | 国际商业机器公司 | Method and equipment for using route switching equipment |
-
2020
- 2020-07-17 CN CN202010692454.5A patent/CN111817969B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103095573A (en) * | 2013-02-07 | 2013-05-08 | 杭州华三通信技术有限公司 | Method for virtual router redundancy protocol backup set switching and switch |
| CN104184708A (en) * | 2013-05-22 | 2014-12-03 | 杭州华三通信技术有限公司 | Method of inhabiting MAC address attack in EVI (Ethernet Virtualization Interconnection) network and ED (edge device) |
| CN105450525A (en) * | 2014-05-28 | 2016-03-30 | 国际商业机器公司 | Method and equipment for using route switching equipment |
| CN105393511A (en) * | 2014-06-30 | 2016-03-09 | 华为技术有限公司 | Method, device and system for switching switch modes |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111817969A (en) | 2020-10-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10171567B2 (en) | Load balancing computer device, system, and method | |
| US20220334935A1 (en) | Hot standby method, apparatus, and system | |
| US9276898B2 (en) | Method and device for link fault detecting and recovering based on ARP interaction | |
| US9917724B2 (en) | Access method and system of customer premise equipment, and broadband network gateway | |
| CN106161272B (en) | Realize the method and routing device of VRRP load balancing | |
| EP4142219A1 (en) | Message processing method and apparatus, announcement method and apparatus, network bridge node, source device, storage medium, and message processing system | |
| US10693775B2 (en) | Method and system for providing automatic router assignment in a virtual environment | |
| US9979656B2 (en) | Methods, systems, and computer readable media for implementing load balancer traffic policies | |
| WO2004084496A1 (en) | A method for implementing gateway dynamic load distribution | |
| WO2014190791A1 (en) | Method for setting identity of gateway device and management gateway device | |
| CN102821044A (en) | Method and device for configuring server cluster | |
| CN105959282A (en) | Protection method and device for DHCP attack | |
| CN102377669B (en) | Method for sending message and switch | |
| WO2019185013A1 (en) | Message forwarding | |
| WO2020062268A1 (en) | Method and device for load balancing and message reordering in network | |
| CN106533973A (en) | Method and system for distributing service message, and equipment | |
| US20210092090A1 (en) | Domain name resolution method and apparatus based on a plurality of availability zones az | |
| US10771382B2 (en) | Method and system for balancing network load in a virtual environment | |
| US10476746B2 (en) | Network management method, device, and system | |
| CN109495526A (en) | A kind of file transmitting method, device, system, electronic equipment and storage medium | |
| US9591034B2 (en) | Method and gateway device for managing address resource | |
| CN113726690B (en) | Method, system, electronic equipment and storage medium for uploading protocol message | |
| CN111817969B (en) | Method and equipment for adjusting switch mode of switch | |
| CN117221110A (en) | Container network creation method, device, equipment and storage medium | |
| CN104243304B (en) | The data processing method of non-full-mesh topological structure, equipment and system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP03 | Change 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 |