CN105072033A - Message forwarding method of switch chip, and switch chip - Google Patents

Message forwarding method of switch chip, and switch chip Download PDF

Info

Publication number
CN105072033A
CN105072033A CN201510392051.8A CN201510392051A CN105072033A CN 105072033 A CN105072033 A CN 105072033A CN 201510392051 A CN201510392051 A CN 201510392051A CN 105072033 A CN105072033 A CN 105072033A
Authority
CN
China
Prior art keywords
message
vlan
label
exchange chip
interface
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.)
Pending
Application number
CN201510392051.8A
Other languages
Chinese (zh)
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.)
BEIJING OPZOON TECHNOLOGY Co Ltd
Opzoon Technology Co Ltd
Original Assignee
BEIJING OPZOON TECHNOLOGY Co Ltd
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 BEIJING OPZOON TECHNOLOGY Co Ltd filed Critical BEIJING OPZOON TECHNOLOGY Co Ltd
Priority to CN201510392051.8A priority Critical patent/CN105072033A/en
Publication of CN105072033A publication Critical patent/CN105072033A/en
Pending legal-status Critical Current

Links

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/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]

Abstract

The invention discloses a message forwarding method of a switch chip, and a switch chip. The message forwarding includes uplink forwarding and downlink forwarding. The uplink forwarding concretely includes: ensealing a message with a vlan label when an incoming interface of a switch chip receives the message; and sending the message with the ensealing vlan label to a CPU interface. The downlink forwarding concretely includes: identifying information about the vlan label of the message when an outcoming interface of the switch chip receives the message from a CPU; and selecting a corresponding switch chip interface and sending the message on the basis of the information of the label, wherein the vlan label is positioned prior to an MAC layer of the message. According to the message forwarding method, interface sharing can be guaranteed, code complexity is reduced, and the performance is improved.

Description

The message forwarding method of exchange chip and exchange chip
Technical field
The present invention relates to network communication technology field, particularly relate to a kind of message forwarding method and exchange chip of exchange chip.
Background technology
Utilize the interface of the vlan isolation characteristic of exchange chip to forwarded chip CPU to carry out multiplexing, become a kind of conventional Interface Expanding means of network equipment vendor.This mode cost performance is higher, effectively can increase interface number, improves the competitiveness of product, is a kind of trend of future device development.
The network device hardware framework of a basic tape swap chip is as follows: the interface of forwarding chip CPU is connected with exchange chip, marks off more interface to use by exchange chip.Exchange chip is isolated by vlan, marks off one by one independently message passage: seal up different vlantag labels to the message that distinct interface enters, make it not interfere with each other.For the message that exchange chip interface is sent up, distribute or the mode of hash according to odd even, uniform feeding in cpu i/f processes.As shown below:
The mode of this interface duplex, needs to stamp vlantag label in the message of transmitted to CPU, tells the incoming interface of CPU message; Meanwhile, also correct outgoing interface is selected by vlantag label at outgoing direction CPU.The operation of general this encapsulation and stripping vlan-label has all been driven by exchange chip, and general needs carries out:
1, vlan passage divides, and namely divides independently vlan to each interface;
2, uplink message seals up vlan-label;
3, downlink message judges vlan-label and peels off;
Vlan label is positioned between two layers of head (mac layer) of message and three layers of head (IP head), and length is four bytes.
There are the following problems for the mode of sealing up of this vlantag:
One, in the processing procedure of upper layer software (applications), generally has vlan Message processing flow process and non-vlan Message processing flow process.So for the message carrying vlan-label that multiplex interface send, in fact vlan message not truly, and the position of just using vlan-label is to identify incoming interface, its vlan-label is stamped by exchange chip, be not carry in original message, non-vlan Message processing forwarding process should be walked.And only have the self-contained vlan of original message (as sent from vlan sub-interface) to be only real vlan message.Therefore, the energy that needs to cost a lot of money in the process of upper strata is distinguished this kind of situation, prevents message from going to the wrong way flow process, has impact to code complexity and performance.
Its two, in Message processing process, some flow process (such as main frame message flow process) needs initial original message, namely needs to peel off the exchange chip vlan-label of sealing up.Vlan-label, between two or three layers of head, needs during stripping to move integrally the position of message in internal memory, is a very large loss to equipment performance.
They are three years old, for the original message (as the message that sub-interface enters) just carrying vlan, this is sealed up mode and message can be caused to carry double-deck vlan, this double-deck vlan brings a lot of inconvenience in forwarding process or on message judges, causes the lifting of flow process complexity and the decline of equipment performance.
Summary of the invention
The technical problem to be solved in the present invention is: the message repeating how under exchange chip expansion interface mode, both ensured interface duplex, reduces again and performance boost has good effect to code complexity.
For solving the problem, the invention provides a kind of exchange chip message forwarding method, it is characterized in that, described message repeating comprises forwarded upstream and down forwards,
Wherein, described forwarded upstream specifically comprises: when the incoming interface of described exchange chip receives message, seals up vlan-label to described message;
The message of sealing up vlan-label is sent to cpu i/f;
Described down forwarding specifically comprises: when the outgoing interface of described exchange chip receives the message from CPU, identifies the label information of the vlan-label of described message;
Corresponding exchange chip interface is selected to send described message according to described label information;
Wherein, before described vlan-label is positioned at the MAC layer of described message.
Wherein, down forward described in and also comprise:
When the message repeating from CPU is gone out, the vlan-label information of described message is peeled off.
Wherein, when the incoming interface of described exchange chip receives message, vlan-label is sealed up to described message, specifically comprises:
Vlan mark according to the sub-interface receiving described message seals up vlan-label to described message.
Wherein, the label information of the vlan-label of the described message of described identification comprises:
Read the label information of the vlan-label before the MAC layer of described message.
According to another aspect of the present invention, a kind of exchange chip is provided, it is characterized in that, comprising:
Vlan label sealing unit, for sealing up vlan-label before the MAC layer of the message received from incoming interface;
Vlan tag recognition unit, identifies for the vlan-label before the MAC layer to the message received from outgoing interface;
Vlan label peeling unit, for peeling off the vlan-label before the MAC layer of described message in the process of being gone out by the message repeating from CPU.
Incoming interface information, when E-Packeting, before label information is encapsulated into MAC layer, under the prerequisite not changing original message, can be carried to CPU and realize isolation extended attribute by forwarding chip of the present invention.Simultaneously, after CPU receives the message of Tag Packaging before MAC layer, can normally go out to resolve label information, after being parsed, only message pointer offset can need be obtained complete original message to MAC layer, without the need to carrying out label peeling operation, namely without the need to the position of mobile message in internal memory, this is very large lifting for forwarding performance of equipment.
In addition, new Tag Packaging, before MAC layer, no longer with the vlan-label location overlap in original message, does not namely exist and judges that original vlan-label and exchange chip seal up the problem of label, greatly reduce code complexity, simplify code flow.
Accompanying drawing explanation
Fig. 1 shows the forwarded upstream flow chart of exchange chip message forwarding method of the present invention.
What Fig. 2 showed exchange chip message forwarding method of the present invention down forwards flow chart.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples for illustration of the present invention, but are not used for limiting the scope of the invention.
Fig. 1 shows the forwarded upstream flow chart of exchange chip message forwarding method of the present invention; What Fig. 2 showed exchange chip message forwarding method of the present invention down forwards flow chart.
As depicted in figs. 1 and 2, the exchange chip of one embodiment of the invention protects civilian retransmission method, comprises forwarded upstream and down forwards,
Particularly, forwarded upstream specifically comprises:
When the incoming interface of S11, exchange chip receives message, vlan-label is sealed up to described message;
Particularly, in above-mentioned steps, the vlan mark according to the sub-interface receiving described message seals up vlan-label to described message.
S12, the message of sealing up vlan-label is sent to cpu i/f;
Down forward and specifically comprise:
When the outgoing interface of S21, described exchange chip receives the message from CPU, identify the label information of the vlan-label of described message;
S22, the exchange chip interface corresponding according to described label information selection send described message;
In the above-described embodiments, before vlan-label is positioned at the MAC layer of described message.
Based on above-mentioned, the label information of the vlan-label of the described message of identification of step S21 is specially: the label information reading the vlan-label before the MAC layer of described message.
Further the, down forward and also comprise:
When the message repeating from CPU is gone out, the vlan-label information of described message is peeled off.
Namely incoming interface message to deliver to from exchange chip seal up label in the process of CPU time, seal up before position moves to MAC layer; And when message is issued to exchange chip from cpu i/f, identification tag information before the MAC layer of message, finds corresponding exchange chip outgoing interface to send, and meanwhile, when sending from outgoing interface, is peeled off by the label information before the MAC layer of message.
Before label information is encapsulated into MAC layer by the present invention, under the prerequisite not changing original message, incoming interface information can be carried to CPU and realize isolation extended attribute.In addition, obtain original message in the application without the need to message position mobile in internal memory, only need mobile heading pointer, to performance undamaged consumption, the capable energy of obvious lifting means; In addition, this approach simplify upper strata handling process, the vlan-label no longer carried with sub-interface etc. is formed and judges to conflict, and reduces the complexity of code and flow process.
According to another embodiment of the invention, a kind of exchange chip is provided, specifically comprises:
Vlan label sealing unit, for sealing up vlan-label before the MAC layer of the message received from incoming interface;
Vlan tag recognition unit, identifies for the vlan-label before the MAC layer to the message received from outgoing interface;
Vlan label peeling unit, for peeling off the vlan-label before the MAC layer of described message in the process of being gone out by the message repeating from CPU.
Incoming interface information, when E-Packeting, before label information is encapsulated into MAC layer, under the prerequisite not changing original message, can be carried to CPU and realize isolation extended attribute by forwarding chip of the present invention.Simultaneously, after CPU receives the message of Tag Packaging before MAC layer, can normally go out to resolve label information, after being parsed, only message pointer offset can need be obtained complete original message to MAC layer, without the need to carrying out label peeling operation, namely without the need to the position of mobile message in internal memory, this is very large lifting for forwarding performance of equipment.
In addition, new Tag Packaging, before MAC layer, no longer with the vlan-label location overlap in original message, does not namely exist and judges that original vlan-label and exchange chip seal up the problem of label, greatly reduce code complexity, simplify code flow.
Above execution mode is only for illustration of the present invention; and be not limitation of the present invention; the those of ordinary skill of relevant technical field; without departing from the spirit and scope of the present invention; can also make a variety of changes and modification; therefore all equivalent technical schemes also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.

Claims (5)

1. an exchange chip message forwarding method, is characterized in that, described message repeating comprises forwarded upstream and down forwards,
Wherein, described forwarded upstream specifically comprises: when the incoming interface of described exchange chip receives message, seals up vlan-label to described message;
The message of sealing up vlan-label is sent to cpu i/f;
Described down forwarding specifically comprises: when the outgoing interface of described exchange chip receives the message from CPU, identifies the label information of the vlan-label of described message;
Corresponding exchange chip interface is selected to send described message according to described label information;
Wherein, before described vlan-label is positioned at the MAC layer of described message.
2. exchange chip message forwarding method as claimed in claim 1, is characterized in that, described in down forward and also comprise:
When the message repeating from CPU is gone out, the vlan-label information of described message is peeled off.
3. exchange chip as claimed in claim 1 embraces message forwarding method, it is characterized in that, when the incoming interface of described exchange chip receives message, seals up vlan-label, specifically comprise described message:
Vlan mark according to the sub-interface receiving described message seals up vlan-label to described message.
4. exchange chip as claimed in claim 1 embraces message forwarding method, and it is characterized in that, the label information of the vlan-label of the described message of described identification comprises:
Read the label information of the vlan-label before the MAC layer of described message.
5. an exchange chip, is characterized in that, comprising:
Vlan label sealing unit, for sealing up vlan-label before the MAC layer of the message received from incoming interface;
Vlan tag recognition unit, identifies for the vlan-label before the MAC layer to the message received from outgoing interface;
Vlan label peeling unit, for peeling off the vlan-label before the MAC layer of described message in the process of being gone out by the message repeating from CPU.
CN201510392051.8A 2015-07-06 2015-07-06 Message forwarding method of switch chip, and switch chip Pending CN105072033A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510392051.8A CN105072033A (en) 2015-07-06 2015-07-06 Message forwarding method of switch chip, and switch chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510392051.8A CN105072033A (en) 2015-07-06 2015-07-06 Message forwarding method of switch chip, and switch chip

Publications (1)

Publication Number Publication Date
CN105072033A true CN105072033A (en) 2015-11-18

Family

ID=54501319

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510392051.8A Pending CN105072033A (en) 2015-07-06 2015-07-06 Message forwarding method of switch chip, and switch chip

Country Status (1)

Country Link
CN (1) CN105072033A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105763489A (en) * 2016-04-19 2016-07-13 烽火通信科技股份有限公司 Method and system for expanding the exchange capacity of exchange service chip
CN106856454A (en) * 2015-12-09 2017-06-16 北京华为数字技术有限公司 A kind of method of message forwarding, equipment and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030140163A1 (en) * 2002-01-22 2003-07-24 Conexant Systems, Inc. Low-processor-load aggregation
US20060245435A1 (en) * 2005-04-28 2006-11-02 Cisco Technology, Inc. Scalable system and method for DSL subscriber traffic over an Ethernet network
CN101115006A (en) * 2007-08-21 2008-01-30 杭州华三通信技术有限公司 Three-layer packet forwarding method and routing device and two-layer switch module
CN101877671A (en) * 2009-12-02 2010-11-03 北京星网锐捷网络技术有限公司 Sending method of mirror image message, switch chip and Ethernet router
CN103209141A (en) * 2012-01-17 2013-07-17 中兴通讯股份有限公司 Method for processing data messages with switching chip and switching chip

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030140163A1 (en) * 2002-01-22 2003-07-24 Conexant Systems, Inc. Low-processor-load aggregation
US20060245435A1 (en) * 2005-04-28 2006-11-02 Cisco Technology, Inc. Scalable system and method for DSL subscriber traffic over an Ethernet network
CN101115006A (en) * 2007-08-21 2008-01-30 杭州华三通信技术有限公司 Three-layer packet forwarding method and routing device and two-layer switch module
CN101877671A (en) * 2009-12-02 2010-11-03 北京星网锐捷网络技术有限公司 Sending method of mirror image message, switch chip and Ethernet router
CN103209141A (en) * 2012-01-17 2013-07-17 中兴通讯股份有限公司 Method for processing data messages with switching chip and switching chip

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MIAOMIAOYU111: "VLAN技术白皮书", 《百度文库》 *
薛文莲: "基于双层标签的VLAN交换技术的研究", 《中国优秀硕士论文全文数据库 信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106856454A (en) * 2015-12-09 2017-06-16 北京华为数字技术有限公司 A kind of method of message forwarding, equipment and system
CN105763489A (en) * 2016-04-19 2016-07-13 烽火通信科技股份有限公司 Method and system for expanding the exchange capacity of exchange service chip

Similar Documents

Publication Publication Date Title
CN100563146C (en) A kind of time division multiplex data transmitting method based on packet switching
CN1996948B (en) Message forwarding method and device based on the media access control layer
CN102469509A (en) Data transmission method, apparatus thereof and system thereof
CN102724118A (en) Label distribution method and device
CN105162673A (en) Data transmission interface and method
CN103945553B (en) The method that control plane and user plane separation are realized based on carrier aggregation
CN103401773A (en) Method and network equipment realizing interboard communication
CN105323137B (en) Service data transmission method and device
CN103200068B (en) A kind of based on customer service Multiple tunnel transmitting device
CN103023779A (en) Method and device for processing data message
CN103731935A (en) Space network communication method based on WIFI
WO2018014323A3 (en) Information transceiving method, apparatus and system
CN105072033A (en) Message forwarding method of switch chip, and switch chip
CN107645391B (en) Port configuration method and device of interface expansion equipment
CN102299862B (en) Quick forwarding equipment and method for two-layer tunnel
CN107370654A (en) A kind of encapsulation, de-encapsulation method and the relevant apparatus of pseudo-wire data message
US11178572B2 (en) Method and device for processing MAC layer header
CN103634213B (en) Message forwarding method
CN101557386A (en) Method and device for sending data and method and device for receiving data
CN101888336B (en) Access device realizes method and the access device of TDM business relaying
CN101527710A (en) Method and device for transmitting data packet
CN105656744A (en) Service chain path identifying method, device and service chain
CN103716220B (en) A kind of data transmission method and its device
CN107360594B (en) Information processing method and device
CN104348821A (en) Method, equipment and system for managing services of IPv4/IPv6 (internet protocol version 4/internet protocol version 6)

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned

Effective date of abandoning: 20181123

AD01 Patent right deemed abandoned