CN105162733A - Method and device for determining edge interface - Google Patents

Method and device for determining edge interface Download PDF

Info

Publication number
CN105162733A
CN105162733A CN201510621356.1A CN201510621356A CN105162733A CN 105162733 A CN105162733 A CN 105162733A CN 201510621356 A CN201510621356 A CN 201510621356A CN 105162733 A CN105162733 A CN 105162733A
Authority
CN
China
Prior art keywords
port
stp
switch
bpdus
rstp
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
CN201510621356.1A
Other languages
Chinese (zh)
Other versions
CN105162733B (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.)
Huzhou Yinglie Intellectual Property Operation Co ltd
Original Assignee
Shanghai Feixun Data Communication 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 Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201510621356.1A priority Critical patent/CN105162733B/en
Publication of CN105162733A publication Critical patent/CN105162733A/en
Application granted granted Critical
Publication of CN105162733B publication Critical patent/CN105162733B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a method and a device for determining an edge interface. The method and the device are applied to a switch in which an STP, an RSTP or an MSTP is run, wherein the method comprises: when the port of the switch is initialized, setting a local port as a specified port and sending a specific layer 2 message to the outside; and determining the local port as an edge port if the local port does not receive an STP, RSTP or MSTP message sent by an opposite end within set time. The method is capable of identifying the edge port in an STP, RSTP or MSTP mode, and therefore, network calculation can be simplified and the efficiency is improved.

Description

A kind of method and apparatus determining edge interface
Technical field
The present invention relates to communication technical field, particularly relate to a kind of method and apparatus determining edge interface.
Background technology
During switchboard unit network, in multiple ports of a switch, some ports are connected with another switch, specific two layer message is had mutual between them, as Multiple Spanning Tree Protocol (MSTP, MultipleSpanningTreeProtocol), link aggregate control protocol (LACP, LinkAggregationControlProtocol) etc.; Have plenty of and be connected with non-switch, as computer, printer etc., do not need above-mentioned two layer message mutual between them, this switch ports themselves is edge port (edgeport), namely edgeport is not directly connected with any switch, the port that the network that also no-go end mouth connects is connected with any switch indirectly.
If switch can identify edge port, just can calculate by simplified network, thus raising efficiency, such as, in MSTP calculates, edgeport directly can enter forwarding state.But present case is, some producers do not support this function, and some producers only part support this function, and it does not support in Spanning-Tree Protocol (STP, SpanningTreeProtocol) situation, thus affects the efficiency of network calculations.
Summary of the invention
In view of this, the invention provides a kind of method and apparatus determining edge interface, can calculate by simplified network, raising efficiency.
The invention provides a kind of method determining edge interface, be applied on the switch of operation Spanning-Tree Protocol STP, RSTP RSTP or Multiple Spanning Tree Protocol MSTP, the method comprises: when the port of switch carries out initialization, and setting the port is designated port and externally sends specific two layer message; If the port does not receive STP, RSTP or the MSTP BPDUs of opposite end transmission in setting-up time, then determine that the port is edge port edgeport.
Further, the specific two layer message of described external transmission, is specially: determine the agreement that switch runs; If switch runs RSTP and MSTP, when the port of switch carries out initialization, setting the port is designated port and externally sends proposal message; If switch runs STP, when the port of switch carries out initialization, setting the port is designated port and externally sends STP BPDUs.
Further, described external transmission STP BPDUs, is specially: pre-set the quantity sending STP BPDUs and the interval time sending STP BPDUs; According to interval time, at least externally send the STP BPDUs of magnitude setting.
Further, described method also comprises: increase counter in a switch and count the quantity sending STP BPDUs.
Further, described setting-up time is 3 seconds; The quantity arranged is 2; The interval time arranged is 2 seconds.
Present invention also offers a kind of device for determining edge interface, be applied on the switch of operation Spanning-Tree Protocol STP, RSTP RSTP or Multiple Spanning Tree Protocol MSTP, this device comprises: the first processing module, for when the port of switch carries out initialization, setting the port is designated port and externally sends specific two layer message; Second processing module, if STP, the RSTP or the MSTP BPDUs that do not receive opposite end transmission for the port in setting-up time, then determines that the port is edge port edgeport.
Further, described first processing module, specifically for: determine the agreement that switch runs; If switch runs RSTP and MSTP, when the port of switch carries out initialization, setting the port is designated port and externally sends proposal message; If switch runs STP, when the port of switch carries out initialization, setting the port is designated port and externally sends STP BPDUs.
Further, described first processing module externally sends STP BPDUs, is specially: pre-set the quantity sending STP BPDUs and the interval time sending STP BPDUs; According to interval time, at least externally send the STP BPDUs of magnitude setting.
Further, described second processing module, specifically for: judge whether to receive in setting-up time STP, RSTP or MSTP BPDUs that opposite end is sent to; If received, then the port is non-edgeport; If do not received, then the port is non-edgeport.
Further, described device also comprises: counter, for counting the quantity sending STP BPDUs.
Compared to the prior art, beneficial effect of the present invention is: switch can identify edgeport under STP, RSTP or MSTP pattern, and edgeport directly can enter forwarding state, thus simplified network calculates, raising efficiency.
Accompanying drawing explanation
Fig. 1 is the networking schematic diagram of the system for determining edge interface disclosed in this invention.
Fig. 2 is the schematic flow sheet determining the method for edge interface disclosed in this invention.
Fig. 3 is the detailed process schematic diagram of the method for determination edge interface based on Fig. 2.
Fig. 4 is the structural representation of the device for determining edge interface disclosed in this invention.
Embodiment
Describe the present invention below with reference to embodiment shown in the drawings; but these execution modes do not limit the present invention, the structure that those of ordinary skill in the art makes according to these execution modes, method or conversion functionally are all included in protection scope of the present invention.
Spanning-Tree Protocol (STP, SpanningTreeProtocol) is a kind of two layer-management agreements, and it eliminates double-layer loop by the redundant link in optionally clogging networks, also possesses the function of link backup simultaneously.Spanning-Tree Protocol is constantly updated along with the development of network, from initial STP to RSTP (RSTP, RapidSpanningTreeProtocol), then to Multiple Spanning Tree Protocol (MSTP, MultipleSpanningTreeProtocol).
The main distinction between STP, RSTP and MSTP is: STP, can not fast transferring, even at point-to-point link or edge port, also must wait for the time delay of the forwarddelay of 2 times, network could be restrained; RSTP, define according to IEEEStd802.1w, by P (proposal)/A (agreement) machine-processed Fast Convergent, but a spanning tree shared by all bridges in local area network (LAN), redundant link can not be blocked by VLAN (VLAN, VirtualLocalAreaNetwork); MSTP, allows the flow of different VLAN along the distribution of respective path, thus provides better load balancing mechanism for redundant link.
Fig. 1 is for determining the system group network figure of edge interface in the present invention one specific embodiment.With reference to Fig. 1, hypothesis has three switches within the system, and in multiple ports of every platform switch, ports having is connected with another switch, has specific two layer message mutual between them; Every platform switch all comprises the edgeport connected with non-switch, and such as these three switches are respectively by oneself edgeport connection server, PC and printer.
Fig. 2 is the schematic flow sheet determining the method for edge interface disclosed in this invention.With reference to Fig. 2, the method determining edge interface of the present invention, be applied on the switch of operation STP, RSTP or MSTP, the method comprises:
Step 201, when the port of switch carries out initialization, setting the port is designated port and externally sends specific two layer message;
Step 202, if the port does not receive STP, RSTP or the MSTP BPDUs of opposite end transmission in setting-up time, then determines that the port is edgeport.
Fig. 3 is the detailed process schematic diagram of the method for determination edge interface based on Fig. 2.With reference to Fig. 3, the method comprises:
Step 301, determines the agreement that switch runs.
In this step, this agreement comprises STP, RSTP and MSTP.
Incompatible RSTP and MSTP of STP, namely runs switch nonrecognition RSTP and the MSTP BPDUs of STP, if receive RSTP or MSTP BPDUs directly abandons usually; The compatible STP of RSTP and MSTP, the switch namely running RSTP and MSTP receives STP BPDUs, can run in STP mode.
Step 302, if switch runs RSTP and MSTP, when the port of switch carries out initialization, setting the port is designated port and externally sends proposal message.
Step 303, if switch runs STP, when the port of switch carries out initialization, setting the port is designated port and externally sends STP BPDUs.
In this step, due to the compatible STP of RSTP and MSTP, as long as therefore any one in STP, RSTP and MSTP is supported in opposite end, all can enter STP pattern, all likely send STP BPDUs.If but the STP BPDUs priority that the port sends is higher, then STP BPDUs just not necessarily can be sent out in opposite end, and causing judging whether is edgeport.Therefore, the priority ensureing the STP BPDUs that the port sends is needed.
Particularly, after the port enters STP, the quantity sending STP BPDUs and the interval time sending STP BPDUs are set, counter can be increased in a switch the quantity sending STP BPDUs is counted.No matter which kind of situation, all at least send the STP BPDUs of magnitude setting.When the STP BPDUs priority sent is lower, opposite end is direct discard processing usually, and therefore impact is little; Under MSTP scene, the probability of message dropping is lower, therefore can be set at least send 2 STP BPDUs, and arrange the interval time of transmission STP BPDUs in addition for being no more than 2 seconds, follow-up STP BPDUs still sends by former protocol specification.
Step 304, judge whether to receive in setting-up time STP, RSTP or MSTP BPDUs that opposite end is sent to, if so, then the port is non-edgeport; If not, then the port is edgeport.
In this step, as long as support the switch of STP type protocol, just send the STP type message of magnitude setting to I haven't seen you for ages, and non-switch can not send the message of any STP type, wherein namely STP type message refers to any one in STP, RSTP or MSTP type.
So, at setting-up time, such as 3S, inside receive STP, RSTP or MSTP BPDUs that opposite end is sent to, then the port is non-edgeport; If do not receive STP, RSTP or MSTP BPDUs that opposite end is sent in setting-up time, then the port is edgeport.
As shown in Figure 4, present invention also offers a kind of device for determining edge interface, be applied on the switch of operation STP, RSTP or MSTP, this device comprises:
First processing module 401, for when the port of switch carries out initialization, setting the port is designated port and externally sends specific two layer message;
Second processing module 402, if do not receive for the port STP, RSTP or MSTP BPDUs that opposite end is sent in setting-up time, determines that the port is edgeport.
Further, the first processing module specifically for: determine the agreement that switch runs; If switch runs RSTP and MSTP, when the port of switch carries out initialization, setting the port is designated port and externally sends proposal message; If switch runs STP, when the port of switch carries out initialization, setting the port is designated port and externally sends STP BPDUs.
Further, the second processing module specifically for: judge whether to receive in setting-up time STP, RSTP or MSTP BPDUs that opposite end is sent to; If received, then the port is non-edgeport; If do not received, then the port is edgeport.
Further, this device also comprises: counter, for counting the quantity sending STP BPDUs.
The present invention for determining the ins and outs of the device of edge interface and aforesaidly determining that edge interface is similar, therefore is not repeated herein.
In the present invention, switch can identify edgeport under STP, RSTP or MSTP pattern, and edgeport directly can enter forwarding state, thus simplified network calculates, raising efficiency.
Although the present invention discloses as above with preferred embodiment, the present invention is not defined in this.Any those skilled in the art, without departing from the spirit and scope of the present invention, all can make various changes or modifications, and therefore protection scope of the present invention should be as the criterion with claim limited range.To those skilled in the art, obviously the invention is not restricted to the details of above-mentioned one exemplary embodiment, and when not deviating from spirit of the present invention or essential characteristic, the present invention can be realized in other specific forms.Therefore, no matter from which point, all should embodiment be regarded as exemplary, and be nonrestrictive, scope of the present invention is limited by claims instead of above-mentioned explanation, and all changes be therefore intended in the implication of the equivalency by dropping on claim and scope are included in the present invention.

Claims (10)

1. determine a method for edge interface, it is characterized in that, be applied on the switch of operation Spanning-Tree Protocol STP, RSTP RSTP or Multiple Spanning Tree Protocol MSTP, the method comprises:
When the port of switch carries out initialization, setting the port is designated port and externally sends specific two layer message;
If the port does not receive STP, RSTP or the MSTP BPDUs of opposite end transmission in setting-up time, then determine that the port is edge port edgeport.
2. determine the method for edge interface as claimed in claim 1, it is characterized in that, the specific two layer message of described external transmission, is specially:
Determine the agreement that switch runs;
If switch runs RSTP and MSTP, when the port of switch carries out initialization, setting the port is designated port and externally sends proposal message;
If switch runs STP, when the port of switch carries out initialization, setting the port is designated port and externally sends STP BPDUs.
3. determine the method for edge interface as claimed in claim 2, it is characterized in that, described external transmission STP BPDUs, is specially:
Pre-set the quantity sending STP BPDUs and the interval time sending STP BPDUs;
According to interval time, at least externally send the STP BPDUs of magnitude setting.
4. determine the method for edge interface as claimed in claim 3, it is characterized in that, described method also comprises: increase counter in a switch and count the quantity sending STP BPDUs.
5. determine the method for edge interface as claimed in claim 3, it is characterized in that, described setting-up time is 3 seconds; The quantity arranged is 2; The interval time arranged is 2 seconds.
6. for determining a device for edge interface, it is characterized in that, be applied on the switch of operation Spanning-Tree Protocol STP, RSTP RSTP or Multiple Spanning Tree Protocol MSTP, this device comprises:
First processing module, for when the port of switch carries out initialization, setting the port is designated port and externally sends specific two layer message;
Second processing module, if STP, the RSTP or the MSTP BPDUs that do not receive opposite end transmission for the port in setting-up time, then determines that the port is edge port edgeport.
7., as claimed in claim 6 for determining the device of edge interface, it is characterized in that, described first processing module, specifically for: determine the agreement that switch runs; If switch runs RSTP and MSTP, when the port of switch carries out initialization, setting the port is designated port and externally sends proposal message; If switch runs STP, when the port of switch carries out initialization, setting the port is designated port and externally sends STP BPDUs.
8. as claimed in claim 7 for determining the device of edge interface, it is characterized in that, described first processing module externally sends STP BPDUs, is specially: pre-set the quantity sending STP BPDUs and the interval time sending STP BPDUs; According to interval time, at least externally send the STP BPDUs of magnitude setting.
9. as claimed in claim 6 for determining the device of edge interface, it is characterized in that, described second processing module, specifically for: judge whether to receive in setting-up time STP, RSTP or MSTP BPDUs that opposite end is sent to; If received, then the port is non-edgeport; If do not received, then the port is edgeport.
10. as claimed in claim 8 for determining the device of edge interface, it is characterized in that, described device also comprises: counter, for counting the quantity sending STP BPDUs.
CN201510621356.1A 2015-09-25 2015-09-25 A kind of method and apparatus for determining edge interface Active CN105162733B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510621356.1A CN105162733B (en) 2015-09-25 2015-09-25 A kind of method and apparatus for determining edge interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510621356.1A CN105162733B (en) 2015-09-25 2015-09-25 A kind of method and apparatus for determining edge interface

Publications (2)

Publication Number Publication Date
CN105162733A true CN105162733A (en) 2015-12-16
CN105162733B CN105162733B (en) 2018-04-06

Family

ID=54803489

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510621356.1A Active CN105162733B (en) 2015-09-25 2015-09-25 A kind of method and apparatus for determining edge interface

Country Status (1)

Country Link
CN (1) CN105162733B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108243027A (en) * 2016-12-23 2018-07-03 大唐移动通信设备有限公司 A kind of port initialization method and device
CN113411220A (en) * 2021-06-30 2021-09-17 新华三技术有限公司 Method and device for configuring spanning tree protocol edge port

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003318933A (en) * 2002-04-22 2003-11-07 Hitachi Ltd Method for effectively utilizing redundant port
CN1801820A (en) * 2006-01-11 2006-07-12 杭州华为三康技术有限公司 Port state shift method
CN1937567A (en) * 2006-08-10 2007-03-28 杭州华为三康技术有限公司 Method for determining port role
CN104301226A (en) * 2013-07-16 2015-01-21 杭州华三通信技术有限公司 Designated routing bridge (DRB) election method, equipment and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003318933A (en) * 2002-04-22 2003-11-07 Hitachi Ltd Method for effectively utilizing redundant port
CN1801820A (en) * 2006-01-11 2006-07-12 杭州华为三康技术有限公司 Port state shift method
CN1937567A (en) * 2006-08-10 2007-03-28 杭州华为三康技术有限公司 Method for determining port role
CN104301226A (en) * 2013-07-16 2015-01-21 杭州华三通信技术有限公司 Designated routing bridge (DRB) election method, equipment and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
漆帅: "《基于LINUX的MSTP设计与实现》", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
陈宇: "《生成树协议改进方法分析》", 《微计算机信息》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108243027A (en) * 2016-12-23 2018-07-03 大唐移动通信设备有限公司 A kind of port initialization method and device
CN108243027B (en) * 2016-12-23 2020-04-07 大唐移动通信设备有限公司 Port initialization method and device
CN113411220A (en) * 2021-06-30 2021-09-17 新华三技术有限公司 Method and device for configuring spanning tree protocol edge port

Also Published As

Publication number Publication date
CN105162733B (en) 2018-04-06

Similar Documents

Publication Publication Date Title
CN102821050B (en) A kind of RSTP is applied to the processing method of Single-ring network topology
KR101869902B1 (en) Sdn controller, data centre system, and router connection method
CN101964746B (en) Routing frames in shortest path computer network for multi-homed legacy bridge node
US8102760B2 (en) Method for reconvergence after failure in a dual-homing network environment
EP2689561B1 (en) Directing traffic in an edge network element operable to perform layer 2 data forwarding and supporting any of various spanning tree protocols
CN103051536A (en) Quick multicast switching method of two-layer redundant link
US20140369230A1 (en) Virtual Chassis Topology Management
CN102299845A (en) Multi-link transparent interconnection multicast frame transmission method and system thereof
CN104243239B (en) The condition detection method and device of controller in a kind of SDN clusters
WO2011113394A2 (en) Router, virtual cluster router system and establishion method thereof
CN106664235B (en) Method and device for fusing software defined network and traditional network
CN105656715B (en) Method and apparatus for monitoring the state of cloud computing environment lower network equipment
KR20130055392A (en) Method and appratus for protection switching in point-to- multipoint network
CN102571612A (en) Virtual router redundancy protocol (VRRP) state switching method and three-layer exchange equipment
CN104639437A (en) Forwarding method and apparatus of broadcast messages in stack system
CN104219115A (en) Method and system of performing heterogeneous hybrid networking through Ethernet ring protocol and spanning tree protocol
CN105162733A (en) Method and device for determining edge interface
CN102255758B (en) Method for increasing convergence rate of RSTP (Rapid Spanning Tree Protocol)
CN101478489B (en) Method and system for controlling default routing notification by IS-IS protocol
WO2014075594A1 (en) Service transmission protection method and device based on intersecting ring of multi-ring structure network
US9225667B2 (en) Communication system and network relay apparatus
CN106105129B (en) Topology learning method and apparatus of the Openflow network across traditional IP
CN103152262B (en) A kind of method and apparatus of connection establishment
US9942126B2 (en) Distributing non-unicast routes information in a TRILL network
JP2010087551A (en) Network route setup system, network route setup method and network setting server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201125

Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201214

Address after: 233000 3rd floor, Dong'an Market, Fengyang West Road, Longzihu District, Bengbu City, Anhui Province

Patentee after: Bengbu 309 Technology Consulting Co.,Ltd.

Address before: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210129

Address after: 313001 room 1019, Xintiandi office building, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: 233000 3rd floor, Dong'an Market, Fengyang West Road, Longzihu District, Bengbu City, Anhui Province

Patentee before: Bengbu 309 Technology Consulting Co.,Ltd.

TR01 Transfer of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Method and device for determining edge interface

Effective date of registration: 20230111

Granted publication date: 20180406

Pledgee: Huzhou Wuxing Rural Commercial Bank Co.,Ltd. high tech Zone Green sub branch

Pledgor: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Registration number: Y2023330000072

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20231205

Granted publication date: 20180406

Pledgee: Huzhou Wuxing Rural Commercial Bank Co.,Ltd. high tech Zone Green sub branch

Pledgor: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Registration number: Y2023330000072

PC01 Cancellation of the registration of the contract for pledge of patent right