CN113411220A - Method and device for configuring spanning tree protocol edge port - Google Patents

Method and device for configuring spanning tree protocol edge port Download PDF

Info

Publication number
CN113411220A
CN113411220A CN202110736394.7A CN202110736394A CN113411220A CN 113411220 A CN113411220 A CN 113411220A CN 202110736394 A CN202110736394 A CN 202110736394A CN 113411220 A CN113411220 A CN 113411220A
Authority
CN
China
Prior art keywords
port
neighbor
equipment
type
edge port
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
CN202110736394.7A
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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C 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 Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN202110736394.7A priority Critical patent/CN113411220A/en
Publication of CN113411220A publication Critical patent/CN113411220A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a STP edge port configuration method and a device, which are applied to switching equipment. In the method, the switching equipment receives a message sent by the neighbor equipment, the message comprises the equipment type of the neighbor equipment, and the switching equipment performs STP edge port configuration on a port connected with the server when determining that the neighbor equipment is the server according to the equipment type. Therefore, the method and the device can realize automatic configuration of the STP edge port, thereby effectively improving the configuration efficiency and reducing the influence on the service network.

Description

Method and device for configuring spanning tree protocol edge port
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for configuring an STP edge port.
Background
The Spanning Tree Protocol (STP) is a two-layer management Protocol, and aims to eliminate two-layer network loops and avoid broadcast storm by selectively blocking redundant links of a network to construct a Tree-type network topology. The protocol is mainly applied to a two-layer switching network of a data center.
When a server accesses a network through switching equipment of a data center, a port connected with the server on the switching equipment needs to be configured as an STP edge port, so that the port directly enters a forwarding state, and the network topology convergence speed is accelerated.
At present, STP edge port configuration mainly adopts manual configuration, configuration efficiency is low, and normal service processing is influenced.
Disclosure of Invention
In view of the above, the present application provides a method and a device for configuring an STP edge port, so as to implement automatic configuration of the STP edge port.
In order to achieve the purpose of the application, the application provides the following technical scheme:
in a first aspect, the present application provides an STP edge port configuration method, applied to a switching device, the method including:
receiving a message sent by neighbor equipment, wherein the message comprises the equipment type of the neighbor equipment;
and if the equipment type indicates that the neighbor equipment is the server type equipment, configuring a port connected with the neighbor equipment as an STP edge port.
Optionally, before receiving the message sent by the neighbor device, the method further includes:
configuring the port as a non-STP edge port by default.
Optionally, the packet is a link layer discovery protocol LLDP packet, and the device type is located in a chatsis ID TLV of the LLDP packet.
Optionally, after the port connected to the neighbor device is configured to be an STP edge port, the method further includes:
monitoring the connection state of the port;
and if the connection state is a DOWN state and the preset waiting time is continued, configuring the port as a non-STP edge port.
Optionally, the waiting duration is set according to a restart duration of the server.
In a second aspect, the present application provides an STP edge port configuration device, applied to a switching device, the device comprising:
the receiving unit is used for receiving a message sent by the neighbor equipment, wherein the message comprises the equipment type of the neighbor equipment;
a configuration unit, configured to configure a port connected to the neighbor device as an STP edge port if the device type indicates that the neighbor device is a server type device.
Optionally, the configuration unit is further configured to configure the port as a non-STP edge port by default before receiving the packet sent by the neighbor device.
Optionally, the packet is a link layer discovery protocol LLDP packet, and the device type is located in a chatsis ID TLV of the LLDP packet.
Optionally, the apparatus further comprises:
the monitoring unit is used for monitoring the connection state of the ports;
the configuration unit is further configured to configure the port as a non-STP edge port if the connection state is a DOWN state and the preset waiting duration continues.
Optionally, the waiting duration is set according to a restart duration of the server.
As can be seen from the above description, in the embodiment of the present application, the switching device receives a packet sent by the neighbor device, where the packet includes a device type to which the neighbor device belongs, and when the switching device determines that the neighbor device is a server according to the device type, the switching device performs STP edge port configuration on a port connected to the server. Therefore, the method and the device can realize automatic configuration of the STP edge port, thereby effectively improving the configuration efficiency and reducing the influence on the service network.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart illustrating an STP edge port configuration method according to an embodiment of the present application;
fig. 2 is a schematic format diagram of a chatiss ID TLV shown in the embodiment of the present application;
fig. 3 is a flowchart illustrating a port configuration update according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an STP edge port configuration device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the present application. As used in the embodiments of the present application, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the negotiation information may also be referred to as second information, and similarly, the second information may also be referred to as negotiation information without departing from the scope of the embodiments of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The application provides a STP edge port configuration method, which can automatically configure the STP edge port, thereby effectively improving the configuration efficiency and reducing the influence on normal services.
For the purpose of making the objects, aspects and advantages of the present application more apparent, the following detailed description of the present application is made with reference to the accompanying drawings and specific embodiments:
referring to fig. 1, a flowchart of an STP edge port configuration method is shown in an embodiment of the present application, and the flowchart is applied to a switching device.
Step 101, receiving a message sent by a neighbor device, where the message includes a device type to which the neighbor device belongs.
In a data center, the neighbor devices of the switching device may be servers, and may also be other network devices such as a switching device. That is, the port of the switching device may be connected to the server, or may be connected to other network devices such as the switching device.
In the embodiment of the application, the format of the message interacted between the switching device and the neighbor device may be agreed in advance, so that the neighbor device carries the device type information of the neighbor device itself in the message sent to the switching device according to the agreed format, and meanwhile, the switching device may also analyze the message according to the agreed format to obtain the device type of the neighbor device.
As an embodiment, the message may be a Link Layer Discovery Protocol (LLDP) message. The device Type of the neighbor device can be carried by the existing Type/Length/Value (English: Type/Length/Value, abbreviated as TLV) in the LLDP message, or carried by the newly added custom TLV.
As an example, in order to save network resources, the device type may be carried by the chatsis ID TLV that the LLDP packet must include. Specifically, the fact that the Chassis ID TLV carries the device type information can be identified by extending a Chassis ID subtype (subtype) field in the Chassis ID TLV, and a specific device type value is carried by the Chassis ID field in the Chassis ID TLV.
Referring to fig. 2, a format of the chatiss ID TLV is shown for the embodiment of the present application. The format includes TLV type (type), TLV length (length), chatsis ID subtype, and chatsis ID.
Wherein, the Chassis ID sublypes 0-7 are used, the present application may define that the Chassis ID sublype is 8 to identify that the Chassis ID field carries the device type value. Wherein, the Chassis ID is 1, which represents a server type device; the Chassis ID is 0, which indicates other types of devices, such as a switching device.
Therefore, the switching device can obtain the device type information of the neighbor device carried in the message by receiving the message sent by the neighbor device.
Step 102, if the device type indicates that the neighbor device is a server type device, configuring a port connected with the neighbor device as an STP edge port.
For example, in the received LLDP message, the Chassis ID subtype is 8, and the Chassis ID is 1, the switch device may determine that the neighbor device that sends the LLDP message is a server type device, and perform STP edge port configuration on a port connected to the neighbor device on the switch device.
Thus, the flow shown in fig. 1 is completed.
As can be seen from the flow shown in fig. 1, in the embodiment of the present application, the switching device determines the device type to which the neighbor device belongs based on a packet (carrying the device type to which the neighbor device belongs) sent by the neighbor device, and then automatically triggers the STP edge port configuration on the port to which the neighbor device belongs when the neighbor device is determined to be a server type device, so that the port configuration efficiency can be effectively improved, and the influence on the service network is reduced.
Here, it should be noted that, in the embodiment of the present application, after the switch device is started, all ports may be configured as non-STP edge ports by default. Therefore, when the server type equipment is identified subsequently, only the port connected with the server type equipment needs to be updated to be the STP edge port, the configuration time can be further shortened, and the configuration efficiency is improved.
For one embodiment, after performing step 102, the switching device may also perform the following port configuration update procedure. Referring to fig. 3, a port configuration update procedure is shown in an embodiment of the present application.
As shown in fig. 3, the process may include the following steps:
step 301, monitoring the connection state of the port.
The connection state of a port typically includes an UP state and a DOWN state. If the connection state of the monitoring port is an UP state, the connection state indicates that the equipment connected with the port is online (not disconnected), and the existing configuration of the port is maintained; if the connection state of the port is monitored to be a DOWN state, which indicates that the device connected to the port is disconnected, go to step 302.
Step 302, if the connection state is DOWN and the preset waiting time is continued, the port is configured as a non-STP edge port.
Here, it should be noted that the server rebooting or some special operation by the user may cause the server to disconnect from the switching device for a short time.
In order to avoid frequent update of the port configuration, in the embodiment of the present application, a waiting duration is preset, and when the DOWN state of the port continues for the preset waiting duration, the server device connected to the port is considered to be completely disconnected, and the default configuration of the port is recovered, that is, the port is configured as a non-STP edge port to be used for connecting other devices.
Of course, if the server is accessed (UP) through the port again, the port will be reconfigured as an STP edge port to meet the configuration requirement of the connection server through the aforementioned flow shown in fig. 1.
In addition, it should be added that the preset waiting duration in the embodiment of the present application may be set based on the restart duration of the server, and is at least greater than the restart duration of the server, so as to avoid updating the port configuration due to the restart (disconnection) of the server.
The flow shown in fig. 3 is completed.
The process shown in fig. 3 may be implemented to automatically update the port configuration of the switching device after the server is disconnected.
The method provided by the embodiment of the present application is described above, and the apparatus provided by the embodiment of the present application is described below:
referring to fig. 4, a schematic structural diagram of an STP edge port configuration device provided in an embodiment of the present application is shown.
The device includes: a receiving unit 401 and a configuration unit 402, wherein:
a receiving unit 401, configured to receive a message sent by a neighboring device, where the message includes a device type to which the neighboring device belongs;
a configuring unit 402, configured to configure a port connected to the neighbor device as an STP edge port if the device type indicates that the neighbor device is a server type device.
As an embodiment, the configuring unit 402 is further configured to configure the port as a non-STP edge port by default before receiving a packet sent by a neighbor device.
As an embodiment, the packet is a link layer discovery protocol LLDP packet, and the device type is located in a chatsis ID TLV of the LLDP packet.
As an embodiment, the apparatus further comprises:
the monitoring unit is used for monitoring the connection state of the ports;
the configuring unit 402 is further configured to configure the port as a non-STP edge port if the connection state is a DOWN state and the preset waiting duration continues.
As an embodiment, the waiting duration is set according to a restart duration of the server.
The description of the apparatus shown in fig. 4 is thus completed. In the embodiment of the application, the switching device judges the type of the device to which the neighbor device belongs based on the message (carrying the type of the device to which the neighbor device belongs) sent by the neighbor device, and then automatically triggers the configuration of the STP edge port on the port where the neighbor device belongs when the neighbor device is determined to be the server type device, so that the port configuration efficiency can be effectively improved, and the influence on a service network is reduced.
The above description is only a preferred embodiment of the present application, and should not be taken as limiting the present application, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present application shall be included in the scope of the present application.

Claims (10)

1. A configuration method for STP edge port of spanning tree protocol is applied to switching equipment, and is characterized in that the method comprises the following steps:
receiving a message sent by neighbor equipment, wherein the message comprises the equipment type of the neighbor equipment;
and if the equipment type indicates that the neighbor equipment is the server type equipment, configuring a port connected with the neighbor equipment as an STP edge port.
2. The method of claim 1, wherein prior to receiving the message sent by the neighbor device, the method further comprises:
configuring the port as a non-STP edge port by default.
3. The method of claim 1, wherein the packet is a Link Layer Discovery Protocol (LLDP) packet, and wherein the device type is located in a chatsis ID TLV of the LLDP packet.
4. The method of claim 1, wherein after the configuring the port connecting the neighbor device as an STP edge port, the method further comprises:
monitoring the connection state of the port;
and if the connection state is a DOWN state and the preset waiting time is continued, configuring the port as a non-STP edge port.
5. The method of claim 4, wherein the wait period is set according to a restart period of the server.
6. An apparatus for configuring an STP edge port, applied to a switching device, the apparatus comprising:
the receiving unit is used for receiving a message sent by the neighbor equipment, wherein the message comprises the equipment type of the neighbor equipment;
a configuration unit, configured to configure a port connected to the neighbor device as an STP edge port if the device type indicates that the neighbor device is a server type device.
7. The apparatus of claim 6, wherein:
the configuration unit is further configured to configure the port as a non-STP edge port by default before receiving a packet sent by a neighbor device.
8. The apparatus of claim 6, wherein the packet is a Link Layer Discovery Protocol (LLDP) packet, and wherein the device type is located in a Chassis ID TLV of the LLDP packet.
9. The apparatus of claim 6, wherein the apparatus further comprises:
the monitoring unit is used for monitoring the connection state of the ports;
the configuration unit is further configured to configure the port as a non-STP edge port if the connection state is a DOWN state and the preset waiting duration continues.
10. The apparatus of claim 9, wherein the wait period is set according to a restart period of the server.
CN202110736394.7A 2021-06-30 2021-06-30 Method and device for configuring spanning tree protocol edge port Pending CN113411220A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110736394.7A CN113411220A (en) 2021-06-30 2021-06-30 Method and device for configuring spanning tree protocol edge port

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110736394.7A CN113411220A (en) 2021-06-30 2021-06-30 Method and device for configuring spanning tree protocol edge port

Publications (1)

Publication Number Publication Date
CN113411220A true CN113411220A (en) 2021-09-17

Family

ID=77680546

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110736394.7A Pending CN113411220A (en) 2021-06-30 2021-06-30 Method and device for configuring spanning tree protocol edge port

Country Status (1)

Country Link
CN (1) CN113411220A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1469639A1 (en) * 2003-04-15 2004-10-20 ECI Telecom Ltd. Technology for improving STP protocols in Ethemet networks supporting VLANs
CN103236941A (en) * 2013-04-03 2013-08-07 华为技术有限公司 Link discovery method and device
CN105162733A (en) * 2015-09-25 2015-12-16 上海斐讯数据通信技术有限公司 Method and device for determining edge interface
CN108521341A (en) * 2018-03-23 2018-09-11 紫光华山信息技术有限公司 Message transmitting method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1469639A1 (en) * 2003-04-15 2004-10-20 ECI Telecom Ltd. Technology for improving STP protocols in Ethemet networks supporting VLANs
CN103236941A (en) * 2013-04-03 2013-08-07 华为技术有限公司 Link discovery method and device
CN105162733A (en) * 2015-09-25 2015-12-16 上海斐讯数据通信技术有限公司 Method and device for determining edge interface
CN108521341A (en) * 2018-03-23 2018-09-11 紫光华山信息技术有限公司 Message transmitting method and device

Similar Documents

Publication Publication Date Title
EP3188409B1 (en) Oam mechanisms for evpn active-active services
US7177919B1 (en) Method and system for controlling tasks on network cards
US7061858B1 (en) High availability architecture for network devices
CN115460068A (en) Method and system for high availability enhancement of computer networks
CN101060485B (en) Topology changed messages processing method and processing device
WO2016165463A1 (en) Software defined network-based link failure reporting method and forwarding device
US20130262604A1 (en) Method and system for matching and repairing network configuration
WO2014026512A1 (en) Processing method for applying rapid spanning tree protocol to single ring network topology
CN101304340A (en) Method and apparatus for monitoring resource condition as well as communication network
CN104869057A (en) OpeFlow switch graceful restart processing method, device and OpeFlow controller
US9288075B2 (en) Method and system for auto-configuration, and network node
CN107645394B (en) Switch configuration method in SDN network
CN113938405B (en) Data processing method and device
CN113746658A (en) Method, device and system for determining network slice topology
US10084656B2 (en) TRILL network establishing method, node, and system
CN115514719B (en) Message sending method, device, switch and readable storage medium
CN113411220A (en) Method and device for configuring spanning tree protocol edge port
CN108282383B (en) Method and equipment for realizing fault processing
WO2009062351A1 (en) Method for stacking system merging
JP5625494B2 (en) Transmission apparatus, control information setting method, and control information setting program
WO2021073367A1 (en) Data processing method, device, and system
CN103840965A (en) Method for enhancing quick fault convergence in RSTP
US20120230207A1 (en) Early detection of loss of continuity in a maintenance association
CN109361781B (en) Message forwarding method, device, server, system and storage medium
TWI554055B (en) Architecture heterogeneous network service interruption determining system and method

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210917

RJ01 Rejection of invention patent application after publication