CN109587027A - A kind of message forwarding method and device - Google Patents

A kind of message forwarding method and device Download PDF

Info

Publication number
CN109587027A
CN109587027A CN201811442790.3A CN201811442790A CN109587027A CN 109587027 A CN109587027 A CN 109587027A CN 201811442790 A CN201811442790 A CN 201811442790A CN 109587027 A CN109587027 A CN 109587027A
Authority
CN
China
Prior art keywords
message
member device
vlan value
stacking opening
encapsulated
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.)
Granted
Application number
CN201811442790.3A
Other languages
Chinese (zh)
Other versions
CN109587027B (en
Inventor
杨渊
徐鹏程
王鑫孟
李玉军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN201811442790.3A priority Critical patent/CN109587027B/en
Publication of CN109587027A publication Critical patent/CN109587027A/en
Application granted granted Critical
Publication of CN109587027B publication Critical patent/CN109587027B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • 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
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/35Switches specially adapted for specific applications
    • H04L49/354Switches specially adapted for specific applications for supporting virtual local area networks [VLAN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/55Prevention, detection or correction of errors
    • H04L49/552Prevention, detection or correction of errors by ensuring the integrity of packets received through redundant connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2212/00Encapsulation of packets

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the present application provides a kind of message forwarding method and device, is related to field of communication technology, to improve message transmissions efficiency.The scheme of the embodiment of the present application includes: that the first member device receives the first message, when the outgoing interface for determining stack equipment the first message of transmission is located at the second member device, obtain the 2nd VLAN value with the first VLAN value of outgoing interface binding and with stacking opening binding, and the first VLAN value and the 2nd VLAN value are encapsulated to the heading of the first message, obtain the first encapsulated message, then according to the 2nd VLAN value, determine the stacking opening for being used for transmission the first encapsulated message, and delete the 2nd VLAN value that the first encapsulated message includes, obtain the second encapsulated message, second encapsulated message is sent to the second member device by stacking opening, so that the second member device determines outgoing interface by the first VLAN value, delete the first VLAN value that the second encapsulated message includes, obtain the first message, forwarding first Message.

Description

A kind of message forwarding method and device
Technical field
This application involves fields of communication technology, more particularly to a kind of message forwarding method and device.
Background technique
Currently, each member device is by extended receiver from upper for the stack equipment including multiple member devices After the message of row interchanger, message can be sent to Downlink Switch by downlink.Wherein, upstream switch is to be connected to The interchanger of client, communication link of the uplink between upstream switch and member device, Downlink Switch are connection In the interchanger of server, communication link of the downlink between Downlink Switch and server.
By taking networking as shown in Figure 1 as an example, stack equipment includes member device 1 and member device 2, and upstream switch receives After the message that client is sent, member device 1 can be forwarded the message to by link 1, member device 1 passes through chain after handling message Road 3 forwards the message to Downlink Switch or upstream switch and forwards the message to member device 2, Cheng Yuanshe by link 2 Downlink Switch is forwarded the message to by link 4 after standby 2 processing message.Wherein, member device 1 and member device 2 receive It after message, requires to parse message, determines the destination address of message.
However, if any one link failure of the link 1 into link 4 in Fig. 1, such as 4 failure of link 1 and link, or 3 failure of person's link 2 and link, will lead to and occurs transparent transmission message between member device 1 and member device 2.With link 2 and link For 3 failures, after member device 1 is received message and handled the message by link 1, message can be passed through stacking opening It is sent to member device 2, after member device 2 handles the message, Downlink Switch is sent to by link 4.
It can be seen that link failure, which will lead to, needs a large amount of message of transparent transmission between each member device in stack equipment, and stacks and set First member device in standby (example as shown in figure 1 member device 1) receive the message of multiple pileup device external transmission and to message into After row processing, the second member device (example as shown in figure 1 member device 2) for receiving the message of the first member device forwarding is needed again Message is handled, causes the efficiency of transmission of message lower.
Summary of the invention
The embodiment of the present application is designed to provide a kind of message forwarding method and device, to improve the transmission of transparent transmission message Efficiency.Specific technical solution is as follows:
In a first aspect, the embodiment of the present application provides a kind of message forwarding method, applied to the first member in stack equipment Equipment, the stack equipment further include the second member device being connect with the first member device by stacking opening, the method packet It includes:
First member device receives the first message, when determining that the stack equipment sends the outgoing interface position of first message When second member device, the with the first VLAN value of outgoing interface binding and with stacking opening binding is obtained Two VLAN values, and the first VLAN value and the 2nd VLAN value are encapsulated to the heading of first message, obtain One encapsulated message;
According to the 2nd VLAN value, the stacking opening for being used for transmission first encapsulated message is determined;
The 2nd VLAN value that first encapsulated message includes is deleted, the second encapsulated message is obtained, described second is encapsulated Message is sent to the second member device by the stacking opening, so that second member device is true by the first VLAN value The fixed outgoing interface deletes the first VLAN value that second encapsulated message includes, obtains first message, forwards institute State the first message.
Second aspect, the embodiment of the present application provide a kind of message forwarding method, applied to the second member in stack equipment Equipment, which comprises
The second encapsulated message is received by the stacking opening, second encapsulated message includes the first VLAN value;
It whether include the first VLAN value in judgement and the VLAN value of stacking opening binding;
If so, determine outgoing interface by the first VLAN value, and delete that second encapsulated message includes it is described First VLAN value obtains the first message;
First message is forwarded by the outgoing interface.
The third aspect, the embodiment of the present application provide a kind of message forwarding method, applied to the first member in stack equipment Equipment, which comprises
It obtains and is bound with the first VLAN value of outgoing interface binding and the stacking opening for sending message with each member device The 2nd VLAN value, and the first VLAN value and each 2nd VLAN value are encapsulated according to transmission path to first message Heading obtains the first encapsulated message;
According to first the 2nd VLAN value in first encapsulated message, determine that first member device is used for and institute State the first stacking opening of first the second member device connection in transmission path;
First the 2nd VLAN value that first encapsulated message includes is deleted, the second encapsulated message is obtained, by described Two encapsulated messages are sent to first second member device by first stacking opening.
Fourth aspect, the embodiment of the present application provide a kind of apparatus for forwarding message, applied to the second member in stack equipment Equipment, which comprises
Receive third encapsulated message by local first stacking opening, the third encapsulated message include the first VLAN value and The 2nd VLAN value of the stacking opening binding of message, the first VLAN value and transmission road are sent with member device each in transmission path The outgoing interface binding of the member device of message is finally received in diameter;
According to first the 2nd VLAN value that the third encapsulated message includes, determine second member device for Second stacking opening of next member device connection in transmission path;
First the 2nd VLAN value that the third encapsulated message includes is deleted, the 4th encapsulated message is obtained, by described Four encapsulated messages are sent to next member device in the transmission path by second stacking opening, so that the transmission road Next member device in diameter is according to first the 2nd VLAN value or the first VLAN value in the 4th encapsulated message.
5th aspect, the embodiment of the present application provides a kind of apparatus for forwarding message, applied to the first member in stack equipment Equipment, the stack equipment further include the second member device being connect with the first member device by stacking opening, described device packet It includes:
Receiving module, for receiving the first message;
Module is obtained, the outgoing interface for sending first message when the determining stack equipment is located at described the second one-tenth When member's equipment, the 2nd VLAN value with the first VLAN value of outgoing interface binding and with stacking opening binding is obtained;
Package module, for by it is described acquisition module obtain the first VLAN value and the 2nd VLAN value encapsulate to The heading of first message, obtains the first encapsulated message;
Transmission module, for determining the heap for being used for transmission first encapsulated message according to the 2nd VLAN value Folded mouth;
The package module is also used to delete the 2nd VLAN value that first encapsulated message includes, obtains the second encapsulation Message;
The transmission module, is also used to second encapsulated message being sent to the second member by the stacking opening and sets It is standby, so that second member device determines the outgoing interface by the first VLAN value, delete second encapsulated message Including the first VLAN value, obtain first message, forward first message.
6th aspect, the embodiment of the present application provides a kind of apparatus for forwarding message, applied to the second member in stack equipment Equipment, described device include:
Receiving module, for receiving the second encapsulated message by the stacking opening, second encapsulated message includes first VLAN value;
Judgment module, for judge with the stacking opening binding VLAN value in whether include the first VLAN value;
Removing module, if the judging result for the judgment module be it is yes, determined by the first VLAN value Interface, and the first VLAN value that second encapsulated message includes is deleted, obtain the first message;
Transmission module, for forwarding first message by the outgoing interface.
7th aspect, the embodiment of the present application provides a kind of apparatus for forwarding message, applied to the first member in stack equipment Equipment, described device include:
Receiving module, for receiving the first message;
Determining module, the outgoing interface for sending first message when the determining stack equipment are not located at this member and set When standby, the transmission path that first message is sent to the outgoing interface is determined, the transmission path includes successively passing through Second member device;
Module is obtained, for obtaining with the first VLAN value of outgoing interface binding and sending message with each member device Stacking opening binding the 2nd VLAN value;
Package module, for encapsulating the first VLAN value and each 2nd VLAN value according to transmission path to described first The heading of message obtains the first encapsulated message;
The determining module, is also used to according to first the 2nd VLAN value in first encapsulated message, determine described in First member device is used for the first stacking opening connecting with first the second member device in the transmission path;
The package module is also used to delete first the 2nd VLAN value that first encapsulated message includes, and obtains Two encapsulated messages;
Sending module, for second encapsulated message to be sent to first the second member by first stacking opening Equipment.
Eighth aspect, the embodiment of the present application provide a kind of apparatus for forwarding message, applied to the second member in stack equipment Equipment, described device include:
Receiving module, for receiving third encapsulated message by local first stacking opening, the third encapsulated message includes The 2nd VLAN value that first VLAN value and the stacking opening for sending message with member device each in transmission path are bound, described first The outgoing interface that the member device of message is finally received in VLAN value and transmission path is bound;
Determining module, first the 2nd VLAN value for including according to the third encapsulated message, determines described second Member device is used for the second stacking opening connecting with member device next in transmission path;
Package module, first the 2nd VLAN value for including for deleting the third encapsulated message obtain the 4th encapsulation Message;
Sending module, for the 4th encapsulated message to be sent in the transmission path by second stacking opening Next member device so that next member device in the transmission path is according to first in the 4th encapsulated message Two VLAN values or the first VLAN value transmit the 4th encapsulated message.
9th aspect, the embodiment of the present application provide a kind of electronic equipment, which includes: processor and machine readable Storage medium, the machine readable storage medium is stored with the machine-executable instruction that can be executed by the processor, described Processor is promoted by the machine-executable instruction: realizing described in first aspect, second aspect, the third aspect or fourth aspect Message forwarding method.
Tenth aspect, the embodiment of the present application also provides a kind of computer readable storage medium, the computer-readable storages Dielectric memory contains computer program, and first aspect, second aspect, third are realized when the computer program is executed by processor Message forwarding method described in aspect or fourth aspect.
Tenth on the one hand, and the embodiment of the present application also provides a kind of computer program products comprising instruction, when it is being counted When being run on calculation machine, so that computer executes above-mentioned first aspect, second aspect, report described in the third aspect or fourth aspect Literary retransmission method.
Message forwarding method provided by the embodiments of the present application, after the first member device receives the first message, however, it is determined that heap Stacking device sends the outgoing interface of the first message when being located at the second member device, can obtain the first VLAN value bound with outgoing interface with And the 2nd VLAN value with stacking opening binding, and the first VLAN value and the 2nd VLAN value are encapsulated to the heading of the first message, The first encapsulated message is obtained, the first member device can thus be made to pass through the corresponding stacking port transmission second of the 2nd VLAN value Encapsulated message, after the second member device receives the second encapsulated message for carrying the first VLAN value, the exchange of the second member device Chip directly can determine outgoing interface according to the first VLAN value, and forward the first message by outgoing interface, thereby realize second Member device directly passes through the corresponding hardware layer of exchange chip and is forwarded to message, without identifying the particular content of message and right Message is handled, and the efficiency of transmission of message can be improved.
Certainly, implement the application any product or method it is not absolutely required to and meanwhile reach all the above excellent Point.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of schematic diagram of group-network construction provided by the embodiments of the present application;
Fig. 2 is a kind of flow chart of message forwarding method provided by the embodiments of the present application;
Fig. 3 is the flow chart of another message forwarding method provided by the embodiments of the present application;
Fig. 4 is a kind of illustrative diagram of application scenarios provided by the embodiments of the present application;
Fig. 5 is a kind of structural schematic diagram of apparatus for forwarding message provided by the embodiments of the present application;
Fig. 6 is the structural schematic diagram of another apparatus for forwarding message provided by the embodiments of the present application;
Fig. 7 is the structural schematic diagram of another apparatus for forwarding message provided by the embodiments of the present application;
Fig. 8 is the structural schematic diagram of another apparatus for forwarding message provided by the embodiments of the present application;
Fig. 9 is the structural schematic diagram of a kind of electronic equipment provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
Inventor has found when studying the prior art: the prior art when be caused in stack equipment due to link failure respectively at The a large amount of message of transparent transmission is needed between member's equipment, and the first member device in stack equipment receives multiple pileup device external hair The message that send and after handling message, the second member device for receiving the message of the first member device forwarding needs again Downlink Switch can be just transmitted to by being handled, and it is lower to will lead to message transmissions efficiency.
To improve message transmissions efficiency, each member device in the embodiment of the present application in stack equipment is each of itself Interface is configured with the VLAN value for identifying interface, and multiple interfaces can be divided to the same business in the prior art VLAN (i.e. multiple interface VLAN values having the same) is different, this application involves VLAN value be for distinguishing interface, it is different Interface have different VLAN values.When each member device enables stacking opening, each member device can incite somebody to action the embodiment of the present application Itself stacking opening is bound with the VLAN value for identifying local each interface, such as: the first member device and the second member device it Between stacking opening it is enabled when, the first member device can be by the VLAN value of stacking opening and each interface for being used to identify the first member device Binding, the second member device can bind stacking opening and the VLAN value for each interface for being used to identify the second member device.
Forwarding principle based on exchange chip can be to the VLAN value with the interface after by certain interface to message Other identical interfaces forward the message, and the application may be implemented to connect when a member device by stacking opening through the above configuration When receiving the message for carrying VLAN value, the VLAN value is inevitable to bind with stacking opening, so the message can be forwarded to by exchange chip The corresponding outgoing interface of VLAN value, and then E-Packeted by the outgoing interface.
Based on above-mentioned configuration, the embodiment of the present application is somebody's turn to do after the first member device receives the first message when determining to send When the outgoing interface of message is located at the second member device, it can obtain with the first VLAN value of outgoing interface binding and be bound with stacking opening The 2nd VLAN value, and the first VLAN value and the 2nd VLAN value are encapsulated to the heading of the first message, obtain the first encapsulation report First encapsulated message is transmitted to stacking opening then according to the 2nd VLAN value by text, then deletes include in the first encapsulated message the Two VLAN values, obtain the second encapsulated message, the second encapsulated message are sent second to member device by stacking opening, and then second The first VLAN value that member device can include by the second encapsulated message determines outgoing interface, can delete the first VLAN value, pass through Outgoing interface forwards the first message, and the second encapsulated message received due to the second member device includes the first VLAN value, and the second one-tenth Member's equipment can directly be E-Packeted by the corresponding outgoing interface of the first VLAN value of exchange chip, since exchange chip is that hardware turns Hair, will not be by the CPU of the message up sending to equipment, so the second member device is just not necessarily to handle the message, but directly It connects and is forwarded, the efficiency of transmission of message can be improved.
The method forwarded below by way of specific embodiment to message provided by the embodiments of the present application is illustrated.
The embodiment of the present application can be applied to the network environment with stack equipment, between each member device of stack equipment Stacking opening transparent transmission message can be passed through.
Wherein, each member device in stack equipment is the equipment with message transmission function, such as can be fire prevention The equipment such as wall, switch or router.
By taking application scenarios shown in FIG. 1 as an example, when link breaks down in stack equipment, the transmission situation of message is at least Including following two situation:
Situation one: perhaps 3 failure of link or the equal failure of link 2 and link 3, upstream switch pass through 2 failure of link After message is sent to member device 1 by link 1, message transmission to member device 2, member device 2 are passed through link by member device 1 Message is sent to Downlink Switch by 4.
Situation two: perhaps 4 failure of link or the equal failure of link 1 and link 4, upstream switch pass through 1 failure of link After message is sent to member device 2 by link 2, message transmission to member device 1, member device 1 are passed through link by member device 2 Message is sent to Downlink Switch by 3.
In conjunction with Fig. 1, the embodiment of the present application provides a kind of method of message forwarding, and this method is applied to the in stack equipment One member device, stack equipment further include the second member device being connect with the first member device by stacking opening, the first member Equipment can be member device 1 or member device 2 in Fig. 1, correspondingly, the second member device is then the member device 2 in Fig. 1 Or member device 1.It is said so that member device 1 is the first member device, member device 2 is the second member device as an example below It is bright.As shown in Fig. 2, shown in this method is specific as follows.
S201, the first member device receive the first message, when the outgoing interface for determining stack equipment the first message of transmission is located at When the second member device, the 2nd VLAN value with the first VLAN value of outgoing interface binding and with stacking opening binding is obtained, and will First VLAN value and the 2nd VLAN value are encapsulated to the heading of the first message, obtain the first encapsulated message.
In system initialization process, the first member device be respectively itself each interface be configured with one for identify connect The VLAN value of mouth, similarly, the second member device are also respectively that itself each interface is configured with one for identifying interface VLAN value.
Illustratively, if there is 8 interfaces on the exchange chip of the first member device, it can configure the VLAN of this 8 interfaces Value is respectively 1 to 8.Equally, if there is 8 interfaces on the exchange chip of the second member device, it can also be configured the VLAN of this 8 interfaces Value is respectively 1 to 8.Above-mentioned configuration is merely illustrative, and in actual implementation, the configuration of the VLAN value of each interface is without being limited thereto, configuration Principle is that each member device is that itself each interface configures different VLAN values.It, can be in addition, in system initialization Logic index value is configured for the interface of each member device, to pass through the logic index value corresponding interface easy to find.
First member device includes that hardware layer, driving layer and podium level, hardware layer are the exchange core of the first member device Piece, after exchange chip receives the first message, can by the first message up sending to driving layer, driving layer again by the first message up sending extremely Podium level, the business module in podium level can be identified and be handled to the first message, when business module determines the first message When outgoing interface is located at the second member device, the first member device can obtain with outgoing interface binding the first VLAN value and with stacking 2nd VLAN value of mouth binding.
Wherein, due to the Interface status of member device each in stack equipment, interface identifier (such as the interface logic index Value), the information such as forwarding table and routing table be mutually synchronized, therefore may be implemented can be according to storage in the first member device Above- mentioned information determine the outgoing interface of the first message on which platform member device.Optionally, business module can be true according to forwarding-table item It is fixed to determine for sending the interface number of the outgoing interface of the first message, or according to load balancing for sending the first message The interface number of outgoing interface, the mode of the outgoing interface for determining the first message, the application is with no restriction.
Specifically, when the stacking opening between the first member device and the second member device is enabled, the first member device and The interface message of each interface of itself can be mutually synchronized between second member device, interface message includes Interface status, interface number And the corresponding logic index value of interface number.
First member device can calculate the VLAN of each interface of the second member device according to the interface number of the second member device Value, the method that the first member device calculates the VLAN value of each interface of the second member device, configures itself with the second member device Each interface VLAN value method it is identical.
As an example, interface number can be by slot (slot number), subslot (sub- slot number), port (interface serial number) Three parts composition, the corresponding VLAN value of interface number can be with are as follows:
VLAN=slot*28+subslot*24+port+stratIndex
Wherein, StartIndex is preset starting index value.
The calculation of VLAN value in certain the embodiment of the present application is without being limited thereto, and it is raw that other can be implemented as distinct interface It also can be applied in the present embodiment at the method for different VLAN values.
By above-mentioned calculating, the first member device can determine that the interface number-VLAN value of the second member device or interface number-are patrolled Collect the corresponding relationship between index value-VLAN value.
So the first member device can be according to the corresponding with logic index value of each interface number of the second member device Relationship obtains the corresponding target logic index value of interface number of outgoing interface, and it is corresponding for identifying to search target logic index value First VLAN value of outgoing interface.
It, can be according to interface number and logic after the business module of the podium level of first member device determines the interface number of outgoing interface The corresponding relationship of index value determines the corresponding target logic index value of the interface number of outgoing interface, then by target logic index value It is handed down to driving layer, driving layer it is corresponding can to search target logic index value according to the corresponding relationship of logic index value and VLAN value For identifying the first VLAN value of outgoing interface.
In addition, driving layer may further determine that the target interface on the first member device as stacking opening, obtain for identifying mesh 2nd VLAN value of tag splice mouth.
For example, if outgoing interface is the interface 1 of the second member device, it may be determined that the first VLAN value is 1, if the first member device On as stacking opening target interface be interface 3, then can determine the 2nd VLAN value be 3.
First VLAN value and the 2nd VLAN value can be encapsulated in two layers of report of the first message by the driving layer of the first member device In literary head, the format of the first encapsulated message obtained after encapsulation can be " [target MAC (Media Access Control) address] [source MAC] [second VLAN value] [the first VLAN value] [protocol type] [data portion] ".
Optionally, if the first member device determines that the first message need to be transmitted via local device, the first message is forwarded extremely Downlink Switch.
S202, the first member device determine the stacking opening for being used for transmission the first encapsulated message according to the 2nd VLAN value.
After the driving layer of the first member device obtains the first encapsulated message, the first encapsulated message can be transmitted to exchange core Piece, exchange chip can recognize outermost VLAN value in the first encapsulated message, i.e. the 2nd VLAN value, exchange chip can determine second VLAN value is the VLAN value of the stacking opening of itself, and then determination can pass through first encapsulated message of stacking port transmission.
S203, the first member device delete the 2nd VLAN value that the first encapsulated message includes, and obtain the second encapsulated message, will Second encapsulated message is sent to the second member device by stacking opening, so that the second member device is determined by the first VLAN value Interface deletes the first VLAN value that the second encapsulated message includes, obtains the first message, forwards the first message.
It specifically, can after the exchange chip of the first member device determines and stacking the first encapsulated message of port transmission can be used The 2nd VLAN value in first encapsulated message is deleted, the format of the second encapsulated message obtained at this time can be " [purpose MAC Address] [source MAC] [the first VLAN value] [protocol type] [data portion] ".
Then the second encapsulated message can be sent to the second member by stacking opening and set by the exchange chip of the first member device It is standby, after the exchange chip of the second member device receives the second encapsulated message by stacking opening, it can recognize to the second encapsulated message In include the first VLAN value, due to stacking opening and each interface for identifying the second member device of the second member device The binding of VLAN value, so the exchange chip of the second member device can determine that the first VLAN value is the VLAN value of stacking opening binding, into And the exchange chip of the second member device can determine that the outgoing interface of second encapsulated message is the corresponding outgoing interface of the first VLAN value, Then the exchange chip of the second member device can delete the first VLAN value that the second encapsulated message includes, and obtain the first message, pass through Outgoing interface forwards the first message.
It should be noted that since the exchange chip of the second member device determines carry in the second encapsulated message first VLAN value and stacking opening are bound, so exchange chip can forward the first message by the corresponding outgoing interface of the first VLAN value, are not necessarily to It will send on second encapsulated message to the driving layer and podium level of the second member device, need to only be carried out in exchange chip hardware view Forwarding.
It, can be by stacking opening and each interface for being used to identify the first member device when the first member device enables stacking opening The binding of VLAN value.If the first member device in this way receives the message for carrying VLAN value by stacking opening, if the first member sets Standby exchange chip determines that the VLAN value and stacking opening are bound, and can be E-Packeted by the corresponding interface of VLAN value.
Correspondingly, the first member device can release stacking opening and the second member when the first member device deletes stacking opening Binding relationship between the VLAN value of each interface of equipment.
Similarly, when the second member device enable stacking opening when, can by stacking opening be used to identify each of the second member device The VLAN value of interface is bound.When the second member device deletes stacking opening, stacking opening can be released and set with for identifying the first member Binding relationship between the VLAN value of standby each interface.
Message forwarding method provided by the embodiments of the present application, after the first member device receives the first message, however, it is determined that heap Stacking device sends the outgoing interface of the first message when being located at the second member device, can obtain the first VLAN value bound with outgoing interface with And the 2nd VLAN value with stacking opening binding, and the first VLAN value and the 2nd VLAN value are encapsulated to the heading of the first message, The first encapsulated message is obtained, the first member device can thus be made to pass through the corresponding stacking port transmission second of the 2nd VLAN value Encapsulated message, after the second member device receives the second encapsulated message for carrying the first VLAN value, the exchange of the second member device Chip directly can determine outgoing interface according to the first VLAN value, and forward the first message by outgoing interface, thereby realize second Member device directly passes through the corresponding hardware layer of exchange chip and is forwarded to message, without identifying the particular content of message and right Message is handled, and the efficiency of transmission of message can be improved.
It is understood that determining that stack equipment sends the second report if above-mentioned second member device receives the second message When the outgoing interface of text is located at the first member device, it can also obtain with the 3rd VLAN value of outgoing interface binding and be bound with stacking opening The 4th VLAN value, and the 3rd VLAN value and the 4th VLAN value are encapsulated to the heading of the second message, obtain third encapsulation report Text.
For example, the format of third encapsulated message can be " [target MAC (Media Access Control) address] [source MAC] [the 4th VLAN value] [the Three VLAN values] [protocol type] [data portion] "
Then the second member device can determine the stacking opening for being used for transmission third encapsulated message according to the 4th VLAN value.
Then the 4th VLAN value that third encapsulated message includes is deleted, the 4th encapsulated message is obtained.
For example, the format of the 4th encapsulated message can be " [target MAC (Media Access Control) address] [source MAC] [the 3rd VLAN value] [association Discuss type] [data portion] "
4th encapsulated message can be sent to the first member device, and then the first member by stacking opening by the second member device Equipment determines outgoing interface by the 3rd VLAN value, deletes the 3rd VLAN value that the 4th encapsulated message includes, obtains the second message, turns Send out the second message.
Corresponding to embodiment shown in Fig. 2, the embodiment of the present application also provides a kind of message forwarding method, and this method is applied to The second member device in stack equipment, stack equipment further include the first member being connect with the second stack equipment by stacking opening Equipment, the first member device can be member device 1 or member device 2 in Fig. 1, correspondingly, the second member device is then Fig. 1 In member device 2 or member device 1.Hereinafter be the first member device with member device 1, member device 2 is that the second member sets It is illustrated for standby.As shown in figure 3, shown in this method is specific as follows.
S301, the second member device receive the second encapsulated message that the first member device is sent, the second envelope by stacking opening Filling message includes the first VLAN value.
Optionally, each interface that the second member device may respectively be itself configures one for identifying the VLAN of interface Value.The first VLAN value for including in the second encapsulated message that second member device receives is for identifying the second member device The VLAN value of one of interface.
It whether include the first VLAN value in S302, the judgement of the second member device and the VLAN value of stacking opening binding.
When enabled stacking opening, the second member device can be by stacking opening and each interface for being used to identify the second member device The binding of VLAN value.Correspondingly, the second member device can release stacking opening and set with for identifying the second member when deleting stacking opening Binding relationship between the VLAN value of standby each interface.
So the second member device can if the first VLAN value is the VLAN value for identifying the interface of the second member device It include the first VLAN value in the determining VLAN value with stacking opening binding.
If including the first VLAN value in S303, the VLAN value bound with stacking opening, determine to connect by the first VLAN value Mouthful, and the first VLAN value that the second encapsulated message includes is deleted, obtain the first message.
Wherein, the second member device can determine that the first VLAN value is corresponding according to the corresponding relationship of interface number and VLAN value Outgoing interface, the second member device determines the outgoing interface of message is used for transmission on the exchange chip of itself after, can by second encapsulation The first VLAN value in message is deleted.
S304, the second member device forward the first message by outgoing interface.
It should be understood that the exchange chip of the second member device can forward the first message by the outgoing interface of itself.
Using message forwarding method provided by the embodiments of the present application, the second member device is the first one-tenth received by stacking opening After the second encapsulated message that member's equipment is sent, however, it is determined that there are the first VLAN values in the VLAN value bound with stacking opening, then can be true The fixed corresponding outgoing interface of first VLAN value, and the first VLAN value that the second encapsulated message includes is deleted, the first message is obtained, is passed through Outgoing interface forwards the first message, it is seen that since the second member device is carried by stacking opening received second encapsulated message center 2nd VLAN value, so the second member device is just not necessarily to carry out operational processing to the second encapsulated message, it only need to be via exchange The outgoing interface of chip is forwarded message, and the efficiency of transmission of message can be improved.
Optionally, the embodiment of the present application can also be applied to the scene that stack equipment includes two or more member device, heap It may include the first member device and at least one second member device in stacking device, wherein the first member device is outer for receiving The equipment for the message that portion's equipment is sent, the second member device are to set to the equipment of external equipment transmission message or the second member The standby member device in addition to the first member device is with the equipment to external equipment transmission message.Wherein, outside here is set The standby equipment referred in addition to the member device for constituting stack equipment.By taking Fig. 4 as an example, it is assumed that member device 1 is external equipment hair The equipment of the message sent, member device 3 are the equipment for sending message to external equipment, then member device 1 is the first member device, Member device 2 and 3 is the second member device.
Based on above-mentioned scene, the embodiment of the present application also provides a kind of message forwarding method, applied in stack equipment One member device, this method specifically includes the following steps:
Step 1: receive the first message, when determine stack equipment send first message outgoing interface be not located at When member's equipment, the transmission path that the first message is sent to outgoing interface is determined, transmission path includes the second member successively passed through Equipment.
After first member device receives the first message, however, it is determined that itself is used for the chain to external the first message of device forwards Road failure then can determine the state of outgoing interface of other member devices for connecting external equipment in stack equipment.Due to using After Stack Technology, each member device in stack equipment will be used as an equipment, and the first member device can obtain stacking The interface message and Interface status of each member device of other in equipment.
If the first member device determines that the outgoing interface of the second member device connected by the stacking opening of itself is available, can Determine that transmission path is the second member device that the first member device-is connected to the first member device.By taking Fig. 4 as an example, it is assumed that at The interface (i.e. outgoing interface) that member's equipment 2 is connect with Downlink Switch is available, then member device 1 can determine that transmission path is member Equipment 1 → member device, 2 → Downlink Switch.
If it is determined that the outgoing interface for the second member device being connected with the stacking opening of the first member device is unavailable, then can determine Whether the outgoing interface for another the second member device being connected by stacking opening with second member device can be used.If available, It can determine that transmission path is that the first member device-first the second member device for being connected to the first member device-is connected to the Second the second member device of one the second member device.By taking Fig. 4 as an example, it is assumed that member device 2 is connect with Downlink Switch Interface (i.e. outgoing interface) it is unavailable, member device 3 and interface (i.e. outgoing interface) that afternoon, interchanger was connect are available, then member sets Standby 1 can determine that transmission path is 1 → member device of member device, 2 → member device, 3 → Downlink Switch.
Step 2: obtaining the stacking for sending message with the first VLAN value of outgoing interface binding and with each member device 2nd VLAN value of mouth binding, and the first VLAN value and each 2nd VLAN value are encapsulated according to transmission path to described first The heading of message obtains the first encapsulated message.
Wherein, the first VLAN value is the outgoing interface that the last one member device is connected to external equipment in transmission path VLAN value.
First VLAN value and each 2nd VLAN value are encapsulated according to transmission path to the heading of the first message, obtained The first encapsulated message in outermost VLAN value be the first member device stacking opening the 2nd VLAN value, innermost layer VLAN value For the first VLAN value.
For example, if transmission path is first the second member device-that the first member device-is connected to the first member device It is connected to second the second member device of first the second member device.The then VLAN that the first encapsulated message encapsulates from outside to inside Value is successively are as follows: for connecting second in the 2nd VLAN value of the stacking opening of the first member device, first the second member device 2nd VLAN value of the stacking opening of the second member device, the first VLAN value of the outgoing interface of second the second member device.
By taking Fig. 4 as an example, it is assumed that the interface (i.e. outgoing interface) that member device 2 is connect with Downlink Switch is unavailable, Cheng Yuanshe Standby 3 is available with the interface (i.e. outgoing interface) that afternoon, interchanger was connect, then member device 1 can determine that transmission path is member device 1 → member device, 2 → member device, 3 → Downlink Switch, then the first VLAN value is the VLAN value of the outgoing interface of member device 3 1, each 2nd VLAN value is respectively the VLAN value 3 of the stacking opening 1 of member device 1, the VLAN value 2 of the stacking opening 2 of member device 2. Assuming that the format of the first message is " [target MAC (Media Access Control) address] [source MAC] [protocol type] [data portion] ", by each VLAN value The heading of the first message is encapsulated into according to transmission path, the format of the first obtained encapsulated message is " [target MAC (Media Access Control) address] [source MAC] [VLAN value 3] [VLAN value 2] [VLAN value 1] [protocol type] [data portion] ".
Step 3: determining that the first member device is used for and biography according to first the 2nd VLAN value in the first encapsulated message First stacking opening of first the second member device connection in defeated path.
Wherein, first the 2nd VLAN value is the outermost VLAN value of the first encapsulated message.
Step 4: deleting first the 2nd VLAN value that the first encapsulated message includes, the second encapsulated message is obtained, by second Encapsulated message is sent to first the second member device in transmission path by the first stacking opening.
It wherein, can be according to outermost in the second encapsulated message after first the second member device receives the second encapsulated message The VLAN value of layer determines the interface of transmitting message, and VLAN value outermost in the second encapsulated message is deleted, then by true Fixed interface transmitting message.
It is understood that if first the second member device is not the last one member device in transmission path, The interface of determining transmitting message is the stacking opening for being connected to second the second member device, will be outermost in the second encapsulated message It, can be by stacking opening by message transmissions to second the second member device after the VLAN value of layer is deleted.If first the second member Equipment is the last one member device in transmission path, it is determined that transmitting message interface be outgoing interface.
It is corresponding with a upper embodiment in the scene that stack equipment includes more than two member devices, the embodiment of the present application A kind of message forwarding method is also provided, applied to the second member device in stack equipment, this method specifically includes the following steps:
Step 1: receiving third encapsulated message by local first stacking opening.Third encapsulated message includes the first VLAN value And the 2nd VLAN value of the stacking opening binding of message, the first VLAN value and transmission road are sent with member device each in transmission path The outgoing interface binding of the member device of message is finally received in diameter.The outgoing interface can connect external equipment.
Wherein, the outermost VLAN value in third encapsulated message be second member device on, it is next for connecting The VLAN value of the stacking opening of member device.Innermost layer VLAN value in third encapsulated message is the first VLAN value.Local first heap Folded mouth is connect with a member device upper in transmission path.For the networking shown in Fig. 4, it is assumed that the second member device is member device 2, then local first stacking opening is the stacking opening connecting on member device 2 with stacking opening 1 on member device 1.
Step 2: according to first the 2nd VLAN value that third encapsulated message includes, determine the second member device for Second stacking opening of next member device connection in transmission path.For the networking shown in Fig. 4, it is assumed that the second member device be at Member's equipment 2, then the second stacking opening is the stacking opening 2 connecting on member device 2 with stacking opening on member device 3.
Wherein, first the 2nd VLAN value refers to outermost 2nd VLAN value in third encapsulated message.
Step 3: deleting first the 2nd VLAN value that third encapsulated message includes, the 4th encapsulated message is obtained, by the 4th Encapsulated message is sent to next member device in transmission path by the second stacking opening, so that next member in transmission path Equipment transmits the 4th encapsulated message according to first the 2nd VLAN value in the 4th encapsulated message or the first VLAN value.
Wherein, if next member device in transmission path is the last one member device in transmission path, the 4th The first VLAN value is only included in encapsulated message, it, can be true according to the first VLAN value after which receives the 4th encapsulated message Interface is made, and deletes the first VLAN value in the 4th encapsulated message, obtains the first message, passes through the first report of outgoing interface forwarding Text.This process can be referring particularly to the related embodiment explanation that Fig. 3 is related to.
If next member device in transmission path is not the last one member device in transmission path, which is set It is standby that stacking opening can be determined according to the 2nd VLAN value outermost in the 4th encapsulated message, and delete outermost layer in the 4th encapsulated message The 2nd VLAN value, obtain the 5th encapsulated message, the 5th encapsulated message is transmitted to by stacking opening be connected with itself it is next Member device.
After each member device in subsequent transmission path receives encapsulated message, if the member device is not transmission path In the last one member device, can be according to the method described above according to VLAN value outermost in encapsulated message come transmitting message, directly To the outgoing interface by the last one member device in transmission path by message transmissions to external equipment.If the member device is The last one member device in transmission path, Message processing process can be referring particularly to the related embodiment explanations that Fig. 3 is related to.
It should be noted that in the scene that stack equipment includes more than two member devices, in stack equipment it is each at Member's equipment is respectively that each interface of itself configures one for identifying the VLAN value of interface, the involved in above-described embodiment One VLAN value and the 2nd VLAN value are the VLAN value for identifying interface.
When the stacking opening of member device is enabled, each member device respectively connects the stacking opening of itself with being used to identify itself The VLAN value binding of mouth.Correspondingly, if when certain member device deletes the stacking opening of itself, releases itself stacking opening and be used for Identify the binding relationship between the VLAN value of each interface of this member device.
It is illustrated below in conjunction with specific example, shown in Fig. 4, by taking stack equipment includes three member devices as an example, if at Link failure between member's equipment 1 and Downlink Switch, the chain between member device 2 and upstream switch and Downlink Switch The equal failure in road after member device 1 receives the message (by taking message 1 as an example) of upstream switch transmission, can lead in such a scenario It crosses stacking opening 1 and message 1 is sent to member device 2, then message 1 is sent to member device by stacking opening 2 by member device 2 3, then message is sent to Downlink Switch by member device 3.
The processing of service layer is not carried out after message 1 to message 1 in order to avoid member device 2 and member device 3 receive, The embodiment of the present application can transmit message 1 using following methods.
Firstly, each interface that member device 1, member device 2 and member device 3 are respectively itself is configured with for identifying The VLAN value of interface.In member device 1,2 enabled stacking openings 1 and member device 2,3 enabled stacking opening 2, member device 1 will be certainly The corresponding VLAN value of each interface of body and stacking opening 1 are bound, and member device 2 is by the corresponding VLAN value of each interface of itself and stacks Mouth 1 and stacking opening 2 are bound, and member device 3 binds the corresponding VLAN value of each interface of itself with stacking opening 2.And member device 1, the corresponding relationship being mutually synchronized between member device 2 and member device 3 between interface number, logic index value.And due to it is each at Member's equipment is identical according to the mode that interface number calculates VLAN value, therefore each member device can be calculated according to synchronous interface number and be removed The VLAN value of each interface in other member devices except this member device, therefore each member device can be determined except this member device Except other member devices " corresponding relationship between interface number-VLAN value or interface number-logic index value-VLAN value ".
In the case where stacking opening 1 and stacking opening 2 are enabled, if member device 1 receives the report of upstream switch transmission After text 1, however, it is determined that the outgoing interface that stack equipment sends message 1 is located at member device 3, then obtains and be located at going out for member device 3 The VLAN value 1 of interface binding, the VLAN value 2 bound with the stacking opening 2 of member device 2, and the stacking opening 1 with member device 1 The VLAN value 3 of binding obtains encapsulated message A then by VLAN value 1, VLAN value 2, the encapsulation of VLAN value 3 to the heading of message 1, The format of encapsulated message A is " [target MAC (Media Access Control) address] [source MAC] [VLAN value 3] [VLAN value 2] [VLAN value 1] [protocol class Type] [data portion] ".
Encapsulated message A can be transmitted to stacking opening according to the VLAN value 3 in encapsulated message A by the exchange chip of member device 1 1, and the VLAN value 3 in encapsulated message A is deleted, encapsulated message B is obtained, the format of encapsulated message B is " [target MAC (Media Access Control) address] [source MAC Address] [VLAN value 2] [VLAN value 1] [protocol type] [data portion] ".
Then encapsulated message B can be sent to member device 2, Cheng Yuanshe by stacking opening 1 by the exchange chip of member device 1 After standby 2 exchange chip receives encapsulated message B by stacking opening 1, it may be determined that include envelope in the VLAN value bound with stacking opening 1 The VLAN value 2 in message B is filled, and then determines 2 corresponding interface (i.e. stacking opening 2) of VLAN value, and delete in encapsulated message B VLAN value 2, obtains encapsulated message C, and the format of encapsulated message C is " [target MAC (Media Access Control) address] [source MAC] [VLAN value 1] [association Discuss type] [data portion] ".
Then encapsulated message C can be pass-through to member device 3, Cheng Yuanshe by stacking opening 2 by the exchange chip of member device 2 After standby 3 exchange chip receives encapsulated message C by stacking opening 2, it may be determined that include envelope in the VLAN value bound with stacking opening 2 The VLAN value 1 in message C is filled, and then determines that the corresponding outgoing interface of VLAN value 1 is the outgoing interface for being connected to Downlink Switch, is deleted VLAN value 1 in encapsulated message C can be obtained message 1, and message 1 be forwarded to downlink by the corresponding outgoing interface of VLAN value 1 and is handed over It changes planes.
In above-mentioned message transmission procedure, member device 2 and member device 3 carry out message by respective exchange chip Transmission, that is, related only to the transmission of hardware view, and member device 2 and member device 3 do not carry out service layer to message Processing, can be improved message transmissions efficiency.
Corresponding to above method embodiment, the embodiment of the present application also provides a kind of apparatus for forwarding message, sets applied to stacking The first member device in standby, stack equipment further includes the second member device being connect with the first member device by stacking opening, As shown in figure 5, the device includes: receiving module 501, obtains module 502, package module 503, transmission module 504.
Receiving module 501, for receiving the first message;
Obtain module 502, for when determine stack equipment send the first message outgoing interface be located at the second member device when, Obtain the 2nd VLAN value with the first VLAN value of outgoing interface binding and with stacking opening binding;
Package module 503, the first VLAN value and the 2nd VLAN value for will acquire the acquisition of module 502 are encapsulated to the first report The heading of text, obtains the first encapsulated message;
Transmission module 504, for will determine the heap for being used for transmission first encapsulated message according to the 2nd VLAN value Folded mouth;
Package module 503 is also used to delete the 2nd VLAN value that the first encapsulated message includes, obtains the second encapsulated message;
Transmission module 504 is also used to the second encapsulated message being sent to the second member device by stacking opening, so that second Member device determines outgoing interface by the first VLAN value, deletes the first VLAN value that the second encapsulated message includes, obtains the first report Text forwards the first message.
Optionally, device further include: configuration module.
Configuration module, for being respectively that each interface of this member device configures one for identifying the VLAN of interface Value.
Optionally, device further include: binding module.
Binding module is used for when enabled stacking opening, by stacking opening and each interface for being used to identify this member device The binding of VLAN value;And/or
When deleting stacking opening, tying up between stacking opening and the VLAN value of each interface for identifying this member device is released Determine relationship.
Optionally, module 502 is obtained, is specifically used for:
According to the corresponding relationship of the interface number of each interface of the second member device of storage and logic index value, obtains out and connect It is corresponding for identifying the first of outgoing interface to search target logic index value for the corresponding target logic index value of interface number of mouth VLAN value;
Determine on the first member device as in stacking opening or second member device as first stacking opening Target interface obtains the 2nd VLAN value for identifying target interface.
Corresponding to above method embodiment, the embodiment of the present application also provides another apparatus for forwarding message, is applied to stack The second member device in equipment, as shown in fig. 6, the device includes: receiving module 601, judgment module 602, removing module 603, transmission module 604.
Receiving module 601, for receiving the second encapsulated message by stacking opening, the second encapsulated message includes the first VLAN Value;
Judgment module 602, for judge with stacking opening binding VLAN value in whether include the first VLAN value;
Removing module 603, if the judging result for judgment module 602 be it is yes, determine to connect by the first VLAN value Mouthful, and the first VLAN value that the second encapsulated message includes is deleted, obtain the first message;
Transmission module 604, for forwarding the first message by outgoing interface.
Optionally, device further include: configuration module.
Configuration module, for being respectively that each interface of this member device configures one for identifying the VLAN value of interface.
Optionally, device further include: binding module.
Binding module is used for when enabled stacking opening, by stacking opening and the VLAN for being used to identify each interface of this member device Value binding;
When deleting stacking opening, the binding between stacking opening and VLAN value for identifying each interface of this member device is released Relationship.
In the case where stack equipment includes the scene of more than two member devices, the embodiment of the present application also provides another message and turns Transmitting apparatus, applied to the first member device in stack equipment, as shown in fig. 7, the device includes: receiving module 701, determines mould Block 702 obtains 703 package module 704 of module, sending module 705.
Receiving module 701, for receiving the first message;
Determining module 702, for when determine stack equipment send the first message outgoing interface be not located at this member device when, Determine the transmission path that the first message is sent to outgoing interface, transmission path includes the second member device successively passed through;
Module 703 is obtained, for obtaining with the first VLAN value of outgoing interface binding and sending message with each member device Stacking opening binding the 2nd VLAN value;
Package module 704, for encapsulating the first VLAN value and each 2nd VLAN value according to transmission path to the first message Heading, obtain the first encapsulated message;
Determining module 702 is also used to determine that the first member sets according to first the 2nd VLAN value in the first encapsulated message It is ready for use on the first stacking opening connecting with first the second member device in transmission path;
Package module 704 is also used to delete first the 2nd VLAN value that the first encapsulated message includes, obtains the second encapsulation Message;
Sending module 705, for the second encapsulated message to be sent to first the second member device by the first stacking opening.
In the case where stack equipment includes the scene of more than two member devices, the embodiment of the present application also provides another message and turns Transmitting apparatus, applied to the second member device in stack equipment, it is described as shown in figure 8, the device include: receiving module 801, really Cover half block 802, package module 803 and sending module 804.
Receiving module 801, for receiving third encapsulated message by local first stacking opening, third encapsulated message includes the The 2nd VLAN value that one VLAN value and the stacking opening for sending message with member device each in transmission path are bound, the first VLAN value It is bound with the outgoing interface for the member device for finally receiving message in transmission path;
Determining module 802, first the 2nd VLAN value for including according to third encapsulated message, determines that the second member sets It is ready for use on the second stacking opening connecting with member device next in transmission path;
Package module 803, first the 2nd VLAN value for including for deleting third encapsulated message obtain the 4th encapsulation report Text;
Sending module 804, for by the 4th encapsulated message by the second stacking opening be sent in transmission path it is next at Member's equipment, so that next member device in transmission path is according to first the 2nd VLAN value or first in the 4th encapsulated message VLAN value transmits the 4th encapsulated message.
The embodiment of the present application also provides a kind of electronic equipment, which can be the first one-tenth in above-described embodiment Member's equipment or the second member device, as shown in figure 9, including processor 901, communication interface 902, memory 903 and communication bus 904, wherein processor 901, communication interface 902, memory 903 complete mutual communication by communication bus 904,
Memory 903, for storing computer program;
Processor 901 when for executing the program stored on memory 903, is realized in above method embodiment by the The step of one member device or the second member device execute.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
In another embodiment provided by the present application, a kind of computer readable storage medium is additionally provided, which can It reads to be stored with computer program in storage medium, the computer program realizes any of the above-described message forwarding when being executed by processor The step of method.
In another embodiment provided by the present application, a kind of computer program product comprising instruction is additionally provided, when it When running on computers, so that computer executes any message forwarding method in above-described embodiment.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or It partly generates according to process or function described in the embodiment of the present application.The computer can be general purpose computer, dedicated meter Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk Solid State Disk (SSD)) etc..
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The foregoing is merely the preferred embodiments of the application, are not intended to limit the protection scope of the application.It is all Any modification, equivalent replacement, improvement and so within spirit herein and principle are all contained in the protection scope of the application It is interior.

Claims (13)

1. a kind of message forwarding method, which is characterized in that applied to the first member device in stack equipment, the stack equipment It further include the second member device being connect with first member device by stacking opening, which comprises
First member device receives the first message, when determining that the stack equipment sends the outgoing interface position of first message When second member device, the with the first VLAN value of outgoing interface binding and with stacking opening binding is obtained Two VLAN values, and the first VLAN value and the 2nd VLAN value are encapsulated to the heading of first message, obtain One encapsulated message;
According to the 2nd VLAN value, the stacking opening for being used for transmission first encapsulated message is determined;
The 2nd VLAN value that first encapsulated message includes is deleted, the second encapsulated message is obtained, by second encapsulated message It is sent to second member device by the stacking opening, so that second member device is true by the first VLAN value The fixed outgoing interface deletes the first VLAN value that second encapsulated message includes, obtains first message, forwards institute State the first message.
2. a kind of message forwarding method, which is characterized in that applied to the first member device in stack equipment, the method packet It includes:
The first message is received, when determining that the stack equipment sends the outgoing interface of first message and be not located at this member device When, it determines and first message is sent to the transmission path of the outgoing interface, the transmission path includes the successively passed through Two member devices;
Obtain the of the stacking opening binding that message is sent with the first VLAN value of outgoing interface binding and with each member device Two VLAN values, and the first VLAN value and each 2nd VLAN value are encapsulated according to transmission path to the message of first message Head obtains the first encapsulated message;
According to first the 2nd VLAN value in first encapsulated message, determine that first member device is used for and the biography First stacking opening of first the second member device connection in defeated path;
First the 2nd VLAN value that first encapsulated message includes is deleted, the second encapsulated message is obtained, by second envelope It fills message and first second member device is sent to by first stacking opening.
3. method according to claim 1 or 2, which is characterized in that the method also includes:
First member device is respectively that each interface of itself configures one for identifying the VLAN value of interface.
4. method according to claim 1 or 2, which is characterized in that the method also includes:
When enabling the stacking opening of this member device, the stacking opening of described member device is set with being used to identify described member The VLAN value of standby each interface is bound;And/or
When deleting the stacking opening of described member device, the stacking opening of described member device is released and for identifying described Binding relationship between the VLAN value of each interface of member device.
5. according to the method described in claim 4, it is characterized in that, the first VLAN value and the 2nd VLAN value pass through it is following Mode obtains:
According to the corresponding relationship of the interface number of each interface of second member device of storage and logic index value, described in acquisition The corresponding target logic index value of the interface number of outgoing interface, search the target logic index value it is corresponding for identify it is described go out First VLAN value of interface;
It determines and is stacked as in the stacking opening or second member device as described first on first member device The target interface of mouth, obtains the 2nd VLAN value for identifying the target interface.
6. a kind of message forwarding method, which is characterized in that applied to the second member device in stack equipment, the method packet It includes:
The second encapsulated message is received by the stacking opening, second encapsulated message includes the first VLAN value;
It whether include the first VLAN value in judgement and the VLAN value of stacking opening binding;
If so, determining outgoing interface by the first VLAN value, and delete second encapsulated message includes described first VLAN value obtains the first message;
First message is forwarded by the outgoing interface.
7. a kind of message forwarding method, which is characterized in that applied to the second member device in stack equipment, the method packet It includes:
Receive third encapsulated message by local first stacking opening, the third encapsulated message include the first VLAN value and with biography Each member device sends the 2nd VLAN value of the stacking opening binding of message in defeated path, in the first VLAN value and transmission path Finally receive the outgoing interface binding of the member device of message;
According to first the 2nd VLAN value that the third encapsulated message includes, determine that second member device is used for and transmission Second stacking opening of next member device connection in path;
First the 2nd VLAN value that the third encapsulated message includes is deleted, the 4th encapsulated message is obtained, by the 4th envelope It fills message and next member device in the transmission path is sent to by second stacking opening, so that in the transmission path Next member device according to first the 2nd VLAN value in the 4th encapsulated message or the first VLAN value transmission the described 4th Encapsulated message.
8. method according to claim 6 or 7, which is characterized in that the method also includes:
Second member device is respectively that each interface of itself configures one for identifying the VLAN value of interface.
9. method according to claim 6 or 7, which is characterized in that the method also includes:
When enabling the stacking opening of this member device, the stacking opening of described member device is set with being used to identify described member The VLAN value of standby each interface is bound;
When deleting the stacking opening of described member device, the stacking opening of described member device is released and for identifying described Binding relationship between the VLAN value of each interface of member device.
10. a kind of apparatus for forwarding message, which is characterized in that applied to the first member device in stack equipment, the stacking is set Standby further includes the second member device being connect with the first member device by stacking opening, and described device includes:
Receiving module, for receiving the first message;
Module is obtained, the outgoing interface for sending first message when the determining stack equipment is located at second member and sets When standby, the 2nd VLAN value with the first VLAN value of outgoing interface binding and with stacking opening binding is obtained;
Package module, the first VLAN value and the 2nd VLAN value for obtaining the acquisition module are encapsulated to described The heading of first message obtains the first encapsulated message;
Transmission module, for determining the stacking opening for being used for transmission first encapsulated message according to the 2nd VLAN value;
The package module is also used to delete the 2nd VLAN value that first encapsulated message includes, obtains the second encapsulated message;
The transmission module is also used to second encapsulated message being sent to the second member device by the stacking opening, with Second member device is set to determine the outgoing interface by the first VLAN value, deleting second encapsulated message includes The first VLAN value obtains first message, forwards first message.
11. a kind of apparatus for forwarding message, which is characterized in that applied to the second member device in stack equipment, described device packet It includes:
Receiving module, for receiving the second encapsulated message by the stacking opening, second encapsulated message includes the first VLAN Value;
Judgment module, for judge with the stacking opening binding VLAN value in whether include the first VLAN value;
Removing module, if the judging result for the judgment module be it is yes, outgoing interface is determined by the first VLAN value, And the first VLAN value that second encapsulated message includes is deleted, obtain the first message;
Transmission module, for forwarding first message by the outgoing interface.
12. a kind of apparatus for forwarding message, which is characterized in that applied to the first member device in stack equipment, described device packet It includes:
Receiving module, for receiving the first message;
Determining module, for being not located at this member device when the outgoing interface for determining that the stack equipment sends first message When, it determines and first message is sent to the transmission path of the outgoing interface, the transmission path includes the successively passed through Two member devices;
Module is obtained, for obtaining the heap for sending message with the first VLAN value of outgoing interface binding and with each member device 2nd VLAN value of folded mouth binding;
Package module, for encapsulating the first VLAN value and each 2nd VLAN value according to transmission path to first message Heading, obtain the first encapsulated message;
The determining module is also used to determine described first according to first the 2nd VLAN value in first encapsulated message Member device is used for the first stacking opening connecting with first the second member device in the transmission path;
The package module is also used to delete first the 2nd VLAN value that first encapsulated message includes, obtains the second envelope Fill message;
Sending module is set for second encapsulated message to be sent to first the second member by first stacking opening It is standby.
13. a kind of apparatus for forwarding message, which is characterized in that applied to the second member device in stack equipment, described device packet It includes:
Receiving module, for receiving third encapsulated message by local first stacking opening, the third encapsulated message includes first The 2nd VLAN value that VLAN value and the stacking opening for sending message with member device each in transmission path are bound, the first VLAN The outgoing interface that the member device of message is finally received in value and transmission path is bound;
Determining module, first the 2nd VLAN value for including according to the third encapsulated message, determines second member Equipment is used for the second stacking opening connecting with member device next in transmission path;
Package module, first the 2nd VLAN value for including for deleting the third encapsulated message, obtains the 4th encapsulated message;
Sending module, under being sent to the 4th encapsulated message in the transmission path by second stacking opening One member device, so that next member device in the transmission path is according to first second in the 4th encapsulated message VLAN value or the first VLAN value transmit the 4th encapsulated message.
CN201811442790.3A 2018-11-29 2018-11-29 Message forwarding method and device Active CN109587027B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811442790.3A CN109587027B (en) 2018-11-29 2018-11-29 Message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811442790.3A CN109587027B (en) 2018-11-29 2018-11-29 Message forwarding method and device

Publications (2)

Publication Number Publication Date
CN109587027A true CN109587027A (en) 2019-04-05
CN109587027B CN109587027B (en) 2021-05-25

Family

ID=65925250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811442790.3A Active CN109587027B (en) 2018-11-29 2018-11-29 Message forwarding method and device

Country Status (1)

Country Link
CN (1) CN109587027B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6934292B1 (en) * 1999-11-09 2005-08-23 Intel Corporation Method and system for emulating a single router in a switch stack
US7093027B1 (en) * 2002-07-23 2006-08-15 Atrica Israel Ltd. Fast connection protection in a virtual local area network based stack environment
CN1866919A (en) * 2005-12-06 2006-11-22 华为技术有限公司 Service switching method based on VLAN stack
CN1925456A (en) * 2005-09-01 2007-03-07 中兴通讯股份有限公司 System and method for realizing multi-service stack virtual local area network and method of use thereof
CN103581274A (en) * 2012-08-09 2014-02-12 杭州华三通信技术有限公司 Message forwarding method and device in stacking system
CN106850385A (en) * 2017-01-18 2017-06-13 盛科网络(苏州)有限公司 The synchronous detection method of two-layer retransmitting table and device in pile system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6934292B1 (en) * 1999-11-09 2005-08-23 Intel Corporation Method and system for emulating a single router in a switch stack
US7093027B1 (en) * 2002-07-23 2006-08-15 Atrica Israel Ltd. Fast connection protection in a virtual local area network based stack environment
CN1925456A (en) * 2005-09-01 2007-03-07 中兴通讯股份有限公司 System and method for realizing multi-service stack virtual local area network and method of use thereof
CN1866919A (en) * 2005-12-06 2006-11-22 华为技术有限公司 Service switching method based on VLAN stack
CN103581274A (en) * 2012-08-09 2014-02-12 杭州华三通信技术有限公司 Message forwarding method and device in stacking system
CN106850385A (en) * 2017-01-18 2017-06-13 盛科网络(苏州)有限公司 The synchronous detection method of two-layer retransmitting table and device in pile system

Also Published As

Publication number Publication date
CN109587027B (en) 2021-05-25

Similar Documents

Publication Publication Date Title
EP3154227B1 (en) Packet transmission method, node, path management server and storage medium
KR101492510B1 (en) Multiple delivery route packet ordering
CN105765926A (en) Configurable service proxy mapping
CN102546383A (en) Methods and apparatus for standard protocol validation mechanisms deployed over a switch fabric system
CN104717150A (en) Exchange device and packet loss method
CN105162732B (en) Create the method, apparatus of ECP Extended Capabilities Port
CN110061923A (en) Flow control methods, device, interchanger, transmitting terminal server and medium
CN109412922B (en) Method, forwarding device, controller and system for transmitting message
CN109218200A (en) A kind of message processing method and device
CN109688058A (en) Message processing method, device and the network equipment
CN106559302A (en) Single tunnel method for building up, device and system
CN105530193B (en) Determine method, the network equipment and the system of tunnel maximum transmission unit
CN109617995A (en) To management system, method and the electronic equipment of tenant's cluster VPC internal container
CN105308904A (en) Oam packet processing method, network device and network system
CN106330779A (en) Server, physical switch, and communication system
CN109510690A (en) Method, networking component and the computer readable storage medium of transmitting message
CN103840976A (en) Communication method, optical module and network device
CN105324961B (en) Gre tunneling implementation method, access point and gateway
CN104579973B (en) Message forwarding method and device in a kind of Virtual Cluster
CN105871512B (en) A kind of data transmission method and device
CN110233779A (en) Test method, test macro and computer readable storage medium
CN105763375A (en) Data packet transmission method, receiving method and microwave station
CN104753790B (en) A kind of message transmitting method and equipment based on TRILL network
CN108718275A (en) Message forwarding method and device
CN109587027A (en) A kind of message forwarding method and device

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
GR01 Patent grant
GR01 Patent grant