WO2016082614A1 - 一种组播路由表项处理方法、装置及计算机存储介质 - Google Patents

一种组播路由表项处理方法、装置及计算机存储介质 Download PDF

Info

Publication number
WO2016082614A1
WO2016082614A1 PCT/CN2015/090508 CN2015090508W WO2016082614A1 WO 2016082614 A1 WO2016082614 A1 WO 2016082614A1 CN 2015090508 W CN2015090508 W CN 2015090508W WO 2016082614 A1 WO2016082614 A1 WO 2016082614A1
Authority
WO
WIPO (PCT)
Prior art keywords
multicast routing
routing entry
entry
aging
multicast
Prior art date
Application number
PCT/CN2015/090508
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 WO2016082614A1 publication Critical patent/WO2016082614A1/zh

Links

Images

Definitions

  • the present invention relates to an Ethernet switching technology, and in particular, to a multicast routing entry processing method and apparatus, and a computer storage medium.
  • IP Internet Protocol
  • Layer 3 networks With the rapid development of IP (Internet Protocol) services and the widespread use of Ethernet in metropolitan area networks, the size of Layer 3 networks is increasing, and the use of multicast is becoming more widespread, making the performance of Ethernet switches and Reliability has become the focus of attention of operators.
  • the number of multicast routing entries affects system performance. For example, if the entries are searched, the number of multicast routing entries will affect the creation, deletion, and update of multicast routing entries.
  • the efficiency of the device which in turn affects the utilization of the device resources; when the allocation of the index value or the entry is full, it affects the allocation of system resources, thereby affecting the performance of the entire switch system.
  • the embodiments of the present invention provide:
  • a method for processing a multicast routing entry includes:
  • determining, according to the flag bit, that the path corresponding to the multicast routing entry has no traffic forwarding including:
  • the method further includes: when determining that the path corresponding to the multicast routing entry has traffic forwarding according to the flag bit, setting the flag position to zero.
  • the method before the reading the flag bit in the hardware entry corresponding to the multicast routing entry, the method further includes:
  • the multicast source port corresponding to the multicast routing entry is determined to be on the local line card.
  • the method further includes:
  • the multicast routing entry is aged.
  • an aging period is preset, and the method further includes:
  • Periodic processing is performed according to the aging period set in advance. In each aging period, all multicast routing entries in the multicast routing table are polled to determine whether to perform the aging operation.
  • the aging period and the aging interval are set in advance, and the method further includes:
  • the aging process is performed in batches according to the preset aging period.
  • the multicast routing entries in the multicast routing table are processed in batches to determine whether to perform the aging operation.
  • the embodiment of the present invention further provides a multicast routing entry processing device, including: a first obtaining module, a first determining module, and a first processing module;
  • the first obtaining module is configured to obtain a flag bit in a hardware entry corresponding to the multicast routing entry.
  • the first determining module is configured to determine, according to the flag bit, the pair of multicast routing entries Whether the path should be forwarded by traffic;
  • the first processing module is configured to age the multicast routing entry when the first determining module determines that the path corresponding to the multicast routing entry has no traffic forwarding.
  • the first determining module is configured to: when the flag bit value is 0, determine that the path corresponding to the multicast routing entry has no traffic forwarding;
  • the first processing module is further configured to: when the first determining module determines that the path corresponding to the multicast routing entry has traffic forwarding according to the flag bit, the flag is set to zero.
  • the apparatus further includes a second determining module
  • the second determining module is configured to determine whether the multicast source port corresponding to the multicast routing entry is on the local line card.
  • the first obtaining module is configured to acquire, when the second determining module determines that the multicast source port corresponding to the multicast routing entry is on the local line card, the hardware entry corresponding to the multicast routing entry The flag in the middle.
  • the device further includes: a second obtaining module, a third determining module, a reporting module, a fourth determining module, and a second processing module;
  • the second obtaining module is configured to obtain a flag bit in a hardware entry corresponding to the multicast routing entry of the virtual port as the virtual port;
  • the third determining module is configured to determine, according to the flag bit, whether the path corresponding to the multicast routing entry has traffic forwarding;
  • the reporting module is configured to report the keep-alive message of the multicast routing entry to the third determining module when the third determining module determines that the path corresponding to the multicast routing entry has traffic forwarding;
  • the fourth determining module is configured to determine whether a keep-alive message of the multicast routing entry is received within a preset time period
  • the second processing module is configured to age the multicast routing entry when the fourth determining module determines that the keep-alive message of the multicast routing entry is not received within the preset time period.
  • the device performs periodic processing according to a preset aging period, and polls all multicast routing entries in the multicast routing table in each aging period to determine whether to perform an aging operation.
  • the periodic processing is performed according to the preset aging period.
  • the multicast routing entries in the multicast routing table are processed in batches according to the preset aging interval to determine whether to perform. Aging operation.
  • the embodiment of the present invention further provides a computer storage medium, where the storage medium includes a set of computer executable instructions, and the instructions are used to execute the multicast routing entry processing method according to the embodiment of the present invention.
  • the method and device for processing a multicast routing entry and the computer storage medium obtain a flag bit in a hardware entry corresponding to a multicast routing entry; and determine the multicast routing entry according to the flag bit.
  • the multicast routing entry is aged when the corresponding path has no traffic forwarding.
  • the embodiments of the present invention can implement rapid and timely aging of multicast routing entries based on the existing multicast routing protocol, thereby improving device resource utilization and system performance.
  • FIG. 1 is a schematic flowchart of a method for processing a multicast routing entry according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a device for processing a multicast routing entry according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of another apparatus for processing a multicast routing entry according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of another apparatus for processing a multicast routing entry according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of a method for aging a multicast routing entry according to Embodiment 1 of the present invention.
  • FIG. 6 is a schematic flowchart of a keepalive process of a multicast routing entry according to Embodiment 2 of the present invention.
  • FIG. 7 is a schematic flowchart of a process for aging a multicast routing entry according to Embodiment 3 of the present invention.
  • the embodiment of the present invention provides a multicast routing entry processing solution, which is specifically described as follows.
  • the multicast routing system of the device can work normally. It can be roughly divided into a multicast routing protocol control part and a hardware forwarding part.
  • the multicast routing protocol control part is used to calculate and generate a multicast routing table
  • the hardware forwarding part is a multicast routing part. After the protocol control part generates the route, it is written in the hardware table, and the multicast data packet is forwarded according to the hardware routing entry.
  • the aging method of the multicast routing entry in the embodiment of the present invention is between the two parts. .
  • the multicast routing protocol has its own aging mode, which is performed by the protocol itself.
  • the aging time is more than three minutes.
  • the method in the embodiment of the present invention is based on the hardware forwarding entry and forwarding.
  • the traffic is implemented.
  • the solution described in the embodiment of the present invention can simultaneously support a centralized switch and a distributed switch.
  • Multicast routing entry (*, G, V) or (S, G, V), where G is the group address, S is the multicast source address, and V is the virtual local area network where the multicast source resides.
  • VLAN here also refers to a multicast source port (Source Port), this port is used in (S, G, V), used for reverse path lookup (RPF), if the multicast stream is not If it is received from the source port corresponding to (S, G, V), it will be used as an unknown multicast data packet.
  • Multicast routing database used to save all generated multicast routing entries.
  • the embodiment of the invention provides a method for processing a multicast routing entry. As shown in FIG. 1 , the method includes:
  • Step 101 Obtain a flag bit in a hardware entry corresponding to the multicast routing entry.
  • the multicast source port corresponding to the multicast routing entry is determined to be on the local line card, and then step 101 is performed.
  • This flag in the hardware forwarding entry is mainly used to distinguish whether there is multicast traffic forwarding. For example, the hit bits in some existing chips will set this flag to 1 when there is multicast traffic for forwarding.
  • Step 102 Attenuate the multicast routing entry when the path corresponding to the multicast routing entry is not forwarded according to the flag bit.
  • the flag bit may be a hit bit.
  • the hit bit value When the hit bit value is 1, it indicates that there is traffic forwarding.
  • the hit bit value When the hit bit value is 0, it indicates that there is no traffic forwarding.
  • the flag bit value when the flag bit value is 0.
  • the path corresponding to the multicast routing entry is determined to have no traffic forwarding.
  • the method further includes: when determining that the path corresponding to the multicast routing entry has traffic forwarding according to the flag bit, setting the flag position to zero.
  • the method further includes a keep-alive processing process, specifically:
  • the multicast routing entry is aged.
  • an aging period is set in advance, periodic processing is performed according to a preset aging period, and all multicast routing entries in the multicast routing table are polled in each aging period to determine whether to perform aging. operating.
  • an aging timer is required. The timeout period of this timer is smaller than the aging time of the protocol. You can directly read the default configuration or configure it through the command line. When the aging timer expires. You can run the aging process (corresponding to the process shown in Figure 1) and the keep-alive process at the same time.
  • the periodic processing is performed according to the preset aging period, and the multicast routing in the multicast routing table is further performed according to the preset aging interval in the aging period.
  • the entries are processed in batches to determine whether the aging operation is performed.
  • the embodiment of the present invention further provides a multicast routing entry processing device.
  • the device includes: a first obtaining module 201, a first determining module 202, and a first processing module. 203; among them,
  • the first obtaining module 201 is configured to obtain a flag bit in a hardware entry corresponding to the multicast routing entry.
  • the first determining module 202 is configured to determine, according to the flag bit, whether the path corresponding to the multicast routing entry has traffic forwarding;
  • the first processing module 203 is configured to age the multicast routing entry when the first determining module 202 determines that the path corresponding to the multicast routing entry has no traffic forwarding.
  • the first determining module 202 is configured to: when the flag bit value is 0, determine that the path corresponding to the multicast routing entry has no traffic forwarding;
  • the first processing module 203 is further configured to: when the first determining module 202 determines that the path corresponding to the multicast routing entry has traffic forwarding according to the flag bit, the flag is set to zero.
  • the device further includes a second determining module 204.
  • the second determining module 204 is configured to determine whether the multicast source port corresponding to the multicast routing entry is on the local line card.
  • the first obtaining module 201 is configured to acquire the hardware corresponding to the multicast routing entry when the second determining module 204 determines that the multicast source port corresponding to the multicast routing entry is on the local line card. The flag in the entry.
  • the device further includes: a second obtaining module 205, a third determining module 206, a reporting module 207, a fourth determining module 208, and a second processing module 209;
  • the second obtaining module 205 is configured to obtain a flag bit in a hardware entry corresponding to the multicast routing entry of the virtual port.
  • the third determining module 206 is configured to determine, according to the flag bit, whether the path corresponding to the multicast routing entry has traffic forwarding;
  • the reporting module 207 is configured to report the multicast routing table to the third determining module 206 when the third determining module 206 determines that the path corresponding to the multicast routing entry has traffic forwarding. Keep-alive message of the item;
  • the fourth determining module 208 is configured to determine whether the keepalive message of the multicast routing entry is received within a preset time period
  • the second processing module 209 is configured to age the multicast routing entry when the fourth determining module 208 determines that the keep-alive message of the multicast routing entry is not received within the preset time period.
  • the device performs periodic processing according to a preset aging period, and polls all multicast routing entries in the multicast routing table in each aging period to determine whether to perform an aging operation.
  • the periodic processing is performed according to the preset aging period.
  • the multicast routing entries in the multicast routing table are processed in batches according to the preset aging interval to determine whether to perform. Aging operation.
  • FIG. 5 is a schematic flowchart of an aging timer for implementing aging of a multicast routing entry according to the present invention. As shown in FIG. 5, the method includes the following steps:
  • Step 501 Acquire an aging interval.
  • a device can have a number of multicast routing entries.
  • the device supports 4096.
  • the aging timer expires, the aging and keep-alive processes can be performed on the 4096 entries.
  • Broadcast routing protocol module if such a system will generate a large number of messages in an instant, and the CPU utilization will increase, because each multicast routing entry may send a message, so here is the process of calculating the aging interval, such as It is said that an aging cycle can be divided into three segments, and each time one-third of all multicast routing entries are reported, so that CPU utilization and a large number of messages are spread to different time segments.
  • Step 502 Determine whether it is within the aging interval calculated in step 501;
  • Step 503 Perform a process of aging the multicast routing entry.
  • the aging process may be: polling all the generated multicast routing entries, and reading the information bits in the corresponding hardware entries by using the information of each obtained software multicast routing entry (hardware transfer)
  • This flag in the publication item will set this flag when there is multicast traffic for forwarding, for example, the hit bit in some existing chips. After reading, if the flag is 1, it will be cleared. This flag (the hardware entry has traffic forwarding, this flag will be set again). If the flag is 0, the aging message is reported to the protocol layer.
  • the protocol layer aging the multicast route and deleting the corresponding hardware entry.
  • the centralized switch can be processed according to the above process. If it is a distributed switch, only when the ingress port of the source is on the line card, the process can be processed according to the above procedure. The source port on the non-line card is not processed.
  • Step 504 Perform a multicast routing entry retentive processing process.
  • the multicast routing protocol module performs aging processing on the multicast routing entry according to the information reported by the keep-alive.
  • the keep-alive process is actually an application of the aging process of an entry.
  • the source port is a virtual port, such as a smartgroup port
  • its member ports may be distributed on different line cards, but for some
  • the line card can only know whether there is traffic on the line card for forwarding, and the source port may not be on the line card. Therefore, a line card cannot determine to delete the multicast routing table because its hardware forwarding entry has no traffic. Item, but each line card can know that its forwarding entry has traffic forwarding, and reporting the keep-alive message to the protocol layer is no problem.
  • a source port is a smartgroup port, and its member ports are distributed on different line cards.
  • the multicast routing protocol module considers that the multicast routing entry can be aged if it does not receive the keep-alive message from the line card within one cycle. , the deletion of the multicast routing entry is delivered.
  • This embodiment describes a detailed method flow of the multicast routing entry keepalive processing, as shown in FIG. 6, including:
  • Step 601 Read the multicast routing database, and match the source port as an attribute of the virtual port;
  • Step 602 Whether the first matching multicast routing entry in the database is found, if found Go to 603 when you arrive, skip to 607 if you don't find it;
  • Step 603 Read the hit bit in the hardware routing forwarding entry according to the routing entry information currently read from the database.
  • Step 604 Determine whether the hit bit is 1, if it is 1, it can report the keep-alive, and jump to 605. If it is not 1, skip to 606 to take a matching routing information;
  • step 605 the multicast routing keep-alive message is reported, and the keep-alive message is reported to the multicast routing protocol module, and the reporting of the keep-alive message can also be reported in a segmental manner. For example, 100 reports are reported once;
  • Step 606 Read the next route in the multicast routing database, and the source port is required to be a virtual port, and jump 602;
  • Step 607 The multicast routing entry preservation process ends.
  • This embodiment describes the detailed method flow of the aging process of the multicast routing entry, as shown in Figure 7, including:
  • Step 701 Find a specified route according to the keyword, and the keyword may be an entry number.
  • Step 702 Determine whether the specified route is found, if found, go to step 703, otherwise go to step 708;
  • Step 703 Determine whether the source port of the route is on the line card, because the aging process can only process the routing entry on the local line card, if yes, go to step 704, otherwise go to step 708;
  • Step 704 Read the hit bit in the hardware routing forwarding entry according to the routing entry information currently read from the database.
  • Step 705 Determine whether the hit bit is 1, if it is 1, then jump to 706, if not 1, jump to 707;
  • Step 706 Clear the bit bit of the current multicast routing forwarding entry in the hardware entry. If a multicast data packet is forwarded through the route, the hit bit is set again.
  • Step 707 Reporting the multicast routing aging message, and reporting the aging message to the multicast routing protocol module.
  • the reporting of aging messages can also be reported in segments. For example, 100 reports are reported once.
  • Step 708 The aging process of the multicast routing entry ends.
  • the method for aging the multicast routing entry in the embodiment of the present invention is between the multicast routing protocol module and the hardware forwarding entry.
  • the multicast routing table can be discovered earlier by periodically reading the hardware entry information. The item is no longer used as a forwarding entry, so that the entry deletion is performed, and the device resources are released.
  • Each of the above units may be implemented by a central processing unit (CPU), a digital signal processor (DSP), or a field-programmable gate array (FPGA) in an electronic device.
  • CPU central processing unit
  • DSP digital signal processor
  • FPGA field-programmable gate array
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明实施例公开了一种组播路由表项处理方法、装置及计算机存储介质,该方法包括:获取组播路由表项对应的硬件表项中的标志位;根据所述标志位确定所述组播路由表项对应的路径没有流量转发时,老化所述组播路由表项。本发明实施例能够在现有组播路由协议的基础上实现组播路由表项的快速及时老化,从而能够提高设备资源利用率及系统性能。

Description

一种组播路由表项处理方法、装置及计算机存储介质 技术领域
本发明涉及以太网交换技术,尤其涉及一种组播路由表项处理方法、装置及计算机存储介质。
背景技术
随着IP(网际协议)业务的高速发展,以及以太网在城域网中的广泛应用,三层网络的规模越来越大,组播的使用越来越广泛,使得以太网交换机的性能及可靠性成了各运营商关注的焦点。
在以太网交换机中,组播路由表项的多少会对系统性能造成影响,例如,由于涉及表项的查找,组播路由表项过多会影响组播路由表项的创建,删除和更新时的效率,进而影响设备资源利用率;当索引值的分配或表项已满时,会影响系统资源的分配,从而影响到整个交换机系统的性能。
因此,如何对组播路由表项进行处理,从而在不影响系统功能实现的前提下,有效减少组播路由表项过多对设备资源利用率及系统性能的影响,是一个值得关注的问题。
发明内容
有鉴于此,为解决现有存在的技术问题,本发明实施例提供:
一种组播路由表项处理方法,包括:
获取组播路由表项对应的硬件表项中的标志位;
根据所述标志位确定所述组播路由表项对应的路径没有流量转发时,老化所述组播路由表项。
一具体实施例中,根据所述标志位确定所述组播路由表项对应的路径没有流量转发,包括:
所述标志位值为0时,确定所述组播路由表项对应的路径没有流量转发;
该方法还包括:根据所述标志位确定所述组播路由表项对应的路径有流量转发时,将所述标志位置零。
一具体实施例中,所述读取组播路由表项对应的硬件表项中的标志位之前,该方法还包括:
确定所述组播路由表项对应的组播源端口在本地线卡上。
一具体实施例中,该方法还包括:
对于组播源端口为虚端口的组播路由表项,获取所述组播路由表项对应的硬件表项中的标志位;
根据所述标志位确定所述组播路由表项对应的路径有流量转发时,上报所述组播路由表项的保活消息;
确定在预设时间段内没有接收到所述组播路由表项的保活消息,则老化所述组播路由表项。
一具体实施例中,预先设置老化周期,该方法还包括:
按照预先设置的老化周期进行周期性处理,在每个老化周期,轮询组播路由表中的所有组播路由表项,判断是否执行老化操作。
一具体实施例中,预先设置老化周期和老化区间,该方法还包括:
按照预先设置的老化周期进行周期性处理,在老化周期内,进一步按照预设的老化区间,对组播路由表中的组播路由表项分批进行处理,判断是否执行老化操作。
本发明实施例还提供了一种组播路由表项处理装置,包括:第一获取模块、第一判断模块和第一处理模块;其中,
所述第一获取模块,配置为获取组播路由表项对应的硬件表项中的标志位;
所述第一判断模块,配置为根据所述标志位确定所述组播路由表项对 应的路径是否有流量转发;
所述第一处理模块,配置为当第一判断模块确定所述组播路由表项对应的路径没有流量转发时,老化所述组播路由表项。
一具体实施例中,所述第一判断模块,配置为当所述标志位值为0时,确定所述组播路由表项对应的路径没有流量转发;
所述第一处理模块,还配置为在所述第一判断模块根据所述标志位确定所述组播路由表项对应的路径有流量转发时,将所述标志位置零。
一具体实施例中,该装置还包括第二判断模块,
所述第二判断模块,配置为判断组播路由表项对应的组播源端口是否在本地线卡上;
所述第一获取模块,配置为在所述第二判断模块确定所述组播路由表项对应的组播源端口在本地线卡上时,获取所述组播路由表项对应的硬件表项中的标志位。
一具体实施例中,该装置还包括:第二获取模块、第三判断模块、上报模块、第四判断模块和第二处理模块;其中,
所述第二获取模块,配置为获取组播源端口为虚端口的组播路由表项对应的硬件表项中的标志位;
所述第三判断模块,配置为判断根据所述标志位确定所述组播路由表项对应的路径是否有流量转发;
所述上报模块,配置为在所述第三判断模块确定所述组播路由表项对应的路径有流量转发时,向第三判断模块上报所述组播路由表项的保活消息;
所述第四判断模块,配置为判断是否在预设时间段内接收到组播路由表项的保活消息;
所述第二处理模块,配置为在第四判断模块确定在预设时间段内没有接收到所述组播路由表项的保活消息时,老化所述组播路由表项。
一具体实施例中,该装置按照预先设置的老化周期进行周期性处理,在每个老化周期,轮询组播路由表中的所有组播路由表项,判断是否执行老化操作。
一具体实施例中,按照预先设置的老化周期进行周期性处理,在老化周期内,进一步按照预设的老化区间,对组播路由表中的组播路由表项分批进行处理,判断是否执行老化操作。
本发明实施例还提供了一种计算机存储介质,所述存储介质包括一组计算机可执行指令,所述指令用于执行本发明实施例所述的组播路由表项处理方法。
本发明实施例所述的组播路由表项处理方法、装置及计算机存储介质,获取组播路由表项对应的硬件表项中的标志位;根据所述标志位确定所述组播路由表项对应的路径没有流量转发时,老化所述组播路由表项。本发明实施例能够在现有组播路由协议的基础上实现组播路由表项的快速及时老化,从而能够提高设备资源利用率及系统性能。
附图说明
图1为本发明实施例一种组播路由表项处理方法流程示意图;
图2为本发明实施例一种组播路由表项处理装置结构示意图;
图3为本发明实施例再一种组播路由表项处理装置结构示意图;
图4为本发明实施例再一种组播路由表项处理装置结构示意图;
图5为本发明实施例1一种组播路由表项老化的方法流程示意图;
图6为本发明实施例2所述的组播路由表项保活处理流程示意图;
图7为本发明实施例3所述的组播路由表项老化处理流程示意图。
具体实施方式
为了在现有组播路由协议的基础上实现组播路由表项的快速及时老化, 以提高设备资源利用率,提高系统性能,本发明实施例提出一种组播路由表项处理方案,具体说明如下。
设备的组播路由系统可以正常工作,大体可以分为组播路由协议控制部分和硬件转发部分,组播路由协议控制部分用来计算并生成组播路由表,硬件转发部分则是由组播路由协议控制部分生成路由后,写入硬件表中,组播数据报文按此硬件路由表项进行转发,本发明实施例所述的组播路由表项的老化方法就是在这两个部分之间。
组播路由协议有自己的老化方式,是由协议自己来完成的,其老化时间都在三分钟以上,本发明实施例所述的方法是在协议之外,主要是根据硬件转发表项和转发的流量来实现的。本发明实施例所述方案可同时支持集中式交换机和分布式交换机。
本发明实施例涉及的一些概念解释如下:
组播路由表项(*,G,V)或(S,G,V),其中,G为组地址,S为组播源地址,V为组播源所在的虚拟局域网(Virtual Local Area Network,VLAN),这里还涉及到一个组播源端口(Source Port),这个端口用在(S,G,V)中,用来做反向路径查找(Reverse Path Forwarding,RPF),如果组播流不是从(S,G,V)对应的源端口收到的,则会作为未知组播数据报文。
组播路由数据库:用来保存所有生成的组播路由表项。
本发明实施例提出了一种组播路由表项处理方法,如图1所示,该方法包括:
步骤101:获取组播路由表项对应的硬件表项中的标志位;
这里,需要预先确定所述组播路由表项对应的组播源端口在本地线卡上,之后执行步骤101。
硬件转发表项中的这个标志位主要用于区分是否有组播流量转发,如,现有一些芯片中的hit位,当有组播流量作转发时,就会将这个标志位置1。
步骤102:根据所述标志位确定所述组播路由表项对应的路径没有流量转发时,老化所述组播路由表项。
这里,所述标志位可以为hit位,hit位值为1时,表示有流量转发,hit位值为0时,表示没有流量转发;相应的,步骤102中,当所述标志位值为0时,确定所述组播路由表项对应的路径没有流量转发。
另外,该方法还包括:根据所述标志位确定所述组播路由表项对应的路径有流量转发时,将所述标志位置零。
一具体实施例中,该方法还包括保活处理流程,具体为:
对于组播源端口为虚端口的组播路由表项,获取所述组播路由表项对应的硬件表项中的标志位;
根据所述标志位确定所述组播路由表项对应的路径有流量转发时,上报所述组播路由表项的保活消息;
确定在预设时间段内没有接收到所述组播路由表项的保活消息,则老化所述组播路由表项。
本发明实施例中,如果预先设置了老化周期,则按照预先设置的老化周期进行周期性处理,在每个老化周期,轮询组播路由表中的所有组播路由表项,判断是否执行老化操作。需要说明的是,为了实现周期性处理,需要设置一老化定时器,这个定时器的超时时间小于协议老化时间,可以直接读取默认配置,也可以通过命令行进行配置,当老化定时器超时时,可以同时运行老化处理流程(对应图1所示流程)和保活处理流程。
本发明实施例中,如果预先设置老化周期和老化区间,则按照预先设置的老化周期进行周期性处理,在老化周期内,进一步按照预设的老化区间,对组播路由表中的组播路由表项分批进行处理,判断是否执行老化操作。
本发明实施例还相应地提出了一种组播路由表项处理装置,如图2所示,该装置包括:第一获取模块201、第一判断模块202和第一处理模块 203;其中,
所述第一获取模块201,配置为获取组播路由表项对应的硬件表项中的标志位;
所述第一判断模块202,配置为根据所述标志位确定所述组播路由表项对应的路径是否有流量转发;
所述第一处理模块203,配置为当第一判断模块202确定所述组播路由表项对应的路径没有流量转发时,老化所述组播路由表项。
一具体实施例中,所述第一判断模块202,配置为当所述标志位值为0时,确定所述组播路由表项对应的路径没有流量转发;
所述第一处理模块203,还配置为在所述第一判断模块202根据所述标志位确定所述组播路由表项对应的路径有流量转发时,将所述标志位置零。
一具体实施例中,如图3所示,该装置还包括第二判断模块204,
所述第二判断模块204,配置为判断组播路由表项对应的组播源端口是否在本地线卡上;
所述第一获取模块201,配置为在所述第二判断模块204确定所述组播路由表项对应的组播源端口在本地线卡上时,获取所述组播路由表项对应的硬件表项中的标志位。
一具体实施例中,如图4所示,该装置还包括:第二获取模块205、第三判断模块206、上报模块207、第四判断模块208和第二处理模块209;其中,
所述第二获取模块205,配置为获取组播源端口为虚端口的组播路由表项对应的硬件表项中的标志位;
所述第三判断模块206,配置为根据所述标志位确定所述组播路由表项对应的路径是否有流量转发;
所述上报模块207,配置为在所述第三判断模块206确定所述组播路由表项对应的路径有流量转发时,向第三判断模块206上报所述组播路由表 项的保活消息;
所述第四判断模块208,配置为判断是否在预设时间段内接收到组播路由表项的保活消息;
所述第二处理模块209,配置为在第四判断模块208确定在预设时间段内没有接收到所述组播路由表项的保活消息时,老化所述组播路由表项。
一具体实施例中,该装置按照预先设置的老化周期进行周期性处理,在每个老化周期,轮询组播路由表中的所有组播路由表项,判断是否执行老化操作。
一具体实施例中,按照预先设置的老化周期进行周期性处理,在老化周期内,进一步按照预设的老化区间,对组播路由表中的组播路由表项分批进行处理,判断是否执行老化操作。
下面通过附图及具体实施例对本发明再做进一步的详细说明。
实施例1
本实施例提供一种组播路由表项老化的方法,图5是本发明实现组播路由表项老化的老化定时器流程示意图,如图5所示,该方法包括以下步骤:
步骤501:获取老化区间;
一个设备的组播路由表项可以有很多条,现在设备支持的是4096条,当老化定时器超时时,可以一次性的对这4096条表项作老化和保活流程的处理,然后上报组播路由协议模块,如果这样系统中会瞬间产生大量的消息,并且CPU的利用率会升高,因为可能每一条组播路由条目会发一条消息,所以在这里加了计算老化区间的流程,比如说可以将一个老化周期分成三段,每次上报所有组播路由条目的1/3,使CPU利用率和大量的消息均摊到不同的时间段。
步骤502:判断是否是在步骤501中计算出来的老化区间内;
步骤503:执行组播路由表项老化处理流程;
这里,老化处理流程可以为:对所有已生成的组播路由表项进行轮询,通过每一个得到的软件组播路由表项的信息,读取对应的硬件表项中的标志位(硬件转发表项中的这个标志,当有组播流量作转发时,就会将这个标志置1,如,现有一些芯片中的hit位),读完后,如果该标志位为1,则清掉这个标志(这个硬件表项有流量转发,这个标志会再次置位),如果这个标志位是0,则向协议层上报老化消息,协议层会老化这个组播路由,删除对应的硬件表项。集中式交换机可以按上述流程处理,如果是分布式交换机,只有当源的入端口是在本线卡上时,可以按上述流程处理,非本线卡上源端口不作处理。
步骤504:执行组播路由表项保活处理流程,实际上组播路由协议模块会根据这个保活上报的信息,对组播路由表项进行老化处理。
这里,保活处理流程其实也是一个表项老化过程的应用,在一个分布式交换机上,如果源端口是个虚端口,如smartgroup端口,其成员端口可能分布在不同的线卡上,而对于某个线卡,只能知道本线卡上是否有流量进行转发,而源端口有可能不在本线卡上,所以,一个线卡就不能因为自己的硬件转发表项没有流量而确定删除组播路由表项,但是每个线卡可以知道自己的转发表项有流量在转发,而向协议层上报保活消息则是没有问题的。一个源端口是smartgroup端口,其成员端口分布在不同的线卡,组播路由协议模块则通过一个周期内,没有收到这些线卡上报保活消息,则认为这个组播路由表项可以老化了,下发组播路由表项的删除操作。
实施例2
本实施例描述组播路由表项保活处理的详细方法流程,如图6所示,包括:
步骤601:读取组播路由数据库,并匹配源端口是虚端口的属性;
步骤602:是否找到了数据库中的第一条匹配的组播路由表项,如果找 到则跳到603,如果没找到则跳到607;
步骤603:根据当前从数据库中读出的路由条目信息,读取硬件路由转发表项中的hit位;
步骤604:判断hit位是否为1,如果为1,说明可以上报保活,跳到605,如果不为1,则跳到606取下一条匹配的路由信息;
步骤605:上报组播路由保活消息,将保活消息上报给组播路由协议模块,保活消息的上报也可以分段上报,比如说,100条上报一次;
步骤606:读取组播路由数据库中下一条路由,要求源端口是虚端口,跳行602;
步骤607:组播路由表项保活流程结束。
实施例3
本实施例描述组播路由表项老化处理流程的详细方法流程,如图7所示,包括:
步骤701:根据关键字查找指定的路由,这个关键字可以是表项编号。
步骤702:判断是否找到指定的路由,找到则转步骤703,否则转步骤708;
步骤703:判断这条路由的源端口是否在本线卡上,因为老化处理,只能处理本地线卡上的路由表项,如果是则转步骤704,否则转步骤708;
步骤704:根据当前从数据库中读出的路由条目信息,去读取硬件路由转发表项中的hit位;
步骤705:判断hit位是否为1,如果为1,则跳到706,如果不为1,则跳到707;
步骤706:清除硬件表项中当前组播路由转发表项的hit位,如果有组播数据报文通过这条路由在转发,hit位会再次置位;
步骤707:上报组播路由老化消息,将老化消息上报给组播路由协议模 块,老化消息的上报也可以分段上报,比如说,100条上报一次。
步骤708:组播路由表项老化流程结束。
本发明实施例描述的组播路由表项老化的方法,介于组播路由协议模块和硬件转发表项之间,通过周期性的读取硬件表项信息,可以较早的发现组播路由表项已不再作为转发表项,以便进行表项删除操作,释放设备资源,实现了由底层来实现主动的表项老化操作。
上述各单元可以由电子设备中的中央处理器(Central Processing Unit,CPU)、数字信号处理器(Digital Signal Processor,DSP)或可编程逻辑阵列(Field-Programmable Gate Array,FPGA)实现。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。

Claims (13)

  1. 一种组播路由表项处理方法,该方法包括:
    获取组播路由表项对应的硬件表项中的标志位;
    根据所述标志位确定所述组播路由表项对应的路径没有流量转发时,老化所述组播路由表项。
  2. 根据权利要求1所述的方法,其中,根据所述标志位确定所述组播路由表项对应的路径没有流量转发,包括:
    所述标志位值为0时,确定所述组播路由表项对应的路径没有流量转发;
    该方法还包括:根据所述标志位确定所述组播路由表项对应的路径有流量转发时,将所述标志位置零。
  3. 根据权利要求1所述的方法,其中,所述读取组播路由表项对应的硬件表项中的标志位之前,该方法还包括:
    确定所述组播路由表项对应的组播源端口在本地线卡上。
  4. 根据权利要求1所述的方法,其中,该方法还包括:
    对于组播源端口为虚端口的组播路由表项,获取所述组播路由表项对应的硬件表项中的标志位;
    根据所述标志位确定所述组播路由表项对应的路径有流量转发时,上报所述组播路由表项的保活消息;
    确定在预设时间段内没有接收到所述组播路由表项的保活消息,则老化所述组播路由表项。
  5. 根据权利要求1至4任一项所述的方法,其中,预先设置老化周期,该方法还包括:
    按照预先设置的老化周期进行周期性处理,在每个老化周期,轮询组播路由表中的所有组播路由表项,判断是否执行老化操作。
  6. 根据权利要求1至4任一项所述的方法,其中,预先设置老化周期和老化区间,该方法还包括:
    按照预先设置的老化周期进行周期性处理,在老化周期内,进一步按照预设的老化区间,对组播路由表中的组播路由表项分批进行处理,判断是否执行老化操作。
  7. 一种组播路由表项处理装置,该装置包括:第一获取模块、第一判断模块和第一处理模块;其中,
    所述第一获取模块,配置为获取组播路由表项对应的硬件表项中的标志位;
    所述第一判断模块,配置为根据所述标志位确定所述组播路由表项对应的路径是否有流量转发;
    所述第一处理模块,配置为当第一判断模块确定所述组播路由表项对应的路径没有流量转发时,老化所述组播路由表项。
  8. 根据权利要求7所述的装置,其中,
    所述第一判断模块,配置为当所述标志位值为0时,确定所述组播路由表项对应的路径没有流量转发;
    所述第一处理模块,还配置为在所述第一判断模块根据所述标志位确定所述组播路由表项对应的路径有流量转发时,将所述标志位置零。
  9. 根据权利要求7所述的装置,其中,该装置还包括第二判断模块,
    所述第二判断模块,配置为判断组播路由表项对应的组播源端口是否在本地线卡上;
    所述第一获取模块,配置为在所述第二判断模块确定所述组播路由表项对应的组播源端口在本地线卡上时,获取所述组播路由表项对应的硬件表项中的标志位。
  10. 根据权利要求7所述的装置,其中,该装置还包括:第二获取模块、第三判断模块、上报模块、第四判断模块和第二处理模块;其中,
    所述第二获取模块,配置为获取组播源端口为虚端口的组播路由表项对应的硬件表项中的标志位;
    所述第三判断模块,配置为判断根据所述标志位确定所述组播路由表项对应的路径是否有流量转发;
    所述上报模块,配置为在所述第三判断模块确定所述组播路由表项对应的路径有流量转发时,向第三判断模块上报所述组播路由表项的保活消息;
    所述第四判断模块,配置为判断是否在预设时间段内接收到组播路由表项的保活消息;
    所述第二处理模块,配置为在第四判断模块确定在预设时间段内没有接收到所述组播路由表项的保活消息时,老化所述组播路由表项。
  11. 根据权利要求7至10任一项所述的装置,其中,该装置按照预先设置的老化周期进行周期性处理,在每个老化周期,轮询组播路由表中的所有组播路由表项,判断是否执行老化操作。
  12. 根据权利要求7至10任一项所述的装置,其中,按照预先设置的老化周期进行周期性处理,在老化周期内,进一步按照预设的老化区间,对组播路由表中的组播路由表项分批进行处理,判断是否执行老化操作。
  13. 一种计算机存储介质,所述存储介质包括一组计算机可执行指令,所述指令用于执行权利要求1-6任一项所述的组播路由表项处理方法。
PCT/CN2015/090508 2014-11-27 2015-09-24 一种组播路由表项处理方法、装置及计算机存储介质 WO2016082614A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410698989.8A CN105704046A (zh) 2014-11-27 2014-11-27 一种组播路由表项处理方法及装置
CN201410698989.8 2014-11-27

Publications (1)

Publication Number Publication Date
WO2016082614A1 true WO2016082614A1 (zh) 2016-06-02

Family

ID=56073560

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/090508 WO2016082614A1 (zh) 2014-11-27 2015-09-24 一种组播路由表项处理方法、装置及计算机存储介质

Country Status (2)

Country Link
CN (1) CN105704046A (zh)
WO (1) WO2016082614A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116366577A (zh) * 2023-03-06 2023-06-30 深圳市丰润达科技有限公司 交换机组播组的带宽分配方法、装置及可读存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113381937B (zh) * 2021-06-09 2022-09-13 烽火通信科技股份有限公司 一种信息状态上报方法和网络设备
CN114697728B (zh) * 2022-05-31 2024-04-05 浙江宇视科技有限公司 一种图像输出控制方法、系统、电子设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1595879A (zh) * 2003-09-08 2005-03-16 华为技术有限公司 一种大容量组播路由表下提高组播数据转发效率的方法
CN101030919A (zh) * 2006-03-02 2007-09-05 中兴通讯股份有限公司 复用接口板地址时网络地址转换的实现方法
CN101374113A (zh) * 2008-10-07 2009-02-25 中兴通讯股份有限公司 一种基于组索引的组播跨板转发控制方法
CN101800701A (zh) * 2010-02-24 2010-08-11 北京交通大学 基于集中控制的组播路由控制方法
CN102075417A (zh) * 2010-09-30 2011-05-25 杭州华三通信技术有限公司 组播剪枝方法及协议无关组播路由器、二层交换机

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7002955B1 (en) * 2000-03-06 2006-02-21 Advanced Micro Devices, Inc. Selective address table aging in a network switch based on application state determined from a received data packet
CN100438439C (zh) * 2006-05-19 2008-11-26 华为技术有限公司 一种防止mac地址欺骗的方法
CN101094187B (zh) * 2007-07-30 2010-06-09 杭州华三通信技术有限公司 一种学习介质访问控制地址的方法和装置、业务板
KR101308088B1 (ko) * 2011-12-09 2013-09-12 주식회사 시큐아이 고가용성 정적 멀티캐스트 라우팅 방법 및 시스템
CN103209134B (zh) * 2013-04-22 2017-02-15 杭州华三通信技术有限公司 一种组播转发的方法和设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1595879A (zh) * 2003-09-08 2005-03-16 华为技术有限公司 一种大容量组播路由表下提高组播数据转发效率的方法
CN101030919A (zh) * 2006-03-02 2007-09-05 中兴通讯股份有限公司 复用接口板地址时网络地址转换的实现方法
CN101374113A (zh) * 2008-10-07 2009-02-25 中兴通讯股份有限公司 一种基于组索引的组播跨板转发控制方法
CN101800701A (zh) * 2010-02-24 2010-08-11 北京交通大学 基于集中控制的组播路由控制方法
CN102075417A (zh) * 2010-09-30 2011-05-25 杭州华三通信技术有限公司 组播剪枝方法及协议无关组播路由器、二层交换机

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116366577A (zh) * 2023-03-06 2023-06-30 深圳市丰润达科技有限公司 交换机组播组的带宽分配方法、装置及可读存储介质

Also Published As

Publication number Publication date
CN105704046A (zh) 2016-06-22

Similar Documents

Publication Publication Date Title
US9106443B2 (en) Forwarding table optimization with flow data
WO2018094616A1 (zh) 监测虚拟网络的方法、设备和虚拟网络系统
CA2950206C (en) Flow entry configuration method, apparatus, and system
WO2017156974A1 (zh) 一种信息传输方法、装置和系统
CN107547349B (zh) 一种虚拟机迁移的方法及装置
JP2011170656A (ja) 中継装置、仮想マシンシステム及び中継方法
JP6055009B2 (ja) パケット処理方法、装置及びシステム
US9608900B2 (en) Techniques for flooding optimization for link state protocols in a network topology
WO2016107424A1 (zh) 一种链路状态检测方法、装置和系统
US20140044130A1 (en) Avoiding unknown unicast floods resulting from mac address table overflows
WO2016101870A1 (zh) 网络攻击分析方法和装置
US10397340B2 (en) Multicast migration
WO2016082614A1 (zh) 一种组播路由表项处理方法、装置及计算机存储介质
WO2021208682A1 (zh) 网络设备的数据采样方法、装置、设备及介质
WO2016091156A1 (zh) 节点故障的判断方法及装置
WO2015123853A1 (zh) 一种数据流处理方法及装置
US20220393934A1 (en) Determining the impact of network events on network applications
EP2717519A2 (en) Method and apparatus for transferring bootstrap message
CN111800338B (zh) 跨as的evpn路由交互方法及装置
WO2020187295A1 (zh) 异常主机的监控
CN109495311B (zh) 一种网络故障检测方法及装置
WO2016173196A1 (zh) 地址映射关系的学习方法及装置
WO2014180363A1 (zh) OpenFlow信令控制方法及装置
WO2013078683A1 (zh) 一种l3vpn端到端业务形成的方法和装置
WO2019001101A1 (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: 15862845

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

Country of ref document: EP

Kind code of ref document: A1