[go: up one dir, main page]

CN1988497B - Method for Processing Layer 2 Data Packet in Ethernet Switch - Google Patents

Method for Processing Layer 2 Data Packet in Ethernet Switch Download PDF

Info

Publication number
CN1988497B
CN1988497B CN 200510121284 CN200510121284A CN1988497B CN 1988497 B CN1988497 B CN 1988497B CN 200510121284 CN200510121284 CN 200510121284 CN 200510121284 A CN200510121284 A CN 200510121284A CN 1988497 B CN1988497 B CN 1988497B
Authority
CN
China
Prior art keywords
port
switch
special
data packet
layer
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 - Lifetime
Application number
CN 200510121284
Other languages
Chinese (zh)
Other versions
CN1988497A (en
Inventor
范成法
宋晓娟
李新宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN 200510121284 priority Critical patent/CN1988497B/en
Publication of CN1988497A publication Critical patent/CN1988497A/en
Application granted granted Critical
Publication of CN1988497B publication Critical patent/CN1988497B/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种在以太网交换机中处理二层数据包的方法,将交换机里做特殊业务的端口设置成QINQ的CUSTOM端口,将PVID设成不与任何其他端口绑定的一个特殊值。这里的特殊业务是指前面谈到的VPLS和VPWS或者别的二层的高级功能业务。和现有技术相比,本发明对在分布式交换机中实现一些特殊功能,有效的抑制了查不到MAC地址VLAN广播的行为。A method for processing layer 2 data packets in an Ethernet switch, setting the port for special services in the switch as a CUSTOM port of QINQ, and setting the PVID as a special value not bound to any other port. The special service here refers to the VPLS and VPWS mentioned above or other layer-2 advanced function services. Compared with the prior art, the present invention realizes some special functions in the distributed switch, and effectively restrains the behavior of VLAN broadcasting where the MAC address cannot be found.

Description

在以太网交换机中处理二层数据包的方法 Method for Processing Layer 2 Data Packet in Ethernet Switch

技术领域technical field

本发明涉及通讯领域的以太网交换机,具体涉及抑制分布式交换机中对二层数据包的处理方法。The invention relates to an Ethernet switch in the field of communication, in particular to a method for suppressing the processing of layer-2 data packets in a distributed switch.

背景技术Background technique

交换机中,在处理二层数据包的时候,首先会用目的MAC查找MAC表,如果MAC表中有这样的一个MAC地址,那么数据包就从此MAC表中的出端口转发出去。如果MAC表中没有这样一个地址,就会把数据包在数据包带的VLAN内或者缺省PVLAN内进行广播转发。In a switch, when processing a layer-2 data packet, it first uses the destination MAC to look up the MAC table. If there is such a MAC address in the MAC table, the data packet is forwarded out from the outgoing port in the MAC table. If there is no such address in the MAC table, the data packet will be broadcast and forwarded in the VLAN carried by the data packet or in the default PVLAN.

交换机的特点是,上面的转发流程一般都采用集成ASIC芯片来完成,也就是说上面的转发流程都是由硬件自动完成,这样价格便宜,但是不易扩展,不易实现一些比如VPLS(VPLS:Virtual Private LAN Service,虚拟专用局域网服务)、VPWS(VPWS:Virtual Private Wire Service虚拟专用线服务)的高级功能。The characteristic of the switch is that the above forwarding process is generally completed by an integrated ASIC chip, that is to say, the above forwarding process is automatically completed by the hardware, which is cheap, but not easy to expand, and difficult to implement some such as VPLS (VPLS: Virtual Private Advanced functions of LAN Service, virtual private local area network service), VPWS (VPWS: Virtual Private Wire Service virtual private line service).

现在为了要交换机里面实现一些普通ASIC芯片不支持的二层特殊功能,比如VPLS,VPWS,就必须把数据包送到指定的特殊单板上做特殊处理。但是端口收到一个查不到MAC的二层数据包就会进行VLAN内广播,一广播就有背于实现VPLS/VPWS的初衷了。Now in order to implement some special Layer 2 functions not supported by ordinary ASIC chips in the switch, such as VPLS and VPWS, the data packets must be sent to the designated special board for special processing. However, when a port receives a Layer 2 data packet whose MAC address cannot be found, it will broadcast in the VLAN. Once broadcast, it will go against the original intention of implementing VPLS/VPWS.

发明内容Contents of the invention

本发明要解决的技术问题是,提出了一种方法,对二层数据包进行处理,抑制数据包进行广播。The technical problem to be solved by the invention is to propose a method for processing the two-layer data packet and suppressing the broadcast of the data packet.

本发明的技术方案是,将交换机里做特殊业务的端口设置成QINQ的CUSTOM端口,将PVID设成不与任何其他端口绑定的一个特殊值。这里的特殊业务是指前面谈到的VPLS和VPWS或者别的二层的高级功能业务。The technical solution of the present invention is to set the port for special service in the switch as the CUSTOM port of QINQ, and set the PVID to a special value not bound with any other port. The special service here refers to the VPLS and VPWS mentioned above or other layer-2 advanced function services.

可以先把做特殊业务的端口设成ACCESS端口,然后把做特殊业务的端口设成QINQ的CUSTOM端口。You can first set the port for special business as ACCESS port, and then set the port for special business as CUSTOM port of QINQ.

当数据包通过交换机的特殊端口进入转发芯片,用PVID+MAC地址查找MAC表,若查不到,在特殊VLAN内进行广播,特殊业务板若收到这个包,则利用网络处理器来对数据包做任意处理,处理完再把数据发送出去。When the data packet enters the forwarding chip through the special port of the switch, use PVID+MAC address to search the MAC table, if not found, broadcast in the special VLAN, if the special service board receives this packet, use the network processor to process the data The packet is processed arbitrarily, and the data is sent out after processing.

和现有技术相比,本发明对在分布式交换机中实现一些特殊功能,有效的抑制了查不到MAC地址VLAN广播的行为。Compared with the prior art, the present invention realizes some special functions in the distributed switch, and effectively restrains the behavior of VLAN broadcasting where the MAC address cannot be found.

具体实施方式Detailed ways

首先介绍一下QINQ功能,QINQ功能即标签堆叠功能,就是把进入交换机的原始数据包再打一层VLAN TAG(标签)送出交换机。QINQ分CUSTOM端口和UPLINK端口。First introduce the QINQ function. The QINQ function is the tag stacking function, which is to add a layer of VLAN TAG (label) to the original data packet entering the switch and send it out of the switch. QINQ is divided into CUSTOM port and UPLINK port.

CUSTOM端口需要设置PVID(PVID:Port Vlan ID,又称端口默认VLAN ID,即port default Vlan ID),这个PVID就是要在原数据包上添加的VLAN TAG。当数据包进入CUSTOM端口,如果原数据包不带VLAN TAG,数据包会添加一层PVID的VLAN TAG从UPLINK端口出去.如果原数据包带了一层VLAN TAG,数据包就会再添加一层PVID的VLAN TAG从UPLINK端口出去,这样原来的VLAN TAG为内层标签,新添加的VLAN TAG为外层标签。The CUSTOM port needs to set PVID (PVID: Port Vlan ID, also known as port default VLAN ID, that is, port default Vlan ID). This PVID is the VLAN TAG to be added to the original data packet. When a data packet enters the CUSTOM port, if the original data packet does not have a VLAN TAG, the data packet will add a layer of PVID VLAN TAG and go out from the UPLINK port. If the original data packet has a layer of VLAN TAG, the data packet will add another layer The VLAN TAG of PVID goes out from the UPLINK port, so the original VLAN TAG is the inner label, and the newly added VLAN TAG is the outer label.

当数据包进入UPLINK端口,如果原数据包带两层VLAN TAG,则把外层VLAN TAG剥掉,数据包带内层VLAN TAG从CUSTOM端口出去。如果原数据包带一层VLAN TAG,则把VLAN TAG剥掉从CUSTOM端口出去。When the data packet enters the UPLINK port, if the original data packet has two layers of VLAN TAG, the outer VLAN TAG is stripped off, and the data packet with the inner VLAN TAG goes out from the CUSTOM port. If the original data packet has a layer of VLAN TAG, then strip the VLAN TAG out from the CUSTOM port.

本发明的方法就是,在交换机里把做特殊业务的端口设置成QINQ的CUSTOM端口,将PVID设成一个特殊值,没有任何其他端口属于这个VLAN。The method of the present invention is exactly, in switch, the port that does special business is set to the CUSTOM port of QINQ, and PVID is set to a special value, does not have any other port to belong to this VLAN.

可以首先把特殊功能的端口设成ACCESS端口(ACCESS端口:端口只能属于一个VLAN,并且是untagged),PVID设为一个特殊保留值。然后把端口设成QINQ的CUSTOM端口。You can first set the port with a special function as an ACCESS port (ACCESS port: the port can only belong to one VLAN and is untagged), and the PVID is set as a special reserved value. Then set the port to QINQ's CUSTOM port.

做上面的配置之后,所有进入端口二层数据包,将不在入口VLAN内做广播,而是在原始包的基础上再打上一层PVID的VLAN TAG,在PVID内进行广播,因为这个PVID没有跟任何其他端口绑定,所以这个数据包不从任何端口转发出去,只是广播到了特殊功能处理板。After the above configuration is done, all Layer 2 data packets entering the port will not be broadcast in the ingress VLAN, but on the basis of the original packet, a layer of PVID VLAN TAG will be added and broadcast in the PVID, because this PVID does not follow the Any other port is bound, so this data packet is not forwarded from any port, but broadcast to the special function processing board.

当数据包通过交换机的特殊端口进入转发芯片,用PVID+MAC地址查找MAC表,查不到,在特殊VLAN内进行广播,只有特殊业务板可能收到这个包。特殊业务板可以利用网络处理器来对数据包做任意处理,处理完再把数据发送出去。但需要注意的是:进入特殊业务板的数据包已经不是原始的数据包,而是添加了一层VLAN TAG的数据包,处理中间可以不理会这个外层VLAN,处理完把外层的VLANTAG剥掉。When the data packet enters the forwarding chip through the special port of the switch, the PVID+MAC address is used to search the MAC table, but if it cannot be found, it broadcasts in the special VLAN, and only the special service board may receive the packet. The special service board can use the network processor to process the data packets arbitrarily, and then send the data out after processing. However, it should be noted that the data packets entering the special service board are no longer original data packets, but a data packet with a layer of VLAN TAG added. You can ignore the outer VLAN during processing, and strip the outer VLAN TAG after processing. Lose.

Claims (2)

1. method of in Ethernet switch, handling the Layer 2 data bag, the port of doing particular service in the switch is arranged to the CUSTOM port of QINQ, PVID is set as not a particular value with any other port binding, wherein, described particular service comprises virtual special local area network service VPLS or virtual dedicated line service VPWS.
2. the method for in Ethernet switch, handling the Layer 2 data bag according to claim 1, it is characterized in that, when the port of packet by switch enters forwarding chip, show with PVID+MAC address search MAC, if can not find out, in VLAN, to broadcast, business board is if receive this bag, then utilize network processing unit to come packet is done any processing, handle that again data are sent.
CN 200510121284 2005-12-24 2005-12-24 Method for Processing Layer 2 Data Packet in Ethernet Switch Expired - Lifetime CN1988497B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200510121284 CN1988497B (en) 2005-12-24 2005-12-24 Method for Processing Layer 2 Data Packet in Ethernet Switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200510121284 CN1988497B (en) 2005-12-24 2005-12-24 Method for Processing Layer 2 Data Packet in Ethernet Switch

Publications (2)

Publication Number Publication Date
CN1988497A CN1988497A (en) 2007-06-27
CN1988497B true CN1988497B (en) 2010-05-05

Family

ID=38185139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200510121284 Expired - Lifetime CN1988497B (en) 2005-12-24 2005-12-24 Method for Processing Layer 2 Data Packet in Ethernet Switch

Country Status (1)

Country Link
CN (1) CN1988497B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227401B (en) * 2008-02-19 2010-09-29 中兴通讯股份有限公司 Data transmission system and method
CN103532848B (en) * 2013-10-25 2017-02-08 迈普通信技术股份有限公司 virtual private local area network service message processing method and system
CN113050703B (en) * 2021-02-05 2022-11-18 新华三技术有限公司 Flow control method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1404263A (en) * 2001-09-03 2003-03-19 华为技术有限公司 Realizing method and system of special network in wideband virtual network
CN1405986A (en) * 2001-09-18 2003-03-26 富士通株式会社 Relay system of second layer virtual special network
CN1499781A (en) * 2002-11-05 2004-05-26 �ձ�������ʽ���� Second layer exchanging and processing method to second layer frame spreading virtual local net label
CN1652542A (en) * 2004-02-07 2005-08-10 华为技术有限公司 The Method of Realizing Virtual Leased Line

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1404263A (en) * 2001-09-03 2003-03-19 华为技术有限公司 Realizing method and system of special network in wideband virtual network
CN1405986A (en) * 2001-09-18 2003-03-26 富士通株式会社 Relay system of second layer virtual special network
CN1499781A (en) * 2002-11-05 2004-05-26 �ձ�������ʽ���� Second layer exchanging and processing method to second layer frame spreading virtual local net label
CN1652542A (en) * 2004-02-07 2005-08-10 华为技术有限公司 The Method of Realizing Virtual Leased Line

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘明,蔡昭权.基于LDP的VPLS的实施模型的比较.广东通信技术 10.2005,(10),66-72.
刘明,蔡昭权.基于LDP的VPLS的实施模型的比较.广东通信技术 10.2005,(10),66-72. *

Also Published As

Publication number Publication date
CN1988497A (en) 2007-06-27

Similar Documents

Publication Publication Date Title
EP3211839B1 (en) Split-horizon packet forwarding in a mh-pbb-evpn network
CN103023792B (en) For carrying out the method and system of packet switching in shortest path bridging network
US9794180B2 (en) Reducing transient packet duplication and improving split-horizon filtering
US9843507B2 (en) Enhanced hierarchical virtual private local area network service (VPLS) system and method for ethernet-tree (E-tree) services
US9608833B2 (en) Supporting multiple multicast trees in trill networks
CN101820392B (en) A kind of method and network processing unit realizing multi-service forwarding
US9628293B2 (en) Network layer multicasting in trill networks
US7633889B2 (en) Carrier network of virtual network system and communication node of carrier network
US20050018605A1 (en) Multiprotocol label switching (MPLS) edge service extraction
US8724629B1 (en) E-tree service having extended shared VLAN learning across VPLS network
US20100142537A1 (en) Packet transport layer apparatus
US20130287027A1 (en) Apparatus and method for processing packet in mpls-tp network
EP3113422B1 (en) Method and system of enhancing multiple mac registration protocol (mmrp) for protocol internetworking
CN101110746B (en) Edge equipment of operators, city Ethernet access network and its data processing method
CN102404179B (en) Method and device for processing message
CN103780484B (en) Message transmitting method and device
CN101667954A (en) Network of multilayer virtual private LAN (local area network) service and data processing method thereof
CN100433691C (en) Routing method of virtual special network
CN101364949B (en) Packet stream redirection processing method for distributed network system
CN100484055C (en) Method for implementing multicast spanning VLAN
CN1988497B (en) Method for Processing Layer 2 Data Packet in Ethernet Switch
CN101166137B (en) Method for separating different virtual LAN services
CN100442777C (en) Quality of Service Management Method Based on Virtual Local Area Network Stacking
CN101232446A (en) Message processing method and device
CN100446503C (en) A method and device for enhancing VPN network optimization

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
CX01 Expiry of patent term

Granted publication date: 20100505

CX01 Expiry of patent term