
技术领域technical field
本发明涉及通信网络中的报文转发方法,具体地说涉及基于二层交换设备的组播报文转发方法。The invention relates to a message forwarding method in a communication network, in particular to a multicast message forwarding method based on a two-layer switching device.
背景技术Background technique
目前在宽带网络中,用户终端通常会通过二层交换设备接入网络,其中最为常见的二层交换设备是支持802.1Q协议的以太网二层交换机(LANSWITCH)。下面以LANSWITCH为例说明组播报文的转发。所有由LANSWITCH接入网络的用户终端发出的报文都要被加上一个特殊的用于用户终端识别的标记,实际中,该标记通常为虚拟局域网(VLAN:Virtual Local Area Network)标签,此VLAN标签可以唯一标识此用户终端接入LANSWITCH的特定物理接口,即用户从接入端口发来的以太网格式的报文经过该交换机都将加上一个VLAN头以标识用户接入的端口位置。LANSWITCH对于收到的所有报文的转发方法如下:根据报文中的目的MAC地址和VLAN头中的VLANID查找二层转发表,即MAC地址和VLANID到物理端口的映射表,如果找到匹配项,则把报文从相应的物理端口转发出去;如果没有找到匹配项,则把报文向VLAN头中的VLANID对应的所有物理端口进行转发,相当于广播式发送。由于二层转发表是根据报文中的源MAC地址和VLANID以及收到此报文的物理端口来生成的,由于组播MAC地址不能当作标识终端设备的单播MAC地址使用,因此组播报文使用的是根本不会作为源媒体访问控制(MAC)地址出现的组播MAC地址作为报文的目的MAC地址,如果不做特殊处理的话,LANSWITCH无法为组播MAC地址生成二层转发表,LANSWITCH对于组播报文只能采取向所有端口以广播的方式发送,极大地浪费了系统带宽资源并严重影响LANSWITCH的性能。为了改善LANSWITCH对组播报文的处理,LANSWITCH截获用户的因特网组管理协议(IGMP)报文,以收到此IGMP报文的端口的VLAN标识(VLANID)和组播MAC地址生成关于此组播MAC地址的二层转发表,一旦LANSWITCH生成了关于组播MAC地址的二层转发表后,对于后面收到的组播数据报文,就完全可以按照普通报文一样查找二层转发表进行转发,从而避免LANSWITCH对组播报文的广播转发。Currently, in a broadband network, a user terminal usually accesses the network through a
由上述LANSWITCH对报文的处理中可以看出,当LANSWITCH收到一个不带VLAN头的报文时会自动的给此报文扩展一个VLAN头,而且这个VLAN头是以收到此报文的端口的VLANID来构造的。当LANSWITCH生成关于组播MAC地址的二层转发表时,其VLANID使用的是收到此IGMP报文的用户侧的接入端口的VLANID,而当LANSWITCH上行端口收到不带VLAN头的组播数据报文时(实际中,组播节目源都在网络侧,组播数据报文都是从LANSWITCH上行端口发过来的),LANSWITCH会为这个报文加上上行端口的VLANID构成的VLAN头,而用户侧端口和上行侧端口的VLANID是不相同的,因此这将导致生成的关于组播MAC地址的二层转发表对于LANSWITCH上行端口收到的不带VLAN头的组播数据报文毫无作用,LANSWITCH仍会把组播报文当作广播报文处理,根据VLANID对应的物理端口进行转发,仍将浪费大量的网络资源。It can be seen from the processing of the message by LANSWITCH above that when LANSWITCH receives a message without a VLAN header, it will automatically extend a VLAN header to the message, and the VLAN header is based on receiving the message. The VLANID of the port is constructed. When LANSWITCH generates a
发明内容Contents of the invention
本发明的目的在于提供一种避免网络资源浪费的基于二层交换设备的组播报文转发方法。The purpose of the present invention is to provide a layer-2 switching device-based multicast message forwarding method that avoids waste of network resources.
为达到上述目的,本发明提供的基于二层交换设备的组播报文转发方法,包括:In order to achieve the above object, the multicast message forwarding method based on the two-layer switching equipment provided by the present invention includes:
(1)二层交换设备从接入端口接收因特网组管理协议(IGMP)报文;(1)
(2)判断报文中是否有虚拟局域网(VLAN)头,如果有,转步骤(3),否则给该报文加上接入端口的虚拟局域网标识(VLANID)构成虚拟局域网头;(2) judge whether there is a virtual local area network (VLAN) head in the message, if there is, go to step (3), otherwise add the virtual local area network identification (VLANID) of the access port to the message to form a virtual local area network head;
(3)生成接入端口的虚拟局域网标识(VLANID)和组播媒体接入控制(MAC)地址到收到该IGMP报文的物理端口的映射关系表,以及生成上行端口的虚拟局域网标识和组播媒体接入控制地址到收到该IGMP报文的物理端口的影射关系表;(3) generate the virtual local area network identification (VLANID) of the access port and the mapping relationship table of the multicast media access control (MAC) address to the physical port receiving the IGMP message, and generate the virtual local area network identification and group of the uplink port A mapping relationship table from the broadcast media access control address to the physical port receiving the IGMP message;
(4)根据上述映射关系表进行组播报文的转发。(4) Forwarding the multicast message according to the above mapping relationship table.
本发明在生成组播二层转发表时使用了LANSWITCH的上行端口的VLANID,增加了一个LANSWITCH的上行端口的VLANID和组播MAC地址到收到此IGMP报文的物理端口的映射关系表,由于在生成组播二层转发表时建立两个转发表:一个转发表中的VLANID使用收到IGMP加入报文的用户侧端口的VLANID,另一个转发表中的VLANID使用LANSWITCH的上行端口的VLANID,从而解决了LANSWITCH上行端口收到的不带VLAN头的组播数据报文无法有效转发的问题,因此采用本发明所述方法转发IGMP组播报文可以避免网络资源浪费。The present invention has used the VLANID of the uplink port of LANSWITCH when generating the multicast two-layer forwarding table, has increased the VLANID of the uplink port of LANSWITCH and the mapping relationship table of the multicast MAC address to the physical port that receives this IGMP message, because Create two forwarding tables when generating the
附图说明Description of drawings
图1是本发明方法的实施例流程图。Fig. 1 is the flow chart of the embodiment of the method of the present invention.
具体实施方式Detailed ways
下面结合附图对本发明作进一步详细的描述。The present invention will be described in further detail below in conjunction with the accompanying drawings.
通常,经二层交换设备处理的组播报文有两种:IGMP报文和组播数据报文。这是不同的两种报文,虽然他们都使用组播MAC地址作为目的MAC地址:IGMP报文是用户终端通告网络设备需要某个组播服务的信令控制报文,用户只有在需要和离开某个组播服务时,才会发出相应的IGMP报文,而且IGMP报文的目的MAC地址和相应的组播数据报文的目的MAC地址采用完全相同的组播MAC地址;而组播数据报文才是真正的承载组播服务内容的数据报文。因此,二层交换设备生成组播报文二层转发表需要IGMP报文的参与才可能实现,然后利用二层转发表进行组播数据报文的转发。Generally, there are two types of multicast packets processed by
为了使二层交换设备能够实现带VLAN头和不带VLAN头的组播报文的非广播式转发,本发明在生成组播二层转发表时多建立一个二层转发表,这样通过两个二层转发表即可实现带VLAN头和不带VLAN头的组播报文的非广播式转发。下面通过以太网二层交换机(LANSWITCH)为例说明本发明。In order to enable the two-layer switching equipment to realize the non-broadcast forwarding of multicast messages with VLAN headers and without VLAN headers, the present invention sets up a second-layer forwarding table when generating the multicast two-layer forwarding table, so that through two The
图1是本发明方法的实施例流程图。按照图1,实现本发明共有5个步骤。首先,LANSWITCH在步骤1,从接入端口接收因特网组管理协议(IGMP)报文,然后在步骤2判断该报文中是否有虚拟局域网(VLAN)头,如果有,转步骤4,否则在步骤3给该报文加上接入端口的虚拟局域网标识(VLANID)构成虚拟局域网头,例如,对于不支持802.1Q协议的用户终端发出的IGMP报文都不会有VLAN头,因此IGMP报文的VLAN头都是由LANSWITCH自动加上的,且是以接入端口的虚拟局域网标识(VLANID)构成的;然后转步骤4;在步骤4,生成接入端口的虚拟局域网标识(VLANID)和组播媒体接入控制(MAC)地址(即IGMP报文的目的MAC地址)到收到该IGMP报文的物理端口的映射关系表,生成该表是传统的LANSWITCH的功能,这样做是为了和传统兼容,因为如果LANSWITCH上连的上层设备支持802.1Q协议时,它可以发出带有接入端口的VLANID的组播数据报文;同时生成上行端口的虚拟局域网标识和组播媒体接入控制地址(即IGMP报文的目的MAC地址)到收到该IGMP报文的物理端口的映射关系表;最后在步骤5,根据上述映射关系表进行组播数据报文的转发。Fig. 1 is the flow chart of the embodiment of the method of the present invention. According to Fig. 1, realize the present invention has 5 steps altogether. First, LANSWITCH receives the Internet Group Management Protocol (IGMP) message from the access port in
当LANSWITCH上行端口收到不带VLAN头的组播数据报文时,LANSWITCH会自动为这个报文加上上行端口的VLANID构成的VLAN头,然后LANSWITCH根据报文中的组播MAC地址,即组播数据报文的目的MAC地址和上行端口的VLANID查找二层转发表,由于步骤3已经生成了上行端口的VLANID和相应的组播MAC地址到收到该IGMP报文的物理端口的映射关系表,LANSWITCH把组播数据报文直接转发到这个物理端口,保证了发出IGMP报文的用户能够收到组播数据报文,获得组播服务。When the LANSWITCH uplink port receives a multicast data packet without a VLAN header, LANSWITCH will automatically add a VLAN header composed of the VLANID of the uplink port to the packet, and then LANSWITCH will use the multicast MAC address in the packet, that is, the group The destination MAC address of the broadcast data message and the VLANID of the uplink port are searched for the
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB02117802XACN1194508C (en) | 2002-05-15 | 2002-05-15 | A method for forwarding multicast packets based on Layer 2 switching equipment |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB02117802XACN1194508C (en) | 2002-05-15 | 2002-05-15 | A method for forwarding multicast packets based on Layer 2 switching equipment |
| Publication Number | Publication Date |
|---|---|
| CN1458771Atrue CN1458771A (en) | 2003-11-26 |
| CN1194508C CN1194508C (en) | 2005-03-23 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB02117802XAExpired - LifetimeCN1194508C (en) | 2002-05-15 | 2002-05-15 | A method for forwarding multicast packets based on Layer 2 switching equipment |
| Country | Link |
|---|---|
| CN (1) | CN1194508C (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2007009367A1 (en)* | 2005-07-19 | 2007-01-25 | Alcatel | A method for duplicate address detection in the two-layer access network supporting ipv6 and a system thereof |
| WO2007056923A1 (en)* | 2005-11-17 | 2007-05-24 | Huawei Technologies Co., Ltd. | Method for implementing multicast |
| CN100337457C (en)* | 2005-06-03 | 2007-09-12 | 华为技术有限公司 | Cross-VLAN layer 2 multicast data transmission method of Ethernet switch |
| WO2008003214A1 (en)* | 2006-06-30 | 2008-01-10 | Huawei Technologies Co., Ltd. | Method, device and system for media flow traversing nat |
| WO2008077321A1 (en)* | 2006-12-27 | 2008-07-03 | Huawei Technologies Co., Ltd. | An implementation method, system and device of internet group management protocol snooping |
| CN100428734C (en)* | 2004-01-26 | 2008-10-22 | 日立通讯技术株式会社 | packet transfer device |
| CN100433730C (en)* | 2006-08-08 | 2008-11-12 | 杭州华三通信技术有限公司 | Method and system of multicast and video-on-demand |
| CN100442772C (en)* | 2005-10-19 | 2008-12-10 | 华为技术有限公司 | A bridge forwarding method |
| CN100444586C (en)* | 2006-11-06 | 2008-12-17 | 杭州华三通信技术有限公司 | Message repeat method and device |
| CN100444576C (en)* | 2004-06-24 | 2008-12-17 | 信息产业部电信研究院 | Method of Realizing Multicast in IP Telecommunication Network System |
| CN100454888C (en)* | 2004-03-06 | 2009-01-21 | 鸿富锦精密工业(深圳)有限公司 | Multicast flow control management method |
| WO2009026846A1 (en)* | 2007-08-25 | 2009-03-05 | Huawei Technologies Co., Ltd. | Message transmission method, device and system for implementing multicast services |
| CN100486207C (en)* | 2003-12-26 | 2009-05-06 | 华为技术有限公司 | IP multicasting precision port transmitting method in three layer exchanging |
| WO2009117923A1 (en)* | 2008-03-27 | 2009-10-01 | 华为技术有限公司 | A method, an apparatus and a communication device for transmitting data |
| CN101800705A (en)* | 2010-03-18 | 2010-08-11 | 中兴通讯股份有限公司 | Method and device for broadcasting data messages between local accesses |
| CN101938429A (en)* | 2010-09-30 | 2011-01-05 | 迈普通信技术股份有限公司 | Two-layer multicast forwarding method based on two-layer multicast domain and router |
| CN101133605B (en)* | 2005-04-01 | 2011-02-23 | 思科技术公司 | Performing extended lookups on MAC-based tables |
| CN101483655B (en)* | 2009-02-10 | 2012-01-25 | 杭州华三通信技术有限公司 | Packet transmission method and proxy device for Internet group management protocol |
| CN102510767A (en)* | 2011-11-09 | 2012-06-20 | 华为技术有限公司 | Method for realizing interaction multicast in PON, system and device thereof |
| CN101286990B (en)* | 2008-05-27 | 2012-09-05 | 中兴通讯股份有限公司 | Forwarding method and apparatus of double-layer multicast |
| TWI467934B (en)* | 2012-11-23 | 2015-01-01 | Nat Univ Chung Cheng | In the passive optical fiber network using the second layer of multicast monitoring packet transfer method |
| CN106851435A (en)* | 2016-12-23 | 2017-06-13 | 浙江宇视科技有限公司 | The sending method and rear end equipment of a kind of multicast data flow |
| CN108667735A (en)* | 2017-03-29 | 2018-10-16 | 中兴通讯股份有限公司 | A kind of retransmission method and device of multicast packet |
| CN111385026A (en)* | 2018-12-29 | 2020-07-07 | 中兴通讯股份有限公司 | OLT equipment virtualization method and OLT equipment |
| CN117579585A (en)* | 2023-11-16 | 2024-02-20 | 中科驭数(北京)科技有限公司 | Layer 2 message forwarding method, device and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101127696B (en) | 2006-08-15 | 2012-06-27 | 华为技术有限公司 | Data forwarding method for layer 2 network and network and node devices |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100486207C (en)* | 2003-12-26 | 2009-05-06 | 华为技术有限公司 | IP multicasting precision port transmitting method in three layer exchanging |
| CN100428734C (en)* | 2004-01-26 | 2008-10-22 | 日立通讯技术株式会社 | packet transfer device |
| CN100454888C (en)* | 2004-03-06 | 2009-01-21 | 鸿富锦精密工业(深圳)有限公司 | Multicast flow control management method |
| CN100444576C (en)* | 2004-06-24 | 2008-12-17 | 信息产业部电信研究院 | Method of Realizing Multicast in IP Telecommunication Network System |
| CN101133605B (en)* | 2005-04-01 | 2011-02-23 | 思科技术公司 | Performing extended lookups on MAC-based tables |
| CN100337457C (en)* | 2005-06-03 | 2007-09-12 | 华为技术有限公司 | Cross-VLAN layer 2 multicast data transmission method of Ethernet switch |
| WO2007009367A1 (en)* | 2005-07-19 | 2007-01-25 | Alcatel | A method for duplicate address detection in the two-layer access network supporting ipv6 and a system thereof |
| US7965709B2 (en) | 2005-10-19 | 2011-06-21 | Huawei Technologies Co., Ltd. | Bridge forwarding method and apparatus |
| CN100442772C (en)* | 2005-10-19 | 2008-12-10 | 华为技术有限公司 | A bridge forwarding method |
| CN100442775C (en)* | 2005-11-17 | 2008-12-10 | 华为技术有限公司 | A Method of Realizing Multicast in MAC in MAC Network |
| WO2007056923A1 (en)* | 2005-11-17 | 2007-05-24 | Huawei Technologies Co., Ltd. | Method for implementing multicast |
| US7746859B2 (en) | 2005-11-17 | 2010-06-29 | Huawei Technologies Co., Ltd. | Method for implementing multicast |
| WO2008003214A1 (en)* | 2006-06-30 | 2008-01-10 | Huawei Technologies Co., Ltd. | Method, device and system for media flow traversing nat |
| CN100433730C (en)* | 2006-08-08 | 2008-11-12 | 杭州华三通信技术有限公司 | Method and system of multicast and video-on-demand |
| CN100444586C (en)* | 2006-11-06 | 2008-12-17 | 杭州华三通信技术有限公司 | Message repeat method and device |
| WO2008077321A1 (en)* | 2006-12-27 | 2008-07-03 | Huawei Technologies Co., Ltd. | An implementation method, system and device of internet group management protocol snooping |
| WO2009026846A1 (en)* | 2007-08-25 | 2009-03-05 | Huawei Technologies Co., Ltd. | Message transmission method, device and system for implementing multicast services |
| WO2009117923A1 (en)* | 2008-03-27 | 2009-10-01 | 华为技术有限公司 | A method, an apparatus and a communication device for transmitting data |
| CN101286990B (en)* | 2008-05-27 | 2012-09-05 | 中兴通讯股份有限公司 | Forwarding method and apparatus of double-layer multicast |
| CN101483655B (en)* | 2009-02-10 | 2012-01-25 | 杭州华三通信技术有限公司 | Packet transmission method and proxy device for Internet group management protocol |
| CN101800705A (en)* | 2010-03-18 | 2010-08-11 | 中兴通讯股份有限公司 | Method and device for broadcasting data messages between local accesses |
| CN101938429B (en)* | 2010-09-30 | 2012-08-29 | 迈普通信技术股份有限公司 | Two-layer multicast forwarding method based on two-layer multicast domain and router |
| CN101938429A (en)* | 2010-09-30 | 2011-01-05 | 迈普通信技术股份有限公司 | Two-layer multicast forwarding method based on two-layer multicast domain and router |
| CN102510767A (en)* | 2011-11-09 | 2012-06-20 | 华为技术有限公司 | Method for realizing interaction multicast in PON, system and device thereof |
| WO2012167541A1 (en)* | 2011-11-09 | 2012-12-13 | 华为技术有限公司 | Method, system and apparatus for implementing intercommunication multicast in passive optical network |
| CN102510767B (en)* | 2011-11-09 | 2014-04-02 | 华为技术有限公司 | Method for realizing interaction multicast in PON, system and device thereof |
| TWI467934B (en)* | 2012-11-23 | 2015-01-01 | Nat Univ Chung Cheng | In the passive optical fiber network using the second layer of multicast monitoring packet transfer method |
| CN106851435A (en)* | 2016-12-23 | 2017-06-13 | 浙江宇视科技有限公司 | The sending method and rear end equipment of a kind of multicast data flow |
| CN106851435B (en)* | 2016-12-23 | 2019-08-27 | 浙江宇视科技有限公司 | Method for sending multicast stream and backend device |
| CN108667735A (en)* | 2017-03-29 | 2018-10-16 | 中兴通讯股份有限公司 | A kind of retransmission method and device of multicast packet |
| CN111385026A (en)* | 2018-12-29 | 2020-07-07 | 中兴通讯股份有限公司 | OLT equipment virtualization method and OLT equipment |
| CN111385026B (en)* | 2018-12-29 | 2022-08-26 | 中兴通讯股份有限公司 | OLT equipment virtualization method and OLT equipment |
| CN117579585A (en)* | 2023-11-16 | 2024-02-20 | 中科驭数(北京)科技有限公司 | Layer 2 message forwarding method, device and storage medium |
| Publication number | Publication date |
|---|---|
| CN1194508C (en) | 2005-03-23 |
| Publication | Publication Date | Title |
|---|---|---|
| CN1458771A (en) | Multicasting messag transmission method base on two layer exchange device | |
| CN100531040C (en) | Method and apparatus for realizing multicasting virtual private network binding | |
| CN100442776C (en) | The Method of Realizing Multicast Forwarding on Layer 3 Switch | |
| US8189582B2 (en) | Multicast supported virtual local area network switching system and method thereof | |
| CN102035729B (en) | Multicast data forwarding method | |
| EP0861544B1 (en) | Method for establishing restricted broadcast groups in a switched network | |
| US8934486B2 (en) | System and method for implementing multicast over a label-switched core network | |
| CN100442775C (en) | A Method of Realizing Multicast in MAC in MAC Network | |
| US20070127477A1 (en) | Method for implementing multicast based on multi-service transport platform | |
| CN101626338B (en) | Method and device for realizing multiple virtual private network (VPN) examples | |
| CN102215172B (en) | A kind of method and system for realizing cross-virtual private local area network multicast | |
| CN106375223B (en) | A kind of data forwarding system and method based on SDN | |
| CN100396055C (en) | Multicasting source filtering treatment method | |
| US7327730B2 (en) | Data packet transmission method and network switch applying same thereto | |
| CN100440848C (en) | Data packet transmission method and network switch using the same | |
| CN100486207C (en) | IP multicasting precision port transmitting method in three layer exchanging | |
| WO2007041942A1 (en) | System for Ethernet supporting the transmitting of the source-specific multicast and the method thereof | |
| CN100450080C (en) | Method and device for converging layer 2 MAC address | |
| CN100372321C (en) | A Method of Establishing Virtual Circuit | |
| CN102868642B (en) | The method and apparatus of NVGRE message repeating is realized in ASIC | |
| CN103139085A (en) | Method for implementation of multicast service in network, access device and system | |
| KR101279790B1 (en) | An ip multicast route monitoring system and the method thereof | |
| CN101252456B (en) | Method, system and device for wholesale of multicast service | |
| CN101480010B (en) | source-specific multicast method | |
| CN1787520B (en) | System and Method for Realizing Internet Group Management Protocol on Resilient Packet Ring |
| Date | Code | Title | Description |
|---|---|---|---|
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| 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 | ||
| CX01 | Expiry of patent term | ||
| CX01 | Expiry of patent term | Granted publication date:20050323 |