CN113347085A - Method for realizing STP protocol under mimicry environment - Google Patents

Method for realizing STP protocol under mimicry environment Download PDF

Info

Publication number
CN113347085A
CN113347085A CN202110611448.7A CN202110611448A CN113347085A CN 113347085 A CN113347085 A CN 113347085A CN 202110611448 A CN202110611448 A CN 202110611448A CN 113347085 A CN113347085 A CN 113347085A
Authority
CN
China
Prior art keywords
stp
mac address
message
port
stp protocol
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
CN202110611448.7A
Other languages
Chinese (zh)
Other versions
CN113347085B (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.)
Zhuhai Comleader Information Technology Co Ltd
Henan Xinda Wangyu Technology Co Ltd
Original Assignee
Zhuhai Comleader Information Technology Co Ltd
Henan Xinda Wangyu 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 Zhuhai Comleader Information Technology Co Ltd, Henan Xinda Wangyu Technology Co Ltd filed Critical Zhuhai Comleader Information Technology Co Ltd
Priority to CN202110611448.7A priority Critical patent/CN113347085B/en
Publication of CN113347085A publication Critical patent/CN113347085A/en
Application granted granted Critical
Publication of CN113347085B publication Critical patent/CN113347085B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/18Loop-free operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a method for realizing STP protocol in a mimicry environment, which is applied to a mimicry switch to realize STP protocol in the mimicry switch environment, wherein the mimicry switch comprises an input agent, an output agent, an internal switching chip, an external switching chip and a plurality of executors, the input agent and the output agent are connected to the same port of the internal switching chip and the external switching chip, and the plurality of executors are respectively connected to other ports of the internal switching chip. The invention carries out rotation transformation on the source MAC addresses of the STP protocol messages on the input proxy and the execution body, and solves the problem that the MAC address table of the internal exchange chip is repeatedly migrated to cause the internal communication to be switched on and off when the internal communication is switched off when the same STP protocol message passes through the input proxy and the execution body respectively under the condition of external link call return.

Description

Method for realizing STP protocol under mimicry environment
Technical Field
The invention relates to the field of mimicry defense, in particular to a method for realizing STP protocol in a mimicry environment.
Background
The STP protocol relies on receiving and transmitting STP messages for determining whether a loop is present at a service port of the switching device and for performing loop blocking. The mimic component generally consists of an input/output agent, a arbitration module, a heterogeneous execution body and a feedback module, and in a hardware level, the mimic component often depends on a CPU module to operate. Under the mimicry construction system, because each CPU module realizes communication through an internal exchange chip, when a loop occurs in the exchange equipment, the input/output agent and the execution body receive the same STP message, so that the MAC address of the port of the internal exchange chip is repeatedly migrated, and the communication between the mimicry components is switched on and off.
Disclosure of Invention
In order to solve the above problem, it is necessary to provide a method for implementing the STP protocol in a mimicry environment.
The first aspect of the present invention provides a method for implementing STP protocol in a mimicry environment, the method comprising the steps of:
starting the STP protocol by an execution body, wherein an STP protocol stack of the execution body sends an STP protocol message outwards from a port N, and the source MAC address of the STP protocol message is aa: bb: cc: dd: ee: ff;
STP protocol message reaches external exchange chip port T-M through internal exchange chip and output agent, MAC address table of port N learned by internal exchange chip is MN (N, aa: bb: cc: dd: ee: ff, VX), VX represents VLAN ID where port N is located, X is execution body number;
when the input agent receives an STP message with a source MAC address aa: bb: cc: dd: ee: ff, the source MAC address of the STP message is replaced by MM: bb: cc: dd: ee: ff, and then the STP message is sent to an internal switching chip, and an MAC address table on a port T-M learned by the internal switching chip is MN (M, MM: bb: cc: dd: ee: ff, VX);
when the source MAC address of the STP message received by the execution body is MM: bb: cc: dd: ee: ff, the source MAC address is replaced by aa: bb: cc: dd: ee: ff, and then the source MAC address is sent to the STP protocol stack of the execution body, and if the STP message received by the STP protocol stack is the STP message sent by the execution body, the external link is judged to be looped back.
The invention provides a mimicry switch capable of realizing STP protocol, which comprises an input agent, an output agent, an internal exchange chip, an external exchange chip and a plurality of executors, wherein the input agent and the output agent are connected to the same port of the internal exchange chip and the external exchange chip, and the plurality of executors are respectively connected to other ports of the internal exchange chip;
the executive is configured to:
starting the STP protocol, sending an STP protocol message from a port N by the STP protocol stack of the execution body, and setting the source MAC address of the STP protocol message as aa: bb: cc: dd: ee: ff;
replacing the source MAC address of the STP message with MM: bb: cc: dd: ee: ff as the source MAC address, sending the STP message to an execution body, and judging that the external link appears a loopback if the STP message received by the STP protocol stack is the STP message sent by the STP protocol stack;
the output agent is configured to:
sending the received STP protocol message to the port T-M of the external exchange chip;
the input agent is configured to:
replacing the source MAC address of the received STP message with the source MAC address aa: bb: cc: dd: ee: ff with the source MAC address MM: bb: cc: dd: ee: ff, and then sending the STP message to the internal switching chip;
the internal switching chip is configured to:
through transmitting STP protocol message sent by the execution body from the port N to the port T-M of the external exchange chip through the output agent, learning that the MAC address table of the port N is MN (N, aa: bb: cc: dd: ee: ff, VX), wherein the VX represents VLAN ID where the port N is located, and X is the number of the execution body;
through STP protocol message from input agent, learning MAC address table of port T-M as MN (M, MM: bb: cc: dd: ee: ff, VX)
Transmitting STP protocol messages from the input agent and the output agent to the corresponding execution body;
the external switch chip is configured to be an input-output port module of the mimic switch.
Based on the above, the internal exchange chip adopts 53128 exchange chip, and the external exchange chip adopts 5160/7148 exchange chip.
Based on the above, the output agent and the input agent are disposed on a CPU module, and are connected to an external switch chip through a PCIE interface and connected to an internal switch chip through an ethernet port.
The STP protocol design method under the mimicry environment provided by the invention carries out rotation transformation on STP protocol message source MAC addresses on the input proxy and the execution body, thereby solving the problem that the internal communication is 'on-off' due to the fact that the same STP protocol message repeatedly migrates through the input proxy and the execution body respectively under the condition of external link call return.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 shows a flow diagram of the method of the invention.
Fig. 2 shows a block diagram of the architecture of the inventive mimic switch.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
As shown in fig. 1 and fig. 2, the present invention provides a method for implementing STP protocol in a mimicry environment, which is applied to a mimicry switch, where the mimicry switch includes an input proxy, an output proxy, an internal switch chip, an external switch chip, and a plurality of executors, the input proxy and the output proxy are connected to a same port of the internal switch chip and the external switch chip, and the plurality of executors are respectively connected to other ports of the internal switch chip;
the executive is configured to:
starting the STP protocol, sending an STP protocol message from a port N by the STP protocol stack of the execution body, and setting the source MAC address of the STP protocol message as aa: bb: cc: dd: ee: ff;
replacing the source MAC address of the STP message with MM: bb: cc: dd: ee: ff as the source MAC address, sending the STP message to an execution body, and judging that the external link appears a loopback if the STP message received by the STP protocol stack is the STP message sent by the STP protocol stack;
the output agent is configured to:
sending the received STP protocol message to the port T-M of the external exchange chip;
the input agent is configured to:
replacing the source MAC address of the received STP message with the source MAC address aa, bb, cc, dd, ee and ff with MM, bb, cc, dd, ee and ff, and sending the message to a switching chip;
the internal switching chip is configured to:
through transmitting STP protocol message sent by the execution body from the port N to the port T-M of the external exchange chip through the output agent, learning that the MAC address table of the port N is MN (N, aa: bb: cc: dd: ee: ff, VX), wherein the VX represents VLAN ID where the port N is located, and X is the number of the execution body;
learning that the MAC address table of the port T-M is MN (M, MM: bb: cc: dd: ee: ff, VX) through STP protocol message from the input agent;
transmitting STP protocol messages from the input agent and the output agent to the corresponding execution body;
the external switch chip is configured to be an input-output port module of the mimic switch.
Specifically, the internal exchange chip adopts an 53128 exchange chip, and the external exchange chip adopts a 5160/7148 exchange chip. The output agent and the input agent are deployed on a CPU module, connected with an external switching chip through a PCIE interface and connected with an internal switching chip through an Ethernet interface.
The method for realizing the STP protocol under the mimicry switch comprises the following steps:
starting the STP protocol by an execution body 1, wherein an STP protocol stack of the execution body 1 sends an STP protocol message outwards from a port 2, and the source MAC address of the STP protocol message is set as aa: bb: cc: dd: ee: ff;
STP protocol message reaches the port T-1 of the external switching chip through the internal switching chip and the output agent, the MAC address table of the port 2 learned by the internal switching chip is 12 (2, aa: bb: cc: dd: ee: ff, V1), and V1 represents the VLAN ID of the port 2; under the mimicry switch, when a loop circuit appears between a port T-1 and a port T-2, an STP message on the port T-1 can reach the port T-2, and the STP message on the port T-2 finally reaches an input agent, so that an MAC address on an internal switching chip port is repeatedly migrated, and the communication between the mimicry components is switched on and off;
when the input agent receives the STP message with the source MAC address aa: bb: cc: dd: ee: ff, the source MAC address of the STP message is replaced by 11: bb: cc: dd: ee: ff and then sent to the internal switching chip, and the MAC address table on the port T-1 learned by the internal switching chip is 12 (1, 11: bb: cc: dd: ee: ff, V1); therefore, the ports T-1 and T-2 of the switching chip are in the same VLAN, the same MAC address table can not appear, and the problem of repeated migration of the MAC address table is avoided;
when the source MAC address of the STP message received by the execution body is 11: bb: cc: dd: ee: ff, the source MAC address is replaced by aa: bb: cc: dd: ee: ff, and then the source MAC address is sent to the STP protocol stack of the execution body, and if the STP message received by the STP protocol stack is the STP message sent by the execution body, the external link is judged to return to the ring. When the external link is judged to have loop back, the STP protocol stack can disable one of the loop back ports of the mimic switch to eliminate the external loop back link, so that the problem of 'on-off when internal communication' caused by repeated migration of an MAC address table of an internal switching chip is solved.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (4)

1. A method for implementing STP protocol in a mimicry environment, the method comprising the steps of:
starting the STP protocol by an execution body, wherein an STP protocol stack of the execution body sends an STP protocol message outwards from a port N, and the source MAC address of the STP protocol message is aa: bb: cc: dd: ee: ff;
STP protocol message reaches external exchange chip port T-M through internal exchange chip and output agent, MAC address table of port N learned by internal exchange chip is MN (N, aa: bb: cc: dd: ee: ff, VX), VX represents VLAN ID where port N is located, X is execution body number;
when the input agent receives an STP message with a source MAC address aa: bb: cc: dd: ee: ff, the source MAC address of the STP message is replaced by MM: bb: cc: dd: ee: ff, and then the STP message is sent to an internal switching chip, and an MAC address table on a port T-M learned by the internal switching chip is MN (M, MM: bb: cc: dd: ee: ff, VX);
when the source MAC address of the STP message received by the execution body is MM: bb: cc: dd: ee: ff, the source MAC address is replaced by aa: bb: cc: dd: ee: ff, and then the source MAC address is sent to the STP protocol stack of the execution body, and if the STP message received by the STP protocol stack is the STP message sent by the execution body, the external link is judged to be looped back.
2. A mimicry switch capable of implementing an STP protocol, comprising: the system comprises an input agent, an output agent, an internal exchange chip, an external exchange chip and a plurality of executors, wherein the input agent and the output agent are connected to the same port of the internal exchange chip and the external exchange chip, and the plurality of executors are respectively connected to other ports of the internal exchange chip;
the executive is configured to:
starting the STP protocol, sending an STP protocol message from a port N by the STP protocol stack of the execution body, and setting the source MAC address of the STP protocol message as aa: bb: cc: dd: ee: ff;
replacing the source MAC address of the STP message with MM: bb: cc: dd: ee: ff as the source MAC address, sending the STP message to an execution body, and judging that the external link appears a loopback if the STP message received by the STP protocol stack is the STP message sent by the STP protocol stack;
the output agent is configured to:
sending the received STP protocol message to the port T-M of the external exchange chip;
the input agent is configured to:
replacing the source MAC address of the received STP message with the source MAC address aa: bb: cc: dd: ee: ff with the source MAC address MM: bb: cc: dd: ee: ff, and then sending the STP message to the internal switching chip;
the internal switching chip is configured to:
through transmitting STP protocol message sent by the execution body from the port N to the port T-M of the external exchange chip through the output agent, learning that the MAC address table of the port N is MN (N, aa: bb: cc: dd: ee: ff, VX), wherein the VX represents VLAN ID where the port N is located, and X is the number of the execution body;
learning that the MAC address table of the port T-M is MN (M, MM: bb: cc: dd: ee: ff, VX) through STP protocol message from the input agent;
transmitting STP protocol messages from the input agent and the output agent to the corresponding execution body;
the external switch chip is configured to be an input-output port module of the mimic switch.
3. The mimetic switch capable of implementing the STP protocol of claim 2, wherein: the internal exchange chip adopts 53128 exchange chip, and the external exchange chip adopts 5160/7148 exchange chip.
4. The mimetic switch capable of implementing the STP protocol of claim 3, wherein: the output agent and the input agent are deployed on a CPU module, connected with an external switching chip through a PCIE interface and connected with an internal switching chip through an Ethernet interface.
CN202110611448.7A 2021-06-02 2021-06-02 Method for realizing STP protocol under mimicry environment Active CN113347085B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110611448.7A CN113347085B (en) 2021-06-02 2021-06-02 Method for realizing STP protocol under mimicry environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110611448.7A CN113347085B (en) 2021-06-02 2021-06-02 Method for realizing STP protocol under mimicry environment

Publications (2)

Publication Number Publication Date
CN113347085A true CN113347085A (en) 2021-09-03
CN113347085B CN113347085B (en) 2022-12-13

Family

ID=77474630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110611448.7A Active CN113347085B (en) 2021-06-02 2021-06-02 Method for realizing STP protocol under mimicry environment

Country Status (1)

Country Link
CN (1) CN113347085B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120113871A1 (en) * 2010-11-08 2012-05-10 Cisco Technology, Inc. System and method for providing a loop free topology in a network environment
US20130003608A1 (en) * 2011-06-28 2013-01-03 Brocade Communications Systems, Inc. Spanning-tree based loop detection for an ethernet fabric switch
CN104065582A (en) * 2013-03-22 2014-09-24 杭州华三通信技术有限公司 Message transmission method and gateway device
CN111371907A (en) * 2020-05-26 2020-07-03 网络通信与安全紫金山实验室 STP (spanning Tree protocol) -based data synchronization method and device and mimicry switch
CN111416865A (en) * 2020-03-24 2020-07-14 河南信大网御科技有限公司 Protocol proxy processing method and system based on mimicry defense
US20200236044A1 (en) * 2019-01-17 2020-07-23 Telia Company Ab Methods and Apparatuses for Switching Frames in a Network Topology
CN111865928A (en) * 2020-06-29 2020-10-30 中国人民解放军战略支援部队信息工程大学 Security testing device and method for mimicry switch
CN112152943A (en) * 2020-09-07 2020-12-29 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Method and system for controlling executive body based on processor mimicry switch
CN112615862A (en) * 2020-12-18 2021-04-06 网络通信与安全紫金山实验室 Simulated defense-based attack defense device, method, equipment and medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120113871A1 (en) * 2010-11-08 2012-05-10 Cisco Technology, Inc. System and method for providing a loop free topology in a network environment
US20130003608A1 (en) * 2011-06-28 2013-01-03 Brocade Communications Systems, Inc. Spanning-tree based loop detection for an ethernet fabric switch
CN104065582A (en) * 2013-03-22 2014-09-24 杭州华三通信技术有限公司 Message transmission method and gateway device
US20200236044A1 (en) * 2019-01-17 2020-07-23 Telia Company Ab Methods and Apparatuses for Switching Frames in a Network Topology
CN111416865A (en) * 2020-03-24 2020-07-14 河南信大网御科技有限公司 Protocol proxy processing method and system based on mimicry defense
CN111371907A (en) * 2020-05-26 2020-07-03 网络通信与安全紫金山实验室 STP (spanning Tree protocol) -based data synchronization method and device and mimicry switch
CN111865928A (en) * 2020-06-29 2020-10-30 中国人民解放军战略支援部队信息工程大学 Security testing device and method for mimicry switch
CN112152943A (en) * 2020-09-07 2020-12-29 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Method and system for controlling executive body based on processor mimicry switch
CN112615862A (en) * 2020-12-18 2021-04-06 网络通信与安全紫金山实验室 Simulated defense-based attack defense device, method, equipment and medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
VLADIMIR DIMITROV DIMITROV: ""Implementation of Loop Prevention Protocols at the Data Link Layer in LAN"", 《2020 28TH NATIONAL CONFERENCE WITH INTERNATIONAL PARTICIPATION (TELECOM)》 *
郭彦伟等: "生成树协议与交换网络环路研究", 《厦门大学学报(自然科学版)》 *

Also Published As

Publication number Publication date
CN113347085B (en) 2022-12-13

Similar Documents

Publication Publication Date Title
EP3029883A1 (en) Network protection method and apparatus, next-ring node, and system
CN108718258B (en) Quality detection method and equipment for inter-board link
US7130271B1 (en) Relaying apparatus
CN113347085B (en) Method for realizing STP protocol under mimicry environment
CN105471688A (en) Communication node, communication link based on communication node and working method thereof
CN111130943B (en) Method for realizing fast ring network switching, switch and computer readable storage medium
CN112615789A (en) Out-of-band flow control method and device
JP5172810B2 (en) Baseband unit and base station system
US20020061002A1 (en) Apparatus for provider connection and mobile communication system
CN100499500C (en) Method for realizing management for multistage communication device
CN112583746B (en) Cell transmission method and device, storage medium and electronic device
US11252107B2 (en) Method for operating an ethernet communication device, and ethernet communication device
CN100407666C (en) Wideband wireless switch-in equipment chain circuit loop testing method
CN113794634B (en) Load sharing method and equipment
CN111585886B (en) Self-loop processing method, device, equipment and storage medium based on spanning tree protocol
CN109714294B (en) Physical layer chip, network security device and data forwarding method
CN104038426A (en) Network switch and data updating method
CN114356830B (en) Bus terminal control method, device, computer equipment and storage medium
US20220377605A1 (en) Data transmission method and related devices
KR100469733B1 (en) Computer Exchange System and Method
WO2023005278A1 (en) Flow control processing method and communication device
CN109981486B (en) Message forwarding method and forwarding device
CN109981374A (en) Can adjust automatically signal transmission path network equipment
CN117201295A (en) Message forwarding method and device
KR950010483B1 (en) The method transmitting a message for an electronic exchanger

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