WO2017219732A1 - 组播报文的转发方法及装置、路由器、计算机存储介质 - Google Patents

组播报文的转发方法及装置、路由器、计算机存储介质 Download PDF

Info

Publication number
WO2017219732A1
WO2017219732A1 PCT/CN2017/079723 CN2017079723W WO2017219732A1 WO 2017219732 A1 WO2017219732 A1 WO 2017219732A1 CN 2017079723 W CN2017079723 W CN 2017079723W WO 2017219732 A1 WO2017219732 A1 WO 2017219732A1
Authority
WO
WIPO (PCT)
Prior art keywords
multicast
forwarding
address
packet
multicast packet
Prior art date
Application number
PCT/CN2017/079723
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 WO2017219732A1 publication Critical patent/WO2017219732A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering

Definitions

  • the present invention relates to the field of communications, and in particular to a method and device for forwarding multicast messages, a router, and a computer storage medium.
  • Multicast technology refers to a network communication technology in which a single sender corresponds to multiple receivers.
  • network traffic can be reduced by transmitting a single traffic message to multiple receivers.
  • a multicast routing table needs to be established through a multicast routing protocol.
  • multicast routing protocols There are a variety of multicast routing protocols, the most widely used of which is the Independent Multicast Protocol-Sparse Mode (PIM-SM).
  • PIM-SM Independent Multicast Protocol-Sparse Mode
  • the multicast routing protocol represented by PIM-SM is complicated to implement. When running on a router device, it has a large overhead on the device processor and memory, and no method or system for policy control of routing entries is proposed.
  • Policy routing is a flexible mechanism for implementing IP packet forwarding.
  • router devices of mainstream vendors support policy routing mechanisms.
  • the router device implements the policy routing technology by multiple components, including access control lists, routing maps, and time control lists.
  • the route map defines the next hop forwarding router for the data message.
  • the access control list is referenced in the route mapping table to implement matching of the message.
  • After a policy is applied to an interface on the router the packets received on the interface are checked.
  • the packets matching the matching rules in the route mapping table are defined according to the table.
  • the forwarding mode is forwarded. Packets that do not match any matching rule in the routing mapping table are forwarded according to the unicast routing table. Therefore, in the related art, only the traffic of the unicast packet can be forwarded according to the policy routing mechanism.
  • the embodiment of the present invention provides a method and a device for forwarding a multicast packet, a router, and a computer storage medium, to solve at least the problem that the traffic of the unicast packet can be forwarded according to the policy routing mechanism in the related art.
  • a method for forwarding a multicast packet including: receiving a multicast packet, and performing a multicast routing address and a multicast route in the ACL in the multicast packet The entry is matched; when the multicast routing entry matching the multicast routing address exists in the access control list, the multicast packet is forwarded.
  • forwarding the multicast packet includes: forwarding the multicast packet by using a first interface preset in a routing mapping table, where the first interface is dedicated to the forwarding device. The interface of the multicast packet.
  • receiving the multicast packet includes: receiving, by the second interface bound to the routing mapping table, the multicast packet.
  • the forwarding of the multicast packet includes: setting, by the routing mapping table, an effective time for controlling multicast traffic forwarding, where a system time of the router device is located at the effective time.
  • the multicast packet is forwarded within the indicated time range.
  • the forwarding of the multicast packet further includes: checking a time-to-live (TTL) in the route mapping table; and forwarding the group when the value of the TTL is greater than 0. Broadcasting the message and reducing the TTL; when the TTL is equal to or less than 0, the multicast message is discarded.
  • TTL time-to-live
  • the method further includes: modifying, according to the packet attribute in the route mapping table, the successfully forwarded multicast packet. Attributes.
  • the multicast routing address includes: a group address and a source address.
  • control type of the multicast routing entry includes: a first control type, configured to indicate that each of the source addresses in the group address performs multicast forwarding; and a second control type, It is used to indicate that the specified source address in the group address is forwarded by multicast.
  • a multicast packet is received, and a multicast routing address carried in the multicast packet is matched with a multicast routing entry in the ACL, including: when the multicast routing When the prefix of the group address in the entry is consistent with the prefix of the group address of the multicast packet, the group address in the multicast routing entry supports the group address of the multicast packet; when the multicast routing entry When the prefix of the source address is the same as the prefix of the source address of the multicast packet, the group address in the multicast routing entry supports the group address of the multicast packet.
  • the prefix of the group address includes a mask of the group address and the group address; and the prefix of the source address includes a mask of the source address and the source address.
  • a device for forwarding a multicast packet including: a receiving module configured to receive a multicast packet; and a matching module configured to perform a multicast route carried in the multicast packet The address is matched with the multicast routing entry in the access control list.
  • the forwarding module is configured to forward the multicast packet when the multicast routing entry matching the multicast routing address exists in the access control list.
  • the forwarding module further includes: a first interface unit, configured in advance in the route mapping table, configured to forward the multicast packet; a second interface unit, and the route mapping The table is bound to receive the multicast packet.
  • the forwarding module further includes: the route mapping table is configured to control an effective time of multicast traffic forwarding, where, when the system time of the router device The multicast packet is forwarded when it is within the time range indicated by the effective time.
  • the forwarding module further includes: an checking unit configured to check a TTL in the routing mapping table; and a forwarding unit configured to forward the TTL when the value of the TTL is greater than 0
  • the multicast packet is reduced, and the TTL is decreased.
  • the multicast packet is discarded.
  • the apparatus further includes: a modifying module, configured to modify an attribute of the successfully forwarded multicast packet according to the packet attribute in the routing mapping table.
  • the multicast routing address includes: a group address and a source address.
  • the matching module includes: a first matching unit, configured to: when a prefix of a group address in the multicast routing entry is consistent with a prefix of a group address of the multicast packet The group address in the multicast routing entry supports the group address of the multicast packet, and the second matching unit is configured to: when the source address of the multicast routing entry is prefixed with the multicast packet When the prefixes of the source addresses are the same, the group address in the multicast routing entry supports the group address of the multicast packet.
  • the receiving module, the matching module, the forwarding module, the first interface unit, the second interface unit, the checking unit, the forwarding unit, the modifying module, the first matching unit, and the second matching unit may use a central processing unit (CPU) when performing processing. , Central Processing Unit), Digital Signal Processor (DSP), or Field-Programmable Gate Array (FPGA) implementation.
  • CPU central processing unit
  • DSP Digital Signal Processor
  • FPGA Field-Programmable Gate Array
  • a router including the multicast packet forwarding device described in any of the above.
  • a computer storage medium is also provided.
  • the storage medium is arranged to store program code for performing the following steps:
  • the computer storage medium is further configured to store program code for performing the following steps:
  • S21 Forward the multicast packet by using a preset interface in the route mapping table, where the interface is an interface dedicated to forwarding the multicast packet.
  • the computer storage medium is further configured to store program code for performing the following steps:
  • the computer storage medium is further configured to store program code for performing the following steps:
  • the computer storage medium is further configured to store program code for performing the following steps:
  • the multicast routing entry in the access control table can be used to support the multicast routing address in the multicast packet, so that the unicast packet can be forwarded according to the policy routing mechanism in the related art.
  • Traffic which is achieved according to the strategy
  • the routing mechanism forwards the traffic of multicast packets.
  • FIG. 1 is a block diagram showing the hardware structure of a mobile terminal for forwarding a multicast packet according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for forwarding a multicast packet according to an embodiment of the present invention
  • FIG. 3 is a flowchart of another method for forwarding a multicast packet according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a scenario of a method for forwarding a multicast packet according to an embodiment of the present invention
  • FIG. 5 is a structural block diagram of a device for forwarding a multicast message according to an embodiment of the present invention
  • FIG. 6 is a structural block diagram of another apparatus for forwarding a multicast message according to an embodiment of the present invention.
  • FIG. 7 is a structural block diagram of another apparatus for forwarding a multicast message according to an embodiment of the present invention.
  • FIG. 8 is a structural block diagram of still another apparatus for forwarding a multicast message according to an embodiment of the present invention.
  • FIG. 9 is a structural block diagram of a device for forwarding a multicast message according to an embodiment of the present invention.
  • FIG. 1 is an embodiment of the present invention.
  • router 10 may include one or more (only one shown) processor 102 (processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or FPGA) for storing data.
  • the memory 104 and the transmission device 106 for communication functions. It will be understood by those skilled in the art that the structure shown in FIG. 1 is merely illustrative and does not limit the structure of the above electronic device.
  • router 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than that shown in FIG.
  • the memory 104 can be used to store the software program and the module of the application software, such as the program instruction/module corresponding to the forwarding method of the multicast message in the embodiment of the present invention, and the processor 102 runs the software program and the module stored in the memory 104. Thereby performing various functional applications and data processing, that is, implementing the above method.
  • Memory 104 may include high speed random access memory, and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 104 may further include memory remotely located relative to processor 102, which may be connected to router 10 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • Transmission device 106 is for receiving or transmitting data via a network.
  • the network specific examples described above may include a wireless network provided by a communication provider of the router 10.
  • the transmission device 106 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet.
  • the transmission device 106 can be a radio frequency (RF) module for communicating with the Internet wirelessly.
  • NIC Network Interface Controller
  • RF radio frequency
  • FIG. 2 is a flowchart of a method for forwarding a multicast packet according to an embodiment of the present invention. The process includes the following steps:
  • Step S202 Receive a multicast packet, and match a multicast routing address carried in the multicast packet with a multicast routing entry in the access control list.
  • the multicast routing address includes a group address and a source address.
  • control type of the multicast routing entry includes: a first control type, configured to indicate that each of the source addresses in the group address performs multicast forwarding; and a second control type, It is used to indicate that the specified source address in the group address is forwarded by multicast.
  • the first control type can be expressed as (*, G). Where G represents the group address and * represents each source address in the group address G.
  • the second control type can be expressed as (S, G). Where G represents the group address and S represents the specified source address S in the group address G.
  • the group address support in the multicast routing entry is a group address of the multicast packet; when the prefix of the source address in the multicast routing entry is consistent with the prefix of the source address of the multicast packet, the group address in the multicast routing entry supports the Group address of multicast packets
  • the mode of the multicast matching rule in the access control list is to allow or deny the + source address prefix + group address prefix.
  • the prefix of the group address includes a mask of the group address and the group address; and the prefix of the source address includes a mask of the source address and the source address.
  • the access control list is composed of multiple serial numbers, and the multicast forwarding capacity is improved by setting access control rules of different multicast routing entries in each serial number.
  • the access control rule of the multicast routing entry includes multiple packet attributes such as a source address, a destination address, and a port number.
  • Step S204 the group that matches the multicast routing address exists in the access control list. Forwarding the multicast packet when the route entry is broadcasted;
  • the multicast packet is forwarded by using a first interface that is preset in the routing mapping table, where the first interface is an interface dedicated to forwarding the multicast packet.
  • the multicast packet is received by a second interface that is bound to the routing mapping table.
  • the first receiving interface and the second received data may be one or more.
  • the network environment of the first receiving interface and the network environment of the second interface may be the same or different.
  • the multicast traffic can be imported into the multicast packet by the following method: binding the private network interface (the second interface) of the router device to the routing mapping table, and the routing mapping table is also configured with a public network. Interface (first interface). After a private network interface receives a multicast packet, the multicast packet can be forwarded to the public network through the public network interface. Similarly, the public network interface of the router device is bound to the routing map, and the routing map is also set by the private network interface. After the public interface receives the multicast packet, the multicast packet can be forwarded to the private network through the private network interface.
  • the above method is only an exemplary description.
  • the above method can not only implement the support of multicast packets for VPN traffic import, but also implement multicast packet forwarding between different network environments.
  • the multicast packet that is successfully matched by the group is also copied, and then the multicast packet is forwarded.
  • the TTL for controlling the number of hops in the routing map is checked; when the value of the TTL is greater than 0, the multicast packet is forwarded. And reducing the TTL; discarding the multicast packet when the TTL is equal to or less than 0
  • the routing map is configured to control the effective time of the multicast traffic forwarding, where the multicast packet is forwarded when the system time of the router device is within the time range indicated by the effective time.
  • the effective time includes but is not limited to: a single time period and a cycle time period.
  • the route mapping table can be valid at this time, and the multicast packet can be forwarded. If the system time of the router is within the above-mentioned effective time range, the route mapping table is invalid. Therefore, the device will refuse to forward multicast packets.
  • each route mapping table is composed of multiple sequence numbers, and different multicast routing entry access rules and forwarding multicast packet rules are set for each sequence number to improve multicast forwarding capacity.
  • FIG. 3 is a flowchart of another method for forwarding a multicast packet according to an embodiment of the present invention, as shown in FIG. As shown, the process includes the following steps in addition to steps 202-204 of FIG. 2:
  • message attributes include at least one of the following: TTL or Type Of Service (TOS).
  • TTL Type Of Service
  • TOS Type Of Service
  • version information of the message, the slice offset of the message, and the first checksum and other message attributes are also within the scope of the present embodiment.
  • FIG. 4 is a schematic diagram of a scenario of a method for forwarding a multicast packet according to an embodiment of the present invention.
  • the router device A is connected to the multicast source
  • the router device B is connected to the user device 1 and the user device 2
  • the router device C is connected to the user device 3.
  • S1 The multicast source address of the multicast traffic
  • G1 the multicast group address
  • the scenario of implementing multicast packet forwarding is detailed below.
  • Configure the access control list Macl-A on Router A set the source address of the route entry that is allowed to be forwarded to S1, and the group address to G1.
  • Configure the route mapping table to be named Mmap-A, and reference the access control list Macl-A in Mmap-A.
  • the routing map Mmap-A is bound to the second interface fei-1a, and is dedicated to receiving multicast packets.
  • Router A forwards the multicast traffic in the multicast packet to Router B and Router C.
  • Configure the access control list on Router B to be named Macl-B.
  • Configure the route mapping table to be named Mmap-B, reference the access control list Macl-B in Mmap-B, set the first interface fei-2b interface and fei-3b interface in Mmap-B, and tie the route mapping table Mmap-B.
  • Mmap-B reference the access control list Macl-B in Mmap-B, set the first interface fei-2b interface and fei-3b interface in Mmap-B, and tie the route mapping table Mmap-B.
  • the fei-1b interface receives the traffic of (S1, G1), it forwards the multicast traffic to the fei-2b interface and the fei-3b interface.
  • Router B forwards multicast traffic in multicast packets to User 1 and User 2.
  • the configuration route mapping table is named Mmap-C
  • the access control list Macl-C is referenced in Mmap-C
  • the first interface fei-2c interface is set in Mmap-C. Bind the route map Mmap-C to the second interface fei-1c.
  • the fei-1c interface receives the traffic of (S1, G1), it forwards the multicast traffic to the fei-2c interface. According to the above procedure, the multicast traffic in the multicast packet is forwarded to the user 3 on the router C.
  • the connected router device needs multicast traffic of (S1, G1) for router C, and then increases or decreases in the router mapping table.
  • the fei-3d interface functions as the first interface to implement multicast traffic forwarding to the user 4.
  • you need to forward multicast traffic of any multicast source of G1 you can add a serial number to the access control list configured on each router. Set the source address of the router entry that runs forwarding in the sequence number to 0.0.0.0. The address is G2.
  • the system can send multicast traffic with the group address G2 sent to any source address to the client.
  • the multicast entry (S1, G1) multicast traffic is not forwarded to the multicast user 3 at other times.
  • T-range name it T-range
  • the effective time period that is, the above effective time
  • the time period list T-range is referenced in the route map Mmap-C.
  • Mmap-C is enabled during the time period defined by T-range, and Router C forwards (S1, G1) multicast traffic according to the interface rules defined by Mmap-C. Outside of the time period defined by T-range, Mmap-C is inactive and Router C does not forward (S1, G1) multicast traffic.
  • Router A, Router B, and Router C run the multicast routing protocol PIM-SM, which generates a multicast distribution tree to forward multicast traffic of multicast entries (S1, G1) from the multicast source to multicast users 1. And user 3.
  • PIM-SM multicast routing protocol
  • Router B no longer needs to forward multicast traffic to User 1.
  • the implementation method is as follows: Configure the access control list on Router B to be named Macl-B, set the source address of the route entry that is allowed to be forwarded to S1, and the group address to G1.
  • Configure Mmap-B reference the access control list Macl-B in Mmap-B, and set the first interface fei-3b interface to connect USER2 in Mmap-B. Bind the route map Mmap-B to the second interface fei-1b.
  • the multicast traffic can be forwarded to the user 2 on the router B according to the policy multicast system setting, and then no longer searched.
  • the multicast routing protocol routing table does not send multicast streams to User 1.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present invention which is essential or contributes to the prior art, can be embodied in the form of a software product stored in a storage medium (such as a read only memory (ROM, Read). -Only Memory)/Random Access Memory (RAM), including several instructions to enable a terminal device (which can be a mobile phone, computer, server, or network device) to execute the program.
  • ROM read only memory
  • RAM Random Access Memory
  • a device for forwarding a multicast packet is provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and details are not described herein.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • the present invention is applicable to various devices having IP packet forwarding capabilities, especially routers.
  • devices having IP packet forwarding capabilities are also within the scope of protection in this implementation. (such as switches, computer terminals, PDAs, etc.)
  • FIG. 5 is a structural block diagram of a device for forwarding a multicast message according to an embodiment of the present invention. As shown in FIG. 5, the device includes a receiving module 52, a matching module 54, and a forwarding module 56.
  • the receiving module 52 is configured to receive a multicast packet.
  • the matching module 54 is connected to the receiving module 52, and configured to match the multicast routing address carried in the multicast packet with the multicast routing entry in the access control list.
  • the multicast routing address includes: a group address and a source address.
  • control type of the multicast routing entry includes: a first control type, configured to indicate that each of the source addresses in the group address performs multicast forwarding; and a second control type, It is used to indicate that the specified source address in the group address is forwarded by multicast.
  • the first control type can be expressed as (*, G). Where G represents the group address and * represents each source address in the group address G.
  • the second control type can be expressed as (S, G). Where G represents the group address and S represents the specified source address S in the group address G.
  • the forwarding module 56 is connected to the forwarding module 56, and configured to forward the multicast packet when the multicast routing entry matching the multicast routing address exists in the access control list.
  • FIG. 6 is a structural block diagram of another apparatus for forwarding a multicast message according to an embodiment of the present invention.
  • the forwarding module 56 includes: a first interface unit 62 and a second interface unit 64.
  • the first interface unit 62 is preset in the route mapping table and configured to forward the multicast packet.
  • the second interface unit 64 is bound to the routing mapping table and configured to receive the multicast packet.
  • the first receiving interface and the second received data may be one or more.
  • the network environment of the first receiving interface and the network environment of the second interface may be the same or different.
  • the multicast traffic can be imported into the multicast packet by the following method: binding the private network interface (the second interface) of the router device to the routing mapping table, and the routing mapping table is also configured with a public network. Interface (first interface). After a private network interface receives a multicast packet, the multicast packet can be forwarded to the public network through the public network interface. Similarly, the public network interface of the router device is bound to the routing map, and the routing map is also set by the private network interface. After the public interface receives the multicast packet, the multicast packet can be forwarded to the private network through the private network interface.
  • the above method is only an exemplary description.
  • the above method can not only implement the support of multicast packets for VPN traffic import, but also implement multicast packet forwarding between different network environments.
  • the route mapping table is configured to control the effective time of the multicast traffic forwarding, where the system time of the router device is within the time range indicated by the effective time, and the Multicast packet.
  • the effective time includes but is not limited to: a single time period and a cycle time period.
  • the route mapping table can be valid at this time, and the multicast packet can be forwarded. If the system time of the router is within the above-mentioned effective time range, the route mapping table is invalid. Therefore, the multicast packet will not be redirected.
  • FIG. 7 is a structural block diagram of a device for forwarding a multicast message according to an embodiment of the present invention.
  • the forwarding module 56 includes an inspecting unit 72 and a forwarding unit 74.
  • the checking unit 72 is configured to check a TTL in the routing mapping table for controlling the forwarding hop count
  • the forwarding unit 74 is connected to the checking unit 72, configured to forward the multicast packet and reduce the TTL when the value of the TTL is greater than 0; and discard the TTL when the TTL is equal to or less than 0 Multicast packets.
  • FIG. 8 is a structural block diagram of another apparatus for forwarding a multicast message according to an embodiment of the present invention. As shown in FIG. 8, the apparatus includes: a modification module 82.
  • the modifying module 82 is configured to modify the attributes of the successfully forwarded multicast packets according to the packet attributes in the routing mapping table.
  • FIG. 9 is a structural block diagram of a device for forwarding a multicast message according to an embodiment of the present invention.
  • the matching module 54 includes: a first matching unit 92 and a second matching unit 94.
  • the first matching unit 92 is configured to support, when the prefix of the group address in the multicast routing entry is consistent with the prefix of the group address of the multicast packet, the group address in the multicast routing entry supports the group The group address of the broadcast message;
  • the prefix of the group address includes a mask of the group address and the group address
  • the second matching unit 94 is connected to the first matching unit 92, and configured to: when the prefix of the source address in the multicast routing entry matches the prefix of the source address of the multicast packet, the multicast routing entry The group address in the group supports the group address of the multicast packet.
  • the prefix of the source address includes a mask of the source address and the source address.
  • the manner of the multicast matching rule in the access control list is allowed/rejected + source address prefix + group address prefix.
  • each of the above modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the above modules are in any combination.
  • the forms are located in different processors.
  • Embodiments of the present invention also provide a computer storage medium.
  • the foregoing storage medium may be configured to store program code for performing the following steps:
  • the computer storage medium is further configured to store program code for performing the following steps:
  • S21 Forward the multicast packet by using a preset interface in the route mapping table, where The interface is an interface dedicated to forwarding the multicast packet.
  • the computer storage medium is further configured to store program code for performing the following steps:
  • the computer storage medium is further configured to store program code for performing the following steps:
  • the computer storage medium is further configured to store program code for performing the following steps:
  • the storage medium may include, but is not limited to, a U disk, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk, and the like, which can store program codes.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. Perform the steps shown or described, or separate them into individual integrated circuit modules, or multiple of them Blocks or steps are made in a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
  • the multicast routing entry in the access control table can be used to support the multicast routing address in the multicast packet, so that the unicast packet can be forwarded according to the policy routing mechanism in the related art.
  • the traffic of the multicast packet is forwarded according to the policy routing mechanism.

Landscapes

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

Abstract

本发明提供了一种组播报文的转发方法及装置、路由器、计算机存储介质。该方法包括:接收组播报文,并对所述组播报文中携带的组播路由地址和访问控制列表中的组播路由条目进行匹配;在所述访问控制列表中存在与组播路由地址匹配的所述组播路由条目时,转发所述组播报文。通过本发明,解决相关技术中根据策略路由机制只能够转发单播报文的流量,从而实现了根据策略路由机制对组播报文的流量的转发。

Description

组播报文的转发方法及装置、路由器、计算机存储介质
相关申请的交叉引用
本申请基于申请号为201610460064.9、申请日为2016年06月22日日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本发明涉及通信领域,具体而言,涉及一种组播报文的转发方法及装置、路由器、计算机存储介质。
背景技术
组播技术指的是单个发送者对应多个接收者的一种网络通信技术。组播技术中,通过向多个接收方传送单份流量报文的方式可以减少网络通信流量。现有组播实现方式需要通过组播路由协议建立组播路由表。目前已经有多种组播路由协议,其中使用最为广泛的是独立组播协议-稀疏模式(PIM-SM)。以PIM-SM为代表的组播路由协议实现复杂,在路由器设备上运行时对设备处理器及内存有很大开销,并且没有提出对路由条目进行策略控制的方法或系统。
策略路由是一种灵活的实现IP报文转发的机制。目前主流厂商的路由器设备都支持策略路由机制。路由器设备实现策略路由技术由多个组件共同完成,包括访问控制列表、路由映射表、时间控制列表等组件。路由映射表定义了数据报文的下一跳转发路由器。路由映射表中引用访问控制列表实现对报文的匹配。路由器上一个接口应用策略路由后,对该接口收到的报文进行检查,符合路由映射表中匹配规则的报文就按照该表中定义的 转发方式进行转发,不符合路由映射表任何匹配规则的报文将按照单播路由表进行转发。因此相关技术中,根据策略路由机制只能够转发单播报文的流量。
发明内容
本发明实施例提供了一种组播报文的转发方法及装置、路由器、计算机存储介质,以至少解决相关技术中根据策略路由机制只能够转发单播报文的流量的问题。
根据本发明的一个实施例,提供了一种组播报文的转发方法,包括:接收组播报文,并对所述组播报文中携带的组播路由地址和访问控制列表中的组播路由条目进行匹配;在所述访问控制列表中存在与组播路由地址匹配的所述组播路由条目时,转发所述组播报文。
在本发明实施例一实施方式中,转发所述组播报文包括:通过路由映射表中预先设置的第一接口转发所述组播报文,其中,所述第一接口为专用于转发所述组播报文的接口。
在本发明实施例一实施方式中,接收组播报文,包括:通过与所述路由映射表绑定的第二接口接收所述组播报文。
在本发明实施例一实施方式中,转发所述组播报文,包括:所述路由映射表设置有控制组播流量转发的生效时间,其中,当路由器设备的系统时间位于所述生效时间所指示的时间范围内时,转发所述组播报文。
在本发明实施例一实施方式中,转发所述组播报文,还包括:检查所述路由映射表中的生存时间(TTL);当所述TTL的取值大于0时,转发所述组播报文,并减小所述TTL;当所述TTL等于或者小于0时,丢弃所述组播报文。
在本发明实施例一实施方式中,在转发所述组播报文之后,所述方法还包括:根据所述路由映射表中的报文属性,修改成功转发的组播报文的 属性。
在本发明实施例一实施方式中,所述组播路由地址包括:组地址以及源地址。
在本发明实施例一实施方式中,所述组播路由条目的控制类型包括,第一控制类型,用于指示所述组地址中每一个所述源地址进行组播转发;第二控制类型,用于指示所述组地址中指定源地址进行组播转发。
在本发明实施例一实施方式中,接收组播报文,并对所述组播报文中携带的组播路由地址和访问控制列表中的组播路由条目进行匹配,包括:当所述组播路由条目中的组地址的前缀与所述组播报文的组地址的前缀一致时,所述组播路由条目中的组地址支持所述组播报文的组地址;当所述组播路由条目中的源地址的前缀与所述组播报文的源地址的前缀一致时,所述组播路由条目中的组地址支持所述组播报文的组地址。
在本发明实施例一实施方式中,所述组地址的前缀包括所述组地址与所述组地址的掩码;所述源地址的前缀包括所述源地址与所述源地址的掩码。
根据本发明的又一个实施例,提供了一种组播报文的转发装置,包括:接收模块,配置为接收组播报文;匹配模块,配置为对所述组播报文中携带的组播路由地址和访问控制列表中的组播路由条目进行匹配;转发模块,配置为在所述访问控制列表中存在与组播路由地址匹配的所述组播路由条目时,转发所述组播报文。
在本发明实施例一实施方式中,所述转发模块还包括,第一接口单元,预先设置于路由映射表中,配置为转发所述组播报文;第二接口单元,与所述路由映射表绑定,配置为接收所述组播报文。
在本发明实施例一实施方式中,所述转发模块还包括:所述路由映射表设置有控制组播流量转发的生效时间,其中,当路由器设备的系统时间 位于所述生效时间所指示的时间范围内时,转发所述组播报文。
在本发明实施例一实施方式中,所述转发模块还包括:检查单元,配置为检查所述路由映射表中的TTL;转发单元,配置为当所述TTL的取值大于0时,转发所述组播报文,并减小所述TTL;当所述TTL等于或者小于0时,丢弃所述组播报文。
在本发明实施例一实施方式中,所述装置还包括:修改模块,配置为根据所述路由映射表中的报文属性,修改成功转发的组播报文的属性。
在本发明实施例一实施方式中,所述组播路由地址包括:组地址以及源地址。
在本发明实施例一实施方式中,所述匹配模块包括:第一匹配单元,配置为当所述组播路由条目中的组地址的前缀与所述组播报文的组地址的前缀一致时,所述组播路由条目中的组地址支持所述组播报文的组地址;第二匹配单元,配置为当所述组播路由条目中的源地址的前缀与所述组播报文的源地址的前缀一致时,所述组播路由条目中的组地址支持所述组播报文的组地址。
上述接收模块、匹配模块、转发模块、第一接口单元、第二接口单元、检查单元、转发单元、修改模块、第一匹配单元、第二匹配单元在执行处理时,可以采用中央处理器(CPU,Central Processing Unit)、数字信号处理器(DSP,Digital Singnal Processor)或可编程逻辑阵列(FPGA,Field-Programmable Gate Array)实现。
根据本发明的再一个实施例,还提供了一种路由器,包括以上任一上所述的组播报文转发装置。
根据本发明的还一个实施例,还提供了一种计算机存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:
S11,接收组播报文,并对所述组播报文中携带的组播路由地址和访问 控制列表中的组播路由条目进行匹配;
S12,在所述访问控制列表中存在与组播路由地址匹配的所述组播路由条目时,转发所述组播报文。
在本发明实施例一实施方式中,该计算机存储介质还设置为存储用于执行以下步骤的程序代码:
S21,通过路由映射表中预先设置的接口转发所述组播报文,其中,所述接口为专用于转发所述组播报文的接口。
在本发明实施例一实施方式中,该计算机存储介质还设置为存储用于执行以下步骤的程序代码:
S31,检查所述路由映射表中的TTL;
S32,当所述TTL的取值大于0时,转发所述组播报文,并减小所述TTL;当所述TTL等于或者小于0时,丢弃所述组播报文
在本发明实施例一实施方式中,该计算机存储介质还设置为存储用于执行以下步骤的程序代码:
S41,根据所述路由映射表中的报文属性,修改成功转发的组播报文的属性。
在本发明实施例一实施方式中,该计算机存储介质还设置为存储用于执行以下步骤的程序代码:
S51,当所述组播路由条目中的组地址的前缀与所述组播报文的组地址的前缀一致时,所述组播路由条目中的组地址支持所述组播报文的组地址;
S52,当所述组播路由条目中的源地址的前缀与所述组播报文的源地址的前缀一致时,所述组播路由条目中的组地址支持所述组播报文的组地址
采用本发明实施例,由于通过匹配确定是否访问控制类表中的组播路由条目存在能够支持组播报文中的组播路由地址,因此,可以解决相关技术中根据策略路由机制只能够转发单播报文的流量,从而实现了根据策略 路由机制对组播报文的流量的转发。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是本发明实施例的一种组播报文的转发方法的移动终端的硬件结构框图;
图2是根据本发明实施例的一种组播报文的转发方法的流程图;
图3是根据本发明实施例的另一种组播报文的转发方法的流程图;
图4是根据本发明实施例的一种组播报文的转发方法的场景示意图;
图5是根据本发明实施例的一种组播报文的转发装置的结构框图;
图6是根据本发明实施例的另一种组播报文的转发装置的结构框图;
图7是根据本发明实施例的还一种组播报文的转发装置的结构框图;
图8是根据本发明实施例的再一种组播报文的转发装置的结构框图;
图9是根据本发明实施例的更一种组播报文的转发装置的结构框图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
实施例1
本申请实施例一所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在路由器上为例,图1是本发明实施例 的一种组播报文的转发方法的移动终端的硬件结构框图。如图1所示,路由器10可以包括一个或多个(图中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或FPGA等的处理装置)、用于存储数据的存储器104、以及用于通信功能的传输装置106。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述电子装置的结构造成限定。例如,路由器10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。
存储器104可用于存储应用软件的软件程序以及模块,如本发明实施例中的组播报文的转发方法对应的程序指令/模块,处理器102通过运行存储在存储器104内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至路由器10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括路由器10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(NIC,Network Interface Controller),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(RF,Radio Frequency)模块,其用于通过无线方式与互联网进行通讯。
在本实施例中提供了一种运行于上述路由器的组播报文的转发方法,图2是根据本发明实施例的一种组播报文的转发方法的流程图,如图2所示,该流程包括如下步骤:
步骤S202,接收组播报文,并对所述组播报文中携带的组播路由地址和访问控制列表中的组播路由条目进行匹配;
在本发明实施例一实施方式中,组播路由地址包括组地址与源地址。
在本发明实施例一实施方式中,所述组播路由条目的控制类型包括,第一控制类型,用于指示所述组地址中每一个所述源地址进行组播转发;第二控制类型,用于指示所述组地址中指定源地址进行组播转发。
具体地,第一控制类型可以表示为(*,G)。其中G表示组地址,而*表示组地址G中的每一个源地址。
具体地,第二控制类型可以表示为(S,G)。其中G表示组地址,而S表示组地址G中的指定源地址S。
在本发明实施例一实施方式中,当所述组播路由条目中的组地址的前缀与所述组播报文的组地址的前缀一致时,所述组播路由条目中的组地址支持所述组播报文的组地址;当所述组播路由条目中的源地址的前缀与所述组播报文的源地址的前缀一致时,所述组播路由条目中的组地址支持所述组播报文的组地址
具体地,访问控制列表中的组播匹配规则的方式为允许或拒绝+源地址前缀+组地址前缀。
在本发明实施例一实施方式中,所述组地址的前缀包括所述组地址与所述组地址的掩码;所述源地址的前缀包括所述源地址与所述源地址的掩码。
具体地,访问控制列表由多个序列号组成,通过在各个序列号中设置不同的组播路由条目的访问控制规则,以实现组播转发容量的提升。
具体地,组播路由条目的访问控制规则包括源地址、目的地址、端口号等多种报文属性。
步骤S204,在所述访问控制列表中存在与组播路由地址匹配的所述组 播路由条目时,转发所述组播报文;
在本发明实施例一实施方式中,通过路由映射表中预先设置的第一接口转发所述组播报文,其中,所述第一接口为专用于转发所述组播报文的接口。
在本发明实施例一实施方式中,通过与所述路由映射表绑定的第二接口接收所述组播报文。
具体地,第一接收接口与第二接收的数据可以为一个或多个。同时第一接收接口的网络环境与第二接口的网络环境可以相同或不同。
具体地,本实施中还能够支持组播报文进行VPN流量导入,具体方法如下:将路由器设备的私网接口(第二接口)与路由映射表绑定,并且路由映射表还设置有公网接口(第一接口)。当私网接口接收到组播报文后,组播报文可以通过公网接口转发至公网。同理,对于路由器设备的公网接口与路由映射表绑定,并且路由映射表还设置由私网接口。当公开接口接收到组播报文后,组播报文可以通过私网接口转发至私网。
需要指出的是,上述方法只是一种示例性说明,通过上述方法,不仅能够实现支持组播报文进行VPN流量导入,同时还能够实现不同网络环境之间的组播报文转发。
具体地,在所述访问控制列表中存在与组播路由地址匹配的所述组播路由条目时,还会将组成功匹配的组播报文复制,然后将上述组播报文转发。
在本发明实施例一实施方式中,为了防止路由环路,检查所述路由映射表中的用于控制转发跳数的TTL;当所述TTL的取值大于0时,转发所述组播报文,并减小所述TTL;当所述TTL等于或者小于0时,丢弃所述组播报文
在本发明实施例一实施方式中,为了丰富组播报文转发的判断条件, 所述路由映射表设置有控制组播流量转发的生效时间,其中,当路由器设备的系统时间位于所述生效时间所指示的时间范围内时,转发所述组播报文。
具体地,该生效时间包括但不限于:单次时间段和循环时间段。
具体地,如果当路由器设备的系统时间在上述生效时间范围以内时,此时的路由映射表能够生效,同时还能够指导组播报文进行转发。而如果路由器设备的系统时间超出了上述生效时间范围以内时,那么此时的路由映射表失效,因此就会拒绝指导进行组播报文的转发。
具体地,每一个路由映射表都是由多个序列号组成的,而对于每一个序列号都设置有不同的组播路由条目访问规则和转发组播报文规制,以提升组播转发容量。
在本实施例中还提供了另一种运行于上述路由器的组播报文的转发方法,图3是根据本发明实施例的另一种组播报文的转发方法的流程图,如图3所示,该流程除了包括图2中步骤202-204外,还包括如下步骤:
S302,根据所述路由映射表中的报文属性,修改成功转发的组播报文的属性。
需要指出的是,上述报文属性至少包括以下其中之一:TTL或者服务类型(TOS,Type Of Service)。当然,例如报文的版本信息、报文的片偏移以及首位检验和等其他报文属性也在本实施例的保护范围之内。
此外,在本实施例中还提供了以下的场景,用于更加清楚的描述本实施中上述的方法流程。具体包括如下:
图4是根据本发明实施例的一种组播报文的转发方法的场景示意图。如图4所示,路由器设备A连接组播源,路由器设备B连接用户设备1和用户设备2,路由器设备C连接用户设备3。当用户设备需要组播流量时,可以按照本文提出的方法完成组播报文从组播源到用户的转发。假定实施 例中组播流量的组播源地址为S1,组播组地址为G1。下面详述实现组播报文转发的场景。
在路由器A上配置访问控制列表Macl-A,设置允许转发的路由条目源地址为S1,组地址为G1。配置路由映射表命名为Mmap-A,在Mmap-A中引用访问控制列表Macl-A,在Mmap-A中设置第一接口fei-2a接口和fei-3a接口,专用于转发组播报文。把路由映射表Mmap-A绑定到第二接口fei-1a,专用于接收组播报文。完成配置后,当fei-1a接口收到(S1,G1)的流量时会向fei-2a接口和fei-3a接口转发组播流量。根据上述流程,路由器A向路由器B以及路由器C转发了组播报文中的组播流量。
在路由器B上配置访问控制列表命名为Macl-B,设置允许转发的路由条目源地址为S1,组地址为G1。配置路由映射表命名为Mmap-B,在Mmap-B中引用访问控制列表Macl-B,在Mmap-B中设置第一接口fei-2b接口和fei-3b接口,把路由映射表Mmap-B绑定到第二接口fei-1b。完成配置后,当fei-1b接口收到(S1,G1)的流量时会向fei-2b接口和fei-3b接口转发组播流量。根据上述流程,路由器B上向用户1和用户2转发组播报文中的组播流量。
在路由器C上配置访问控制列表命名为Macl-C,设置允许转发的路由条目源地址为S1,组地址为G1。配置路由映射表命名为Mmap-C,在Mmap-C中引用访问控制列表Macl-C,在Mmap-C中设置第一接口fei-2c接口。把路由映射表Mmap-C绑定到第二接口fei-1c。完成配置后,当fei-1c接口收到(S1,G1)的流量时会向fei-2c接口转发组播流量。根据上述流程,路由器C上向用户3转发组播报文中的组播流量。
场景1
当有新的用户请求同一个组播流量时,假定为用户4,连接的路由器设备为路由器C需要(S1,G1)的组播流量时,此时在路由器映射表中增减 fei-3d接口作为第一接口,以实现组播流量向用户4的转发。当需要对G1的任意组播源的组播流量进行转发时,可以在各个路由器配置的访问控制列表中增加一个序列号,在序列号中设置运行转发的路由器条目源地址为0.0.0.0,组地址为G2。此时系统可以完成对任意源地址发送的组地址为G2的组播流量发送到用户端。
场景2
当路由器C需要在指定的时间段内向组播用户3转发组播条目(S1,G1)的组播流量,在其他时间内不向组播用户3转发组播条目(S1,G1)组播流量时,需要在路由器C上定义一个时间段列表命名为T-range,在T-range中根据网络需求定义生效时间段(即上述生效时间)。在路由映射表Mmap-C中引用时间段列表T-range。配置完成后,在T-range定义的时间段内,Mmap-C处于启用状态,路由器C按照Mmap-C定义的接口规则转发(S1,G1)组播流量。在T-range定义的时间段之外,Mmap-C处于停用状态,路由器C不会转发(S1,G1)组播流量。
场景3
路由器A、路由器B和路由器C运行了组播路由协议PIM-SM,生成了组播分发树把组播条目(S1,G1)的组播流量从组播源转发到组播用户1、用户2和用户3。
因为某种原因,例如用户1欠费原因,路由器B不再需要向用户1转发组播流量。实现方法如下,在路由器B上配置访问控制列表命名为Macl-B,设置允许转发的路由条目源地址为S1,组地址为G1。配置Mmap-B,在Mmap-B中引用访问控制列表Macl-B,在Mmap-B中设置连接USER2的第一接口fei-3b接口。把路由映射表Mmap-B绑定到第二接口fei-1b。由于策略组播系统转发优先级高于组播路由协议,组播流量根据策略组播系统设置可以完成组播流量在路由器B上向用户2进行转发,之后不再查找 组播路由协议路由表,因此不再向用户1发送组播流。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如只读存储器(ROM,Read-Only Memory)/随机存取存储器(RAM,Random Access Memory)、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。
实施例2
在本实施例中还提供了一种组播报文的转发装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
在本发明实施例一实施方式中,本发明适用于各种具有IP报文转发能力的设备,尤其是路由器。当然,其他具有IP报文转发能力的设备也在本实施中的保护范围之内。(例如交换机、计算机终端,PDA等电子设备)
图5是根据本发明实施例的一种组播报文的转发装置的结构框图,如图5所示,该装置包括接收模块52,匹配模块54以及转发模块56。
接收模块52,配置为接收组播报文;
匹配模块54,连接至接收模块52,配置为对所述组播报文中携带的组播路由地址和访问控制列表中的组播路由条目进行匹配;
具体地,所述组播路由地址包括:组地址以及源地址。
在本发明实施例一实施方式中,所述组播路由条目的控制类型包括,第一控制类型,用于指示所述组地址中每一个所述源地址进行组播转发;第二控制类型,用于指示所述组地址中指定源地址进行组播转发。
具体地,第一控制类型可以表示为(*,G)。其中G表示组地址,而*表示组地址G中的每一个源地址。
具体地,第二控制类型可以表示为(S,G)。其中G表示组地址,而S表示组地址G中的指定源地址S。
转发模块56,连接至转发模块56,配置为在所述访问控制列表中存在与组播路由地址匹配的所述组播路由条目时,转发所述组播报文。
图6是根据本发明实施例的另一种组播报文的转发装置的结构框图,如图6所示,转发模块56包括:第一接口单元62以及第二接口单元64。
第一接口单元62,预先设置于路由映射表中,配置为转发所述组播报文;
第二接口单元64,与所述路由映射表绑定,配置为接收所述组播报文。
具体地,第一接收接口与第二接收的数据可以为一个或多个。同时第一接收接口的网络环境与第二接口的网络环境可以相同或不同。
具体地,本实施中还能够支持组播报文进行VPN流量导入,具体方法如下:将路由器设备的私网接口(第二接口)与路由映射表绑定,并且路由映射表还设置有公网接口(第一接口)。当私网接口接收到组播报文后,组播报文可以通过公网接口转发至公网。同理,对于路由器设备的公网接口与路由映射表绑定,并且路由映射表还设置由私网接口。当公开接口接收到组播报文后,组播报文可以通过私网接口转发至私网。
需要指出的是,上述方法只是一种示例性说明,通过上述方法,不仅能够实现支持组播报文进行VPN流量导入,同时还能够实现不同网络环境之间的组播报文转发。
在本发明实施例一实施方式中,所述路由映射表设置有控制组播流量转发的生效时间,其中,当路由器设备的系统时间位于所述生效时间所指示的时间范围内时,转发所述组播报文。
具体地,该生效时间包括但不限于:单次时间段和循环时间段。
具体地,如果当路由器设备的系统时间在上述生效时间范围以内时,此时的路由映射表能够生效,同时还能够指导组播报文进行转发。而如果路由器设备的系统时间超出了上述生效时间范围以内时,那么此时的路由映射表失效,因此也就不会去指导组播报文就会拒绝指导进行组播报文的转发。
图7是根据本发明实施例的还一种组播报文的转发装置的结构框图,如图7所示,转发模块56包括:检查单元72以及转发单元74。
检查单元72,配置为检查所述路由映射表中的用于控制转发跳数的TTL;
转发单元74,连接至检查单元72,配置为当所述TTL的取值大于0时,转发所述组播报文,并减小所述TTL;当所述TTL等于或者小于0时,丢弃所述组播报文。
图8是根据本发明实施例的再一种组播报文的转发装置的结构框图,如图8所示,所述装置包括:修改模块82。
修改模块82,配置为根据所述路由映射表中的报文属性,修改成功转发的组播报文的属性。
需要指出的是,上述报文属性至少包括以下其中之一:TTL或者TOS。当然,例如报文的版本信息、报文的片偏移以及首位检验和等其他报文属性也在本实施例的保护范围之内。图9是根据本发明实施例的更一种组播报文的转发装置的结构框图,如图9所示,所述匹配模块54包括:第一匹配单元92以及第二匹配单元94。
第一匹配单元92,配置为当所述组播路由条目中的组地址的前缀与所述组播报文的组地址的前缀一致时,所述组播路由条目中的组地址支持所述组播报文的组地址;
在本发明实施例一实施方式中,所述组地址的前缀包括所述组地址与所述组地址的掩码;
第二匹配单元94,连接至第一匹配单元92,配置为当所述组播路由条目中的源地址的前缀与所述组播报文的源地址的前缀一致时,所述组播路由条目中的组地址支持所述组播报文的组地址。
在本发明实施例一实施方式中,所述源地址的前缀包括所述源地址与所述源地址的掩码。
具体地,访问控制列表中的组播匹配规则的方式为允许/拒绝+源地址前缀+组地址前缀。
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。
实施例3
本发明的实施例还提供了一种计算机存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:
S11,接收组播报文,并对所述组播报文中携带的组播路由地址和访问控制列表中的组播路由条目进行匹配;
S12,在所述访问控制列表中存在与组播路由地址匹配的所述组播路由条目时,转发所述组播报文。
在本发明实施例一实施方式中,该计算机存储介质还设置为存储用于执行以下步骤的程序代码:
S21,通过路由映射表中预先设置的接口转发所述组播报文,其中,所 述接口为专用于转发所述组播报文的接口。
在本发明实施例一实施方式中,该计算机存储介质还设置为存储用于执行以下步骤的程序代码:
S31,检查所述路由映射表中的TTL;
S32,当所述TTL的取值大于0时,转发所述组播报文,并减小所述TTL;当所述TTL等于或者小于0时,丢弃所述组播报文
在本发明实施例一实施方式中,该计算机存储介质还设置为存储用于执行以下步骤的程序代码:
S41,根据所述路由映射表中的报文属性,修改成功转发的组播报文的属性。
在本发明实施例一实施方式中,该计算机存储介质还设置为存储用于执行以下步骤的程序代码:
S51,当所述组播路由条目中的组地址的前缀与所述组播报文的组地址的前缀一致时,所述组播路由条目中的组地址支持所述组播报文的组地址;
S52,当所述组播路由条目中的源地址的前缀与所述组播报文的源地址的前缀一致时,所述组播路由条目中的组地址支持所述组播报文的组地址
在本发明实施例一实施方式中,在本实施例中,上述存储介质可以包括但不限于:U盘、ROM、RAM、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模 块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
工业实用性
采用本发明实施例,由于通过匹配确定是否访问控制类表中的组播路由条目存在能够支持组播报文中的组播路由地址,因此,可以解决相关技术中根据策略路由机制只能够转发单播报文的流量,从而实现了根据策略路由机制对组播报文的流量的转发。

Claims (19)

  1. 一种组播报文的转发方法,包括:
    接收组播报文,并对所述组播报文中携带的组播路由地址和访问控制列表中的组播路由条目进行匹配;
    在所述访问控制列表中存在与组播路由地址匹配的所述组播路由条目时,转发所述组播报文。
  2. 根据权利要求1所述的方法,其中,转发所述组播报文包括:通过路由映射表中预先设置的第一接口转发所述组播报文,其中,所述第一接口为专用于转发所述组播报文的接口。
  3. 根据权利要求2所述的方法,其中,接收组播报文,包括:通过与所述路由映射表绑定的第二接口接收所述组播报文。
  4. 根据权利要求2所述的方法,其中,所述路由映射表设置有控制组播流量转发的生效时间,其中,当路由器设备的系统时间位于所述生效时间所指示的时间范围内时,转发所述组播报文。
  5. 根据权利要求2所述的方法,其中,转发所述组播报文,还包括:
    检查所述路由映射表中的生存时间TTL;
    当所述TTL的取值大于0时,转发所述组播报文,并减小所述TTL;
    当所述TTL等于或者小于0时,丢弃所述组播报文。
  6. 根据权利要求2所述的方法,其中,在转发所述组播报文之后,所述方法还包括:
    根据所述路由映射表中的报文属性,修改成功转发的组播报文的属性。
  7. 根据权利要求1所述的方法,其中,所述组播路由地址包括:组地址以及源地址。
  8. 根据权利要求6所述的方法,其中,所述组播路由条目的控制类 型包括,
    第一控制类型,用于指示所述组地址中每一个所述源地址进行组播转发;
    第二控制类型,用于指示所述组地址中指定源地址进行组播转发。
  9. 根据权利要求7或8所述的方法,其中,接收组播报文,并对所述组播报文中携带的组播路由地址和访问控制列表中的组播路由条目进行匹配,包括:
    当所述组播路由条目中的组地址的前缀与所述组播报文的组地址的前缀一致时,所述组播路由条目中的组地址支持所述组播报文的组地址;
    当所述组播路由条目中的源地址的前缀与所述组播报文的源地址的前缀一致时,所述组播路由条目中的组地址支持所述组播报文的组地址。
  10. 根据权利要求9所述的方法,其中,所述组地址的前缀包括所述组地址与所述组地址的掩码;所述源地址的前缀包括所述源地址与所述源地址的掩码。
  11. 一种组播报文的转发装置,包括:
    接收模块,配置为接收组播报文;
    匹配模块,配置为对所述组播报文中携带的组播路由地址和访问控制列表中的组播路由条目进行匹配;
    转发模块,配置为在所述访问控制列表中存在与组播路由地址匹配的所述组播路由条目时,转发所述组播报文。
  12. 根据权利要求11所述的装置,其中,所述转发模块还包括:
    第一接口单元,配置为预先设置于路由映射表中,并转发所述组播报文;
    第二接口单元,配置为与所述路由映射表绑定,并接收所述组播报文。
  13. 根据权利要求12所述的装置,其中,所述转发模块还包括:
    所述路由映射表设置有控制组播流量转发的生效时间,其中,当路由器设备的系统时间位于所述生效时间所指示的时间范围内时,转发所述组播报文。
  14. 根据权利要求12所述的装置,其中,所述转发模块还包括:
    检查单元,配置为检查所述路由映射表中的生存时间TTL;
    转发单元,配置为当所述TTL的取值大于0时,转发所述组播报文,并减小所述TTL;当所述TTL等于或者小于0时,丢弃所述组播报文。
  15. 根据权利要求12所述的装置,其中,所述装置还包括:
    修改模块,配置为根据所述路由映射表中的报文属性,修改成功转发的组播报文的属性。
  16. 根据权利要求11所述的装置,其中,所述组播路由地址包括:组地址以及源地址。
  17. 根据权利要求16所述的装置,其中,所述匹配模块包括:
    第一匹配单元,配置为当所述组播路由条目中的组地址的前缀与所述组播报文的组地址的前缀一致时,所述组播路由条目中的组地址支持所述组播报文的组地址;
    第二匹配单元,配置为当所述组播路由条目中的源地址的前缀与所述组播报文的源地址的前缀一致时,所述组播路由条目中的组地址支持所述组播报文的组地址。
  18. 一种路由器,包括权利要求11-17任一项所述的装置。
  19. 一种计算机存储介质,存储有计算机可执行指令,该计算机可执行指令配置执行上述权利要求1-10任一项组播报文的转发方法。
PCT/CN2017/079723 2016-06-22 2017-04-07 组播报文的转发方法及装置、路由器、计算机存储介质 WO2017219732A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610460064.9 2016-06-22
CN201610460064.9A CN107528781A (zh) 2016-06-22 2016-06-22 组播报文的转发方法及装置、路由器

Publications (1)

Publication Number Publication Date
WO2017219732A1 true WO2017219732A1 (zh) 2017-12-28

Family

ID=60734164

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/079723 WO2017219732A1 (zh) 2016-06-22 2017-04-07 组播报文的转发方法及装置、路由器、计算机存储介质

Country Status (2)

Country Link
CN (1) CN107528781A (zh)
WO (1) WO2017219732A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109391551B (zh) * 2017-08-14 2021-10-12 中兴通讯股份有限公司 一种多端口组播方法、设备及计算机可读存储介质
CN108650237B (zh) * 2018-04-13 2020-09-08 烽火通信科技股份有限公司 一种基于存活时间的报文安全检查方法及系统
CN117643040A (zh) * 2021-11-26 2024-03-01 Oppo广东移动通信有限公司 组播消息的处理方法及相关装置
CN114448740B (zh) * 2022-01-14 2023-11-07 绿盟科技集团股份有限公司 一种组播方法、装置、介质、产品和设备
CN115102902A (zh) * 2022-06-21 2022-09-23 北京天融信网络安全技术有限公司 控制策略路由自动切换方法、装置及分析方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567837A (zh) * 2003-06-26 2005-01-19 华为技术有限公司 一种组播源控制的方法和系统
CN1852258A (zh) * 2006-03-30 2006-10-25 华为技术有限公司 一种组播权限控制方法
CN101106470A (zh) * 2007-06-30 2008-01-16 华为技术有限公司 一种组播方法、网络设备及系统
CN101252529A (zh) * 2008-03-31 2008-08-27 杭州华三通信技术有限公司 一种组播报文的转发方法和设备
US20090125470A1 (en) * 2007-11-09 2009-05-14 Juniper Networks, Inc. System and Method for Managing Access Control Lists
CN101674222A (zh) * 2008-09-10 2010-03-17 华为技术有限公司 组播的切换方法及系统

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1232081C (zh) * 2002-08-06 2005-12-14 华为技术有限公司 网络通信中组播报文的转发方法
CN101938696B (zh) * 2009-06-30 2014-02-05 上海贝尔股份有限公司 在无源光网络中控制移动组播广播业务转发的方法及装置
CN101989952B (zh) * 2010-11-03 2014-12-17 中兴通讯股份有限公司 一种组播方法及装置
CN102957616B (zh) * 2011-08-18 2015-09-23 盛科网络(苏州)有限公司 在asic中转发trill网络报文的方法及系统
CN102299845B (zh) * 2011-09-20 2015-09-09 神州数码网络(北京)有限公司 多链路透明互联多播帧传输方法和系统
CN103841013B (zh) * 2012-11-21 2017-06-16 新华三技术有限公司 Trill网络中的报文转发方法及设备
CN105656792A (zh) * 2014-11-12 2016-06-08 中兴通讯股份有限公司 组播设备及因特网组管理协议侦听组播流带宽管理方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567837A (zh) * 2003-06-26 2005-01-19 华为技术有限公司 一种组播源控制的方法和系统
CN1852258A (zh) * 2006-03-30 2006-10-25 华为技术有限公司 一种组播权限控制方法
CN101106470A (zh) * 2007-06-30 2008-01-16 华为技术有限公司 一种组播方法、网络设备及系统
US20090125470A1 (en) * 2007-11-09 2009-05-14 Juniper Networks, Inc. System and Method for Managing Access Control Lists
CN101252529A (zh) * 2008-03-31 2008-08-27 杭州华三通信技术有限公司 一种组播报文的转发方法和设备
CN101674222A (zh) * 2008-09-10 2010-03-17 华为技术有限公司 组播的切换方法及系统

Also Published As

Publication number Publication date
CN107528781A (zh) 2017-12-29

Similar Documents

Publication Publication Date Title
WO2017219732A1 (zh) 组播报文的转发方法及装置、路由器、计算机存储介质
US11082342B2 (en) System and method to facilitate content forwarding using Bit Index Explicit Replication (BIER) in an Information-Centric Networking (ICN) environment
US10148573B2 (en) Packet processing method, node, and system
US11050657B2 (en) Method, device and node for message transmission, and computer storage medium
US20220014497A1 (en) Method and Device for Storing and Sending MAC Address Entry, and System
KR101842820B1 (ko) 모바일 네트워크에서 애플리케이션 특정 혼잡 제어를 지원하기 위한 oma 관리 오브젝트의 사용
US20170134265A1 (en) System and method for enabling services chaining in a provider network
WO2016127398A1 (zh) 控制接入的装置、系统和方法
WO2021223335A1 (zh) 应用程序的路由选择方法及相关装置
EP3014859B1 (en) Method for enabling services chaining in a provider network
EP3143732A1 (en) Scalable segment identifier allocation in segment routing
WO2017107814A1 (zh) 一种传播QoS策略的方法、装置及系统
WO2022062506A1 (zh) 一种数据处理方法、装置、存储介质及电子装置
EP3313031B1 (en) Sdn-based arp realization method and apparatus
WO2020083269A1 (zh) 一种建立多路径连接的子流的方法、装置和系统
JP2021505066A (ja) Ipネットワークへの遠隔的かつ動的ルート注入
US20230291682A1 (en) Method and device for processing data packet, storage medium, and electronic device
CN112134776A (zh) 生成组播转发表项的方法和接入网关
US20150271086A1 (en) Reducing Network Traffic By Intercepting Address Resolution Messages
WO2021056573A1 (zh) 建立会话的方法和终端设备
WO2014180302A1 (zh) 一种应用上网处理方法、装置及终端
US10348518B2 (en) Method, apparatus, system and media for transmitting messages between networked devices in data communication with a local network access point
WO2021259111A1 (zh) 报文处理方法、装置和计算机可读存储介质
WO2022068484A1 (zh) 一种业务链地址池切片处理方法、装置及系统
EP3021529B1 (en) Method and device for implementing layer 3 virtual private network

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

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

Country of ref document: EP

Kind code of ref document: A1