The method for designing of stacking Ethernet devices system
(1) technical field
The present invention relates to data communication field, be specifically related to ethernet device, especially have the function of piling up ethernet device.
(2) background technology
Along with development of Ethernet technology, Ethernet has been widely used in enterprise network, and has occupied most of enterprise network market.Ethernet device has also obtained develop rapidly and extensive use thereupon.
Because the port number and the forwarding bandwidth of every ethernet device are limited, in order to set up, just need to use many ethernet devices, so that the bigger network bandwidth and the more network port to be provided than macroreticular.The Extended Capabilities Port of main flow and the method for bandwidth have two kinds now: 1) ethernet device cascade.2) stacking Ethernet devices.
Since the stacking Ethernet devices system simplification network topology structure, have simultaneously and manage advantage simply and easily, therefore obtained using widely.Pile up is exactly that many ethernet devices are coupled together, regard them as a management object, the webmaster personnel only need pass through a management ip address, just can carry out unified management to all ethernet devices in the pile system, therefore make things convenient for network management, saved network administration cost simultaneously.
Pile up and comprise dual mode: daisy chain pattern and Star Schema.
The star-like pattern of piling up is a kind of senior pattern of piling up, and needs an independent high speed switching center as piling up the center, other each stackable unit all by pile up link directly with pile up the center and be connected, thereby formed a hub-and-spoke configuration.Pile up under the pattern star-like, each message is transmitted in this pile system at most only need be through 3 equipment, thereby the time-delay of message is less.When simultaneously some stackable unit break down, can communicate by letter between other stackable unit in the same old way, therefore can not break down and cause the whole systemic breakdown that piles up because of a stackable unit.Its shortcoming is exactly that its system cost increases greatly owing to need an extra high speed switching center.
It is exactly with ethernet device stringing together one by one that daisy chain is piled up pattern, and per two adjacent stackable unit connect by piling up link, finally form a circulus.At a ring-type pile system, each stackable unit has two stack ports, connects two adjacent with it stackable unit respectively.For full gigabit Ethernet stackable unit, use two 10GE ports as these two stack ports usually, so that the bigger bandwidth of piling up to be provided.It is the technology of piling up that a class is simplified that daisy chain type piles up, and does not need other optional equipments, just can realize piling up, and has saved system cost.Its circulus also provides redundancy to a certain degree simultaneously.
In the pile system of daisy chain pattern message forwarding is typically used FAST (Flexible Advanced Stacking Technology) technology now.
The FAST technology adopts SPF (Shortest Path Forwarding) algorithm message to be striden the forwarding of stackable unit.Utilize the SPF algorithm computation to go out the shortest path that arrives the purpose stackable unit from the source stackable unit, along this paths message is forwarded to the purpose stackable unit from the source stackable unit then.As Fig. 1, owing to adopted the SPF technology, the message forwarding strategy in the stackable unit 0 is: the message that arrives stackable unit 1,2 is transmitted along the 0-1-2 direction; The message that arrives stackable unit 3,4 is transmitted along the 0-4-3 direction.Message forwarding strategy in the stackable unit 2 is: the message that arrives stackable unit 0,1 is transmitted along the 2-1-0 direction; The message that arrives stackable unit 3,4 is transmitted along the 2-3-4 direction.The forwarding strategy of other stackable unit by that analogy.
In the pile system that uses the FAST technology, when piling up the link somewhere when breaking down, each stackable unit just need be made corresponding change to the message forwarding strategy.As Fig. 1, when between stackable unit 1 and the stackable unit 2 pile up link occurs fault the time, the forwarding situation of stackable unit 0 is changed into: the message that arrives stackable unit 1 is transmitted along the 0-1 direction; The message that arrives stackable unit 2,3,4 is transmitted along the 0-4-3-2 direction.In like manner, other stackable unit also need to make corresponding change to message forwarding.
This technology has the less advantage of message forward delay, but following shortcoming is also arranged: 1) message between certain two stackable unit is transmitted and can only be passed through a nearest paths, even an other paths has idle bandwidth to use.2) link occurs fault is piled up in the somewhere in pile system, can influence the forwarding strategy of all stackable unit.
Link aggregation is based on the IEEE802.3ad standard techniques, and it aggregates into a logical links with many physical links, thereby a link that bandwidth is bigger is provided.Link aggregation has improved link-attached stability, when the part physical link in the logical links breaks down, can not cause the whole piece logical links unavailable.
Usually we are by Hash mapping, and the physics in logical links piles up realizes load balancing between link.Its concrete grammar is: according to some information and the hash algorithm in the message, calculate a cryptographic Hash, pick out a physical link according to this cryptographic Hash in logical links then, therefore message link forwarding has from then on then realized that flow is distributed to each physical link equably on the network.The cryptographic Hash of all messages of same stream should be the same simultaneously, thereby can be mapped on same the physical link, has prevented the wrong suitable problem of message in same the stream.
(3) summary of the invention
In view of this, main purpose of the present invention is to provide the method for designing of a cover stacking Ethernet devices system, can limit the coverage of piling up link failure, and that realizes piling up link failure switches protection fast.
Specific term is explained
The network port: the port that connects other network equipments outside the pile system.Other network equipments comprise switch, HUB, PC etc.
Left side stack port: if from then on message routing direction in stacked rings of sending of stack port is a clockwise direction, the left stack port of stackable unit under this stack port just is called so.
Right stack port: if from then on the message that sends of stack port in stacked rings routing direction for counterclockwise, the right stack port of stackable unit under this stack port just is called so.
Stackable unit: one in the pile system can be piled up ethernet device and be called a stackable unit.
Cryptographic Hash computing module: the module of being responsible for the cryptographic Hash of calculating message in the stackable unit.With the information in the heading is parameter, uses hash algorithm, calculates the cryptographic Hash of this message.
Other processing modules: other modules in the stackable unit except piling up processing module and cryptographic Hash computing module, this module are responsible for according to information in the message and the configuration in the equipment message being transmitted and being edited.
Pile up processing module: be used to handle the message that receives from stacked rings, processing capacity comprises the information of extracting in the stacked heads, separating piled head and original message.Be responsible for to handle the message that mails to stacked rings simultaneously, processing capacity comprises selects physics to pile up outbound port, and the encapsulation stacking head also inserts original message with stacked heads.
Stacked heads: be inserted in a privately owned heading in the original message, carry pile system and handle the needed information of message.Mail in the message of stack port and must have stacked heads, and the message that mails to the network port can not have stacked heads.
Cryptographic Hash a: territory that is used for carrying cryptographic Hash in the stacked heads.It is used for the cryptographic Hash of message in current stackable unit passed to next stackable unit.
Sign rebounds: the territory that fault message is piled up in reflection in the stacked heads.If all stack ports on a certain direction of a stackable unit all break down, then from then on the sign that rebounds in the stacked heads of the message that sends of the another one direction stack port of stackable unit is set to 1, otherwise is set to 0.
Destination address: the link layer destination address of Ethernet message (MAC Destination Address).
Source address: the link layer source address of Ethernet message (MAC Source Address).
Load: all message parts of source address MAC back all belong to so-called load herein, and here the Type/Length field of Ethernet message is also included among the load with the Vlan Tag that may exist.
To achieve these goals, the invention provides the method for designing of a kind of stacking Ethernet devices system, may further comprise the steps:
Adopt the method for link aggregation,, comprise all left stack ports and right stack port, be polymerized to one and pile up aggregation group all stack ports in the stackable unit.A plurality of stackable unit connect by piling up link, form a ring-type pile system.Wherein, the method for described link aggregation may further comprise the steps:
1) the port attribute table is set and piles up the port mapping table of aggregation group in described ethernet device.Describe the port association attributes in the described port attribute table, mainly be the aggregation group ID (Trunk ID) under the configured port herein, and this is mainly used in the study from the message of aggregation group.Described port mapping table is made up of the port mapping clauses and subclauses, disposes a physics stack port that joins in the aggregation group in each bar port mapping clauses and subclauses.The physics stack port that all join in the aggregation group all must be configured in mapping table.
2) computational methods of cryptographic Hash and the cryptographic Hash mapping method to mapping number is set in described ethernet device.The computational methods of described cryptographic Hash comprise to be selected hash algorithm and selects which information in the message to participate in calculating.The general link destination address (MAC Destination Address) that adopts, link source address (MAC Source Address), network destination address (IP Destination Address) and network source address (IP Source Address) participate in Hash calculation.Guarantee that so same stream maps out same cryptographic Hash, and then map out same outbound port.The quantity of described mapping number must equate with the number of entries in the described port mapping table, and the scope of cryptographic Hash can not be littler than the scope of mapping number, is 0~(2^32-1) such as the scope of cryptographic Hash, and the scope of mapping number is 0~(2^8-1).Cryptographic Hash to the mapping number mapping generally can adopt: the mapping number=cryptographic Hash % mapping quantity.
Described pile system is under trouble-free situation, and the relevant configuration of piling up of each stackable unit in the pile system must be consistent.The consistent meaning is: the direction of the outbound port that mapping is come out in every equipment of same cryptographic Hash in pile system should be the same.Could guarantee that like this message is forwarded to the purpose stackable unit along same direction from the source stackable unit.The simplest method that is consistent is: use the mapping method of same cryptographic Hash to mapping number in each stackable unit, the configuration of port mapping table is identical simultaneously.
In described pile system, message forwarding may further comprise the steps:
If the described message of A receives from the network port,, use hash algorithm to calculate the cryptographic Hash of message then according to the information in the message;
If the described message of B receives from stack port, then separate the stacked heads and the original message of message, extract rebound sign and cryptographic Hash in the stacked heads;
C finds out the purpose of message according to the configuration in information in the described message and the described ethernet device, and the message purpose comprises local port and piles up two kinds of aggregation group;
If the purpose of the described message of D is for piling up aggregation group, then according to mapping of cryptographic Hash mapping of message number, number be index finds correspondence in piling up the port mapping table of aggregation group stack port with mapping then, this port is the message outbound port;
E decision abandons described message or message is forwarded from outbound port, if do not abandon this message, and encapsulation stacking head then, and stacked heads inserted message, at last message is forwarded from outbound port.
Described E step comprises following substep:
If F searches the failure of message outbound port in the step D, promptly do not find outbound port, then abandon this message, otherwise enter step G;
If the described message of G is from stack port, and the message outbound port is same direction stack port with source port, then enters step H, otherwise enters step I;
Be masked as 1 if H rebounds, then abandon this message, be masked as 1 otherwise newly rebounding of message is set, and enter step J;
If the described message of I is from the network port, and a certain direction stack port all breaks down in the described ethernet device, then being provided with newly rebounds is masked as 1, is masked as 0 otherwise be provided with newly to rebound, and enters step J then;
J is encapsulated into message cryptographic Hash and newly the rebound sign of described message in current stackable unit in the stacked heads, then stacked heads is inserted in the original message, at last message is sent from outbound port.
Described stacked heads is a heading of manufacturer oneself definition, is used for transmitting process information between the different stackable unit of pile system, because stackable unit when handling message, may need according to the result of previous stackable unit to this message.At least comprise cryptographic Hash in the stacked heads and rebound two territories of sign.
When certain stack port in the described ethernet device breaks down, this stack port corresponding clauses and subclauses in piling up the port mapping table of aggregation group will be moved out of, and message no longer from then on stack port sends.When the fault stack port is recovered, these port corresponding mapping table clauses and subclauses can be added in the port mapping table again.
Described stacking Ethernet devices system is a circulus, is daisy chain pattern pile system.
The described aggregation group of piling up follows the difference of common aggregation group to be: it is not with unique aggregation group connection in addition, but all left stack ports wherein follow the right stack port of an adjacent stacks unit to connect, and all right stack ports connect with the left stack port of another one adjacent stacks unit.Pile up aggregation group simultaneously and do not carry out the source port inhibition, can forward from the stack port of another one direction, perhaps rebound from the stack port identical with receiving the stack port direction to guarantee the message of receiving from the stack port of a direction.
Technical scheme of the present invention is with the main distinction of prior art: all left stack ports in the ethernet device and right stack port are polymerized to an aggregation group.In the circulus pile system, the network traffics that mail to other stackable unit from certain stackable unit can a part be transmitted from left stack port, and a part is transmitted from right stack port in addition.When certain stack port breaks down, stack port is shifted out pile up aggregation group immediately, other stackable unit do not need this event of failure of perception, just can realize simply, error protection fast.
The invention has the beneficial effects as follows:
The present invention has obvious effects to the error protection of piling up in the stacking Ethernet devices system.The present invention is limited in the fault effects in the pile system in two adjacent stackable unit scopes of fault, and can be because of all stackable unit in place's fault effects pile system.Only need adjacent two stackable unit of fault to upgrade configuration because recover fault simultaneously, institute is so that fault recovery gets faster.
(5) description of drawings
Fig. 1 is a circulus pile system schematic diagram.
Fig. 2 is the system schematic of stacking Ethernet devices system implementation provided by the invention.
Fig. 3 is the inner forwarding logic figure of ethernet device provided by the invention.
Fig. 4 is that the flow chart that processing module is handled message is piled up in ethernet device provided by the invention inside.
Fig. 5 is the inner schematic diagram that finds out port with cryptographic Hash in port mapping table of ethernet device provided by the invention.
Fig. 6 a is common Ethernet message schematic diagram.
Fig. 6 b is a stacked heads schematic diagram provided by the invention.
Fig. 6 c is the message schematic diagram that has stacked heads provided by the invention.
Label declaration:
Internal module 2, left stack port 21, right stack port 22, the network port 23, cryptographic Hash computing module 24, other processing modules 25 that forwarding capability is relevant in the stackable unit, pile up processing module 26;
The territory 3 of packet,
Stacked heads 31, destination address 32, source address 33, load 34;
Cryptographic Hash 311, source unit numbers 312, the sign 313 that rebounds, recoil unit numbers 314;
Handle each step 4 of message in the stack module.
(5) embodiment
Describe the specific embodiment of the present invention in detail below in conjunction with accompanying drawing.
Fig. 2 shows one embodiment of the present of invention.This embodiment is a pile system provided by the invention, and pile system is made up of the stackable unit more than 2 and 2.Each stackable unit has left stack port, the right stack port and the network port.The adjacent stacks unit connects by piling up link, forms a circulus pile system.The present invention does not limit stack port speed, in gigabit Ethernet equipment, recommends to use the port greater than 1G speed, and stack port is divided into left stack port and right stack port, and the quantity of left and right sides stack port is unrestricted.
In this embodiment, utilize the link aggregation technology, all left stack ports and right stack port are polymerized to an aggregation group, and we are called and pile up aggregation group.What but the link aggregation technology of the standard of following was different is that one is piled up aggregation group is not directly to link to each other with the another one aggregation group by a logical links.In the present invention, a left stack port of piling up in the aggregation group is connected with the right stack port of an adjacent stacks unit, and right stack port is connected with the left stack port of another one adjacent stacks unit.But be based on the link aggregation technology, same all stack ports of piling up in the aggregation group are counted as same logic port, and message is realized the load balancing of network traffics between left stack port and right stack port according to Hash mapping.
In this embodiment, the computational methods of cryptographic Hash: the part field with heading is a parameter, such as the network address (IP Address) of the link address (MAC Address) and the heading of heading, calculates according to hash algorithm.Hash algorithm is producer to select according to actual conditions oneself.
In this embodiment, if the pile system fault-free, then the stack arrangement of each stackable unit in the pile system must be consistent, to guarantee that message is forwarded to the destination along same direction in stacked rings.In order to satisfy above-mentioned requirements, the simplest way is: each stackable unit adopts the mapping method of same cryptographic Hash to mapping number, and the port mapping table configuration of piling up aggregation group simultaneously is the same.
In this embodiment, cryptographic Hash to the mapping number method generally can adopt: the mapping number=cryptographic Hash % mapping quantity.
In this embodiment, the port mapping table that piles up aggregation group has disposed the mapping relations from mapping number to port.Such as in table 1, port 28 is left stack port, and port 29 is right stack port, and two ports are polymerized to one and pile up aggregation group, and table 1 has been described the configuration of the port mapping table that piles up aggregation group.
The mapping number |
Port |
0 |
28 |
1 |
29 |
(table 1)
Fig. 3 is the internal logic figure of the forwarding capability of ethernet device provided by the invention.Mainly comprise the network port 23, left stack port 21, right stack port 22, Hash calculation module 24, other processing modules 25 and pile up processing module 26.
The message that receives from the network port is sent to the Hash calculation module, and Hash calculation module message for this reason calculates the message cryptographic Hash, then message and cryptographic Hash information is delivered to other processing modules.Other processing modules can be according to information in the message and the configuration in the ethernet device, and the purpose of searching message if necessary, can be edited message.For Layer 2 switch, the function of other processing modules can be with reference to IEEE 802.1Q standard.The purpose of the message that other processing modules find out is if the network port on this stackable unit then forwards from the network port, if purpose for piling up aggregation group, is then together delivered to message and cryptographic Hash and piled up processing module.Pile up processing module according to the message cryptographic Hash, in port mapping table, find out port.Its concrete processing procedure is with reference to the explanation of subsequent figures 4.
Fig. 4 shows and piles up the flow process that processing module is handled message.At first enter step 401, judge that message is from stack port or from other processing modules.If from other processing modules, then enter step 403, otherwise enter step 402.
In step 402, extract the information in the stacked heads, comprise cryptographic Hash and the sign that rebounds.Separating piled head and original message, and the stacked heads information and the original message that extract delivered to other processing modules together, continue to handle by other processing modules.
In step 403, the cryptographic Hash of message is mapped out a mapping number, go out corresponding stack port with this mapping index number in piling up the port mapping table of aggregation group again, this port is outbound port.If port mapping table is empty, illustrate that then the neither one stack port adds aggregation group, all stack ports all break down, and promptly find out the port failure.
Then enter step 404, judge in 403 steps, whether to find outbound port,, then enter step 408,, otherwise enter step 405 this packet loss if do not find.
In step 405, judge whether the source port of message is stack port, if stack port, and to follow the outbound port of being found out by step 403 be the stack port of same direction, then enters step 406, otherwise enter step 407.
In step 406, judge whether the flag information that rebounds in the stacked heads of following message is 1, if be 1, then enter step 408, with this packet loss, otherwise enter 409.
In step 407, judge whether the source port of message is the network port, if network, and the stack port of some directions of this stackable unit all breaks down, and then enters step 409, otherwise enters 410.
In step 409, being provided with newly rebounds is masked as 1, enters step 411 then.
In step 410, being provided with newly rebounds is masked as 0, enters step 411 then.
In step 411, encapsulate new stacked heads, the cryptographic Hash of message in current stackable unit is filled up in the Hash territory in this stacked heads, indicate in the mark domain of rebounding that is filled up in this stacked heads newly rebounding, then stacked heads is inserted in the original message, the outbound port that this message is found from step 403 sends at last.
Fig. 5 shows the process that finds out port by cryptographic Hash in port mapping table.At first cryptographic Hash need be mapped as one the mapping number.Because the scope of the cryptographic Hash scope than mapping number usually is big, so cryptographic Hash number be many-to-one mapping to mapping, general mapping method is: shine upon number=cryptographic Hash % mapping quantity.Number be index with mapping again, find corresponding map entry in port mapping table, read the wherein port of configuration then, this port is the message outbound port.
Fig. 6 a shows the common message format that transmits on Ethernet, comprise link destination address (MAC DA) (32), link source address (MAC SA) (33) and load (34).The Type/Length field of Ethernet message and the Vlan Tag that may exist are included in the load the inside.
Fig. 6 b shows the form (31) of stacked heads, comprising Hash codomain (311), and the mark domain of rebounding (312) and other territories.
Fig. 6 c shows the form of the message that is added with stacked heads, and the form of the message of transmitting on stacked rings all is this type of form.Stacked heads is inserted into the front of common message.