CN108173757B - Port state setting method and device - Google Patents

Port state setting method and device Download PDF

Info

Publication number
CN108173757B
CN108173757B CN201711428960.8A CN201711428960A CN108173757B CN 108173757 B CN108173757 B CN 108173757B CN 201711428960 A CN201711428960 A CN 201711428960A CN 108173757 B CN108173757 B CN 108173757B
Authority
CN
China
Prior art keywords
bpdu message
bpdu
port
message
receiving
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
CN201711428960.8A
Other languages
Chinese (zh)
Other versions
CN108173757A (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201711428960.8A priority Critical patent/CN108173757B/en
Publication of CN108173757A publication Critical patent/CN108173757A/en
Application granted granted Critical
Publication of CN108173757B publication Critical patent/CN108173757B/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/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4604LAN interconnection over a backbone network, e.g. Internet, Frame Relay
    • H04L12/462LAN interconnection over a bridge based backbone
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The disclosure relates to a port state setting method and device. The method comprises the following steps: receiving a first BPDU message and receiving a second BPDU message; under the condition that the bridge identification code carried by the first BPDU message is the same as the bridge identification code carried by the second BPDU message, judging whether the sender of the first BPDU message and the sender of the second BPDU message are the same equipment or not, and obtaining a judgment result; and controlling the state setting of the port for receiving the first BPDU message and the port for receiving the second BPDU message according to the judgment result. The port state setting method and the device can prevent the tunnel serving as the IPL Link in the DRNI networking without the Peer-Link from being blocked by the STP protocol, thereby ensuring the smooth IPL Link, ensuring the normal and effective work of a DR system and improving the stability of the DR system.

Description

Port state setting method and device
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method and an apparatus for setting a port state.
Background
DRNI (Distributed Resilient Network Interconnect) is a cross-device link aggregation technology, where two physical devices are virtualized into one device on an aggregation layer to implement cross-device link aggregation, thereby providing device-level redundancy protection and traffic load sharing. Two DR (distributedrelay) devices in a DRNI typical network are aggregated by ethernet links to form a DR system. Fig. 1 illustrates a schematic diagram of a DRNI networking in the related art. As shown in fig. 1, a device a and a device B share load and forward traffic together, and when one device fails, the traffic can be quickly switched to another device, thereby ensuring normal operation of a service.
In the related art, the DRNI defines several interface roles for each DR device: the DR interface is a two-layer aggregation interface for connecting the DR equipment and external equipment. And the DR device and the DR interface connected with the same aggregation group on the external device belong to the same DR group. As shown in fig. 1, the DR interface on device a and the DR interface on device B belong to the same DR group. IPP (Intra-portal port, internal control link interface) is a two-layer aggregation interface that connects neighbor DR devices and is used for internal control. A DRCP (distributed relay Control Protocol) message may be established between the IPP ports and transmitted between the DR devices through an IPL (Intra-Portal Link). The neighbor state can be detected between DR devices through a Keepalive link.
Disclosure of Invention
In view of this, the present disclosure provides a method and an apparatus for setting a port state to solve the problem in the related art that a tunnel serving as an IPL Link is blocked in a Peer-Link-free DRNI network.
According to an aspect of the present disclosure, there is provided a port state setting method for use in a remote device of a Peer-Link-less DRNI networking, the method including:
receiving a first BPDU message and receiving a second BPDU message;
under the condition that the bridge identification code carried by the first BPDU message is the same as the bridge identification code carried by the second BPDU message, judging whether the sender of the first BPDU message and the sender of the second BPDU message are the same equipment or not, and obtaining a judgment result;
and controlling the state setting of the port for receiving the first BPDU message and the port for receiving the second BPDU message according to the judgment result.
According to another aspect of the present disclosure, there is provided a port state setting method in a DR device of a Peer-Link-less DRNI networking, the method including:
under the condition that a port is detected to be provided with an identification adding function, determining a bridge identification code, and determining a DR system number of the DR equipment or an MAC address of the DR equipment as an identification;
generating a BPDU message according to the determined bridge identification code and the identifier;
and sending the BPDU message through the port, so that the equipment receiving the BPDU message controls the state setting of the port receiving the BPDU message according to the bridge identification code and the identification carried by the BPDU message.
According to another aspect of the present disclosure, there is provided a port state setting apparatus for use in a remote device of a Peer-Link-less DRNI networking, the apparatus including:
the receiving module is used for receiving the first BPDU message and receiving the second BPDU message;
a judging module, configured to judge whether senders of the first BPDU message and the second BPDU message are the same device or not under the condition that a bridge identification code carried by the first BPDU message is the same as a bridge identification code carried by the second BPDU message, and obtain a judgment result;
and the first setting module is used for controlling the state setting of the port for receiving the first BPDU message and the port for receiving the second BPDU message according to the judgment result.
According to another aspect of the present disclosure, there is provided a port state setting apparatus for use in a DR device of a Peer-Link-less DRNI networking, the apparatus including:
the determining module is used for determining a bridge identification code and determining a DR system number of the DR equipment or an MAC address of the DR equipment as an identifier under the condition that the port is detected to be provided with an identification adding function;
a generating module, configured to generate a BPDU message according to the determined bridge identifier and identifier;
and the sending module is used for sending the BPDU message through the port so that the equipment receiving the BPDU message controls the state setting of the port receiving the BPDU message according to the bridge identification code and the identification carried by the BPDU message.
According to another aspect of the present disclosure, there is provided a port status setting apparatus including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the above method.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the above-described method.
The method and the device for setting the port state judge whether the sender of the first BPDU message and the sender of the second BPDU message are the same equipment or not by receiving the first BPDU message and the second BPDU message and judging whether the sender of the first BPDU message and the sender of the second BPDU message are the same equipment or not under the condition that the bridge identification code carried by the first BPDU message is the same as the bridge identification code carried by the second BPDU message, obtain a judgment result and control the state setting of the port for receiving the first BPDU message and the port for receiving the second BPDU message according to the judgment result, thereby preventing the tunnel STP (spanning Tree protocol) serving as an IPL (IP Link) Link in a DRmesh network without Peer-Link from being blocked by an NI (protocol), ensuring the smooth IPL Link, ensuring the normal and effective work of a DR system and improving the stability.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 illustrates a schematic diagram of a DRNI networking in the related art.
Fig. 2 shows a schematic diagram of a Peer-Link-free DRNI networking in the related art.
Fig. 3 illustrates a flow chart of a port status setting method according to an embodiment of the present disclosure.
Figure 4 shows a schematic diagram of a Peer-Link free DRNI networking, according to an embodiment of the present disclosure.
Figure 5 shows a schematic diagram of a Peer-Link free DRNI networking, according to an embodiment of the present disclosure.
Fig. 6 illustrates a flowchart of a port status setting method according to an embodiment of the present disclosure.
Fig. 7 illustrates a block diagram of a port status setting apparatus according to an embodiment of the present disclosure.
Fig. 8 illustrates a block diagram of a port status setting apparatus according to an embodiment of the present disclosure.
Fig. 9 is a block diagram illustrating an apparatus 900 for setting a port state according to an example embodiment.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
In the related art, the basic idea of STP (Spanning Tree protocol) protocol is to construct a topology of a network in accordance with a Tree structure. The root of the tree may be a device called a root bridge from which a tree is formed in stages. The root Bridge may be determined by the BID (Bridge ID, Bridge identification code) of the switch or Bridge, with the device with the smallest BID becoming the root Bridge in the layer two network. The BID may be composed of a bridge priority and a Mac (Media Access Control) address. The root Bridge sends configuration BPDU (Bridge Protocol Data Unit) at fixed time, and the non-root Bridge receives configuration BPDU, refreshes the best BPDU and forwards. Wherein the best BPDU may refer to the BPDU transmitted by the current root bridge. If a lower-level BPDU is received (a newly-accessed device will send a BPDU but the BID of the device is larger than the current root bridge), the device that receives the lower-level BPDU will send its own stored best BPDU to the newly-accessed device to inform it of the root bridge in the current network. If the received BPDU is more optimal, the topology of the network will be recalculated and constructed.
In order to reduce the connection between DR devices in a DR system, DRNI networking without Peer-Link was introduced. Fig. 2 shows a schematic diagram of a Peer-Link-free DRNI networking in the related art. As shown in fig. 2, the device a and the device B are DR devices, and the device C and the device D are external devices. Device a and device B form a DR system, but there is no directly connected link between device a and device B. A tunnel, such as a VXLAN tunnel, may be established between device a and device B. The tunnel ports of the device a and the device B may be used as IPP ports, and the link where the tunnel between the device a and the device B is located may be used as an IPL link, so as to transmit the DRCP packet between the device a and the device B through the IPL link. The Keepalive link may be formed by a link connecting the gateway ports of the device a and the device B to the switch.
As shown in fig. 2, the process of establishing the DR system between device a and device B is as follows: the two-end equipment periodically sends DRCP messages through the IPL link. After receiving the DRCP message from the opposite terminal, it will be judged whether the DR interface number in the DRCP message is the same as that of the home terminal. If the DR interfaces at the two ends are the same in number, the two devices form a DR system. After pairing is successful, the devices at the two ends can determine the master-slave state. The role priorities of the DR equipment are compared firstly, the smaller the value is, the higher the priority is, and the higher the priority is the main equipment. If the priorities are the same, the bridges Mac of the two devices are compared, and the smaller bridge Mac is the master device. The two-end equipment periodically sends Keepalive messages through the Keepalive link, and when the two-end equipment can receive the Keepalive messages sent by the opposite end, the DRNI networking starts to work normally. After the DR system starts working, the information of the opposite end, such as Mac table entries, ARP table entries and the like, can be synchronized between the two end devices in real time, so that the forwarding of flow cannot be influenced by the failure of any one of the device A and the device B, and the normal service cannot be interrupted.
As shown in fig. 2, Port1 is the physical Port of device a, Port2 is the physical Port of device B, and if Port1 and Port2 are configured as tunnel ports, a tunnel is established between device a and device B. The tunnel ports of the device a and the device B may be used as IPP ports, and the link where the tunnel between the device a and the device B is located may be used as an IPL link. After the IPL link is established and the DR system is formed, since the DR system is equivalent to one device for STP protocol processing, the BPDU messages sent by the device a and the device B to the device D through the Port1 and the Port2, respectively, have the same BID. For example, if the DR system is a root bridge, both device a and device B consider themselves to be the root bridge, and send a BPDU message to device D. The BID may be populated with the DR system Mac (Distributed-Relay System-Mac). After receiving the BPDU message, the device D considers that the BPDU message is sent by two different ports of the same device. Device D blocks one of the physical ports, Port3 and Port4, as a result of the operation of the STP protocol. For example, Port4 is set to the blocking state. Therefore, the tunnel between the device a and the device B will be blocked, which results in the closing of the IPL link and the failure of the IPP port to normally receive and transmit DRCP messages, and further causes the DR system to be separated, and the DR system cannot normally work.
To solve the technical problem in the related art, fig. 3 is a flowchart illustrating a port status setting method according to an embodiment of the present disclosure. The method is used for the remote equipment of the DRNI networking without the Peer-Link. The remote device may be a public network device in a Peer-Link-free DRNI networking. As shown in fig. 3, the method includes steps S31 to S33.
In step S31, a first BPDU message is received, and a second BPDU message is received.
In step S32, under the condition that the bridge identification code carried in the first BPDU message is the same as the bridge identification code carried in the second BPDU message, it is determined whether the sender of the first BPDU message and the sender of the second BPDU message are the same device, and a determination result is obtained.
In step S33, according to the determination result, the state settings of the port receiving the first BPDU message and the port receiving the second BPDU message are controlled.
The port state setting method disclosed by the invention can prevent a tunnel serving as an IPL Link in a DRNI networking without Peer-Link from being blocked by an STP protocol by judging whether any two transmitters carrying BPDU messages with the same BID are the same equipment or not and keeping the ports receiving any two BPDU messages in a unblocked state under the condition that the transmitters are not the same equipment, thereby ensuring that the IPL Link is unblocked, ensuring the normal and effective work of a DR system and improving the stability of the DR system.
In one implementation, determining whether the sender of the first BPDU message and the sender of the second BPDU message are the same device, and obtaining the determination result (step S32) may include: respectively judging whether the first BPDU message and the second BPDU message carry the identification; respectively judging whether the first BPDU message and the second BPDU message carry the identification; and under the condition that the first BPDU message and the second BPDU message both carry the identification and the identification carried by the first BPDU message is different from the identification carried by the second BPDU message, judging that the sending parties of the first BPDU message and the second BPDU message are not the same equipment.
In one implementation, an identifier, such as a TLV (Type Length Value) field, may be added to the BPDU message. Under the condition that BIDs carried by any two BPDU messages are the same, whether the senders of the two BPDU messages are the same equipment or not can be judged through the identifiers in the BPDU messages. For example, under the condition that the BID carried by any two BPDU messages is the same, if the identifier in the first BPDU message is the same as the identifier in the second BPDU message, it may be determined that the senders of the first BPDU message and the second BPDU message are the same device; if the identifier in the first BPDU message is different from the identifier in the second BPDU message, it may be determined that the sender of the first BPDU message and the sender of the second BPDU message are not the same device.
It should be noted that, as can be understood by those skilled in the art, the present disclosure does not limit the method for determining the identifier in the BPDU message, and can distinguish whether the sender of any two BPDU messages carrying the same BID is the same device. For example, the identity in the BPDU message may be determined by the DR system number of the DR device, i.e., the identity in the BPDU message may be filled with the DR system number of the DR device. For another example, the identifier in the BPDU message may be determined by the MAC address of the DR device, that is, the identifier in the BPDU message may be the MAC address of the DR device.
Figure 4 shows a schematic diagram of a Peer-Link free DRNI networking, according to an embodiment of the present disclosure. As shown in fig. 4, the device a and the device B are DR devices, and the device C and the device D are external devices. Device a and device B form a DR system. But there is no direct link between device a and device B. Port1 is the physical Port of device A, Port2 is the physical Port of device B, and if Port1 and Port2 are configured as tunnel ports, a tunnel is established between device A and device B. The tunnel ports of the device a and the device B may be used as IPP ports, and the link where the tunnel between the device a and the device B is located may be used as an IPL link. Therefore, DRCP messages are transmitted between the equipment A and the equipment B through the IPL link. The Keepalive link may be formed by a link connecting the gateway ports of the device a and the device B to the switch.
In one implementation, controlling the state settings of the port receiving the first BPDU message and the port receiving the second BPDU message according to the determination result (step S33) may include: and under the condition that the sender of the first BPDU message and the sender of the second BPDU message are judged not to be the same equipment, the port for receiving the first BPDU message and the port for receiving the second BPDU message are both kept in a smooth state.
As an example, as shown in fig. 4, the DR systems Mac of the device a and the device B may be denoted as Macs, the DR system number of the device a may be 1, and the DR system number of the device B may be 2. Mac of device C may be denoted as Macc, Mac of device D may be denoted as Macd, and Macs < Macd < Macc.
As shown in fig. 4, since the DR system Mac is smaller than the bridge Mac of the device C and the device D, if the DR system is the root bridge, the device a and the device B both consider themselves to be the root bridge, and may send the BPDU message to the device D. Device D receives BPDU message 1 from the DR system through Port3 and BPDU message 2 from the DR system through Port 4. Wherein, the BID carried by the BPDU message 1 is Macs, and the identifier is 1. The BID carried by the BPDU message 2 is Macs, and the label is 2. Because the BID carried by the BPDU message 1 is the same as the BID carried by the BPDU message 2, but the identification in the BPDU message 1 is different from the identification in the BPDU message 2, the device D judges that the sending parts of the BPDU message 1 and the BPDU message 2 are different DR devices of the same DR system, so that the device D keeps both the Port3 and the Port4 in a unblocked state, and can avoid the tunnel serving as an IPL Link in a DRNI networking without Peer-Link from being blocked by an STP protocol, thereby ensuring the unblocked IPL Link, ensuring the normal and effective work of the DR system, and improving the stability of the DR system.
In one implementation, the device receives the BPDU message through the root port and sends the BPDU message through the designated port. When the root port is selected, the BPDU message with a smaller identifier can be used as the BPDU message with a higher priority. After receiving the BPDU message 1 and the BPDU message 2, the device D finds that the received BPDU message 1 is a BPDU message with a higher priority, and selects the Port3 of the device D as a root Port. Device D forwards BPDU message 1 received from root Port3 through Port 4. After receiving the BPDU packet 1, the device B finds that the received BPDU packet 1 is a BPDU packet with a higher priority, selects the Port2 of the device B as a root Port, and stops sending the BPDU packet to the device D through the Port 2.
As an example, as shown in fig. 4, the DR systems Mac of the device a and the device B may be denoted as Macs, the DR system number of the device a may be 1, and the DR system number of the device B may be 2. Mac of device C may be denoted as Macc, Mac of device D may be denoted as Macd, and Macc < Macs < Macd.
As shown in fig. 4, since the bridge Mac of the device C is smaller than the bridge Mac of the DR system Mac and the device D, and the device C is a root bridge, the device C may send a BPDU message to the device a and the device B. Device a and device B receive BPDU message 3 from device C, respectively. Wherein, the BID carried by the BPDU message 3 is Macc and does not carry an identifier. Device a discovers that the received BPDU packet 3 is a higher priority BPDU packet, and device a sends BPDU packet 4 to device D via Port 1. Wherein, the BID carried by the BPDU message 4 is Macc, and the identifier is 1. Device B finds that the received BPDU message 3 is a higher priority BPDU message, and device B sends BPDU message 5 to device D via Port 2. Wherein, the BID carried by the BPDU message 5 is Macc, and the identifier is 2. Device D receives BPDU message 4 from the DR system through Port3 and BPDU message 5 from the DR system through Port 4. Because the BID carried by the BPDU message 4 is the same as the BID carried by the BPDU message 5, but the identification in the BPDU message 4 is different from the identification in the BPDU message 5, the device D judges that the sending parts of the BPDU message 4 and the BPDU message 5 are different DR devices of the same DR system, so that the device D keeps both the Port3 and the Port4 in a unblocked state, and can avoid the tunnel serving as an IPL Link in a DRNI networking without Peer-Link from being blocked by an STP protocol, thereby ensuring the unblocked IPL Link, ensuring the normal and effective work of the DR system, and improving the stability of the DR system.
Figure 5 shows a schematic diagram of a Peer-Link free DRNI networking, according to an embodiment of the present disclosure. As shown in fig. 5, the device a and the device B are DR devices, and the device C and the device D are external devices. Device a and device B form a DR system. But there is no direct link between device a and device B. Port1 is the physical Port of device A, Port2 is the physical Port of device B, Port5 is the physical Port of device B, and if Port1 and Port2 are configured as tunnel ports, a tunnel is established between device A and device B. The tunnel ports of the device a and the device B may be used as IPP ports, and the link where the tunnel between the device a and the device B is located may be used as an IPL link. Therefore, DRCP messages are transmitted between the equipment A and the equipment B through the IPL link. The Keepalive link may be formed by a link connecting the gateway ports of the device a and the device B to the switch.
In one implementation, the method further comprises: and under the condition of receiving the third BPDU message, if the bridge identification code carried by the third BPDU message is the same as the bridge identification code carried by the first BPDU message or the bridge identification code carried by the second BPDU message, and the third BPDU message does not carry an identifier, setting a port for receiving the third BPDU message into a blocking state.
As an example, as shown in fig. 5, the DR systems Mac of the device a and the device B may be denoted as Macs, the DR system number of the device a may be 1, and the DR system number of the device B may be 2. Mac of device C may be denoted as Macc, Mac of device D may be denoted as Macd, and Macs < Macd < Macc.
As shown in fig. 5, since the DR system Mac is smaller than the bridge Mac of the device C and the device D, if the DR system is the root bridge, the device a and the device B both consider themselves to be the root bridge, and may send the BPDU message to the device D. Device D receives BPDU message 1 from the DR system via Port3, BPDU message 2 from the DR system via Port4, and BPDU message 6 from the DR system via Port 6. Wherein, the BID carried by the BPDU message 1 is Macs, and the identifier is 1. The BID carried by the BPDU message 2 is Macs, and the label is 2. The BID carried by the BPDU message 6 is Macs, and does not carry an identifier. Because the BID carried by the BPDU message 1 is the same as the BID carried by the BPDU message 2, but the identification in the BPDU message 1 is different from the identification in the BPDU message 2, the device D judges that the sending parts of the BPDU message 1 and the BPDU message 2 are different DR devices of the same DR system, so that the device D keeps both the Port3 and the Port4 in a unblocked state, and can avoid the tunnel serving as an IPL Link in a DRNI networking without Peer-Link from being blocked by an STP protocol, thereby ensuring the unblocked IPL Link, ensuring the normal and effective work of the DR system, and improving the stability of the DR system. Because the BID carried by the BPDU message 2 is the same as the BID carried by the BPDU message 6, but the BPDU message 6 does not carry an identifier, the device D determines that the senders of the BPDU message 2 and the BPDU message 6 are the same DR device of the same DR system, and thus the device D keeps the Port4 in a smooth state and sets the Port6 in a blocking state, thereby preventing loops.
The port state setting method disclosed by the invention adds the identifier in the BPDU message, judges whether any two transmitting sides of the BPDU messages carrying the same BID are the same equipment or not through the identifier in the BPDU message, and enables the ports for receiving any two BPDU messages to be kept in a unblocked state under the condition that the transmitting sides are not the same equipment, thereby preventing a tunnel which is used as an IPL Link in a DRNI networking without Peer-Link from being blocked by an STP protocol, ensuring the unblocked IPL Link, ensuring the normal and effective work of a DR system and improving the stability of the DR system.
Fig. 6 illustrates a flowchart of a port status setting method according to an embodiment of the present disclosure. The method is used for the DR equipment of the DRNI networking without the Peer-Link. As shown in fig. 6, the method includes steps S61 and S63.
In step S61, in the event that it is detected that the port setting adds an identification function, a bridge identification code is determined, and the DR system number of the DR device or the MAC address of the DR device is determined as an identification.
In step S62, a BPDU message is generated based on the determined bridge id and identifier.
In step S63, the BPDU message is sent through the port, so that the device receiving the BPDU message controls the state setting of the port receiving the BPDU message according to the bridge identification code and the identifier carried in the BPDU message.
In one implementation, the method further comprises: before generating the BPDU message, the method further includes: under the condition that the port is detected to be configured as a tunnel portal, adding an identification function to the port setting; wherein, the tunnel port is used as an IPP port, and the tunnel established between the tunnel ports is used as an IPL link.
As an example, as shown in FIG. 4, Port1 of device A and Port2 of device B are configured as tunnel ports. Port1 of device A and Port2 of device B enable the addition of the identified function (i.e., set the add identification function) in the BPDU message. Thus, the BPDU messages sent out from Port1 and Port2 carry the identity. If the DR system is a root bridge, the BID carried in the BPDU message may be filled by the DR system Mac, and the identifier in the BPDU message may be filled by the DR system number of the DR device or the Mac address of the DR device. The device A sends a BPDU message 1 to the device D through the Port1, and the BID carried in the BPDU message 1 is Macs and is marked as 1. And the device B sends a BPDU message 2 to the device D through a Port2, wherein the BID carried in the BPDU message 2 is Macs and is marked as 2.
As an example, as shown in FIG. 5, Port1 of device A and Port2 of device B are configured as tunnel ports. Port1 of device A and Port2 of device B enable the addition of the identified function (i.e., set the add identification function) in the BPDU message. Thus, the BPDU messages sent out from Port1 and Port2 carry the identity. Port5 of device B is a non-tunnel portal. The Port5 of device B does not enable the function of adding the identifier in the BPDU message (i.e. the function of adding the identifier is not set), so that the BPDU message sent from the Port5 does not carry the identifier. If the DR system is a root bridge, the BID carried in the BPDU message may be filled by the DR system Mac, and the identifier in the BPDU message may be filled by the DR system number of the DR device or the Mac address of the DR device. The device A sends a BPDU message 1 to the device D through the Port1, and the BID carried in the BPDU message 1 is Macs and is marked as 1. And the device B sends a BPDU message 2 to the device D through a Port2, wherein the BID carried in the BPDU message 2 is Macs and is marked as 2. And the device B sends a BPDU message 4 to the device D through a Port5, wherein the BID carried by the BPDU message 4 is Macs and does not carry an identifier.
According to the port state setting method, whether the port is provided with the identification adding function is judged, and under the condition that the port is provided with the identification adding function, the identification is added in the generated BPDU message, so that the equipment receiving the BPDU message controls the state setting of the port receiving the BPDU message according to the BID and the identification carried by the BPDU message.
Fig. 7 illustrates a block diagram of a port status setting apparatus according to an embodiment of the present disclosure. The device is used in remote equipment of DRNI networking without Peer-Link. As shown in fig. 7, the apparatus includes:
a receiving module 71, configured to receive a first BPDU message and a second BPDU message; a determining module 72, configured to determine whether senders of the first BPDU message and the second BPDU message are the same device or not under the condition that a bridge identification code carried by the first BPDU message is the same as a bridge identification code carried by the second BPDU message, so as to obtain a determination result; and a first setting module 73, configured to control, according to the determination result, state setting of a port that receives the first BPDU packet and a port that receives the second BPDU packet.
In one implementation, the determining module 72 is configured to: respectively judging whether the first BPDU message and the second BPDU message carry identification or not; and under the condition that the first BPDU message and the second BPDU message both carry identifications and the identification carried by the first BPDU message is different from the identification carried by the second BPDU message, judging that the senders of the first BPDU message and the second BPDU message are not the same device.
In one implementation, the first setting module 73 is configured to: and under the condition that the sender of the first BPDU message and the sender of the second BPDU message are judged not to be the same equipment, the port for receiving the first BPDU message and the port for receiving the second BPDU message are both kept in a smooth state.
In one implementation, the apparatus further comprises: a second setting module 74, configured to, under the condition that a third BPDU message is received, set a port that receives the third BPDU message to a blocking state if a bridge identifier carried in the third BPDU message is the same as the bridge identifier carried in the first BPDU message or the bridge identifier carried in the second BPDU message, and the third BPDU message does not carry an identifier.
The port state setting device disclosed by the invention can prevent a tunnel serving as an IPL Link in a DRNI networking without Peer-Link from being blocked by an STP protocol by judging whether any two transmitters carrying BPDU messages with the same BID are the same equipment or not and keeping the ports receiving any two BPDU messages in a unblocked state under the condition that the transmitters are not the same equipment, thereby ensuring that the IPL Link is unblocked, ensuring the normal and effective work of a DR system and improving the stability of the DR system.
Fig. 8 illustrates a block diagram of a port status setting apparatus according to an embodiment of the present disclosure. The device is used in the DR equipment of the DRNI networking without Peer-Link. As shown in fig. 8, the apparatus includes:
a determining module 81, configured to determine a bridge identification code and determine a DR system number of the DR apparatus or a MAC address of the DR apparatus as an identifier when it is detected that the port is provided with an identifier addition function; a generating module 82, configured to generate a BPDU message according to the determined bridge identifier and identifier; and a sending module 83, configured to send the BPDU packet through the port, so that a device receiving the BPDU packet controls, according to the bridge identification code and the identifier carried in the BPDU packet, a state setting of the port receiving the BPDU packet.
In one implementation, the apparatus further comprises: a third setting module 84, configured to add an identification function to the port setting when the port is detected to be configured as a tunnel portal; the tunnel ports are used as IPP ports, and tunnels established among the tunnel ports are used as IPL links.
The port state setting device disclosed by the invention can be used for controlling the state setting of the port for receiving the BPDU message according to the BID and the identification carried by the BPDU message by judging whether the port is provided with the identification adding function or not and adding the identification into the generated BPDU message under the condition of judging whether the port is provided with the identification adding function.
Fig. 9 is a block diagram illustrating an apparatus 900 for setting a port state according to an example embodiment. Referring to fig. 9, the apparatus 900 may include a processor 901, a machine-readable storage medium 902 having stored thereon machine-executable instructions. The processor 901 and the machine-readable storage medium 902 may communicate via a system bus 903. Also, the processor 901 performs the above-described port state setting method by reading machine-executable instructions corresponding to the port state setting logic in the machine-readable storage medium 902.
The machine-readable storage medium 902 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A port state setting method is used in a remote device of a DRNI networking without Peer-Link, and comprises the following steps:
receiving a first BPDU message and receiving a second BPDU message;
under the condition that the bridge identification code carried by the first BPDU message is the same as the bridge identification code carried by the second BPDU message, judging whether the sender of the first BPDU message and the sender of the second BPDU message are the same equipment or not, and obtaining a judgment result;
and under the condition that the sender of the first BPDU message and the sender of the second BPDU message are judged not to be the same equipment, keeping the port for receiving the first BPDU message and the port for receiving the second BPDU message in a smooth state.
2. The method of claim 1, wherein determining whether the sender of the first BPDU packet and the sender of the second BPDU packet are the same device, and obtaining the determination result comprises:
respectively judging whether the first BPDU message and the second BPDU message carry identification or not;
and under the condition that the first BPDU message and the second BPDU message both carry identifications and the identification carried by the first BPDU message is different from the identification carried by the second BPDU message, judging that the senders of the first BPDU message and the second BPDU message are not the same device.
3. The method of claim 1, further comprising:
and under the condition of receiving a third BPDU message, if the bridge identification code carried by the third BPDU message is the same as the bridge identification code carried by the first BPDU message or the bridge identification code carried by the second BPDU message, and the third BPDU message does not carry an identifier, setting a port for receiving the third BPDU message into a blocking state.
4. A port state setting method is used in a distributed aggregation DR device of DRNI networking without Peer-Link, and comprises the following steps:
under the condition that a port is detected to be provided with an identification adding function, determining a bridge identification code, and determining a DR system number of the DR equipment or an MAC address of the DR equipment as an identification;
generating a BPDU message according to the determined bridge identification code and the identifier;
and sending the BPDU message through the port, so that the equipment receiving the BPDU message judges whether the sender of the two BPDU messages carrying the same bridge identification code is the same equipment according to the bridge identification code and the identification carried by the BPDU message, and under the condition of judging that the senders are not the same equipment, the ports receiving the two BPDU messages are kept in a smooth state.
5. The method of claim 4, wherein prior to generating the BPDU message, the method further comprises:
under the condition that the port is detected to be configured as a tunnel portal, adding an identification function to the port setting; the tunnel ports are used as IPP ports, and tunnels established among the tunnel ports are used as IPL links.
6. A port state setting apparatus, for use in a remote device of a Peer-Link-less DRNI networking, the apparatus comprising:
the receiving module is used for receiving the first BPDU message and receiving the second BPDU message;
a judging module, configured to judge whether senders of the first BPDU message and the second BPDU message are the same device or not under the condition that a bridge identification code carried by the first BPDU message is the same as a bridge identification code carried by the second BPDU message, and obtain a judgment result;
and the first setting module is used for keeping the port for receiving the first BPDU message and the port for receiving the second BPDU message in a smooth state under the condition that the senders of the first BPDU message and the second BPDU message are judged not to be the same device.
7. The apparatus of claim 6, wherein the determining module is configured to:
respectively judging whether the first BPDU message and the second BPDU message carry identification or not;
and under the condition that the first BPDU message and the second BPDU message both carry identifications and the identification carried by the first BPDU message is different from the identification carried by the second BPDU message, judging that the senders of the first BPDU message and the second BPDU message are not the same device.
8. The apparatus of claim 6, further comprising:
and the second setting module is used for setting a port for receiving a third BPDU message to be in a blocking state under the condition that the third BPDU message is received and if the bridge identification code carried by the third BPDU message is the same as the bridge identification code carried by the first BPDU message or the bridge identification code carried by the second BPDU message and the third BPDU message does not carry an identifier.
9. A port state setting apparatus, for use in a distributed aggregated DR device of a Peer-Link-less DRNI networking, the apparatus comprising:
the determining module is used for determining a bridge identification code and determining a DR system number of the DR equipment or an MAC address of the DR equipment as an identifier under the condition that the port is detected to be provided with an identification adding function;
a generating module, configured to generate a BPDU message according to the determined bridge identifier and identifier;
and the sending module is used for sending the BPDU message through the port so that the equipment receiving the BPDU message judges whether the sender of the two BPDU messages carrying the same bridge identification code is the same equipment according to the bridge identification code and the identification carried by the BPDU message, and under the condition that the sender is not the same equipment, the port receiving the two BPDU messages is kept in a smooth state.
10. The apparatus of claim 9, further comprising:
a third setting module, configured to add an identifier function to the port setting when it is detected that the port is configured as a tunnel portal; the tunnel ports are used as IPP ports, and tunnels established among the tunnel ports are used as IPL links.
CN201711428960.8A 2017-12-26 2017-12-26 Port state setting method and device Active CN108173757B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711428960.8A CN108173757B (en) 2017-12-26 2017-12-26 Port state setting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711428960.8A CN108173757B (en) 2017-12-26 2017-12-26 Port state setting method and device

Publications (2)

Publication Number Publication Date
CN108173757A CN108173757A (en) 2018-06-15
CN108173757B true CN108173757B (en) 2020-08-11

Family

ID=62520731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711428960.8A Active CN108173757B (en) 2017-12-26 2017-12-26 Port state setting method and device

Country Status (1)

Country Link
CN (1) CN108173757B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109462515A (en) * 2018-09-11 2019-03-12 锐捷网络股份有限公司 Loop circuit processing method, the network equipment, MLAG networking and storage medium
CN110086657B (en) * 2019-04-10 2020-04-03 北京华三通信技术有限公司 Configuration synchronization method and device
CN110049138B (en) * 2019-04-26 2021-09-28 新华三技术有限公司 Method, device and system for starting communication and data transmission of equipment
CN112751755B (en) * 2019-10-30 2023-09-29 中兴通讯股份有限公司 Equipment virtualization method, device, system, equipment and storage medium
CN114338563B (en) * 2021-12-23 2024-02-23 迈普通信技术股份有限公司 Method and device for preventing port from blocking, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873336A (en) * 2012-12-14 2014-06-18 中兴通讯股份有限公司 Distributed resilient network interconnection-based service bearing method and device
CN104243259A (en) * 2013-06-20 2014-12-24 中兴通讯股份有限公司 Method and system for cooperation of distributed elastic network interconnection systems
CN105122749A (en) * 2013-04-23 2015-12-02 瑞典爱立信有限公司 A method and system of updating conversation allocation in link aggregation
CN105610670A (en) * 2015-12-29 2016-05-25 北京华为数字技术有限公司 Communication method and device of Ethernet switched network
US20170063726A1 (en) * 2013-04-23 2017-03-02 Telefonaktiebolaget Lm Ericsson (Publ) Method and system for network and intra-portal link (ipl) sharing in distributed relay control protocol (drcp)
CN106878164A (en) * 2016-12-13 2017-06-20 新华三技术有限公司 A kind of message transmitting method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873336A (en) * 2012-12-14 2014-06-18 中兴通讯股份有限公司 Distributed resilient network interconnection-based service bearing method and device
CN105122749A (en) * 2013-04-23 2015-12-02 瑞典爱立信有限公司 A method and system of updating conversation allocation in link aggregation
US20170063726A1 (en) * 2013-04-23 2017-03-02 Telefonaktiebolaget Lm Ericsson (Publ) Method and system for network and intra-portal link (ipl) sharing in distributed relay control protocol (drcp)
US20170126501A1 (en) * 2013-04-23 2017-05-04 Telefonaktiebolaget Lm Ericsson (Publ) Method and system for synchronizing with neighbor in a distributed resilient network interconnect (drni) link aggregation group
CN104243259A (en) * 2013-06-20 2014-12-24 中兴通讯股份有限公司 Method and system for cooperation of distributed elastic network interconnection systems
CN105610670A (en) * 2015-12-29 2016-05-25 北京华为数字技术有限公司 Communication method and device of Ethernet switched network
CN106878164A (en) * 2016-12-13 2017-06-20 新华三技术有限公司 A kind of message transmitting method and device

Also Published As

Publication number Publication date
CN108173757A (en) 2018-06-15

Similar Documents

Publication Publication Date Title
CN108173757B (en) Port state setting method and device
US11032197B2 (en) Reroute detection in segment routing data plane
EP3082309B1 (en) Sdn controller, data centre system and router connection method
CN107547370B (en) Flow forwarding method, device and system
CN105657748B (en) Communication method and network equipment based on tunnel binding
US11563641B1 (en) Shifting network traffic from a network device
US20200396162A1 (en) Service function chain sfc-based communication method, and apparatus
EP3297224B1 (en) Preventing data traffic loops associated with designated forwarder selection
US8811190B2 (en) Maximum transmission unit (MTU) size discovery mechanism and method for data-link layers
CN108390821B (en) Method and system for realizing dual activities of openflow switch
US20160127192A1 (en) Loop-free convergence in communication networks
KR102344346B1 (en) Packet transmission method and apparatus
CN112751767B (en) Routing information transmission method and device and data center internet
US11979283B2 (en) Stacking-port configuration using zero-touch provisioning
US20160269188A1 (en) Reverse directed acyclic graph for multiple path reachability from origin to identified destination via multiple target devices
EP3985941A2 (en) Path switching method, device, and system
CN107682261B (en) Flow forwarding method and device
CN105471613A (en) Temporary channel establishing method, device and system
CN112822102A (en) Link switching method, device, equipment, system and storage medium
CN113615132A (en) Fast flooding topology protection
CN107770061B (en) Method and equipment for forwarding message
CN109039916B (en) Message forwarding method, device and storage medium
CN108289044B (en) Data forwarding method, link state method for determining static route and network equipment
US10205661B1 (en) Control messages for scalable satellite device clustering control in a campus network
CN112350936A (en) Method and device for optimizing interior gateway protocol flooding and storage medium

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