CN1218540C - Control method for exact multicast forwarding - Google Patents
Control method for exact multicast forwarding Download PDFInfo
- Publication number
- CN1218540C CN1218540C CN 03156442 CN03156442A CN1218540C CN 1218540 C CN1218540 C CN 1218540C CN 03156442 CN03156442 CN 03156442 CN 03156442 A CN03156442 A CN 03156442A CN 1218540 C CN1218540 C CN 1218540C
- Authority
- CN
- China
- Prior art keywords
- multicast
- port
- forwarding
- layers
- source
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
Description
技术领域:Technical field:
本发明涉及的是一种通信网络的组播精确转发的控制方法,特别是宽带以太网组播精确转发的控制,属于宽带网络通信领域。The invention relates to a method for controlling precise multicast forwarding of a communication network, in particular to the control method for precise forwarding of broadband Ethernet multicast, and belongs to the field of broadband network communication.
背景技术:Background technique:
传统的IP通信有两种方式,第一种单播unicast,第二种是广播broadcast。如果要将信息发送给网络中的多个主机而非所有主机,则要么采用广播方式,要么由源主机分别向网络中的多台目标主机以单播方式发送IP包。采用广播方式实现时不仅会将信息发送给不需要的主机,而且浪费带宽,也可能由于路由回环引起严重的广播风暴。采用单播方式实现时,由于IP包的重复发送会白白浪费掉大量带宽,也增加了服务器的负载。所以传统的单播和广播通信方式不能有效地解决单点发送多点接收的问题。There are two ways of traditional IP communication, the first is unicast, and the second is broadcast. If the information is to be sent to multiple hosts in the network but not all hosts, either the broadcast method is used, or the source host sends IP packets to multiple target hosts in the network in unicast mode. When broadcasting is implemented, it will not only send information to unnecessary hosts, but also waste bandwidth, and may cause serious broadcast storms due to routing loops. When implemented in unicast mode, a large amount of bandwidth will be wasted due to repeated sending of IP packets, and the load on the server will also be increased. Therefore, the traditional unicast and broadcast communication methods cannot effectively solve the problem of single-point transmission and multi-point reception.
IP组播的基本思想是源主机只发送一份数据。这份数据中的目的地址为组播组地址,组播组中的所有接收者都可接收到同样的数据拷贝,并且只有组播组内的目标主机可以接收,该数据网络中其它主机不能收到。The basic idea of IP multicast is that the source host only sends one copy of data. The destination address in this data is the address of the multicast group, and all receivers in the multicast group can receive the same data copy, and only the target host in the multicast group can receive it, and other hosts in the data network cannot receive it. arrive.
如何控制数据只发送给需要的主机、其它主机不能收到,就成了一个急待解决的问题。早期的组播主要用在路由器上面,近年来,随着技术的发展,出现了交换机,交换机几乎包括了路由器的所有功能,并且实现了硬件转发,速度更快。这就为组播在交换机的应用带来了以下新的问题:How to control the data to be sent only to the required host, and other hosts cannot receive it, has become an urgent problem to be solved. Early multicast was mainly used on routers. In recent years, with the development of technology, switches have appeared. Switches include almost all functions of routers, and realize hardware forwarding with faster speed. This brings the following new problems for the application of multicast in switches:
路由器一个端口就是一个三层接口。交换机是按VLAN(虚拟局域网)来划分端口的,VLAN可以配多个端口。VLAN既可以是三层的VLAN,也可以是二层的VLAN,端口就可以既是三层的端口、又是二层的端口。路由器则不存在这个问题,对交换机来说,数据二层转发和数据三层转发是有本质的差别。组播数据转发必须区分这一点。A router port is a Layer 3 interface. The switch divides ports according to VLAN (virtual local area network), and VLAN can be equipped with multiple ports. A VLAN can be either a Layer 3 VLAN or a Layer 2 VLAN, and a port can be both a Layer 3 port and a Layer 2 port. Routers do not have this problem. For switches, there is an essential difference between data layer 2 forwarding and data layer 3 forwarding. Multicast data forwarding must distinguish this.
在交换机里,一个三层的VLAN就是一个三层的接口。这个接口可以有多个端口,传统的组播只能精确到三层接口,没法精确到三层接口的每个端口。组播数据只能在VLAN里广播,浪费了网络带宽,增加了网络负载。In a switch, a layer-3 VLAN is a layer-3 interface. This interface can have multiple ports. Traditional multicast can only be accurate to the Layer 3 interface, but cannot be accurate to each port of the Layer 3 interface. Multicast data can only be broadcast in VLAN, which wastes network bandwidth and increases network load.
当组播的源端口和出端口在同一VLAN时,源端口和出端口属于同一个三层的接口,传统的路由器和交换机RPF(反向路径查找)检查不通过根本无法点播。When the source port and the egress port of the multicast are in the same VLAN, the source port and the egress port belong to the same layer-3 interface, and the traditional router and switch RPF (reverse path lookup) inspection cannot pass the request at all.
发明内容:Invention content:
本发明的目的是提供一种控制IP组播精确转发的方法,在标准协议的基础上,实现交换机所有端口精确转发组播数据。The purpose of the present invention is to provide a method for controlling precise forwarding of IP multicast, and realize precise forwarding of multicast data by all ports of switches on the basis of standard protocols.
本发明的技术方案如下:Technical scheme of the present invention is as follows:
组播精确转发的控制方法,其步骤包括:A control method for multicast precise forwarding, the steps of which include:
1.组播模块在组播源和点播者之间建立组播路由,建立组播转发表;1. The multicast module establishes a multicast route between the multicast source and the orderer, and establishes a multicast forwarding table;
2.组播数据到来,先检查IP包是否合法;如果有不合法的,则丢弃该数据包或者给CPU处理;对于合法的IP包,进入下一步;2. When the multicast data arrives, first check whether the IP packet is legal; if it is illegal, discard the data packet or process it to the CPU; for legal IP packets, go to the next step;
3.根据源地址和组播地址,查找三层表,如果不能找到组播转发表索引,则可以选择丢弃或者给CPU处理;如果获得组播转发表索引,则进入下一步;3. Search the three-layer table according to the source address and multicast address. If the multicast forwarding table index cannot be found, you can choose to discard it or process it to the CPU; if you get the multicast forwarding table index, go to the next step;
4.判断三层表里组播标志是否有效,如果无效则可以选择丢弃或者给CPU处理;如果有效则进入下一步;4. Determine whether the multicast flag in the three-layer table is valid. If it is invalid, you can choose to discard it or give it to the CPU for processing; if it is valid, go to the next step;
5.查找组播转发表,检查源端口和VLAN是否匹配,如果不匹配则可以选择丢弃或者给CPU处理;如果匹配则进入下一步;5. Find the multicast forwarding table, check whether the source port and VLAN match, if not match, you can choose to discard or process it to the CPU; if match, go to the next step;
6.查找组播转发表,如果源端口和目的端口在同一VLAN里,则进行二层转发,对包不做任何处理;如果源端口和目的端口在不同VLAN,则需要进行三层转发。6. Search the multicast forwarding table, if the source port and the destination port are in the same VLAN, perform Layer 2 forwarding without any processing on the packet; if the source port and destination port are in different VLANs, then perform Layer 3 forwarding.
所述的组播精确转发的控制方法,在步骤(1)中,建立组播转发表的方式如下:源端口和目的端口在同一VLAN,建立二层组播转发表;源端口和目的端口在不同VLAN,建立三层组播转发表,同时设置相应的端口工作模式为精确转发模式;The control method of described multicast accurate forwarding, in step (1), the mode of setting up multicast forwarding table is as follows: source port and purpose port are in same VLAN, set up two-layer multicast forwarding table; Source port and purpose port are in For different VLANs, establish a three-layer multicast forwarding table, and set the corresponding port working mode to precise forwarding mode;
相应地,在步骤(6)中:Correspondingly, in step (6):
进行二层转发的方法是:端口模式为广播方式(不做设置时的缺省值),二层出端口为该VLAN所有的端口;端口模式为其它值,二层出端口为设定的二层转发端口。端口模式只对二层转发有影响,对三层转发无影响。The method of Layer 2 forwarding is: the port mode is broadcast mode (the default value when not set), the Layer 2 outbound port is all the ports of the VLAN; the port mode is other values, and the Layer 2 outbound port is the set Layer forwarding port. The port mode only affects Layer 2 forwarding, not Layer 3 forwarding.
进行三层转发的方法是:三层出端口为设定的三层转发端口。The method of performing layer-3 forwarding is: the layer-3 outbound port is the set layer-3 forwarding port.
实际转发的端口是二层转发端口和三层转发端口的总和。The port actually forwarded is the sum of the Layer 2 forwarding port and the Layer 3 forwarding port.
所述的方法中,考虑到组播流量问题,所述的交换机支持组播流量分担。如果出端口是Trunk端口,根据特定的查找算法,进行流量分担。In the method, considering the problem of multicast traffic, the switch supports multicast traffic sharing. If the outgoing port is a trunk port, traffic sharing is performed according to a specific search algorithm.
本发明的优点和积极效果:采用本发明的技术方案,实现了IP组播在交换机上的实际应用,实现了IP网络中点到多点的高效数据传送,能够有效地节约网络带宽、降低网络负载,在实时数据传送、网络电视、多媒体会议、数据拷贝、游戏和仿真等诸多方面都有广泛的应用。Advantages and positive effects of the present invention: adopting the technical scheme of the present invention, the practical application of IP multicast on the switch is realized, and the efficient data transmission from point to multipoint in the IP network is realized, which can effectively save network bandwidth and reduce network bandwidth. The load is widely used in real-time data transmission, network TV, multimedia conferencing, data copying, games and simulation.
附图说明:Description of drawings:
图1为本发明的组播精确转发的控制方法一具体实施例的流程图。FIG. 1 is a flow chart of a specific embodiment of a method for controlling multicast precise forwarding according to the present invention.
具体实施方式:Detailed ways:
按照本发明的技术方案,下面给出本发明的一个实施例,图1示出了本发明方法的流程图。具体步骤如下:According to the technical solution of the present invention, an embodiment of the present invention is given below, and Fig. 1 shows a flow chart of the method of the present invention. Specific steps are as follows:
1.配置media server服务器,启动组播服务。1. Configure the media server server and start the multicast service.
2.在交换机启动组播功能,配置好相应的接口。2. Enable the multicast function on the switch and configure the corresponding interface.
3.点播者开始点播,发出IGMP加入报文。3. The orderer starts to order and sends an IGMP join message.
4.接口管理模块获得点播者所在的端口号、VLAN ID、槽号,通知组播路由模块。4. The interface management module obtains the port number, VLAN ID, and slot number of the broadcaster, and notifies the multicast routing module.
5.组播模块在组播源和点播者之间建立组播路由,源端口和目的端口在同一VLAN,建立二层组播转发表;源端口和目的端口在不同VLAN,建立三层组播转发表,同时设置相应的端口工作模式为精确转发模式。数据从组播源沿着RPT树下发。5. The multicast module establishes a multicast route between the multicast source and the orderer. The source port and the destination port are in the same VLAN, and a Layer 2 multicast forwarding table is established; the source port and the destination port are in different VLANs, and a Layer 3 multicast is established. forwarding table, and set the corresponding port working mode to precise forwarding mode. Data is sent from the multicast source along the RPT tree.
6.组播数据到来,先检查IP包是否合法:(1)是Ip包;(2)无option选项;(3)是IPV4包;(4)IP校验和正确;(5)TTL值正确;(6)目的地址属于D类地址。如果有一项不匹配,则属不合法丢弃该数据包,也可以选择送给CPU处理。一个具体的处理方式为:记载入系统日志,并给出告警。6. When the multicast data arrives, first check whether the IP packet is legal: (1) Ip packet; (2) no option option; (3) IPV4 packet; (4) IP checksum is correct; (5) TTL value is correct ; (6) The destination address belongs to the class D address. If there is a mismatch, it is illegal to discard the data packet, or you can choose to send it to the CPU for processing. A specific processing method is: record into the system log, and give an alarm.
7.根据组播地址或者源地址加上组播地址,查找三层表,获得组播转发表索引。如果没找到,则丢弃该数据包,也可以选择送给CPU处理。7. According to the multicast address or the source address plus the multicast address, search the three-layer table to obtain the index of the multicast forwarding table. If not found, the data packet is discarded, or sent to the CPU for processing.
8.判断三层表里组播标志位是否有效,如果无效则可以选择丢弃或者给CPU处理;如果有效则进入下一步。8. Determine whether the multicast flag in the Layer 3 table is valid. If it is invalid, you can choose to discard it or give it to the CPU for processing; if it is valid, go to the next step.
9.查找组播转发表,检查源端口和VLAN是否匹配,不匹配可以选择丢弃或者给CPU处理。9. Search the multicast forwarding table, and check whether the source port and VLAN match. If they do not match, you can choose to discard them or give them to the CPU for processing.
10.查找组播转发表,根据当前的配置,检查是否需要在整个VLAN广播,是否需要进行二层转发,获得相应的出端口位图。10. Search the multicast forwarding table, check whether it needs to broadcast in the entire VLAN according to the current configuration, whether it needs to perform Layer 2 forwarding, and obtain the corresponding outbound port bitmap.
如果源端口和目的端口在同一VLAN里,则进行二层转发,对包不做任何处理;如果源端口和目的端口在不同VLAN,则需要进行三层转发,TTL值减1,替换源MAC和目的MAC,并重新计算校验和。If the source port and the destination port are in the same VLAN, layer 2 forwarding is performed without any processing on the packet; if the source port and destination port are in different VLANs, layer 3 forwarding is required, the TTL value is reduced by 1, and the source MAC and destination MAC, and recalculate the checksum.
进行二层转发的方法是:端口模式为广播方式,二层出端口为该VLAN所有的端口;端口模式为其它值,二层出端口为设定的二层转发端口。The method for Layer 2 forwarding is: the port mode is broadcast mode, and the Layer 2 outgoing port is the port owned by the VLAN; the port mode is other values, and the Layer 2 outgoing port is the set Layer 2 forwarding port.
进行三层转发的方法是:三层出端口为设定的三层转发端口。The method of performing layer-3 forwarding is: the layer-3 outbound port is the set layer-3 forwarding port.
实际转发的端口是二层转发端口和三层转发端口的总和。The port actually forwarded is the sum of the Layer 2 forwarding port and the Layer 3 forwarding port.
11.如果转发端口是Trunk端口,根据某种算法,如源MAC、源IP、目的MAC、目的IP,计算出端口。11. If the forwarding port is a Trunk port, calculate the port according to a certain algorithm, such as source MAC, source IP, destination MAC, and destination IP.
12.数据从端口出来,到达点播者,开始播放。12. The data comes out from the port, arrives at the requester, and starts playing.
13.点播者想停止点播,发出IGMP离开报文,组播模块更新组播路由。13. The orderer wants to stop ordering, sends an IGMP leave message, and the multicast module updates the multicast route.
14.更新组播转发表的出接口,对应端口置为空。14. Update the outgoing interface of the multicast forwarding table, and set the corresponding port to empty.
15.组播数据到来,检查对应端口为空,则不转发数据。15. When the multicast data arrives, check that the corresponding port is empty, and then the data will not be forwarded.
16.点播停止。16. On-demand stop.
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 03156442 CN1218540C (en) | 2003-08-29 | 2003-08-29 | Control method for exact multicast forwarding |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 03156442 CN1218540C (en) | 2003-08-29 | 2003-08-29 | Control method for exact multicast forwarding |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1486038A CN1486038A (en) | 2004-03-31 |
CN1218540C true CN1218540C (en) | 2005-09-07 |
Family
ID=34156944
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 03156442 Expired - Fee Related CN1218540C (en) | 2003-08-29 | 2003-08-29 | Control method for exact multicast forwarding |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1218540C (en) |
Families Citing this family (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100401718C (en) * | 2005-02-04 | 2008-07-09 | 华为技术有限公司 | Method and system for multicast replication of data frames |
CN100463447C (en) * | 2005-08-31 | 2009-02-18 | 杭州华三通信技术有限公司 | Switchnig equipment and method for controlling multicasting data forwarding |
CN1960321B (en) * | 2005-10-31 | 2011-03-16 | 中兴通讯股份有限公司 | Control method for implementing security of multicast |
CN100420193C (en) * | 2006-05-08 | 2008-09-17 | 国家数字交换系统工程技术研究中心 | A Virtual Identification Method of Multicast Forwarding Table Output Port |
CN101119290B (en) * | 2006-08-01 | 2011-06-01 | 华为技术有限公司 | Ethernet supporting source specific multicast forwarding method and system |
CN101325536A (en) * | 2007-06-15 | 2008-12-17 | 上海贝尔阿尔卡特股份有限公司 | Base station of WiMAX system, method and apparatus for controlling transmission of multicast data packet in gateway |
CN101119311B (en) * | 2007-09-12 | 2010-07-14 | 中兴通讯股份有限公司 | Method and device for controlling multicast data flow |
WO2009089761A1 (en) | 2008-01-09 | 2009-07-23 | Huawei Technologies Co., Ltd. | Method, system for realizing switching of multicast route tracking in second and third layers, and router |
CN101483582B (en) * | 2008-01-09 | 2012-02-01 | 华为技术有限公司 | Method, system and router for implementing second and third layer multicast trace route |
CN101494581B (en) * | 2008-01-22 | 2012-07-18 | 中兴通讯股份有限公司 | Method for implementing user port double layer intercommunication in network processor |
CN101345678B (en) * | 2008-08-27 | 2011-04-06 | 华为技术有限公司 | Multicast communication method, system and multicast communication equipment |
US8204060B2 (en) * | 2009-01-30 | 2012-06-19 | Palo Alto Research Center Incorporated | Method and system for facilitating forwarding a packet in a content-centric network |
US8243735B2 (en) * | 2009-01-30 | 2012-08-14 | Palo Alto Research Center Incorporated | System for forwarding packets with hierarchically structured variable-length identifiers using an exact-match lookup engine |
CN101924698B (en) * | 2010-07-22 | 2012-12-12 | 福建星网锐捷网络有限公司 | Method, system and equipment for balancing two-layer domain load based on IP unicast route |
CN103457862B (en) * | 2013-09-06 | 2016-05-04 | 杭州华三通信技术有限公司 | Three layers of method of realizing group broadcasting and equipment in a kind of software vertical stack system |
CN103634213B (en) * | 2013-11-04 | 2017-04-19 | 天津汉柏信息技术有限公司 | Message forwarding method |
CN103746922B (en) * | 2013-12-17 | 2017-01-25 | 福建星网锐捷网络有限公司 | Method and device for forwarding multicast messages |
-
2003
- 2003-08-29 CN CN 03156442 patent/CN1218540C/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN1486038A (en) | 2004-03-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1218540C (en) | Control method for exact multicast forwarding | |
CN1232081C (en) | Repeating method for multi-broadcast message in network communication | |
CN100442776C (en) | The Method of Realizing Multicast Forwarding on Layer 3 Switch | |
KR100694296B1 (en) | System for providing 2 layer multicast switching and 3 layer multicast routing simultaneously based on virtual interface | |
EP3070877B1 (en) | Evpn inter-subnet multicast forwarding | |
CN100379226C (en) | A multicast method of virtual private network in virtual router mode | |
US8391185B2 (en) | Method to transport bidir PIM over a multiprotocol label switched network | |
CN100531040C (en) | Method and apparatus for realizing multicasting virtual private network binding | |
US9031068B2 (en) | Methods and apparatus for managing multicast traffic through a switch | |
CN100450086C (en) | Method for Realizing Multicast Data Flow Forwarding in Virtual Private Local Area Network Service | |
US8189582B2 (en) | Multicast supported virtual local area network switching system and method thereof | |
US8565140B2 (en) | Methods and apparatus for managing multicast traffic through a switch | |
CN101035057A (en) | Method for establishing the multicast share tree and data transfer method and communication network | |
US20070025276A1 (en) | Congruent forwarding paths for unicast and multicast traffic | |
CN1424833A (en) | Method and apparatus for controlling multicast transmission in an Ethernet metropolitan area network | |
CN114205286B (en) | Method, system and network device for replication mode selection for EVPN multicast | |
CN1754353A (en) | Method and apparatus for protocol-independent implementation of IP multicast | |
CN112543146B (en) | EVPN optimized inter-subnet multicast (OISM) forwarding based on control plane | |
US20080107109A1 (en) | Method and Apparatus for Managing Multicast Traffic in a Network at the Data Link or Level 2 Layer | |
CN1378365A (en) | IP group broadcast route repeating optimizing method | |
CN1852236A (en) | Method for realizing muti-casting in BGP/MPLS VPN | |
CN109257190B (en) | Multicast processing method, controller, switch and system based on SDN | |
CN1302642C (en) | Group broadcast implementing method based on virtual local area network | |
CN1547363A (en) | Control method of multicast board-spanning forwarding | |
CN1484406A (en) | Method for making multicast accurate to terminal in three-layer switchboard |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
ASS | Succession or assignment of patent right |
Owner name: HUAWEI TECHNOLOGY CO., LTD. Free format text: FORMER OWNER: GANGWAN NETWORK CO., LTD. Effective date: 20061020 |
|
C41 | Transfer of patent application or patent right or utility model | ||
TR01 | Transfer of patent right |
Effective date of registration: 20061020 Address after: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Patentee after: Huawei Technologies Co., Ltd. Address before: 100089, No. 21 West Third Ring Road, Beijing, Haidian District, Long Ling Building, 13 floor Patentee before: Harbour Networks Holdings Limited |
|
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20050907 Termination date: 20110829 |