CN105162733B - A kind of method and apparatus for determining edge interface - Google Patents

A kind of method and apparatus for determining edge interface Download PDF

Info

Publication number
CN105162733B
CN105162733B CN201510621356.1A CN201510621356A CN105162733B CN 105162733 B CN105162733 B CN 105162733B CN 201510621356 A CN201510621356 A CN 201510621356A CN 105162733 B CN105162733 B CN 105162733B
Authority
CN
China
Prior art keywords
port
stp
interchanger
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.)
Active
Application number
CN201510621356.1A
Other languages
Chinese (zh)
Other versions
CN105162733A (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 present invention provides a kind of method and apparatus for determining edge interface, applies on operation STP, RSTP or MSTP interchanger, wherein method includes:When being initialized in the port of interchanger, the port is set as designated port and externally sends specific two layer message;If the port is not received by STP, RSTP or MSTP BPDUs of opposite end transmission in setting time, it is determined that the port is edge port.The present invention can identify edge port under STP, RSTP or MSTP pattern, so as to simplify network calculations, raising efficiency.

Description

A kind of method and apparatus for determining edge interface
Technical field
The present invention relates to communication technical field, more particularly to a kind of method and apparatus for determining edge interface.
Background technology
During switchboard unit network, in multiple ports of an interchanger, some ports are connected with another interchanger, they Between have the interaction of specific two layer message, such as Multiple Spanning Tree Protocol (MSTP, Multiple Spanning Tree Protocol), link aggregate control protocol (LACP, Link Aggregation Control Protocol) etc.;Have plenty of with Non-switch is connected, such as computer, printer, does not need above-mentioned two layer message to interact between them, this switch ports themselves It is edge port (edge port), i.e. edge port are not direct to be connected with any interchanger, and also no-go end mouth is connected The port that network is connected with any interchanger indirectly.
If interchanger can recognize that edge port, just it can simplify network calculations, so as to raising efficiency, such as in MSTP calculating In, edge port can be directly entered forwarding state.Present case it is that some producers do not support this function, some producers are only This function is supported in part, and it is not supported in the case of Spanning-Tree Protocol (STP, Spanning Tree Protocol), so as to shadow Ring the efficiency of network calculations.
The content of the invention
In view of this, the invention provides a kind of method and apparatus for determining edge interface, network calculations can be simplified, carried Rise efficiency.
The invention provides a kind of method for determining edge interface, applies in operation Spanning-Tree Protocol STP, quickly generates tree On agreement RSTP or Multiple Spanning Tree Protocol MSTP interchanger, this method includes:When being initialized in the port of interchanger, if The port is determined for designated port and externally sends specific two layer message;If the port is not received by pair in setting time Hold STP, the RSTP or MSTP BPDUs sent, it is determined that the port is edge port edge port.
Further, it is described externally to send specific two layer message, be specially:Determine the agreement of interchanger operation;If Interchanger runs RSTP and MSTP, when being initialized in the port of interchanger, sets the port as designated port and to outgoing Send proposal messages;If interchanger runs STP, when being initialized in the port of interchanger, it is specified to set the port Port simultaneously externally sends STP BPDUs.
Further, it is described externally to send STP BPDUs, be specially:Pre-set the quantity for sending STP BPDUs and transmission The interval time of STP BPDUs;According to interval time, the STP BPDUs that quantity is set at least externally are sent.
Further, methods described also includes:Increase counter in a switch to count the quantity for sending STP BPDUs Number.
Further, the setting time is 3 seconds;The quantity of setting is 2;The interval time of setting is 2 seconds.
Present invention also offers a kind of device for being used to determine edge interface, applies in operation Spanning-Tree Protocol STP, quickly On Spanning-Tree Protocol RSTP or Multiple Spanning Tree Protocol MSTP interchanger, the device includes:First processing module, for exchanging When the port of machine is initialized, the port is set as designated port and externally sends specific two layer message;Second processing mould Block, if being not received by STP, RSTP or MSTP BPDUs of opposite end transmission in setting time for the port, it is determined that this Port is edge port edge port.
Further, the first processing module, is specifically used for:Determine the agreement of interchanger operation;If interchanger is transported Row RSTP and MSTP, when being initialized in the port of interchanger, the port are set as designated port and is externally sent Proposal messages;If interchanger runs STP, when being initialized in the port of interchanger, the port is set as designated ends Mouth simultaneously externally sends STP BPDUs.
Further, the first processing module externally sends STP BPDUs, is specially:Pre-set and send STP BPDUs Quantity and the interval time for sending STP BPDUs;According to interval time, the STP BPDUs that quantity is set at least externally are sent.
Further, the Second processing module, is specifically used for:Judge that opposite end whether is received in setting time to be sent to STP, RSTP or MSTP BPDUs;If received, the port is non-edge port;If do not received, the port is non- edge port。
Further, described device also includes:Counter, for being counted to the quantity for sending STP BPDUs.
Compared to the prior art, the beneficial effects of the present invention are:Interchanger can be under STP, RSTP or MSTP pattern Identify that edge port, edge port can be directly entered forwarding state, so as to simplify network calculations, raising efficiency.
Brief description of the drawings
Fig. 1 is the networking schematic diagram disclosed in this invention for being used to determine the system of edge interface.
Fig. 2 is the schematic flow sheet of the method for determination edge interface disclosed in this invention.
Fig. 3 is the detailed process schematic diagram of the method for the determination edge interface based on Fig. 2.
Fig. 4 is the structural representation disclosed in this invention for being used to determine the device of edge interface.
Embodiment
Below with reference to embodiment shown in the drawings, the present invention will be described in detail, but these embodiments are simultaneously The present invention is not limited, structure that one of ordinary skill in the art is made according to these embodiments, method or functionally Conversion is all contained in protection scope of the present invention.
Spanning-Tree Protocol (STP, Spanning Tree Protocol) is a kind of two layer-management agreements, and it passes through selectivity Redundant link in ground clogging networks eliminates double-layer loop, while is also equipped with the function of link backup.Spanning-Tree Protocol with The development of network and constantly update, from initial STP to RSTP (RSTP, Rapid Spanning Tree Protocol), then to Multiple Spanning Tree Protocol (MSTP, Multiple Spanning Tree Protocol).
The main distinction between STP, RSTP and MSTP is:STP, it is impossible to fast transferring, even in point-to-point link or Edge port, it is also necessary to wait 2 times of forward delay time delay, network could restrain;RSTP, according to IEEE Std 802.1w are defined, by P (proposal)/A (agreement) mechanism Fast Convergent, but all bridges in LAN Share a spanning tree, it is impossible to block redundant link by VLAN (VLAN, Virtual Local Area Network); MSTP, it is allowed to which different VLAN flow is distributed along respective path, so as to provide more preferable load balancing machine for redundant link System.
Fig. 1 is the system group network figure for being used to determine edge interface in a specific embodiment of the invention.Reference picture 1, it is at this Assume there are three interchangers in system, in multiple ports of every interchanger, there is port to be connected with another interchanger, between them There is specific two layer message to interact;Every interchanger all includes the edge port with non-switch connection, such as this three exchanges Machine passes through oneself edge port connection servers, PC and printer respectively.
Fig. 2 is the schematic flow sheet of the method for determination edge interface disclosed in this invention.Reference picture 2, the present invention is really Determine the method for edge interface, apply on operation STP, RSTP or MSTP interchanger, this method includes:
Step 201, when being initialized in the port of interchanger, the port is set as designated port and is externally sent specific Two layer message;
Step 202, if the port is not received by STP, RSTP or MSTP BPDUs of opposite end transmission in setting time, Then determine that the port is edge port.
Fig. 3 is the detailed process schematic diagram of the method for the determination edge interface based on Fig. 2.Reference picture 3, this method includes:
Step 301, the agreement of interchanger operation is determined.
In this step, the agreement includes STP, RSTP and MSTP.
STP incompatible RSTP and MSTP, that is, STP interchanger nonrecognition RSTP and MSTP BPDUs are run, if received RSTP or MSTP BPDUs typically directly abandon;RSTP and MSTP compatibility STP, that is, the interchanger for running RSTP and MSTP receive STP BPDUs, it can be run in a manner of STP.
Step 302, if interchanger runs RSTP and MSTP, when being initialized in the port of interchanger, local terminal is set Mouth is designated port and externally sends proposal messages.
Step 303, if interchanger runs STP, when being initialized in the port of interchanger, it is specified to set the port Port simultaneously externally sends STP BPDUs.
In this step, due to RSTP and MSTP compatibility STP, as long as therefore appointing in opposite end support STP, RSTP and MSTP Meaning is a kind of, can all enter STP patterns, is likely to send STP BPDUs.But if the STP BPDUs priority that the port is sent is higher, Then opposite end just can not necessarily send out STP BPDUs, and it is edge port to lead to not judge whether.Therefore, it is necessary to ensure that the port is sent out The priority of the STP BPDUs gone out.
Specifically, after the port enters STP, when the quantity for sending STP BPDUs being set and sending the interval of STP BPDUs Between, counter can be increased in a switch to be counted to the quantity for sending STP BPDUs.No matter which kind of situation, all at least Send the STP BPDUs that quantity is set.When the STP BPDUs priority sent is relatively low, opposite end typically directly discard processing, because This influences little;Under MSTP scenes, the probability of message dropping is relatively low, therefore may be configured as at least sending 2 STP BPDUs, this It is outer that the interval time for sending STP BPDUs is set for no more than 2 seconds, follow-up STP BPDUs were still sent by former protocol specification.
Step 304, judge STP, RSTP or MSTP BPDUs that opposite end is sent to whether are received in setting time, if It is that then the port is non-edge port;If it is not, then the port is edge port.
In this step, as long as supporting the interchanger of STP type protocols, the STP classes that quantity is set just can at least be sent Type message, and non-switch will not send the message of any STP types, wherein STP type messages refer to STP, RSTP or MSTP Any one in type.
In this way, in setting time, such as 3S, STP, RSTP or MSTP BPDUs that opposite end is sent to inside are received, then the port For non-edge port;If STP, RSTP or MSTP BPDUs that opposite end is sent to are not received in setting time, the port For edge port.
As shown in figure 4, present invention also offers a kind of device for being used to determine edge interface, apply in operation STP, RSTP Or on MSTP interchanger, the device includes:
First processing module 401, during for being initialized in the port of interchanger, set the port as designated port simultaneously Externally send specific two layer message;
Second processing module 402, if be not received by for the port in setting time STP that opposite end is sent to, RSTP or MSTP BPDUs, it is edge port to determine the port.
Further, first processing module is specifically used for:Determine the agreement of interchanger operation;If interchanger runs RSTP And MSTP, when being initialized in the port of interchanger, the port is set as designated port and externally sends proposal messages; If interchanger runs STP, when being initialized in the port of interchanger, the port is set as designated port and is externally sent STP BPDUs.
Further, Second processing module is specifically used for:Judge whether receive what opposite end was sent in setting time STP, RSTP or MSTP BPDUs;If received, the port is non-edge port;If do not received, the port edge port。
Further, the device also includes:Counter, for being counted to the quantity for sending STP BPDUs.
The present invention is used to determine that the ins and outs of the device of edge interface are similar with foregoing determination edge interface, therefore herein Do not repeat.
Interchanger can identify that edge port, edge port can be straight under STP, RSTP or MSTP pattern in the present invention Tap into forwarding state, so as to simplify network calculations, raising efficiency.
Although the present invention is disclosed as above with preferred embodiment, the present invention is not limited to this.Any art technology Personnel, without departing from the spirit and scope of the present invention, it can make various changes or modifications, therefore protection scope of the present invention should It is defined when by claim limited range.It is obvious to a person skilled in the art that the invention is not restricted to above-mentioned demonstration Property embodiment details, and without departing from the spirit or essential characteristics of the present invention, can be with other specific shapes Formula realizes the present invention.Therefore, no matter from the point of view of which point, embodiment all should be regarded as exemplary, and be non-limiting , the scope of the present invention is limited by appended claims rather than described above, it is intended that will fall being equal in claim All changes in the implication and scope of important document are included in the present invention.

Claims (6)

  1. A kind of 1. method for determining edge interface, it is characterised in that apply in operation Spanning-Tree Protocol STP, quickly generate tree association On the interchanger for discussing RSTP or Multiple Spanning Tree Protocol MSTP, this method includes:
    When being initialized in the port of interchanger, the port is set as designated port and externally sends specific two layer message;
    If the port is not received by STP, RSTP or MSTP BPDUs of opposite end transmission in setting time, it is determined that the port For edge port edge port;
    It is described externally to send specific two layer message, be specially:
    Determine the agreement of interchanger operation;
    If interchanger runs RSTP and MSTP, when being initialized in the port of interchanger, the port is set as designated port And externally send proposal messages;
    If interchanger runs STP, when being initialized in the port of interchanger, the port is set as designated port and to outgoing Send STP BPDUs;It is described externally to send STP BPDUs, be specially:
    Pre-set the quantity for sending STP BPDUs and the interval time for sending STP BPDUs;
    According to interval time, the STP BPDUs that quantity is set at least externally are sent.
  2. 2. the method for edge interface is determined as claimed in claim 1, it is characterised in that methods described also includes:In interchanger Middle increase counter counts to the quantity for sending STP BPDUs.
  3. 3. the method for edge interface is determined as claimed in claim 1, it is characterised in that the setting time is 3 seconds;Set Quantity is 2;The interval time of setting is 2 seconds.
  4. 4. a kind of device for being used to determine edge interface, it is characterised in that apply in operation Spanning-Tree Protocol STP, quickly generate On tree protocol RSTP or Multiple Spanning Tree Protocol MSTP interchanger, the device includes:
    First processing module, during for being initialized in the port of interchanger, the port is set as designated port and to outgoing Send specific two layer message;
    Second processing module, if being not received by STP, RSTP or MSTP of opposite end transmission in setting time for the port Message, it is determined that the port is edge port edge port;
    The first processing module, is specifically used for:Determine the agreement of interchanger operation;If interchanger runs RSTP and MSTP, When being initialized in the port of interchanger, the port is set as designated port and externally sends proposal messages;If hand over Change planes operation STP, when being initialized in the port of interchanger, sets the port as designated port and externally sends STP BPDUs;
    The first processing module externally sends STP BPDUs, is specially:Pre-set the quantity for sending STP BPDUs and send STP The interval time of message;According to interval time, the STP BPDUs that quantity is set at least externally are sent.
  5. 5. the device as claimed in claim 4 for being used to determine edge interface, it is characterised in that the Second processing module, tool Body is used for:Judge STP, RSTP or MSTP BPDUs that opposite end is sent to whether are received in setting time;If received, local terminal Mouth is non-edge port;If do not received, the port is edge port.
  6. 6. the device as claimed in claim 4 for being used to determine edge interface, it is characterised in that described device also includes:Count Device, for being counted to the quantity for 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 CN105162733A (en) 2015-12-16
CN105162733B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

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设计与实现》;漆帅;《中国优秀硕士学位论文全文数据库 信息科技辑》;20130115(第01期);正文第4-8、14、33-36页 *
《生成树协议改进方法分析》;陈宇;《微计算机信息》;20100131;第27卷(第1期);全文 *

Also Published As

Publication number Publication date
CN105162733A (en) 2015-12-16

Similar Documents

Publication Publication Date Title
CN104104570B (en) Aggregation processing method in IRF systems and device
EP3082309B1 (en) Sdn controller, data centre system and router connection method
KR101706007B1 (en) A method and system for synchronizing with neighbor in a distributed resilient network interconnect link aggregation group
CN101964746B (en) Routing frames in shortest path computer network for multi-homed legacy bridge node
CN102821050B (en) A kind of RSTP is applied to the processing method of Single-ring network topology
CN102684979B (en) A kind of multicast data forwarding method and device for supporting virtual terminal
EP2701342A1 (en) Method and system for implementing elastic network interface and interconnection
CN104735001B (en) Link discovery method, apparatus and system in software defined network
EP2911355B1 (en) Method and device for flow path negotiation in link aggregation group
CN104798350B (en) The method and system of virtual link polymerization across multiple fabric switch
EP2689561B1 (en) Directing traffic in an edge network element operable to perform layer 2 data forwarding and supporting any of various spanning tree protocols
US9641396B2 (en) Packet processing method and system
CN103051536A (en) Quick multicast switching method of two-layer redundant link
CN103684716A (en) Method for transmitting messages in a redundantly operable industrial communication network and communication device for the redundantly operable industrial communication network
CN102223312B (en) Flow control method and equipment based on link status
EP3200398A1 (en) Automated mirroring and remote switch port analyzer (rspan)/encapsulated remote switch port analyzer (erspan) functions using fabric attach (fa) signaling
CN104980302A (en) STP-based method for removing redundancy link under SDN framework
US20170195213A1 (en) Multipath switching using per-hop virtual local area network classification
WO2012119372A1 (en) Message processing method, device and system
CN105162733B (en) A kind of method and apparatus for determining edge interface
CN106301871A (en) A kind of forwarding detection (BFD) method based on lacp and system
CN102769567B (en) A kind of retransmission method of multilink transparent internet Frame and device
CN102437967A (en) Method and device for forwarding messages
CN204928874U (en) A communication equipment that be used for can redundant operation industry communications network
JP5929720B2 (en) Communication system and network relay device

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