CN107306220A - Message forwarding method and device - Google Patents

Message forwarding method and device Download PDF

Info

Publication number
CN107306220A
CN107306220A CN201610239507.1A CN201610239507A CN107306220A CN 107306220 A CN107306220 A CN 107306220A CN 201610239507 A CN201610239507 A CN 201610239507A CN 107306220 A CN107306220 A CN 107306220A
Authority
CN
China
Prior art keywords
message
card
information
forwarding
destination 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.)
Withdrawn
Application number
CN201610239507.1A
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.)
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 CN201610239507.1A priority Critical patent/CN107306220A/en
Priority to PCT/CN2017/072877 priority patent/WO2017181757A1/en
Publication of CN107306220A publication Critical patent/CN107306220A/en
Withdrawn 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/58Association of routers
    • H04L45/583Stackable routers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/32Flooding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/252Store and forward routing

Abstract

The invention discloses a kind of message forwarding method, line card is receiving message to be forwarded, obtain the source port and card id information of message, and send the message for being packaged with source port and card id information to master control borad by stacking opening, so that master control borad learns the corresponding relation of the source MAC and vlan of the source port and card id information and message, and search corresponding destination interface and card ID, so that the message for being packaged with destination interface and card id information is forwarded into the corresponding line cards of the card ID by destination interface stacking opening corresponding with card ID, line card is when receiving the message of master control borad forwarding, the message for being packaged with destination interface and card id information is removed into stacking opening heading to send to destination interface.The invention also discloses a kind of apparatus for forwarding message.The present invention does not need line card to carry out mac learning and forwarding table search, reduces the memory of line card, reduces the production cost of line card, improves the convenience and efficiency of message forwarding.

Description

Message forwarding method and device
Technical field
The present invention relates to communication technical field, more particularly to a kind of message forwarding method and device.
Background technology
Conventional broadband access technology include DSL (Digital Subscriber Line, digital subscriber line), PON (Passive Optical Network, passive optical-fiber network), ethernet technology etc..Use these The local side apparatus of technology is we term it network element, and network element usually accesses industry by 1 to 2 pieces of master control borads and polylith The line card composition of business.For two layers of (data link layer) business, the ether network packet on line card carries out source Address learning and destination address are searched, if destination interface is this line card port, direct local exchange is no Then it is forwarded to master control borad and carries out source address study and destination address forwarding again;And for three layers (Internets) Business, it is general to carry out distributed routing forwarding, or line card first carries out source address study and destination address is looked into Look for, message is sent to after master control borad, then routing forwarding is carried out by master control borad, it is clear that either which kind of is reported Literary pass-through mode, each piece of line card is required for carrying out source address study and destination address is searched, and causes line card Design it is complicated, device cost is high, and message repeating process is relatively complicated, and efficiency is low.
The content of the invention
It is a primary object of the present invention to propose a kind of message forwarding method and device, it is intended to solve now Line card design is complicated, and device cost is high, and message repeating process is relatively complicated, and the low technical problem of efficiency.
To achieve the above object, a kind of message forwarding method that the present invention is provided, line card and master control borad pass through Stacking opening is connected, and the message forwarding method includes:
Line card is receiving message to be forwarded, obtains the source port and card id information of the message;
The line card encapsulates the source port and card id information of acquisition to the stacking opening report of the message In literary head, and the message for being packaged with source port and card id information is sent to master control borad by stacking opening, So that the master control borad learns the source MAC and vlan of the source port and card id information and message Corresponding relation, target MAC (Media Access Control) address further according to the message and vlan are with searching default MAC In the forward table of location corresponding destination interface and card ID, and by the destination interface and card id information encapsulate to In the stacking opening heading of the message, to be incited somebody to action by destination interface stacking opening corresponding with card ID The message for being packaged with destination interface and card id information is forwarded to the corresponding line cards of the card ID;
The line card is receiving the report for being packaged with destination interface and card id information of the master control borad forwarding Wen Shi, stacking opening heading is removed and direct by the message for being packaged with destination interface and card id information It is forwarded to the destination interface.
Preferably, the line card is packaged with destination interface and card ID receive master control borad forwarding During the message of information, the message for being packaged with destination interface and card id information is removed into stacking opening message Head simultaneously includes the step of be forwarded directly to the destination interface:
The line card is receiving the report for being packaged with destination interface and card id information of the master control borad forwarding Wen Shi, parses the message forwarding mark for being packaged with and being carried in the message of destination interface and card id information Know;
The line card forwards mark and the mapping relations of message forwarding strategy according to default message, obtains solution The corresponding message forwarding strategy of message forwarding mark of analysis;
The line card will be packaged with the institute of destination interface and card id information according to the message forwarding strategy of acquisition Message forwarding is stated to remove stacking opening heading and be forwarded directly to the destination interface.
Preferably, the line card is receiving message to be forwarded, obtains the source port and card of the message The step of id information, includes:
The line card is receiving message to be forwarded, determines the type of message of the message;
When the type of message of the message meets preset kind, the source port and card ID of the message are obtained Information.
In addition, to achieve the above object, the present invention also proposes a kind of message forwarding method, line card and master control Plate is connected by stacking opening, and the message forwarding method comprises the following steps:
Master control borad receives the message for being packaged with source port and card id information that line card is sent by stacking opening When, extract the source port and card id information;
The master control borad carries out source mac learning, by the source MAC and vlan and source port of the message Correspondence setting with card ID is into default mac address forwarding table;
The master control borad is in the mac address forwarding table according to the purpose MAC and vlan of the message Obtain corresponding destination interface and card id information;
The destination interface and card id information of acquisition are encapsulated into the stacking of the message by the master control borad In mouthful heading, and the message of the destination interface and card id information will be packaged with by the stacking opening It is forwarded in the corresponding line cards of the card ID, so that the line card is packaged with the destination receiving During the message of mouth and card id information, the message for being packaged with destination interface and card id information is removed into stacking opening Heading is simultaneously forwarded to the destination interface.
Preferably, the report that the destination interface and card id information will be packaged with by the stacking opening Text is forwarded to before the step in the corresponding line cards of the card ID, and the message forwarding method also includes:
The master control borad is according to the destination interface and card id information of acquisition, it is determined that being packaged with destination Mouth message forwarding mark corresponding with the message of card id information;
The master control borad obtains the message forwarding mark determined;
The message forwarding mark of acquisition is added to by the master control borad is packaged with destination interface and card id information The message in, perform corresponding message forwarding plan so that the line card is based on message forwarding mark Slightly.
In addition, to achieve the above object, the present invention also proposes a kind of apparatus for forwarding message, line card and master control Plate is connected by stacking opening, and the apparatus for forwarding message includes:
First acquisition module, for receiving message to be forwarded, obtain the message source port and Card id information;
First processing module, for the source port and card id information of acquisition to be encapsulated to the message Stacking opening heading in, and the message for being packaged with source port and card id information is sent by stacking opening To master control borad, the source MAC for learning the source port and card id information and message for the master control borad Location and vlan corresponding relation, target MAC (Media Access Control) address and vlan further according to the message are searched default Corresponding destination interface and card ID in mac address forwarding table, and by the destination interface and card id information Encapsulation is into the stacking opening heading of the message, to pass through destination interface heap corresponding with card ID The message for being packaged with destination interface and card id information is forwarded to the corresponding line cards of the card ID by folded mouth;
Forwarding module, for believing in be packaged with destination interface and the card ID that receive the master control borad forwarding During the message of breath, the message for being packaged with destination interface and card id information is removed into stacking opening heading And it is forwarded directly to the destination interface.
Preferably, the forwarding module includes:
Resolution unit, for believing in be packaged with destination interface and the card ID that receive the master control borad forwarding During the message of breath, the message for being packaged with and being carried in the message of destination interface and card id information is parsed Forwarding mark;
First acquisition unit, for forwarding mark and the mapping of message forwarding strategy to close according to default message System, obtains the corresponding message forwarding strategy of message forwarding mark of parsing;
Retransmission unit, destination interface and card id information will be packaged with according to the message forwarding strategy of acquisition The message forwarding removes stacking opening heading and is sent directly to the destination interface.
Preferably, first acquisition module includes:
Determining unit, for receiving message to be forwarded, determines the type of message of the message;
Second acquisition unit, for when the type of message of the message meets preset kind, obtaining described The source port and card id information of message.
In addition, to achieve the above object, the present invention also proposes a kind of apparatus for forwarding message, line card and master control Plate is connected by stacking opening, and the apparatus for forwarding message includes:
Extraction module, be packaged with source port and card ID for receiving line card transmission by stacking opening believe During the message of breath, the source port and card id information are extracted;
Setup module, for carrying out source mac learning, by the source MAC and vlan of the message and source Port and card ID correspondence setting are into default mac address forwarding table;
Second acquisition module, in the mac address forwarding table according to the purpose of the message MAC and vlan obtains corresponding destination interface and card id information;
Second processing module, for the destination interface and card id information of acquisition to be encapsulated into the report In the stacking opening heading of text, and the destination interface and card ID letters will be packaged with by the stacking opening The message of breath is forwarded in the corresponding line cards of the card ID, so that the line card is receiving encapsulation When stating the message of destination interface and card id information, the message for being packaged with destination interface and card id information is gone Fall stacking opening heading and be forwarded to the destination interface.
Preferably, the apparatus for forwarding message also includes:
Determining module, for the destination interface and card id information according to acquisition, it is determined that being packaged with mesh Port and card id information message corresponding message forwarding mark;
3rd acquisition module, the message determined for obtaining forwards mark;
Add module, destination interface and card ID are packaged with for the message forwarding mark of acquisition to be added to In the message of information, corresponding message turn is performed so that the line card is based on message forwarding mark Hair strategy.
Message forwarding method and device proposed by the present invention, when receiving message to be forwarded, directly will The source port and card id information of message are encapsulated into the message, and will be packaged with source port and card ID letters The message of breath is sent to master control borad by stacking opening, and carrying out unified source address by master control borad learns and purpose Address search, and when receiving the message for being packaged with destination interface and card ID of master control borad forwarding, directly E-Packet to the destination interface, so that the convenience and efficiency of message forwarding are improved, simultaneously because Line card is without storing mac address table, so also reducing the cost of line card.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of message forwarding method first embodiment of the present invention;
Fig. 2 is line card of the present invention is packaged with destination interface and card receive master control borad forwarding During the message of id information, the message for being packaged with destination interface and card id information is removed into stacking opening message Head and the schematic flow sheet for being forwarded directly to the destination interface preferred embodiment;
Fig. 3 is the schematic flow sheet of message forwarding method second embodiment of the present invention;
Fig. 4 is the high-level schematic functional block diagram of apparatus for forwarding message first embodiment of the present invention;
Fig. 5 is the refinement high-level schematic functional block diagram of forwarding module in Fig. 4;
Fig. 6 is the high-level schematic functional block diagram of apparatus for forwarding message second embodiment of the present invention.
The realization, functional characteristics and advantage of the object of the invention will be done further referring to the drawings in conjunction with the embodiments Explanation.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, limit is not used to The fixed present invention.
The present invention provides a kind of message forwarding method.
Reference picture 1, Fig. 1 is the schematic flow sheet of message forwarding method first embodiment of the present invention.
The present embodiment proposes a kind of message forwarding method, and line card and master control borad are connected by stacking opening, described Message forwarding method includes:
Step S10, line card is receiving message to be forwarded, obtains the source port and card ID of the message Information;
In the present embodiment, line card and master control borad are preferably connected by stacking opening, rather than common ether Net is port interconnected, because stacking opening can increase stacking opening heading in common Ethernet header, And stacking opening heading can not only include the source port of message and the destination of card id information and message Mouth and card id information, can also include the messages such as known unicast bag, unknown unicast bag, multicast packets or broadcast packet Forwarding mark, whether further, can also be included in the port attribute configuration of the stacking opening needs to carry out Address learning, whether trust the parameter informations such as message outlet, specific implementation is by the present embodiment Following sections are described in detail.
In the present embodiment, the line card may be configured as forwarding the message of fixed type, i.e., only receive and forward With the same type of message of line card type, for example, line card be Ethernet line card when, then message is exactly ether Network packet, then, ethernet line is stuck in when receiving ether network packet, directly obtains the Ethernet report The source port and card id information of text.
Further, in order to improve the flexibility that message is forwarded, the line card can be compatible a variety of messages The line card of type, but when E-Packeting, if with the different types of type of message of line card, it is necessary to The type of message is changed, i.e., different types of line card is when E-Packeting, it is necessary to will first receive Message be converted into the treatable type of message of line card, that is to say, that DSL line cards when E-Packeting, Need DSL frames being converted into ethernet frame, PON line cards are when E-Packeting, it is also desirable to by PON frames It is converted into ethernet frame, and ethernet line is stuck in when E-Packeting and need not then changed.Therefore, exist In the present embodiment, the step S10 comprises the following steps:
The line card is receiving message to be forwarded, determines the type of message of the message;
When the type of message of the message meets preset kind, the source port and card ID of the message are obtained Information.
The line card first determines the type of message of the message, then when receiving message to be forwarded The type of message of the message and preset kind are compared, the preset kind is exactly ether network packet Type, when the type of message of the message meets preset kind, that is, the type of message of the message received During for Ethernet type of message, the source port and card id information of the message are directly obtained;Conversely, institute When the type of message for stating message is unsatisfactory for preset kind, the type of the message such as received is DSL frame types Or during PON frame types, the corresponding type of message of the message received is first converted into Ethernet type of message, Ether network packet is formed, is then obtained again in the source port and card id information of ether network packet, the present embodiment The message interacted between line card and master control all referring to ether network packet, be described collectively herein, Hereafter repeat no more.
Further, line card can also for the common Ethernet interface of mixed insertion line card (i.e. master control borad and line card Between interface be common Ethernet interface, the referred to as inline mouth of Ethernet), now in master control borad forward table only The inline mouth of Ethernet can be learnt, and the use registered permanent residence on line card can not be learnt, now, the line card still needs Progress two, three layers (i.e. data link layer, Internet) forwarding, that is to say, that carrying out message forwarding During, the line card of different interfaces can be set in same network element, be the equal of both to include in network element Stacking opening and include Ethernet interface, then, line card is when E-Packeting, you can according to master control borad Between interface, perform corresponding message repeating process, be stacking opening such as in the interface of line card and master control borad During connection, take master control borad to learn source address and search the mode of destination address forwarding;And line card with When the interface of master control borad is Ethernet interface connection, source address can be learnt using line card and purpose is searched The mode of address forwarding, so can both reduce the cost of the new line card using stacking opening, again can be compatible Using the old line card of Ethernet interface, the compatibility of system is improved.
In the present embodiment, source port and the card id information represents the port numbers and line card that message receives Card number, wherein, port numbers both can be physical port number or empty port numbers, further, To improve the flexibility of message forwarding, the source port can also include trunk (polymerization) numbers etc. of message Deng.
Step S20, the line card is by port and card id information are encapsulated to the message in a steady stream described in acquisition Stacking opening heading in, and the message for being packaged with port in a steady stream and card id information is sent by stacking opening To master control borad, the source MAC for learning the source port and card id information and message for the master control borad Location and vlan corresponding relation, target MAC (Media Access Control) address and vlan further according to the message are searched default Corresponding destination interface and card ID in mac address forwarding table, and by the destination interface and card id information Encapsulation is into the stacking opening heading of the message, to be stacked by the way that the destination interface is corresponding with card ID The message for being packaged with destination interface and card id information is forwarded to the corresponding line cards of the card ID by mouth;
In the present embodiment, get after the source port and card id information of the message, by the source got Port and card id information are encapsulated into the stacking opening heading of the message, because stacking opening is common Ethernet header increases stacking opening heading, therefore, and the line card is by the source port of acquisition and blocks ID Information encapsulation is into stacking opening heading, i.e., by the chip number of message transmission terminal, port numbers or No. trunk It is encapsulated into stacking opening heading, because the stacking opening heading is a part for message, therefore quite Encapsulated in by the source port and card id information of acquisition into described stacking opening heading, it is then described Line card sends the message for being packaged with source port and card id information to master control borad by stacking opening.
Further, whether included in the attribute configuration of the stacking opening needs to carry out source address study, is The parameter informations such as no trust message outlet, these parameters are used to point out whether line card or master control borad need progress Source address learns, whether trusts message outlet, it is to be understood that one where stacking opening correspondence line card During end, the attribute configuration of the stacking opening is that need not carry out source address study, and the outlet of trust message, Now, the line card is according to the attribute configuration of the stacking opening, you can directly by the source port and card of acquisition Id information is potted directly into stacking opening heading, to form the report for being packaged with source port and card id information Text, and the message after encapsulation is sent to master control borad.
Master control borad receive line card transmission be packaged with the message of source port and card id information after, learn institute State stacking opening heading and encapsulate the source port and the corresponding source MAC of card id information and vlan information, Corresponding purpose in master control borad mac address table is searched according to the target MAC (Media Access Control) address of the message and vlan Port and card ID, the master control borad encapsulate the destination interface and card id information of acquisition to the message Stacking opening heading in, and will be encapsulated by destination interface stacking opening corresponding with card ID purposeful The message of port and card id information is sent to correspondence line card, similarly, destination interface and the card id information What is represented is No. ID of the port numbers and line card to be sent.
Step S30, the line card is packaged with destination interface and card ID receive master control borad forwarding During the message of information, the message for being packaged with destination interface and card id information is forwarded to the destination Mouthful.
In the present embodiment, the line card receive master control borad forwarding be packaged with destination interface and During the message of card id information, the destination interface and card id information encapsulated in outgoing packet is first extracted, will be encapsulated The message of purposeful port and card id information is forwarded to the destination interface and card id information is corresponding Exit port.
Further, the line card is packaged with destination interface and card ID receive master control borad forwarding During the message of information, destination interface and card id information are separated, and the message after stripping is forwarded to described Destination interface and the corresponding exit port of card id information, can be the stacking opening reports for peeling off outgoing packet specifically Literary head extracts the purpose encapsulated in stacking opening heading to separate destination interface and card id information, then Port and card id information, finally by the message for separating stacking opening heading be forwarded to the destination interface and The corresponding exit port of card id information.It is worth noting that, when ether network packet will be passed by stacking opening When defeated, just it can increase stacking opening heading in the header of ether network packet, if ether network packet is obstructed Cross stacking opening to be transmitted, then do not increase stacking opening heading in header, then, it is possible to understand that It is, when line card is forwarded the packet to the destination interface and the corresponding exit port of card id information, the message Stripped stacking opening heading, the i.e. message are not include the message of destination interface and card id information.
In the present embodiment, to improve the flexibility of message forwarding, reference picture 2, the step S30 includes:
Step S31, the line card is packaged with destination interface and card ID receive master control borad forwarding During the message of information, the message for being packaged with and being carried in the message of destination interface and card id information is parsed Forwarding mark;
Step S32, the line card forwards mark and the mapping of message forwarding strategy to close according to default message System, obtains the corresponding message forwarding strategy of message forwarding mark of parsing;
Step S33, the line card will be packaged with destination interface and card ID according to the message forwarding strategy of acquisition The message forwarding of information removes stacking opening heading and is forwarded directly to the destination interface.
In the present embodiment, the line card receive master control borad forwarding be packaged with destination interface and During the message of card id information, first parse to be packaged with the message of destination interface and card id information and take The message forwarding mark of band, in the present embodiment, the message forwarding mark is preferably known unicast bag, not Know unicast packet, multicast packets, the mark of broadcast packet, due to known unicast bag, unknown unicast bag, multicast packets, The mark of broadcast packet is different, and the message forwarding strategy of line card is also different, therefore, and the line card is according to default Message forwarding mark and the mapping relations of message forwarding strategy, you can obtain the message forwarding mark of parsing Corresponding message forwarding strategy, finally the message forwarding strategy further according to acquisition will be packaged with destination interface and The message of card id information is forwarded to the destination interface and the corresponding exit port of card id information, for example, When message forwarding is designated known unicast bag, corresponding message forwarding strategy is exactly to go out end to one Mouth E-Packets;When message forwarding is designated unknown unicast bag or broadcast packet, corresponding message turns It is exactly each exit port copy packet into vlan to send out strategy;When message forwarding is designated multicast packets, Corresponding message forwarding strategy is exactly the exit port copy packet into multicast group, specifically, including following Several ways:
1) for known unicast bag, line card directly extracts the destination interface and card id information of outgoing packet, so After forward the packet to the destination interface and the corresponding terminal of card id information;
2) for unknown unicast bag and broadcast packet, line card first determines its VLAN (Virtual Local Area - Network, VLAN) in all user ports (including physical port or empty port or trunk Mouthful), then forward the packet all user ports to the VLAN;
3) for multicast packets, line card first determines the corresponding multicast group of the multicast packets, and then line card is by message It is forwarded to all user ports (including physical port or empty port or the trunk of the multicast group of determination Mouthful).
It is worth noting that, for the multicast packets for the multicast group that can not find, handled according to unknown unicast bag or Person abandons, i.e., all user ports that described line card can be directly into the VLAN of determination E-Packet, Also the packet loss specifically, can be configured according to VLAN attributes.
It should be appreciated that message forwarding is carried out by forwarding strategy, if the message identification is broadcast, flood General or unknown multicast mark, carries out flooding duplication in vlan;If the message identification is known multicast mark Know, flooding duplication is carried out in multicast group;If the message identification identifies for known unicast, it will be packaged with The message of destination interface and card id information is forwarded to the destination interface.
In the present embodiment, line card behind port before it is determined that E-Packet, in addition to step:First determine Line card type, and when the type of message of the message is different from line card type, by the message of the message Type is converted into the line card type and forwarded, i.e., different service types line card (such as DSL line cards, PON line cards or Ethernet line card) ether network packet is converted into respectively the frame of particular traffic type, then Send.
Message forwarding method proposed by the present invention, when receiving message to be forwarded, directly by message Source port and card id information are encapsulated into the message, and the report that will be packaged with source port and card id information Text is sent to master control borad by stacking opening, and carry out unified source address study by master control borad looks into destination address Look for, and when receiving the message for being packaged with destination interface and card ID of master control borad forwarding, directly forwarding is reported Text arrives the destination interface, so that the convenience and efficiency of message forwarding are improved, simultaneously because line card is not With storage mac address table, so also reducing the cost of line card.Further, it is not necessary in line card Carry out source address study and destination address searched, it is to avoid addresses forwarding table is configured in each line card, The design of line card is simplified, the device cost of line card is reduced.
Further, in order to improve the flexibility that message is forwarded, present invention report is proposed based on first embodiment The second embodiment of literary retransmission method, in the present embodiment, reference picture 3, the detection method of the message passage Including:
Step S40, be packaged with source port and the card ID that master control borad receives line card transmission by stacking opening believes During the message of breath, the source port and card id information are extracted;
In the present embodiment, line card and master control borad are connected by stacking opening, and from first embodiment Understand, because stacking opening can increase stacking opening heading in common Ethernet header, and stack Mouth heading can not only include the corresponding source port of message sink mouthful and card id information and message hair The corresponding destination interface of sending end mouthful and card id information, can also include known unicast bag, unknown unicast bag, group The messages such as bag or broadcast packet forwarding mark is broadcast, further, in the port attribute configuration of the stacking opening also Whether can include needs to carry out address learning, whether trusts the parameter informations such as message outlet.
It was found from during first implements, the attribute configuration of stacking opening is at one end where line card, and attribute configuration is Need not carry out address learning and trust message outlet, therefore line card just directly obtain source port and Card id information, and the message for being packaged with source port and card id information is forwarded directly to mainboard.Therefore, The attribute configuration of stacking opening master control borad institute at one end when, attribute configuration be need carry out address learning, with And distrust message outlet, now, the master control borad is packaged with source port and card ID letters what is received In the message of breath, extract the source port and card id information carries out address learning, purpose is subsequently carried out again The forwarding of address.
Step S50, the master control borad carries out source mac learning, by the source MAC and vlan of the message With source port and the correspondence setting for blocking ID into default mac address forwarding table;
Step S60, the master control borad is in the mac address forwarding table according to the purpose of the message MAC and vlan obtains corresponding destination interface and card id information;
And master control borad receives the message for being packaged with source port and card id information that line card is sent by stacking opening When, the source port and card id information can be directly extracted, or stacking opening heading is first separated, then Source port and card id information are extracted from the heading separated, source port and card ID letters is being extracted After breath, the master control borad is by the source MAC in message, VLAN and the source port of extraction and blocks ID Information is compared with default addresses forwarding table, to determine to whether there is MAC in the addresses forwarding table Address information, if being not present, by the source MAC in message, VLAN and the source port of extraction With card id information writing address table, if in the presence of just refreshing hit in tag.Then according to the message Target MAC (Media Access Control) address and vlan search corresponding destination interface and card ID in master control borad mac address table.
The destination interface and card id information of acquisition are encapsulated into the report by step S70, the master control borad In the stacking opening heading of text, and the destination interface and card id information will be packaged with by the stacking opening Message be forwarded in the corresponding line cards of the card ID, so that the line card is packaged with the mesh receiving Port and card id information message when, the message for being packaged with destination interface and card id information is removed into heap Folded mouth heading is simultaneously forwarded to the destination interface.
In the present embodiment, the destination interface and card id information of acquisition are encapsulated into institute by the master control borad In the stacking opening heading for stating message, and retain the source port in stacking opening heading and card id information, and The message for being packaged with the destination interface and card id information is forwarded to by the card ID by the stacking opening In corresponding line card.
Further, the report that the destination interface and card id information will be packaged with by the stacking opening Text is forwarded to before the step in the corresponding line cards of the card ID, and the message forwarding method also includes:
The master control borad is according to the destination interface and card id information of acquisition, it is determined that being packaged with destination interface Message forwarding mark corresponding with the message of card id information;
The master control borad obtains the message forwarding mark determined;
The message of acquisition forwarding mark is added to by the master control borad is packaged with destination interface and card id information In the message, corresponding message forwarding strategy is performed so that the line card is based on message forwarding mark.
In the present embodiment, the master control borad will be packaged with the destination interface and card by the stacking opening Before the message of id information is forwarded in the line card, first according to target MAC (Media Access Control) address in mac address table Lookup result, determine the message corresponding message forwarding mark, determine the corresponding message of the message The mode of forwarding mark includes:The unicast address that can be found in a, mac address table can determine message Forwarding, which is designated the unicast address do not found in known unicast bag mark, mac address table, can determine report Text forwarding is designated unknown unicast bag mark, and address is that broadcast packet can determine that message forwarding is designated broadcast Bag mark;The multicast address that can be found in mac address table can determine that message forwarding is designated known group Broadcast bag mark;It is unknown that the multicast address do not found in mac address table can determine that message forwarding is designated Multicast packets are identified.After message forwarding mark is determined, the message forwarding mark determined is obtained, from the Understood in one embodiment, message forwarding mark represent known unicast bag, unknown unicast bag, known group Broadcast bag, unknown multicast bag, the mark of broadcast packet, then after message forwarding mark is got, will obtain Message forwarding mark be added to and be packaged with the message of destination interface and card id information, finally conduct The message for being packaged with destination interface and card id information is transmitted to line card.
Message forwarding method proposed by the present invention, master control borad receives the encapsulation that line card is sent by stacking opening When having the message of source port and card id information, the source port and card id information are first extracted, is then learnt The stacking opening heading encapsulates the source port and the corresponding source MAC of card id information and vlan letters Breath, is searched corresponding in master control borad mac address table according to the target MAC (Media Access Control) address of the message and vlan Destination interface and card ID, the master control borad encapsulate the destination interface and card id information of acquisition to described In the stacking opening heading of message, and it will be packaged with by destination interface stacking opening corresponding with card ID The message of destination interface and card id information send to correspondence line card so that improve message forwarding efficiency and Convenience, reduces the cost of line card.
The present invention further provides a kind of apparatus for forwarding message.
Reference picture 4, Fig. 4 is the high-level schematic functional block diagram of apparatus for forwarding message first embodiment of the present invention.
It is emphasized that it will be apparent to those skilled in the art that functional block diagram is only shown in Fig. 4 The exemplary plot of one preferred embodiment, those skilled in the art is around the apparatus for forwarding message shown in Fig. 4 Functional module, the supplement of new functional module can be carried out easily;The title of each functional module is self-defined Title, is only used for aiding in each program function block for understanding the apparatus for forwarding message, is not used in and limits this hair Bright technical scheme, the core of technical solution of the present invention is that the functional module of each self-defined title to be reached Into function.
The present embodiment proposes a kind of apparatus for forwarding message, and line card and master control borad are connected by stacking opening, described Apparatus for forwarding message includes:
First acquisition module 10, for receiving message to be forwarded, obtains the source port of the message With card id information;
In the present embodiment, line card and master control borad are preferably connected by stacking opening, rather than common ether Net is port interconnected, because stacking opening can increase stacking opening heading in common Ethernet header, And stacking opening heading can not only be sent comprising message the corresponding source port of terminal and card id information and The corresponding destination interface of message receiving terminal and card id information, can also include known unicast bag, unknown unicast The message forwarding mark such as bag, known multicast packets, unknown multicast bag or broadcast packet, further, the heap Whether can also be included in the port attribute configuration of folded mouth needs to carry out address learning, whether trusts message outlet Deng parameter information, following sections in the present embodiment are described in detail specific implementation.
In the present embodiment, the line card may be configured as forwarding the message of fixed type, i.e., only receive and forward With the same type of message of line card type, for example, line card be Ethernet line card when, then message is exactly ether Network packet, then, ethernet line is stuck in when receiving ether network packet, directly obtains the Ethernet report The source port and card id information of text.
Further, in order to improve the flexibility that message is forwarded, the line card can be compatible a variety of messages The line card of type, but when E-Packeting, if with the different types of type of message of line card, it is necessary to The type of message is changed, i.e., different types of line card is when E-Packeting, it is necessary to will first receive Message be converted into the treatable type of message of line card, that is to say, that DSL line cards when E-Packeting, Need DSL frames being converted into ethernet frame, PON line cards are when E-Packeting, it is also desirable to by PON frames It is converted into ethernet frame, and ethernet line is stuck in when E-Packeting and need not then changed.Therefore, exist In the present embodiment, first acquisition module 10 includes:
Determining unit, for receiving message to be forwarded, determines the type of message of the message;
Second acquisition unit, for when the type of message of the message meets preset kind, obtaining described The source port and card id information of message.
I.e. described first acquisition module 10 is when receiving message to be forwarded, and the determining unit is first determined The type of message of the message, then the type of message of the message and preset kind are compared, institute It is exactly Ethernet type of message to state preset kind, when the type of message of the message meets preset kind, When the type of message of the message received is Ethernet type of message, the second acquisition unit is directly obtained Take the source port and card id information of the message;Conversely, the type of message in the message is unsatisfactory for presetting During type, when the type of the message such as received is DSL frames type or PON frame types, it will first receive The corresponding type of message of message be converted into Ethernet type of message, form ether network packet, then obtain again Take being handed between line card and master control in the source port and card id information of ether network packet, the present embodiment Mutual message is described collectively herein all referring to ether network packet, is hereafter repeated no more.
Further, line card can also for the common Ethernet interface of mixed insertion line card (i.e. master control borad and line card Between interface be common Ethernet interface, the referred to as inline mouth of Ethernet), now in master control borad forward table only The inline mouth of Ethernet can be learnt, and the use registered permanent residence on line card can not be learnt, now, the line card still needs Progress two, three layers (i.e. data link layer, Internet) forwarding, that is to say, that carrying out message forwarding During, the line card of different interfaces can be set in same network element, be the equal of both to include in network element Stacking opening and include Ethernet interface, then, line card is when E-Packeting, you can according to master control borad Between interface, perform corresponding message repeating process, be stacking opening such as in the interface of line card and master control borad During connection, take master control borad to learn source address and search the mode of destination address forwarding;And line card with When the interface of master control borad is Ethernet interface connection, source address can be learnt using line card and purpose is searched The mode of address forwarding, so can both reduce the cost of the new line card using stacking opening, again can be compatible Using the old line card of Ethernet interface, the compatibility of system is improved.
In the present embodiment, source port and the card id information represents the port numbers and card of message sink mouthful Number, wherein, port numbers both can be physical port number or empty port numbers, further, be The flexibility of message forwarding is improved, the source port can also be trunk (polymerization) numbers etc..
First processing module 20, for the source port and card id information of acquisition to be encapsulated to the message Stacking opening heading in, and will be packaged with the message of source port and card id information by stacking opening send to Master control borad, so that the master control borad learns the source MAC of the source port and card id information and message With vlan corresponding relation, target MAC (Media Access Control) address and vlan further according to the message search default MAC In addresses forwarding table corresponding destination interface and card ID, and by the destination interface and card id information encapsulate to In the stacking opening heading of the message, will be sealed by destination interface stacking opening corresponding with card ID Message equipped with destination interface and card id information is forwarded to the corresponding line cards of the card ID;
In the present embodiment, the acquisition module 10 gets the source port and card id information of the message Afterwards, the first processing module 20 encapsulates the source port got and card id information to the message In stacking opening heading, because stacking opening is to increase stacking opening heading in common Ethernet header, Therefore, the source port of acquisition and card id information are encapsulated into stacking opening message by the first processing module 20 In head, i.e., the card number of message sink mouthful, port numbers or No. trunk are encapsulated into stacking opening heading, Because the stacking opening heading is a part for message, thus equivalent to by the source port of acquisition and Card id information is encapsulated into described stacking opening heading, and then forwarding module will be packaged with source port and card The message of id information is sent to master control borad by stacking opening.
Further, whether included in the attribute configuration of the stacking opening needs to carry out source address study, is The parameter informations such as no trust message outlet, these parameters are used to point out whether line card or master control borad need progress Source address learns, whether trusts message outlet, it is to be understood that one where stacking opening correspondence line card During end, the attribute configuration of the stacking opening is that need not carry out source address study, and the outlet of trust message, Now, the first processing module 20 is according to the attribute configuration of the stacking opening, directly by the acquisition mould The source port and card id information that block 10 is obtained are potted directly into stacking opening heading, are packaged with being formed Message after encapsulation is sent to master control borad by the message of source port and card id information, the forwarding module.
Master control borad receive line card transmission be packaged with the message of source port and card id information after, learn institute State stacking opening heading and encapsulate the source port and the corresponding source MAC of card id information and vlan information, Corresponding purpose in master control borad mac address table is searched according to the target MAC (Media Access Control) address of the message and vlan Port and card ID, the master control borad encapsulate the destination interface and card id information of acquisition to the message Stacking opening heading in, and will be encapsulated by destination interface stacking opening corresponding with card ID purposeful The message of port and card id information is sent to correspondence line card, similarly, destination interface and the card id information What is represented is No. ID of the port numbers and line card to be sent..
Forwarding module 30, for believing in be packaged with destination interface and the card ID that receive the master control borad forwarding During the message of breath, the message for being packaged with destination interface and card id information is removed into stacking opening heading simultaneously It is forwarded directly to the destination interface.
In the present embodiment, the forwarding module 30 is purposeful in the encapsulation for receiving the master control borad forwarding During the message of port and card id information, the destination interface and card id information encapsulated in outgoing packet is first extracted, The message for being packaged with destination interface and card id information is forwarded to the destination interface and card id information Corresponding exit port.
Further, the forwarding module 30 is packaged with destination interface receive master control borad forwarding During with the message of card id information, destination interface and card id information are separated, and the message after stripping is turned The destination interface and the corresponding exit port of card id information are sent to, can peel off outgoing packet specifically Stacking opening heading is extracted in stacking opening heading to separate destination interface and card id information, then and sealed The destination interface and card id information of dress, are finally forwarded to the mesh by the message for separating stacking opening heading Port and the corresponding exit port of card id information.It is worth noting that, when ether network packet will be by stacking When mouth is transmitted, just it can increase stacking opening heading in the header of ether network packet, if Ethernet Message is not transmitted by stacking opening, then does not increase stacking opening heading in header, then, can With understanding, when line card is forwarded the packet to the destination interface and the corresponding exit port of card id information, The message stripped stacking opening heading, the i.e. message are not include destination interface and card id information Message.
In the present embodiment, to improve the flexibility of message forwarding, reference picture 5, the forwarding module 30 is wrapped Include:
Resolution unit 31, for believing in be packaged with destination interface and the card ID that receive the master control borad forwarding During the message of breath, the message turn for being packaged with and being carried in the message of destination interface and card id information is parsed Issue of bidding documents is known;
First acquisition unit 32, for forwarding mark and the mapping of message forwarding strategy according to default message Relation, obtains the corresponding message forwarding strategy of message forwarding mark of parsing;
Retransmission unit 33, for destination interface and card ID letters will to be packaged with according to the message forwarding strategy of acquisition The message forwarding of breath removes stacking opening heading and is sent directly to the destination interface.
In the present embodiment, the resolution unit 31 is purposeful in the encapsulation for receiving the master control borad forwarding During the message of port and card id information, the report for being packaged with destination interface and card id information is first parsed In the message forwarding mark carried in text, the present embodiment, the message forwarding mark is preferably known unicast Bag, unknown unicast bag, known multicast packets, unknown multicast bag, the mark of broadcast packet, due to known unicast The mark difference of bag, unknown unicast bag, known multicast packets, unknown multicast bag, broadcast packet, the report of line card Literary forwarding strategy is also different, therefore, the first acquisition unit 32 according to default message forwarding mark with The mapping relations of message forwarding strategy, you can obtain the corresponding message forwarding plan of message forwarding mark of parsing Slightly, the last retransmission unit 33 will be packaged with destination interface and card ID according to the message forwarding strategy of acquisition The message of information is forwarded to the destination interface and the corresponding exit port of card id information, for example, working as institute Message forwarding is stated when being designated known unicast bag, corresponding message forwarding strategy is exactly to a terminal forwarding Message;It is corresponding when message forwarding is designated unknown unicast bag, unknown multicast bag or broadcast packet Message forwarding strategy is exactly to be E-Packeted to each terminal;When message forwarding is designated known multicast packets When, corresponding message forwarding strategy is exactly to be E-Packeted to the terminal of predetermined number, specifically, including with Lower several ways:
1) for known unicast bag, the first acquisition unit 32 directly extracts the destination interface of outgoing packet With card id information, then the retransmission unit 33, is forwarded the packet to the destination interface and card ID letters Cease corresponding exit port;
2) for unknown unicast bag, unknown multicast bag and broadcast packet, its VLAN (Virtual L is first determined Ocal Area-Network, VLAN) in all user ports (including physical port or empty end Mouthful or trunk mouthfuls), then the retransmission unit 33 forwards the packet all users to the VLAN Port;
3) for known multicast packets, the corresponding multicast group of the multicast packets is first determined, then the forwarding is single Member 33 is forwarded the packet to all user ports of the multicast group of determination (including physical port or empty end Mouthful or trunk mouthfuls).
It is worth noting that, for unknown multicast bag, can handle or abandon according to unknown unicast bag, I.e. described line card can be directly into the VLAN of determination all user ports E-Packet, also can incite somebody to action should Packet loss, specifically, can be configured according to VLAN attributes.
It should be appreciated that message forwarding is carried out by forwarding strategy, if the message identification is broadcast, flood General or unknown multicast mark, carries out flooding duplication in vlan;If the message identification is known multicast mark Know, flooding duplication is carried out in multicast group;If the message identification identifies for known unicast, it will be packaged with The message of destination interface and card id information is forwarded to the destination interface.
In the present embodiment, the apparatus for forwarding message also includes conversion module, and the conversion module is used for Line card type is first determined, and when the type of message of the message is different from line card type, by the message Type of message be converted into the line card type and forwarded, i.e. line card (such as DSL of different service types Line card, PON line cards or Ethernet line card) ether network packet is converted into respectively the frame of particular traffic type, For example, current line card is DSL line cards, then the forwarding module 30 first determines destination interface and card ID letters Breath, then ether network packet is first converted into DSL messages by the conversion module, and is sent from corresponding ports Go out.If the type of message of the message is identical with line card type, i.e., the message is ether network packet, line Card is Ethernet line card, then now the forwarding module 30 can will directly be packaged with destination interface and card ID The ether network packet of information is forwarded directly into the destination interface and the corresponding terminal of card id information.
Apparatus for forwarding message proposed by the present invention, when receiving message to be forwarded, directly by message Source port and card id information are encapsulated into the message, and the report that will be packaged with source port and card id information Text is sent to master control borad by stacking opening, and carry out unified source address study by master control borad looks into destination address Look for, and when receiving the message for being packaged with destination interface and card ID of master control borad forwarding, directly forwarding is reported Text arrives the destination interface, so that the convenience and efficiency of message forwarding are improved, simultaneously because line card is not With storage mac address table, so also reducing the cost of line card.Further, it is not necessary in line card Carry out source address study and destination address searched, it is to avoid addresses forwarding table is configured in each line card, The design of line card is simplified, the device cost of line card is reduced.
Further, in order to improve the flexibility that message is forwarded, present invention report is proposed based on first embodiment The second embodiment of literary retransmission unit, in the present embodiment, reference picture 6, the apparatus for forwarding message includes:
Extraction module 40, be packaged with source port and card ID for receiving line card transmission by stacking opening believe During the message of breath, the source port and card id information are extracted;
In the present embodiment, line card and master control borad are connected by stacking opening, and from first embodiment Understand, because stacking opening can increase stacking opening heading in common Ethernet header, and stack Mouth heading can not only include the corresponding source port of message sink mouthful and card id information and message hair Mouthful corresponding destination interface of sending end and card id information, can also include known unicast bag, unknown unicast bag, Know the messages such as multicast packets, unknown multicast bag or broadcast packet forwarding mark, further, the stacking opening Whether can also be included in port attribute configuration needs to carry out address learning, whether trusts the parameters such as message outlet Information.
It was found from during first implements, the attribute configuration of stacking opening is at one end where line card, and attribute configuration is Need not carry out address learning and trust message outlet, therefore line card just directly obtain source port and Card id information, and the message for being packaged with source port and card id information is forwarded directly to mainboard.Therefore, The attribute configuration of stacking opening master control borad institute at one end when, attribute configuration be need carry out address learning, with And distrust message outlet, now, the extraction module 40 is packaged with source port and card what is received In the message of id information, extract the source port and card id information carries out source MAC study, after The continuous forwarding for carrying out target MAC (Media Access Control) address again.
Setup module 50, for carrying out source mac learning, by the source MAC and vlan of the message with Source port and card ID correspondence setting are into default mac address forwarding table;
Second acquisition module 60, in the mac address forwarding table according to the purpose of the message MAC and vlan obtains corresponding destination interface and card id information;
And the extraction module 40 by stacking opening receive line card send be packaged with source port and card ID During the message of information, the source port and card id information can be directly extracted, or first separate stacking opening report Literary head, then extracts source port and card id information from the heading separated, is extracting source port After card id information, the source port of extraction and card id information are compared with default addresses forwarding table, To determine to whether there is mac address information in the addresses forwarding table, if being not present, by message Source MAC, VLAN and the source port of extraction and card id information writing address table, if in the presence of just Refresh hit in tag.Then master control borad is searched according to the target MAC (Media Access Control) address of the message and vlan Corresponding destination interface and card ID in mac address table.
Second processing module 70, for the destination interface and card id information of acquisition to be encapsulated into the report In the stacking opening heading of text, and the destination interface and card id information will be packaged with by the stacking opening Message be forwarded in the corresponding line cards of the card ID, so that the line card is packaged with the mesh receiving Port and card id information message when, the message for being packaged with destination interface and card id information is removed into heap Folded mouth heading is simultaneously forwarded to the destination interface.
In the present embodiment, the Second processing module 70 believes the destination interface of acquisition and card ID Breath is encapsulated into the stacking opening heading of the message, and retains source port and card in stacking opening heading Id information, and be forwarded to the message for being packaged with the destination interface and card id information by the stacking opening In the corresponding line cards of the card ID..
Further, the apparatus for forwarding message also includes:
Determining module, for the destination interface and card id information according to acquisition, it is determined that encapsulation is purposeful The corresponding message forwarding mark of message of port and card id information;
3rd acquisition module, the message determined for obtaining forwards mark;
Add module, destination interface and card ID letters are packaged with for the message forwarding mark of acquisition to be added to In the message of breath, corresponding message forwarding is performed so that the line card is based on message forwarding mark Strategy.
In the present embodiment, the Second processing module 70 will be packaged with the purpose by the stacking opening Before the message of port and card id information is forwarded in the line card, according to purpose in mac address table The lookup result of MAC Address, determines the corresponding message forwarding mark of the message, determines the message pair The mode for the message forwarding mark answered includes:The unicast address that can be found in a, mac address table can be with Determine that message forwarding is designated known unicast bag and identified, the unicast address do not found in mac address table can To determine that message forwarding is designated unknown unicast bag mark, address is that broadcast packet can determine message forwarding mark Know and identified for broadcast packet;The multicast address that can be found in mac address table can determine message forwarding mark Identified for known multicast packets;The multicast address do not found in mac address table can determine message forwarding mark Know and identified for unknown multicast bag.After message forwarding mark is determined, the 3rd acquisition module is obtained The message forwarding mark of determination, understands, message forwarding mark represents known list from first embodiment Broadcast bag, unknown unicast bag, known multicast packets, unknown multicast bag, the mark of broadcast packet, then obtaining To after message forwarding mark, the message forwarding mark of acquisition is added to and is packaged with destination interface and card ID letters In the message of breath, finally line is transmitted to as the message for being packaged with destination interface and card id information Card.
Apparatus for forwarding message proposed by the present invention, master control borad receives the encapsulation that line card is sent by stacking opening When having the message of source port and card id information, the source port and card id information are first extracted, is then learnt The stacking opening heading encapsulates the source port and the corresponding source MAC of card id information and vlan letters Breath, is searched corresponding in master control borad mac address table according to the target MAC (Media Access Control) address of the message and vlan Destination interface and card ID, the master control borad encapsulate the destination interface and card id information of acquisition to described In the stacking opening heading of message, and it will be packaged with by destination interface stacking opening corresponding with card ID The message of destination interface and card id information send to correspondence line card so that improve message forwarding efficiency and Convenience, reduces the cost of line card.
It should be noted that herein, term " comprising ", "comprising" or its any other variant Be intended to including for nonexcludability so that process, method, article including a series of key elements or Person's system not only includes those key elements, but also other key elements including being not expressly set out, or also Including for this process, method, article or the intrinsic key element of system.In the feelings of not more limitations Under condition, the key element limited by sentence "including a ...", it is not excluded that the process including the key element, Also there is other identical element in method, article or system.
The embodiments of the present invention are for illustration only, and the quality of embodiment is not represented.
Through the above description of the embodiments, those skilled in the art can be understood that above-mentioned Embodiment method can add the mode of required general hardware platform to realize by software, naturally it is also possible to logical Cross hardware, but the former is more preferably embodiment in many cases.Understood based on such, it is of the invention The part that technical scheme substantially contributes to prior art in other words can in the form of software product body Reveal and, the computer software product is stored in storage medium (such as ROM/RAM, magnetic disc, a light Disk) in, including some instructions are to cause a station terminal equipment (can be mobile phone, computer, service Device, air conditioner, or network equipment etc.) perform method described in each of the invention embodiment.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every The equivalent structure or equivalent flow conversion made using description of the invention and accompanying drawing content, or directly or Connect and be used in other related technical fields, be included within the scope of the present invention.

Claims (10)

1. a kind of message forwarding method, it is characterised in that line card and master control borad are connected by stacking opening, institute Message forwarding method is stated to comprise the following steps:
Line card is receiving message to be forwarded, obtains the source port and card id information of the message;
The line card encapsulates the source port and card id information of acquisition to the stacking opening report of the message In literary head, and the message for being packaged with source port and card id information is sent to master control borad by stacking opening, So that the master control borad learns the source MAC and vlan of the source port and card id information and message Corresponding relation, target MAC (Media Access Control) address further according to the message and vlan are with searching default MAC In the forward table of location corresponding destination interface and card ID, and by the destination interface and card id information encapsulate to In the stacking opening heading of the message, to be incited somebody to action by destination interface stacking opening corresponding with card ID The message for being packaged with destination interface and card id information is forwarded to the corresponding line cards of the card ID;
The line card is receiving the report for being packaged with destination interface and card id information of the master control borad forwarding Wen Shi, stacking opening heading is removed and direct by the message for being packaged with destination interface and card id information It is forwarded to the destination interface.
2. message forwarding method as claimed in claim 1, it is characterised in that the line card is being received When being packaged with the message of destination interface and card id information of the master control borad forwarding, will be packaged with destination The message of mouth and card id information removes stacking opening heading and is forwarded directly to the destination interface Step includes:
The line card is receiving the report for being packaged with destination interface and card id information of the master control borad forwarding Wen Shi, parses the message forwarding mark for being packaged with and being carried in the message of destination interface and card id information Know;
The line card forwards mark and the mapping relations of message forwarding strategy according to default message, obtains solution The corresponding message forwarding strategy of message forwarding mark of analysis;
The line card will be packaged with the institute of destination interface and card id information according to the message forwarding strategy of acquisition Message forwarding is stated to remove stacking opening heading and be forwarded directly to the destination interface.
3. message forwarding method as claimed in claim 1 or 2, it is characterised in that the line card is connecing The step of receiving message to be forwarded, the source port and card id information of the acquisition message includes:
The line card is receiving message to be forwarded, determines the type of message of the message;
When the type of message of the message meets preset kind, the source port and card ID of the message are obtained Information.
4. a kind of message forwarding method, it is characterised in that line card and master control borad are connected by stacking opening, institute Message forwarding method is stated to comprise the following steps:
Master control borad receives the message for being packaged with source port and card id information that line card is sent by stacking opening When, extract the source port and card id information;
The master control borad carries out source mac learning, by the source MAC and vlan and source port of the message Correspondence setting with card ID is into default mac address forwarding table;
The master control borad is in the mac address forwarding table according to the purpose MAC and vlan of the message Obtain corresponding destination interface and card id information;
The destination interface and card id information of acquisition are encapsulated into the stacking of the message by the master control borad In mouthful heading, and the message of the destination interface and card id information will be packaged with by the stacking opening It is forwarded in the corresponding line cards of the card ID, so that the line card is packaged with the destination receiving During the message of mouth and card id information, the message for being packaged with destination interface and card id information is removed into stacking opening Heading is simultaneously forwarded to the destination interface.
5. message forwarding method as claimed in claim 4, it is characterised in that described to be stacked by described The message for being packaged with the destination interface and card id information is forwarded in the corresponding line cards of the card ID by mouth The step of before, the message forwarding method also includes:
The master control borad is according to the destination interface and card id information of acquisition, it is determined that being packaged with destination Mouth message forwarding mark corresponding with the message of card id information;
The master control borad obtains the message forwarding mark determined;
The message forwarding mark of acquisition is added to by the master control borad is packaged with destination interface and card id information The message in, perform corresponding message forwarding plan so that the line card is based on message forwarding mark Slightly.
6. a kind of apparatus for forwarding message, it is characterised in that line card and master control borad are connected by stacking opening, institute Stating apparatus for forwarding message includes:
First acquisition module, for receiving message to be forwarded, obtain the message source port and Card id information;
First processing module, for the source port and card id information of acquisition to be encapsulated to the message Stacking opening heading in, and the message for being packaged with source port and card id information is sent by stacking opening To master control borad, the source MAC for learning the source port and card id information and message for the master control borad Location and vlan corresponding relation, target MAC (Media Access Control) address and vlan further according to the message are searched default Corresponding destination interface and card ID in mac address forwarding table, and by the destination interface and card id information Encapsulation is into the stacking opening heading of the message, to pass through destination interface heap corresponding with card ID The message for being packaged with destination interface and card id information is forwarded to the corresponding line cards of the card ID by folded mouth;
Forwarding module, for believing in be packaged with destination interface and the card ID that receive the master control borad forwarding During the message of breath, the message for being packaged with destination interface and card id information is removed into stacking opening heading And it is forwarded directly to the destination interface.
7. apparatus for forwarding message as claimed in claim 6, it is characterised in that the forwarding module includes:
Resolution unit, for believing in be packaged with destination interface and the card ID that receive the master control borad forwarding During the message of breath, the message for being packaged with and being carried in the message of destination interface and card id information is parsed Forwarding mark;
First acquisition unit, for forwarding mark and the mapping of message forwarding strategy to close according to default message System, obtains the corresponding message forwarding strategy of message forwarding mark of parsing;
Retransmission unit, for destination interface and card ID letters will to be packaged with according to the message forwarding strategy of acquisition The message forwarding of breath removes stacking opening heading and is sent directly to the destination interface.
8. apparatus for forwarding message as claimed in claims 6 or 7, it is characterised in that described first obtains Module includes:
Determining unit, for receiving message to be forwarded, determines the type of message of the message;
Second acquisition unit, for when the type of message of the message meets preset kind, obtaining described The source port and card id information of message.
9. a kind of apparatus for forwarding message, it is characterised in that line card and master control borad are connected by stacking opening, institute Stating apparatus for forwarding message includes:
Extraction module, be packaged with source port and card ID for receiving line card transmission by stacking opening believe During the message of breath, the source port and card id information are extracted;
Setup module, for carrying out source mac learning, by the source MAC and vlan of the message and source Port and card ID correspondence setting are into default mac address forwarding table;
Second acquisition module, in the mac address forwarding table according to the purpose of the message MAC and vlan obtains corresponding destination interface and card id information;
Second processing module, for the destination interface and card id information of acquisition to be encapsulated into the report In the stacking opening heading of text, and the destination interface and card ID letters will be packaged with by the stacking opening The message of breath is forwarded in the corresponding line cards of the card ID, so that the line card is receiving encapsulation When stating the message of destination interface and card id information, the message for being packaged with destination interface and card id information is gone Fall stacking opening heading and be forwarded to the destination interface.
10. apparatus for forwarding message as claimed in claim 9, it is characterised in that the message forwarding dress Putting also includes:
Determining module, for the destination interface and card id information according to acquisition, it is determined that being packaged with mesh Port and card id information message corresponding message forwarding mark;
3rd acquisition module, the message determined for obtaining forwards mark;
Add module, destination interface and card ID are packaged with for the message forwarding mark of acquisition to be added to In the message of information, corresponding message turn is performed so that the line card is based on message forwarding mark Hair strategy.
CN201610239507.1A 2016-04-18 2016-04-18 Message forwarding method and device Withdrawn CN107306220A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610239507.1A CN107306220A (en) 2016-04-18 2016-04-18 Message forwarding method and device
PCT/CN2017/072877 WO2017181757A1 (en) 2016-04-18 2017-02-04 Packet forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610239507.1A CN107306220A (en) 2016-04-18 2016-04-18 Message forwarding method and device

Publications (1)

Publication Number Publication Date
CN107306220A true CN107306220A (en) 2017-10-31

Family

ID=60115610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610239507.1A Withdrawn CN107306220A (en) 2016-04-18 2016-04-18 Message forwarding method and device

Country Status (2)

Country Link
CN (1) CN107306220A (en)
WO (1) WO2017181757A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110958502A (en) * 2019-11-27 2020-04-03 烽火通信科技股份有限公司 Method and system for realizing intercommunication between different ONUs in same PON
CN113132257A (en) * 2021-04-29 2021-07-16 杭州迪普信息技术有限公司 Message processing method and device
CN114726801A (en) * 2022-04-01 2022-07-08 北京东土军悦科技有限公司 Encrypted flow forwarding method and system

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113014516A (en) * 2019-12-20 2021-06-22 华为技术有限公司 Method and device for transmitting data stream
CN111586503B (en) * 2020-04-13 2022-06-03 烽火通信科技股份有限公司 Method and device for realizing three-layer service load sharing of access system
CN114157684B (en) * 2020-08-18 2024-01-02 华为终端有限公司 Message processing method, device and storage medium
CN113824654B (en) * 2021-09-28 2023-12-29 新华三信息安全技术有限公司 Message forwarding method and device
CN114189484B (en) * 2021-12-28 2023-10-27 杭州迪普科技股份有限公司 Method and device for forwarding message internally
CN114024902B (en) * 2022-01-05 2022-04-08 紫光恒越技术有限公司 Method and device for forwarding stacked messages, electronic equipment and readable storage medium
CN115022225B (en) * 2022-05-31 2023-11-10 东风电驱动系统有限公司 Message forwarding method, device, equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101478435A (en) * 2009-01-20 2009-07-08 杭州华三通信技术有限公司 Topology collecting method for stacking system and dual control board equipment
CN101605104A (en) * 2009-07-23 2009-12-16 杭州华三通信技术有限公司 Flow forwarding method in the stack equipment and equipment
CN101692646A (en) * 2009-09-17 2010-04-07 杭州华三通信技术有限公司 Method for handling layer-2 forwarding and distributed device
CN102130817A (en) * 2010-01-20 2011-07-20 杭州华三通信技术有限公司 Method for keeping flows uninterrupted in stacked system and machine frame switch
US20130103818A1 (en) * 2011-10-25 2013-04-25 Teemu Koponen Physical controller

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102045332B (en) * 2009-10-26 2013-05-08 杭州华三通信技术有限公司 Method for processing control message in intelligent resilient framework and line card boards
CN101753362B (en) * 2010-02-10 2014-04-30 中兴通讯股份有限公司 Configuring method and device of stacking virtual local area network of distributed network device
US8654680B2 (en) * 2010-03-16 2014-02-18 Force10 Networks, Inc. Packet forwarding using multiple stacked chassis
CN104243324B (en) * 2013-06-07 2017-10-03 新华三技术有限公司 The method and apparatus E-Packeted

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101478435A (en) * 2009-01-20 2009-07-08 杭州华三通信技术有限公司 Topology collecting method for stacking system and dual control board equipment
CN101605104A (en) * 2009-07-23 2009-12-16 杭州华三通信技术有限公司 Flow forwarding method in the stack equipment and equipment
CN101692646A (en) * 2009-09-17 2010-04-07 杭州华三通信技术有限公司 Method for handling layer-2 forwarding and distributed device
CN102130817A (en) * 2010-01-20 2011-07-20 杭州华三通信技术有限公司 Method for keeping flows uninterrupted in stacked system and machine frame switch
US20130103818A1 (en) * 2011-10-25 2013-04-25 Teemu Koponen Physical controller

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110958502A (en) * 2019-11-27 2020-04-03 烽火通信科技股份有限公司 Method and system for realizing intercommunication between different ONUs in same PON
CN110958502B (en) * 2019-11-27 2022-03-11 烽火通信科技股份有限公司 Method and system for realizing intercommunication between different ONUs in same PON
CN113132257A (en) * 2021-04-29 2021-07-16 杭州迪普信息技术有限公司 Message processing method and device
CN114726801A (en) * 2022-04-01 2022-07-08 北京东土军悦科技有限公司 Encrypted flow forwarding method and system
CN114726801B (en) * 2022-04-01 2024-03-29 北京东土军悦科技有限公司 Method and system for forwarding encrypted traffic

Also Published As

Publication number Publication date
WO2017181757A1 (en) 2017-10-26

Similar Documents

Publication Publication Date Title
CN107306220A (en) Message forwarding method and device
US8081633B2 (en) Network node unit and method for forwarding data packets
KR101015130B1 (en) Data distribution apparatus, data distribution method, and distribution control program
CN1866919B (en) Service switching method based on VLAN stack
CN103841023B (en) The method and apparatus of data forwarding
CN101160850B (en) Method and device for forwarding packet
CN104410541B (en) The method and device that VXLAN internal layer virtual machine traffics are counted in intermediary switch
CN102970227A (en) Method and device for achieving virtual extensible local area network (VXLAN) message transmitting in application specific integrated circuit (ASIC)
US9813342B2 (en) Method and system for improved load balancing of received network traffic
EP2903218A1 (en) Method and device for modifying and forwarding message in data communication network
CN1722707B (en) Method for securing communication in a local area network switch
CN110855568B (en) Message forwarding method and system
CN103701679B (en) A kind of method for realizing VLAN conversions
JP2022537296A (en) EVPN message transfer method, system, storage medium and terminal
CN110035074A (en) A kind of chip implementing method and device of ACL matching UDF message
WO2020135705A1 (en) Olt device virtualization method, olt device, and computer-readable medium
CN108683610A (en) A kind of system and method realized multi-service rule match and flow and replicated
CN102123072B (en) The implementation method of Packet Classification process, network and terminal
CN101453401B (en) Ethernet bridge equipment, MAC address learning method and data packet transmission method
CN111711555B (en) Message processing method and device
CN103607350B (en) Method and device for generating route
CN104202229A (en) Method and system for processing passive optical network (PON) optical line terminal (OLT) equipment QINQ messages
CN100433710C (en) Isolation method for two-layer service between websites in RPR
CN102655476B (en) Internet protocol flow transmitting method and device
CN100452763C (en) Network unit for forwarding an Ethernet packet

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20171031

WW01 Invention patent application withdrawn after publication