CN115118682A - Method and device for communication between stacking switch and external equipment - Google Patents

Method and device for communication between stacking switch and external equipment Download PDF

Info

Publication number
CN115118682A
CN115118682A CN202210632641.3A CN202210632641A CN115118682A CN 115118682 A CN115118682 A CN 115118682A CN 202210632641 A CN202210632641 A CN 202210632641A CN 115118682 A CN115118682 A CN 115118682A
Authority
CN
China
Prior art keywords
switch
switches
stacking
equipment
stack
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210632641.3A
Other languages
Chinese (zh)
Inventor
刘晓帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Huaxin Chang'an Network Technology Co ltd
Original Assignee
Shanghai Huaxin Chang'an Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Huaxin Chang'an Network Technology Co ltd filed Critical Shanghai Huaxin Chang'an Network Technology Co ltd
Priority to CN202210632641.3A priority Critical patent/CN115118682A/en
Publication of CN115118682A publication Critical patent/CN115118682A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/15Interconnection of switching modules

Abstract

The invention provides a method and a device for communication between a stack switch and external equipment, wherein the method comprises the following steps: the stacking switches are composed of a plurality of switches, a main switch is selected from the interior of each stacking switch, and the rest switches are slave switches; the administrator packages a private network layer for all the switches; connecting the external equipment with any switch in the stacking system through a network cable; the peripheral device communicates with the stack switch. In this way, the management structure and the synchronization step inside the stack switch are optimized, each member switch can perform its own function, the management flow is centrally managed by the main switch, the management complexity is simplified, and the waste of resources is reduced.

Description

Method and device for communication between stacking switch and external equipment
Technical Field
The embodiment of the invention relates to the field of network communication, in particular to a method and a device for communication between a stack switch and external equipment.
Background
The stacking technique aims to provide a network device with high reliability, large data traffic forwarding and high port density. A plurality of switches supporting the stacking characteristic are combined together to logically form a switch device, so that high network reliability and large network data volume forwarding are realized, the number of ports is increased, and network management is simplified.
The stack switches are generally divided into master switches, which are responsible for managing the entire stack switch system and forwarding, and slave switches, which are responsible for forwarding only. If the flow is delivered to a slave switch for processing, in order to realize the characteristics of the stack switch, that is, a plurality of switches are logically one switch, the processing results of the slave switch need to be sequentially synchronized to the rest switches in the stack system.
Such as the patent: "traffic forwarding method and apparatus in stack apparatus (CN 200910158254.5)": the method is applied to a stacking device comprising a plurality of member devices, and comprises the following steps: the member equipment acquires the forwarding table specification of each member equipment in the stacking equipment; when other member devices with forwarding table item specifications exceeding the self forwarding table item specification exist in the stacking device, the member device acquires the member device with the maximum forwarding table item specification as an agent device; and the member equipment sends all or part of traffic to be forwarded to the proxy equipment, and the proxy equipment forwards the traffic. The method not only covers the functions of the main switch, causes the management structure of the whole system to be disordered and inconvenient to maintain, but also causes the waste of the resources of the whole stacking system.
Disclosure of Invention
In order to solve the problems, the invention optimizes the management structure and the synchronization step inside the stacked switch, so that each member switch can respectively perform its own function, the management flow is centrally managed by the main switch, the management complexity is simplified, and the waste of resources is reduced.
According to an embodiment of the invention, a method and a device for communication between a stack switch and an external device are provided.
In a first aspect of the invention, a method of a stack switch communicating with an external device is provided.
The method comprises the following steps:
s01: the stacking switches are composed of a plurality of switches, a main switch is selected from the interior of each stacking switch, and the rest switches are slave switches;
s02: the administrator packages a private network layer for all the switches;
s03: connecting the external equipment with any switch in the stacking system through a network cable;
s04: the peripheral device communicates with the stack switch.
Further, the switch internal network layer hierarchy in S01 includes: link layer, network layer, private network layer, transport layer and application layer.
Further, the number of the master switches in S01 is one, and the number of the slave switches is three.
Further, the step of selecting the master switch inside the stack switch in S01 is:
s011: if the stacking system is automatic stacking, selecting the switch with the minimum Mac address as a main switch;
s012: if the stacking system is not automatically stacked, comparing the priority levels set by all the switches, wherein the switch with the highest priority level is a main switch;
s013: if the priorities of all the switches are the same, selecting the switch with the longest running time as a main switch;
s014: and if the running time of all the switches is the same, selecting the switch with the minimum equipment number as the main switch.
Further, the functions of the private network layer described in S02 are: and determining the processing flow of the message.
Further, the step of determining the message processing flow is:
s021: the private network layer stores the equipment ID of the main switch;
s022: comparing the device ID of the local machine with the stored device ID;
s023: if the equipment IDs are the same, the local machine is judged to be a main exchanger, and the message is directly sent to a corresponding process for processing;
s024: if the device IDs are different, the private network layer judges that the local machine is a slave switch, the private network layer takes the device number of the master switch as a target device number, the slave switch sends a message to the master switch in a CPU2CPU mode, and the master switch receives the message and delivers the message to a corresponding process to process the message according to the characteristics of the message.
Further, the local device ID is a device ID of a switch where traffic arrives.
Further, the communication process described in S04 is:
s041: if the equipment which the external equipment requests for communication is other equipment in the same broadcast domain except the stacking switch, the switch connected with the external equipment forwards the flow to the other equipment;
s042: if the device which the external device requests for communication is other devices across the broadcast domain, the switch connected with the external device forwards the flow to the other devices;
s043: if the device which the external device requests for communication is the stack switch, the flow needs to be processed by the private network layer, delivered to the master switch for processing and the processing result is synchronized to the slave switch.
In a second aspect of the invention, an apparatus for a stack switch to communicate with an external device is provided.
The device comprises:
stacking the modules: the stacking switches are composed of a plurality of switches, a main switch is selected from the interior of each stacking switch, and the rest switches are slave switches;
packaging the module: the private network layer is used for encapsulating all the switches by an administrator;
a connecting module: the external equipment is connected with any switch in the stacking system through a network cable;
a communication module: for communicating with external devices to the stack switch.
Further, the layers of the switch internal network layer in the stack module include: link layer, network layer, private network layer, transport layer and application layer.
Further, the number of the master switches in the stacking module is one, and the number of the slave switches is three.
Further, the stacking module includes:
automatic stacking judgment module: judging whether the stacking system is automatically stacked, and if the stacking system is automatically stacked, selecting the switch with the minimum Mac address as a main switch;
a priority comparison module: if the stacking system is not automatically stacked, comparing the priority levels set by all the switches, wherein the switch with the highest priority level is a main switch;
a run time comparison module: if the priorities of all the switches are the same, selecting the switch with the longest running time as a main switch;
equipment number comparison module: and if the running time of all the switches is the same, selecting the switch with the minimum equipment number as the main switch.
Further, the private network layer has the functions of: and determining the processing flow of the message.
Further, the device ID of the local device is the device ID of the switch where the message arrives.
Further, the communication module comprises:
the same broadcast domain communication module: if the equipment which the external equipment requests for communication is other equipment in the same broadcast domain except the stacking switch, the switch connected with the external equipment forwards the flow to the other equipment;
a cross broadcast domain communication module: if the device which the external device requests for communication is other devices across the broadcast domain, the switch connected with the external device forwards the flow to the other devices;
a stack switch communication module: if the device requesting communication from the external device is the stack switch itself, the flow needs to be processed by the private network layer, delivered to the master switch for processing and the processing result is synchronized to the slave switch.
The above-mentioned english abbreviation:
ID: identity document, Identity number
CPU2 CPU: central processing unit to Central processing unit, from Central processor to Central processor
MAC: MediaAccess control address, local area network address
ARP: address Resolution Protocol (ARP)
The invention optimizes the management structure and the synchronization step in the stack switch, so that each member switch can perform its own function, the management flow is managed by the main switch in a centralized way, and the management complexity is simplified, thereby reducing the waste of resources.
It should be understood that the statements herein reciting aspects are not intended to limit the critical or essential features of any embodiment of the invention, nor are they intended to limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of various embodiments of the present invention will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Wherein:
FIG. 1 is a flow diagram illustrating a method for a stack switch to communicate with an external device, according to an embodiment of the invention;
FIG. 2 is a block diagram of an apparatus for a stack switch to communicate with an external device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
According to the embodiment of the invention, the method and the device for communication between the stack switch and the external equipment are provided, the management structure and the synchronization step in the stack switch are optimized, each member switch is enabled to perform its own function, the management flow is managed by the main switch in a centralized way, the management complexity is simplified, and the waste of resources is reduced.
The principles and spirit of the present invention are explained in detail below with reference to several representative embodiments of the invention.
FIG. 1 is a flowchart illustrating a method for a stack switch to communicate with an external device according to an embodiment of the present invention. The method comprises the following steps:
s01: the stacking switches are composed of a plurality of switches, a main switch is selected from the interior of each stacking switch, and the rest switches are slave switches;
s02: the administrator packages a private network layer for all the switches;
s03: connecting the external equipment with any switch in the stacking system through a network cable;
s04: the peripheral device communicates with the stack switch.
It should be noted that although the operations of the method of the present invention have been described in the above embodiments and the accompanying drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the operations shown must be performed, to achieve the desired results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
For a clearer explanation of the method for the stack switch to communicate with the external device, the following description is made with reference to two specific embodiments, however, it should be noted that the embodiments are only for better illustration of the present invention and should not be construed as an undue limitation on the present invention.
The method of communicating the stack switch with the peripheral device is further described in more detail in the following two specific examples:
example 1:
the system of piling up is constituteed by switch A, switch B, switch C and switch D, and the priority of four switches is compared to the system of piling up, and it is the same that discovery priority switch A's priority is the highest, then selects switch A in the system of piling up to be the master switch, and switch B, switch C and switch D are the slave switch then, and the equipment ID of master switch A is preserved to the private network layer: 2. and the administrator encapsulates the private network layer for all the switches and connects the external equipment with the main switch A through the network cable.
The external device requests communication with a device X in the same broadcast domain of the stack switch, and the switch A directly forwards the flow of the external device to the device X.
The external device requests to communicate with the device Y in other broadcast domains, and the switch A directly forwards the external device flow to the device Y.
The external device and the stack switch carry out routing decision through an OSPF protocol, the external device needs to communicate with the stack switch, the flow firstly reaches the switch A, the switch A carries out analysis, and the analyzed flow needs to be submitted to an application layer for processing. The private network layer inquires that the equipment ID of the switch A is 2, and the inquired equipment ID of the switch A and the stored equipment ID of the main switch A are as follows: 2, comparing, if the two IDs are the same, judging that the flow reaches the main exchanger, and directly sending the flow to a corresponding process for processing.
Example 2:
constitute by switch A, switch B, switch C and switch D and pile up the system, pile up the priority that the system compares four switches, discover that the priority is the same, then look over the operating time of four switches, switch B's operating time is the longest, then selects switch B in the system of piling up to be the master switch, and switch A, switch C and switch D are from the switch, and master switch B's equipment ID is preserved to the private network layer: 1. and the administrator encapsulates the private network layer for all the switches and connects the external equipment with the slave switch A through the network cable.
External equipment is connected with the stacking switch through SSH/Telnet, flow firstly reaches the switch A, the switch A analyzes the flow, and the analyzed flow needs to be submitted to an application layer for processing. The private network layer inquires that the equipment ID of the switch A is 2, and the inquired equipment ID of the switch A and the stored equipment ID of the main switch B are: 1, comparing, if the two IDs are different, judging that the flow reaches the slave switch, taking the equipment number of the master switch B as a target equipment number, sending the flow received by the switch A to the master switch B by the private network layer slave switch in a CPU2CPU mode, and receiving and processing the flow by the master switch B.
The main switch B replies the communication request of the external equipment, firstly, the main switch B requests the ARP of the external equipment for flooding and caches the reply message; the ARP reply of the external equipment is directly processed and learned by the switch A and is synchronized to the main switch B, and the reply message cached by the main switch B is sent to the external equipment through the ARP.
Based on the same invention concept, the invention also provides a device for the communication between the stack switch and the external equipment. The implementation of the device can refer to the implementation of the method, and repeated details are not repeated. As shown in fig. 2, the apparatus 100 includes:
the stack module 101: the system comprises a plurality of switches, a master switch and the other switches, wherein the switches form a stacking switch;
the encapsulation module 102: the private network layer is used for encapsulating all the switches by an administrator;
the connection module 103: the external equipment is connected with any switch in the stacking system through a network cable;
the communication module 104: for communicating with the stack switch by an external device.
Wherein, the stack module 101 further comprises:
automatic stack determination module 1011: judging whether the stacking system is automatically stacked or not, and if the stacking system is automatically stacked, selecting the switch with the minimum Mac address as a main switch;
the priority comparison module 1012: if the stacking system is not automatically stacked, comparing the priority levels set by the switches, wherein the switch with the highest priority level is a main switch;
run time comparison module 1013: if the priorities of all the switches are the same, selecting the switch with the longest running time as a main switch;
device number comparison module 1014: and if the running time of all the switches is the same, selecting the switch with the minimum equipment number as the main switch.
The communication module 104 includes:
the same broadcast domain communication module 1041: if the equipment which the external equipment requests for communication is other equipment in the same broadcast domain except the stacking switch, the switch connected with the external equipment forwards the flow to the other equipment;
the cross-broadcast domain communication module 1042: if the device which the external device requests for communication is other devices across the broadcast domain, the switch connected with the external device forwards the flow to the other devices;
stack switch communication module 1043: if the device which the external device requests for communication is the stack switch, the flow needs to be processed by the private network layer, delivered to the master switch for processing and the processing result is synchronized to the slave switch.
The device for the communication between the stacking switch and the external equipment optimizes the management structure and the synchronization step in the stacking switch, so that each member switch can perform its own function, the management flow is managed by the main switch in a centralized way, the management complexity is simplified, and the waste of resources is reduced.
While the spirit and principles of the invention have been described with reference to several particular embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, nor is the division of aspects, which is for convenience only as the features in such aspects may not be combined to benefit. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
The limitation of the protection scope of the present invention is understood by those skilled in the art, and various modifications or changes which can be made by those skilled in the art without inventive efforts based on the technical solution of the present invention are still within the protection scope of the present invention.

Claims (8)

1. A method for a stack switch to communicate with an external device, the method comprising:
s01: the stacking switches are composed of a plurality of switches, a main switch is selected from the interior of each stacking switch, and the rest switches are slave switches;
s02: the administrator packages a private network layer for all the switches;
s03: connecting the external equipment with any switch in the stacking system through a network cable;
s04: the peripheral device communicates with the stack switch.
2. The method of claim 1, wherein the step of the stack switch selecting the master switch internally in the stack switch in S01 comprises:
s011: if the stacking system is automatic stacking, selecting the switch with the minimum Mac address as a main switch;
s012: if the stacking system is not automatically stacked, comparing the priority levels set by all the switches, wherein the switch with the highest priority level is a main switch;
s013: if the priorities of all the switches are the same, selecting the switch with the longest running time as a main switch;
s014: and if the running time of all the switches is the same, selecting the switch with the minimum equipment number as the main switch.
3. The method of claim 1, wherein the private network layer of S02 functions as: and determining the processing flow of the message.
4. The method of claim 1, wherein the communication process in S04 is as follows:
s041: if the equipment which the external equipment requests for communication is other equipment in the same broadcast domain except the stacking switch, the switch connected with the external equipment forwards the flow to the other equipment;
s042: if the device which the external device requests for communication is other devices across the broadcast domain, the switch connected with the external device forwards the flow to the other devices;
s043: if the device requesting communication from the external device is the stack switch itself, the flow needs to be processed by the private network layer, delivered to the master switch for processing and the processing result is synchronized to the slave switch.
5. An apparatus for a stack switch to communicate with an external device, the apparatus comprising:
stacking the modules: the stacking switches are composed of a plurality of switches, a main switch is selected from the interior of each stacking switch, and the rest switches are slave switches;
packaging the module: the private network layer is used for encapsulating all the switches by an administrator;
a connecting module: the external equipment is connected with any switch in the stacking system through a network cable;
a communication module: for communicating with external devices to the stack switch.
6. The method of claim 5, wherein the stack module comprises:
automatic stacking judgment module: judging whether the stacking system is automatically stacked or not, and if the stacking system is automatically stacked, selecting the switch with the minimum Mac address as a main switch;
a priority comparison module: if the stacking system is not automatically stacked, comparing the priority levels set by all the switches, wherein the switch with the highest priority level is a main switch;
a run time comparison module: if the priorities of all the switches are the same, selecting the switch with the longest running time as a main switch;
equipment number comparison module: and if the running time of all the switches is the same, selecting the switch with the minimum equipment number as the main switch.
7. The apparatus of claim 5, wherein the function of the private network layer in the stack module is: and determining the processing flow of the message.
8. The apparatus of claim 5, wherein the communication module comprises:
the same broadcast domain communication module: if the equipment which the external equipment requests for communication is other equipment in the same broadcast domain except the stacking switch, the switch connected with the external equipment forwards the flow to the other equipment;
a cross broadcast domain communication module: if the device which the external device requests for communication is other devices across the broadcast domain, the switch connected with the external device forwards the flow to the other devices;
a stack switch communication module: if the device requesting communication from the external device is the stack switch itself, the flow needs to be processed by the private network layer, delivered to the master switch for processing and the processing result is synchronized to the slave switch.
CN202210632641.3A 2022-06-06 2022-06-06 Method and device for communication between stacking switch and external equipment Pending CN115118682A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210632641.3A CN115118682A (en) 2022-06-06 2022-06-06 Method and device for communication between stacking switch and external equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210632641.3A CN115118682A (en) 2022-06-06 2022-06-06 Method and device for communication between stacking switch and external equipment

Publications (1)

Publication Number Publication Date
CN115118682A true CN115118682A (en) 2022-09-27

Family

ID=83327257

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210632641.3A Pending CN115118682A (en) 2022-06-06 2022-06-06 Method and device for communication between stacking switch and external equipment

Country Status (1)

Country Link
CN (1) CN115118682A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355501A (en) * 2008-09-02 2009-01-28 中兴通讯股份有限公司 Method and switch apparatus for managing packet of Ethernet stacking system
CN102868775A (en) * 2012-09-06 2013-01-09 福建星网锐捷网络有限公司 Method for expanding capacity of address resolution protocol table, and message forwarding method and device
US20160043902A1 (en) * 2013-04-19 2016-02-11 Hangzhou H3C Technologies Co., Ltd. Topology discovery in a stacked switches system
CN105471601A (en) * 2014-08-20 2016-04-06 西安慧泽知识产权运营管理有限公司 Method of managing all stacked slave switches through master switch
CN106685826A (en) * 2016-12-01 2017-05-17 瑞斯康达科技发展股份有限公司 Interchanger stacking system, slave unit, switching chip and method for processing protocol message
CN113179228A (en) * 2021-04-15 2021-07-27 浪潮思科网络科技有限公司 Method, device, equipment and medium for improving switch stacking reliability
CN114244736A (en) * 2021-12-14 2022-03-25 浪潮思科网络科技有限公司 Multi-master detection method, equipment and medium based on stacking environment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355501A (en) * 2008-09-02 2009-01-28 中兴通讯股份有限公司 Method and switch apparatus for managing packet of Ethernet stacking system
CN102868775A (en) * 2012-09-06 2013-01-09 福建星网锐捷网络有限公司 Method for expanding capacity of address resolution protocol table, and message forwarding method and device
US20160043902A1 (en) * 2013-04-19 2016-02-11 Hangzhou H3C Technologies Co., Ltd. Topology discovery in a stacked switches system
CN105471601A (en) * 2014-08-20 2016-04-06 西安慧泽知识产权运营管理有限公司 Method of managing all stacked slave switches through master switch
CN106685826A (en) * 2016-12-01 2017-05-17 瑞斯康达科技发展股份有限公司 Interchanger stacking system, slave unit, switching chip and method for processing protocol message
CN113179228A (en) * 2021-04-15 2021-07-27 浪潮思科网络科技有限公司 Method, device, equipment and medium for improving switch stacking reliability
CN114244736A (en) * 2021-12-14 2022-03-25 浪潮思科网络科技有限公司 Multi-master detection method, equipment and medium based on stacking environment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
百度经验: ""思科2960s系列交换机堆叠配置"", 《HTTPS://JINGYAN.BAIDU.COM/ARTICLE/A24B33CD3C681319FE002BE6.HTML》, pages 1 *

Similar Documents

Publication Publication Date Title
US20040078772A1 (en) Dynamic route exchange
CN113872845B (en) Method for establishing VXLAN tunnel and related equipment
US7369505B2 (en) Method and system to efficiently manage network connection to connect a client and a resource
CN113839870B (en) Path creation method, device and system
CN111756830A (en) Internal network load balancing implementation method of public cloud network
CN110784434B (en) Communication method and device
US11895083B2 (en) Address obtaining method and an address obtaining apparatus
CN111756565B (en) Managing satellite devices within a branched network
CN115152194A (en) Method, device and system for discovering applications
US7787461B2 (en) System and a method for processing field frames for multiprotocol use in a communications network
CN114143258B (en) Service agent method based on Open vSwitch under Kubernetes environment
CN113794618B (en) Redundant network communication method and device based on virtual network card and terminal equipment
CN112968965B (en) Metadata service method, server and storage medium for NFV network node
US20230336377A1 (en) Packet forwarding method and apparatus, and network system
CN112491984B (en) Container editing engine cluster management system based on virtual network bridge
CN114389967A (en) Link detection method, device, equipment and storage medium
CN115118682A (en) Method and device for communication between stacking switch and external equipment
CN108632173B (en) Resource access system and resource access method based on local area network
WO2009148371A1 (en) Method and apparatus for handling a switch using a preferred destination list
CN116192721A (en) Path perception method, device and system
US9231862B2 (en) Selective service based virtual local area network flooding
CN108965494A (en) Data transmission method and device in data system
JP3269477B2 (en) Multi-protocol management network configuration method
JP3255238B2 (en) Communication control processor
US20120011235A1 (en) Systems and Methods for Implementing Multiple ISIS Routing Instances on a Network Element

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