CN108667645B - Method, device, forwarding equipment and system for configuring interface - Google Patents

Method, device, forwarding equipment and system for configuring interface Download PDF

Info

Publication number
CN108667645B
CN108667645B CN201710213500.7A CN201710213500A CN108667645B CN 108667645 B CN108667645 B CN 108667645B CN 201710213500 A CN201710213500 A CN 201710213500A CN 108667645 B CN108667645 B CN 108667645B
Authority
CN
China
Prior art keywords
interface
sending
receiving
bidirectional
interfaces
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.)
Expired - Fee Related
Application number
CN201710213500.7A
Other languages
Chinese (zh)
Other versions
CN108667645A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201710213500.7A priority Critical patent/CN108667645B/en
Publication of CN108667645A publication Critical patent/CN108667645A/en
Application granted granted Critical
Publication of CN108667645B publication Critical patent/CN108667645B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting

Landscapes

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

Abstract

The application provides a method, a device, forwarding equipment and a system for configuring an interface, relates to the technical field of communication, and can improve the utilization rate of transmission resources of the equipment. The device comprises N transmitting interfaces and M receiving interfaces; the device comprises N sending interfaces, M receiving interfaces, Y receiving interface groups, at least one sending interface group in the X sending interface groups and at least one receiving interface group in the Y receiving interface groups, at least one bidirectional interface, a sending interface number in the sending interface group of each bidirectional interface and a receiving interface number in the receiving interface group of each bidirectional interface are different, the sending interface in the sending interface group of each bidirectional interface and the receiving interface in the receiving interface group of each bidirectional interface are connected with the same opposite terminal device, the opposite terminal device is a device connected with the device, each bidirectional interface is used for the device to send and receive data, N, M, X and Y are positive integers, X < N, and Y < M.

Description

Method, device, forwarding equipment and system for configuring interface
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, a forwarding device, and a system for configuring an interface.
Background
With the development of video technologies, video services such as 4K, 8K, Virtual Reality (VR) and the like are more and more widely applied.
Currently, in Ethernet (Ethernet), Ethernet technology is generally adopted to transmit video traffic. Specifically, as shown in fig. 1, assuming that video traffic is transmitted between the device X and the device Y, a bidirectional ethernet interface (including the transmitting interface TX1 and the receiving interface RX1) on the device X may be connected to a bidirectional ethernet interface (including the transmitting interface TX2 and the receiving interface RX2) on the device Y. Specifically, as shown in fig. 1, the transmission interface TX1 on the device X and the reception interface RX2 on the device Y may be connected, and the reception interface RX1 on the device X and the transmission interface TX2 on the device Y may be connected.
However, in general, assuming that the device X requests the device Y for a video service, during the process that the device X requests the device Y for the video service, an incoming traffic (for example, downloading the video service) on the device X may be much larger than an outgoing traffic (for example, sending a request message requesting the video service) on the device X, and in the above method, transmission rates of ethernet interfaces in two directions connecting the device X and the device Y to each other are the same, so that transmitting the video service by using the above ethernet technology may waste transmission resources of the device, thereby resulting in a low utilization rate of the transmission resources of the device.
Disclosure of Invention
The application provides a method, a device, forwarding equipment and a system for configuring an interface, which can improve the utilization rate of transmission resources of the equipment.
In order to achieve the purpose, the technical scheme is as follows:
in a first aspect, an apparatus for configuring an interface is provided, the apparatus comprising N transmit interfaces and M receive interfaces. The N sending interfaces form X sending interface groups, the M receiving interfaces form Y receiving interface groups, at least one sending interface group in the X sending interface groups and at least one receiving interface group in the Y receiving interface groups form at least one bidirectional interface (each bidirectional interface in the at least one bidirectional interface is used for the device to send and receive data), the quantity of the sending interfaces in the sending interface group and the quantity of the receiving interfaces in the receiving interface group forming each bidirectional interface are different, and the sending interfaces in the sending interface group and the receiving interfaces in the receiving interface group forming each bidirectional interface are connected with the same opposite terminal device (the opposite terminal device is a device connected with the device). Wherein N, M, X and Y are both positive integers, and X < N, Y < M.
In the device for configuring the interface provided by the present application, since the number of the transmitting interfaces in the transmitting interface group and the number of the receiving interfaces in the receiving interface group constituting each bidirectional interface (i.e. the interface capable of transmitting and receiving data, and the transmitting interface in the transmitting interface group and the receiving interface in the receiving interface group constituting each bidirectional interface are the same as the opposite device) are different, i.e. the number of transmit interfaces in the set of transmit interfaces and the number of receive interfaces in the set of receive interfaces making up each bi-directional interface may be configured as desired, the present application thus provides that the outgoing and incoming flows on the bi-directional interface on the device may be different, for example, the incoming traffic on the bi-directional interface may be greater than the outgoing traffic on the bi-directional interface, and as such, in an application scenario of unbalanced outgoing flow and incoming flow, the utilization rate of transmission resources of the device can be improved.
For example, when the device transmits video traffic, since the incoming flow on the device is usually much larger than the outgoing flow on the device, that is, the outgoing flow and the incoming flow on the device are usually not balanced, when the device for configuring an interface transmits video traffic using the bidirectional interface provided by the present application, the incoming flow of the device on the bidirectional interface may be larger than the outgoing flow of the device on the bidirectional interface, so that the utilization rate of the transmission resource of the device may be increased.
In a first optional implementation manner of the first aspect, assuming that the first bidirectional interface is any one of the at least one bidirectional interface, in a case that a transmitting interface in a transmitting interface group and a receiving interface in a receiving interface group that constitute the first bidirectional interface are located on the same chip in the apparatus, the apparatus may be configured to transmit an ethernet frame including an identifier of a first transmitting interface to another apparatus through one transmitting interface in the transmitting interface group that constitutes the first bidirectional interface, where the first transmitting interface is a transmitting interface on the other apparatus that transmits data to a first receiving interface, and the first receiving interface is one receiving interface in the receiving interface group that constitutes the first bidirectional interface. In this way, the device can detect and handle the exception in time by indicating the sending interface on the other device that the sending data exception may occur (for example, the sending data is in error or the sending data flow exceeds the receiving data flow of the receiving end and needs to be suspended), to the other device.
In a second optional implementation manner of the first aspect, assuming that the first bidirectional interface is any one of the at least one bidirectional interface, in a case that a transmitting interface in a transmitting interface group and a receiving interface in a receiving interface group that constitute the first bidirectional interface are located on different chips in the apparatus, the apparatus may be configured to transmit, at a data plane or a control plane, an ethernet frame including an identifier of a first transmitting interface to another apparatus through one transmitting interface in the transmitting interface group that constitutes the first bidirectional interface, where the first transmitting interface is a transmitting interface on the other apparatus that transmits data to a first receiving interface, and the first receiving interface is one receiving interface in the receiving interface group that constitutes the first bidirectional interface. In this way, the device can detect and handle the exception in time by indicating the sending interface on the other device that the sending data exception may occur (for example, the sending data is in error or the sending data flow exceeds the receiving data flow of the receiving end and needs to be suspended), to the other device.
It is to be understood that, in the present application, the identifier of the first sending interface in the ethernet frame sent by the apparatus may also be used to indicate a sending interface to which the ethernet frame applies, for example, the statistical data of the ethernet frame is sent by the sending interface. Of course, the identifier of the first sending interface in the ethernet frame may also indicate the sending interface to which the ethernet frame applies in any other possible situation, which is not listed here.
In the first optional implementation manner and the second optional implementation manner, the ethernet frame may be a physical layer operation administration and maintenance (PHYOAM) ethernet frame or a Bridge Protocol Data Unit (BPDU) ethernet frame.
In the first optional implementation manner and the second optional implementation manner, the identifier of the first sending interface may be a logical identifier of the first sending interface. The logical identifier of the first sending interface may be a logical link Identifier (ID) of the first sending interface or a Media Access Control (MAC) address of the first sending interface.
When the logic identifier of the first sending interface is a logic link identifier of the first sending interface, the ethernet frame may be a PHY OAM ethernet frame or a BPDU ethernet frame; when the logical identifier of the first sending interface is the MAC address of the first receiving interface, the ethernet frame may be a BPDU ethernet frame.
In a third optional implementation manner of the first aspect, the apparatus for configuring an interface provided in the present application may be a chip. The chip can be a physical layer chip, a chip integrated with a physical layer function, and a chip integrated with a physical layer function and an MAC layer function.
It is to be understood that, in the present application, in the first alternative implementation manner of the first aspect, the apparatus for configuring the interface provided in the present application may be one chip, that is, the apparatus is one chip. In a second optional implementation manner of the first aspect, the apparatus for configuring an interface provided by the present application may include two or more chips, that is, the apparatus may be composed of different chips.
In a second aspect, a forwarding device is provided, where the forwarding device includes an apparatus for configuring an interface as in the first aspect or any optional implementation manner thereof.
For a detailed description of the technical effect and other contents of the second aspect, reference may be made to the above-mentioned description of the technical effect and other contents of the first aspect or any one of its optional implementation manners, and details are not described herein again.
In a third aspect, a method of configuring an interface is provided, which may include: a first device receives, through a first receiving interface on the first device, a first probe packet sent by a second device through a first sending interface on the second device, for determining a relationship between the first receiving interface and a sending interface on the first device, which is not configured as a bidirectional interface (the first probe packet at least includes an identifier of the second device and an identifier of the first sending interface); and under the condition that the number of the identifiers in the first detection message is equal to 5, the first device detects whether the first identifier in the first detection message is the same as the identifier of the first device; and under the condition that the first identifier in the first detection message is the same as the identifier of the first device, the first device configures the first receiving interface and a second sending interface (the second sending interface is the sending interface indicated by the second identifier in the first detection message on the first device) as a bidirectional interface.
In the method for configuring an interface provided by the present application, the first device may configure the bidirectional interfaces as needed according to actual connection relationships between each interface on the first device and each interface on another device, that is, the first device may configure the bidirectional interfaces including different numbers of sending interfaces and receiving interfaces as needed according to actual connection relationships between each interface on the first device and each interface on another device, so that the outgoing flow and the incoming flow on the bidirectional interfaces configured by using the method for configuring an interface provided by the present application may be different, for example, the incoming flow on the bidirectional interface may be greater than the outgoing flow on the bidirectional interface, so that in an application scenario where the outgoing flow and the incoming flow are unbalanced, the utilization rate of transmission resources of the device may be improved.
In a first optional implementation manner of the third aspect, before the first device receives, through the first receiving interface on the first device, the first probe packet sent by the second device through the first sending interface on the second device, the method for configuring the interface provided in the present application may further include: the first device sends a second probe message for determining a relationship between a second sending interface on the first device and a receiving interface on the first device, which is not configured as a bidirectional interface, to the second device through the second sending interface on the first device (the second probe message includes an identifier of the first device and an identifier of the second sending interface). The first detection message is generated by adding, to the second detection message by the second device, an identifier of a second receiving interface on the second device (the second receiving interface is a receiving interface on the second device connected to a second sending interface on the first device), an identifier of the second device, and an identifier of a first sending interface on the second device. In this way, a first device may send a second probe message to a second device through a second sending interface on the first device that is not configured as a bidirectional interface to determine a relationship between the second sending interface on the first device and a receiving interface on the first device that is not configured as a bidirectional interface, thereby determining with which receiving interface/interfaces on the first device the second sending interface on the first device may be configured as a bidirectional interface.
In a second optional implementation manner of the third aspect, the method for configuring an interface provided by the present application may further include: when the number of identifiers in the first probe message is less than 5, the first device adds, to the first probe message, an identifier of a first receiving interface on the first device, an identifier of the first device, and an identifier of a third sending interface on the first device (the third sending interface is a sending interface on the first device connected to a third receiving interface on a third device), so as to generate a third probe message for the third device to determine a relationship between the third receiving interface and a sending interface on the third device that is not configured as a bidirectional interface; and then the first device sends the third detection message to the third device through the third sending interface. Thus, when the first device receives that the number of identifiers in the first probe message sent by the second device is less than 5, the first device may continue to add corresponding identifiers in the first probe message to generate a new probe message (e.g., a third probe message), and then send the new probe message to the third device through a third sending interface on the first device that is not configured as a bidirectional interface, so that the third device determines a relationship between a third receiving interface on the third device and a sending interface on the third device that is not configured as a bidirectional interface, and further determines which sending interface/sending interfaces on the third device can be configured as a bidirectional interface.
In a third optional implementation manner of the third aspect, the method for configuring an interface provided by the present application may further include: when the number of the identifiers in the first probe message is less than 5, the first device adds, to the first probe message, an identifier of a first receiving interface on the first device, an identifier of the first device, and an identifier of a fourth sending interface on the first device (the fourth sending interface is a sending interface on the first device that has been configured as a bidirectional interface and is connected to a fourth receiving interface on the second device), so as to generate a fourth probe message for the second device to determine a relationship between the fourth receiving interface on the second device and the first sending interface on the second device; and then the first device sends the fourth detection message to the second device through the fourth sending interface. In this way, in the case that the number of identifiers in the first probe message received by the first apparatus and sent by the second apparatus is less than 5, the first apparatus may continue to add corresponding identifiers in the first probe message, to generate a new probe message (e.g., a fourth probe message), and then the new probe message is sent to the second device through a fourth sending interface on the first device that is already configured as a bi-directional interface, so that the second device can determine the relationship between a fourth receiving interface on the second device connected to a fourth sending interface on the first device and a first sending interface on the second device sending the first probe packet to the first device, for example, the second device may determine that a fourth receive interface on the second device that is connected to a fourth transmit interface on the first device and a first transmit interface on the second device that transmits the first probe packet to the first device may be configured as a bi-directional interface.
In this application, the probe packet sent by one device to another device may also be used to determine a connection relationship between a sending interface on the one device that sends the probe packet and a receiving interface on the another device that receives the probe packet, that is, the sending interface is connected to the receiving interface. In this way, when the other device detects that the data sent by the one device and received by the other device is abnormal, the other device may determine which sending interface on the one device is specifically the sending interface connected to the receiving interface on the other device that receives the probe packet (i.e., the sending interface on the one device that sends the probe packet), so that the other device may specify, in the ethernet frame sent to the one device to indicate the abnormality, the identity of the sending interface on the one device that sends the probe packet.
For example, the first probe packet may also be used to determine a connection relationship between a first receiving interface on the first device and a first sending interface on the second device, that is, the first probe packet may also be used to determine a connection between the first receiving interface on the first device and the first sending interface on the second device. The second probe packet may also be used to determine a connection relationship between a second sending interface on the first device and a second receiving interface on the second device (i.e., a receiving interface on the second device that receives the second probe packet), that is, the second sending interface on the first device is connected to the second receiving interface on the second device. The third probe packet may also be used to determine a connection relationship between a third sending interface on the first device and a third receiving interface on the third device (i.e., a receiving interface on the third device that receives the third probe packet), that is, the third sending interface on the first device is connected to the third receiving interface on the third device. The fourth probe packet may also be used to determine a connection relationship between a fourth sending interface on the first device and a fourth receiving interface on the second device (i.e., a receiving interface on the second device that receives the fourth probe packet), that is, the fourth sending interface on the first device is connected to the fourth receiving interface on the second device.
In a fourth optional implementation manner of the third aspect, if the first receiving interface on the first device is deleted, the method for configuring an interface provided in this application may further include: the method comprises the steps that a first device sends a notification message used for notifying the second device to delete the relationship between a first receiving interface on the first device and a first sending interface on the second device, wherein the relationship is stored in the second device; the first device then receives an acknowledgement message sent by the second device to acknowledge successful receipt of the notification message by the second device. Therefore, the second device can update the connection relation between the corresponding interface on the second device and the corresponding interface on the first device in real time, and the second device can accurately use the corresponding sending interface on the second device to send data to the first device, so that the data can be correctly transmitted.
In a fifth optional implementation manner of the third aspect, the method for configuring an interface provided by the present application may further include: and under the condition that the first identifier in the first detection message is different from the identifier of the first device, the first device discards the first detection message. Since the difference between the first identifier in the first detection message and the identifier of the first device may indicate that the original detection message of the first detection message is not the detection message originally sent by the first device, that is, the number of identifiers in the first detection message has reached 5, but the first detection message cannot be used by the first device to determine the connection relationship between each interface on the first device and each interface on other devices, the first device may discard the first detection message at this time.
In a fourth aspect, an apparatus for configuring an interface is provided and may include a receiving module, a detecting module, and a configuring module. The receiving module is configured to receive, through a first receiving interface on the device, a first probe packet that is sent by a second device through a first sending interface on the second device and is used to determine a relationship between the first receiving interface and a sending interface on the device that is not configured as a bidirectional interface (the first probe packet at least includes an identifier of the second device and an identifier of the first sending interface); the detection module is used for detecting whether a first identifier in the first detection message is the same as the identifier of the device or not under the condition that the number of the identifiers in the first detection message received by the receiving module is equal to 5; the configuration module is configured to configure the first receiving interface and the second sending interface (the second sending interface is a sending interface indicated by a second identifier in the first detection message on the device) as a bidirectional interface under the condition that the detection module detects that the first identifier in the first detection message is the same as the identifier of the device.
In a first optional implementation manner of the fourth aspect, the apparatus for configuring an interface provided in the present application may further include a sending module. The sending module is configured to send, to the second device through a second sending interface on the device, a second probe packet (where the second probe packet includes an identifier of the device and an identifier of the second sending interface) for determining a relationship between the second sending interface and a receiving interface on the device that is not configured as a bidirectional interface before the receiving module receives, through a first receiving interface on the device, a first probe packet sent by the second device through a first sending interface on the second device. The first detection message is generated by adding, to the second detection message by the second device, an identifier of a second receiving interface on the second device (the second receiving interface is a receiving interface on the second device connected to a second sending interface on the device), an identifier of the second device, and an identifier of a first sending interface on the second device.
In a second optional implementation manner of the fourth aspect, the apparatus for configuring an interface provided by the present application may further include a generation module. The generating module is configured to, when the number of identifiers in the first probe message received by the receiving module is less than 5, add, in the first probe message, an identifier of a first receiving interface on the device, an identifier of the device, and an identifier of a third sending interface on the device (the third sending interface is a sending interface on the device connected to a third receiving interface on a third device), so as to generate a third probe message for the third device to determine a relationship between the third receiving interface on the third device and a sending interface on the third device that is not configured as a bidirectional interface; the sending module is further configured to send the third detection packet generated by the generating module to the third device through the third sending interface.
In a third optional implementation manner of the fourth aspect, in the apparatus for configuring an interface provided by the present application, the generating module is further configured to, when the number of the identifiers in the first probe message received by the receiving module is less than 5, add, in the first probe message, the identifier of the first receiving interface on the apparatus, the identifier of the apparatus, and an identifier of a fourth sending interface on the apparatus (the fourth sending interface is a sending interface that has been configured as a bidirectional interface on the apparatus and is connected to a fourth receiving interface on a second apparatus) to generate a fourth probe message used for the second apparatus to determine a relationship between the fourth receiving interface on the second apparatus and the first sending interface on the second apparatus; the sending module is further configured to send the fourth detection packet to the second device through the fourth sending interface.
In a fourth optional implementation manner of the fourth aspect, in the apparatus for configuring an interface provided in the present application, the sending module is further configured to send, to the second apparatus, a notification message for notifying the second apparatus to delete a relationship between the first receiving interface on the apparatus and the first sending interface on the second apparatus, where the relationship is stored in the second apparatus, after the first receiving interface on the apparatus is deleted; the receiving module is further configured to receive a confirmation message sent by the second device and used for confirming that the second device successfully receives the notification message.
In a fifth optional implementation manner of the fourth aspect, in the apparatus for configuring an interface provided by the present application, the configuration module is further configured to discard the first probe packet received by the receiving module when the detecting module detects that the first identifier in the first probe packet is different from the identifier of the apparatus.
For a detailed description of the technical effect and other contents of the fourth aspect, reference may be made to the above-mentioned description of the technical effect and other contents of the third aspect or any optional implementation manner thereof, and details are not described herein again.
In a fifth aspect, an apparatus for configuring an interface is provided and may include a processor and a memory. The memory is configured to store computer instructions, and when the apparatus is running, the processor executes the computer instructions stored in the memory to cause the processor to perform the method of configuring an interface as described in the first aspect or any one of its alternative implementations.
In a sixth aspect, a computer-readable storage medium is provided that includes computer instructions. When the computer instructions are run on an apparatus for configuring an interface provided in the present application, the apparatus may be caused to perform the method for configuring an interface in the first aspect or any one of the alternative implementations thereof.
In a seventh aspect, a computer program product comprising computer instructions is provided, which when run on an apparatus for configuring an interface provided in this application, enables the apparatus to perform the method for configuring an interface of the first aspect or any one of its optional implementations.
In an eighth aspect, a data center system is provided, which may include the forwarding device in the second aspect.
For a detailed description of the technical effects and other contents of the fifth aspect, the sixth aspect, the seventh aspect, and the eighth aspect, reference may be made to the above-mentioned description of the technical effects and other contents of the first aspect or any one of the optional implementations of the first aspect, and details are not described here again.
Drawings
FIG. 1 is a schematic diagram of an Ethernet interface of a prior art device;
fig. 2 is an architecture diagram of a data center system for running video services according to an embodiment of the present invention;
fig. 3 is a hardware schematic diagram of a switch according to an embodiment of the present invention;
fig. 4 is a first schematic structural diagram of an apparatus for configuring an interface according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus for configuring an interface according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an apparatus for configuring an interface according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an apparatus for configuring an interface according to an embodiment of the present invention;
fig. 8 is a schematic diagram illustrating a method for configuring an interface according to an embodiment of the present invention;
fig. 9 is a schematic diagram illustrating an interface connection relationship of an apparatus for configuring an interface according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an apparatus for configuring an interface according to an embodiment of the present invention;
fig. 11 is a sixth schematic structural diagram of an apparatus for configuring an interface according to an embodiment of the present invention;
fig. 12 is a seventh schematic structural diagram of an apparatus for configuring an interface according to an embodiment of the present invention.
Detailed Description
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. The symbol "/" herein denotes a relationship in which the associated object is or, for example, a/B denotes a or B.
The terms "first," "second," and "third," etc. in the description and claims of this application are used for distinguishing between different objects and not for describing a particular order of the objects. For example, the first means, second means, third means, etc. are for distinguishing between different means and not for describing a particular order of the means; the first receiving interface, the second receiving interface, the third receiving interface, etc. are for distinguishing different receiving interfaces, and are not for describing a specific order of the receiving interfaces.
In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the description of the embodiments of the present invention, the meaning of "a plurality" means two or more unless otherwise specified. For example, a plurality of interfaces refers to two or more interfaces; the plurality of reception interfaces means two or more reception interfaces.
Currently, in ethernet, ethernet technology can be generally used to transmit video traffic. For example, when the device X and the device Y transmit the video service by using the ethernet technology, if the device X requests the device Y for the video service, during the process that the device X requests the device Y for the video service, an incoming flow (for example, downloading the video service) on the device X may be much larger than an outgoing flow (for example, sending a request message requesting the video service) on the device X, and in the method, transmission rates of ethernet interfaces in two directions, which are connected to each other on the device X and the device Y, are the same, so that transmitting the video service by using the ethernet technology may waste transmission resources of the device, thereby resulting in a low utilization rate of the transmission resources of the device.
In order to solve the technical problem, embodiments of the present invention provide a method, an apparatus, a forwarding device, and a system for configuring an interface. Taking the device for configuring the interface provided by the embodiment of the present invention as an example, the device includes N transmitting interfaces and M receiving interfaces. The N sending interfaces form X sending interface groups, the M receiving interfaces form Y receiving interface groups, at least one sending interface group in the X sending interface groups and at least one receiving interface group in the Y receiving interface groups form at least one bidirectional interface (namely, interfaces capable of sending and receiving data), the number of the sending interfaces in the sending interface group forming each bidirectional interface is different from that of the receiving interfaces in the receiving interface group forming each bidirectional interface, and the sending interfaces in the sending interface group forming each bidirectional interface and the receiving interfaces in the receiving interface group forming each bidirectional interface are connected with the same device at the opposite end (the device at the opposite end is a device connected with the device). Each bidirectional interface is used for the device to send and receive data (specifically, each bidirectional interface is used for the device to send data to the peer device and receive data sent by the peer device), where N, M, X and Y are positive integers, and X < N, and Y < M. In the device, since the number of the transmitting interfaces in the transmitting interface group and the number of the receiving interfaces in the receiving interface group that constitute each bidirectional interface (i.e., interfaces that can both transmit data and receive data, and the transmitting interfaces in the transmitting interface group and the receiving interfaces in the receiving interface group that constitute each bidirectional interface are the same as the opposite-end device) are different, that is, the number of the transmitting interfaces in the transmitting interface group and the number of the receiving interfaces in the receiving interface group that constitute each bidirectional interface can be configured as needed, the outgoing flow and the incoming flow on the bidirectional interface provided by the embodiment of the present invention may be different, for example, the incoming flow on the bidirectional interface may be greater than the outgoing flow on the bidirectional interface, and thus, in an application scenario where the outgoing flow and the incoming flow are unbalanced, the utilization rate of the transmission resources of the device may be improved.
In this embodiment of the present invention, the peer device connected to the device for configuring an interface provided in this embodiment of the present invention may also be a device for configuring an interface. Specifically, the structure and/or function of the peer device may refer to the related description of the device for configuring an interface provided in the embodiment of the present invention, and details are not described here.
It can be understood that, in the embodiment of the present invention, the sending interface in the sending interface group and the receiving interface in the receiving interface group that form each bidirectional interface both refer to a sending interface and a receiving interface that are connected to the same peer device.
The method, the device, the forwarding equipment and the system for configuring the interface provided by the embodiment of the invention can be applied to a scene that the outgoing flow and the incoming flow of the equipment are asymmetric when the service is transmitted between the equipment. For example, the system provided by the embodiment of the present invention may be a data center system, and the data center system may specifically be a data center system that runs a video service. Fig. 2 is a diagram illustrating an architecture of a data center system for running video services according to an embodiment of the present invention. In fig. 2, the data center system includes two servers (illustrated in fig. 2 as server 10 and server 11, respectively), a rack (TOR) switch 12 connected to both servers, an Aggregation (AGG) switch 13 connected to the TOR switch 12, and a client 14 connected to the AGG switch 13. Assuming that the client 14 downloads the video data from the server 10 and the server 11 through the AGG switch 13 and the TOR switch 12, the client 14 may send a request message requesting a video service to the AGG switch 13, the AGG switch 13 forwards the request message to the server 10 and the server 11 through the TOR switch 12, and after the server 10 and the server 11 receive the request message, the server 10 and the server 11 may send the video data requested by the client 14 to the AGG switch 13 through the TOR switch 12, so that the AGG switch 13 may forward the video data to the client 14, and thus the client 14 completes downloading the video data. In the process of downloading the video data from the server 10 and the server 11 by the client 14 through the AGG switch 13 and the TOR switch 12, since the traffic occupied by the request message requesting the video service on the TOR switch 12 (hereinafter, referred to as the outgoing traffic on the TOR switch 12) is generally small, and the traffic occupied by the video data on the TOR switch 12 (hereinafter, referred to as the incoming traffic on the TOR switch 12) is generally large, a problem of imbalance between the outgoing traffic on the TOR switch 12 and the incoming traffic on the TOR switch 12 may occur. In the embodiment of the present invention, in order to improve the utilization rate of the transmission resource of a device (i.e., a device that transmits a video service) in an application scenario where the outgoing traffic of the device and the incoming traffic of the device are unbalanced, an interface on the device may be flexibly configured as needed, for example, a sending interface and a receiving interface on the device may be flexibly configured as needed. Illustratively, as shown in fig. 2, taking an interface of the TOR switch 12 for transmitting data with the AGG switch 13 as an example, the TOR switch 12 includes 12 interfaces, the 12 interfaces include 8 transmitting interfaces and 4 receiving interfaces, the 8 transmitting interfaces can be grouped into 2 transmitting interface groups (illustrated as TX group 1 and TX group 2 in fig. 2), the 4 receiving interfaces are grouped into 1 receiving interface group (illustrated as RX group 1 in fig. 2), and the 2 transmitting interface groups and the 1 receiving interface group are configured as one bidirectional interface (illustrated as S1 in fig. 2, the bidirectional interface is an interface capable of transmitting data and receiving data, and the traffic when transmitting data is different from the traffic when receiving data, and the transmitting interface in the 2 transmitting interface groups and the receiving interface in the 1 receiving interface group are both the same AGG switch, for example, the AGG switch 13 shown in fig. 2 is connected), so that the number of sending interfaces in the sending interface group (i.e., 8 sending interfaces) and the number of receiving interfaces in the receiving interface group (i.e., 4 receiving interfaces) that form the bidirectional interface are different, and further the outgoing traffic and the incoming traffic on the bidirectional interface on the TOR switch 12 may be different, thereby improving the utilization rate of the transmission resource of the TOR switch 12.
The interface provided by the embodiment of the invention can be an Ethernet interface. For example, the sending interface provided in the embodiment of the present invention may be an ethernet sending interface, and the receiving interface may be an ethernet receiving interface.
The device for configuring the interface provided by the embodiment of the invention can be a chip or a device comprising the chip. The chip can be a physical layer chip, a chip integrated with a physical layer function, and a chip integrated with a physical layer function and an MAC layer function. Illustratively, the chip may be a network card or the like. The device may be a forwarding device, which may be a switch or a router. The following takes the forwarding device as a switch as an example, and an exemplary description is given to a hardware structure of the forwarding device provided in the embodiment of the present invention with reference to fig. 3.
Fig. 3 is a schematic structural diagram of a switch according to an embodiment of the present invention. The switch includes a processor 20, a memory 21, and a plurality of interfaces (specifically, an ethernet interface, 4 interfaces are taken as an example in fig. 3, and to distinguish the 4 interfaces, the 4 interfaces are respectively illustrated as an interface 220, an interface 221, an interface 222, and an interface 223) connected to the processor 20. The processor 20 and the memory 21 are connected by a bus 23. The processor 20 may be integrated with a Central Processing Unit (CPU) 200 and a Network Processor (NP) 201.
The processor 20: for forwarding data through an interface on the switch. An application-specific integrated circuit (ASIC) chip, a Field Programmable Gate Array (FPGA) chip, or the like may be generally used in the processor 20 of the switch to implement high-speed forwarding of data.
A memory 21 for storing the configuration of the switch, the operating system, the forwarding protocol software, etc. The memory 21 may be a volatile memory (volatile memory), such as a random-access memory (RAM). The memory 21 may be a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory (flash memory), a hard disk (HDD), or a solid-state disk (SSD). The memory 21 may also comprise a combination of memories of the kind described above.
Interface: in particular, it may be an ethernet interface on a switch. The interfaces in the switch may include a transmit interface and a receive interface. The sending interface is used for the exchanger to send data to other equipment; the receiving interface is used for the data that other equipment sent is received to the switch.
The embodiment of the invention provides a device for configuring an interface, which can comprise N + M interfaces. The N + M interfaces include N transmission interfaces and M reception interfaces. The N sending interfaces form X sending interface groups, the M receiving interfaces form Y receiving interface groups, at least one sending interface group in the X sending interface groups and at least one receiving interface group in the Y receiving interface groups form at least one bidirectional interface, the number of the sending interfaces in the sending interface group and the number of the receiving interfaces in the receiving interface group which form each bidirectional interface are different, the sending interfaces in the sending interface group and the receiving interfaces in the receiving interface group which form each bidirectional interface are connected with the same opposite terminal device, and the opposite terminal device is a device connected with the device. Each bidirectional interface may be used for the apparatus to transmit and receive data (specifically, each bidirectional interface may be used for the apparatus to transmit data to the peer apparatus and receive data transmitted by the peer apparatus), where N, M, X and Y are positive integers, and X < N, and Y < M.
For example, assume that N transmit interfaces are respectively denoted as TX0、TX1、TX2、……、TXN-2、TXN-1M receiving interfaces are respectively denoted as RX0、RX1、RX2、……、RXM-2、RXM-1X ═ 2 and Y ═ 2, then the 2 transmit interface groups can be represented as { TX0、TX1、TX2、……、TXP-1And { TX }P、……、TXN-2、TXN-1}, a set of 2 receive interfaces may be denoted as { RX0、RX1、RX2、……、RXQ-1And { RX }Q、……、RXM-2、RXM-1}. Wherein P is more than or equal to 1 and less than or equal to N-1, Q is more than or equal to 1 and less than or equal to M-1, and P and Q are integers. In the embodiment of the present invention, after N transmission interfaces and M reception interfaces are respectively divided into 2 transmission interface groups and 2 reception interface groups as needed, the 2 transmission interface groups and the 2 reception interface groups may be configured as at least one bidirectional interface as needed, and in the configuration process, the number of transmission interfaces in the transmission interface group forming each bidirectional interface may be configuredAnd the number of receive interfaces in the set of receive interfaces. The sending interface in the sending interface group and the receiving interface in the receiving interface group which form each bidirectional interface are interfaces connected with the same opposite terminal device.
Alternatively, M and N may be equal.
In order to better understand the technical solution of the present application, the following takes M and N as examples, and an exemplary description is provided for a device for configuring an interface according to an embodiment of the present invention.
Assuming that M is equal to N is equal to 4, the 4 transmission interfaces are denoted as TX respectively0、TX1、TX2And TX3(ii) a The 4 receiving interfaces are respectively marked as RX0、RX1、RX2And RX3
As shown in (a) of fig. 4, assuming that X is 2 and Y is 2, the 2 transmission interface groups configured as needed may be represented as { TX ═ 20、TX1、TX2And { TX }3The set of 2 receive interfaces configured as required may be denoted as { RX }0、RX1、RX2And { RX }3Thus, in the embodiment of the present invention, the sending interfaces { TX }can be grouped0、TX1、TX2And set of receive interfaces { RX }3Form a bi-directional interface S10, and send the interface set { TX3And set of receive interfaces { RX }0、RX1、RX2Constitute another bidirectional interface S11. If the sending rate of each sending interface is R and the rate of each receiving interface is also R, the bidirectional interface S10 is an interface with the sending rate of 3R and the receiving rate of R; the bidirectional interface S11 is an interface with a transmission rate R and a reception rate 3R. Wherein, a transmitting interface group { TX ] of a bidirectional interface S10 is formed0、TX1、TX2Each transmitting interface and receiving interface set in { RX } respectively3The receiving interface in (b) is connected with the same opposite terminal device (not shown in (a) of fig. 4); transmit interface set { TX } comprising bidirectional interface S113Set of transmit and receive interfaces { RX }0、RX1、RX2Each receiving interface in (b) is connected with the same peer device (not shown in fig. 4).
As shown in (b) of fig. 4, assuming that X is 1 and Y is 2, the 1 transmission interface group configured as needed may be represented as { TX ═ 20、TX1、TX2、TX3The set of 2 receive interfaces configured as required may be denoted as { RX }0、RX1、RX2And { RX }3Thus, in the embodiment of the present invention, the sending interfaces { TX }can be grouped0、TX1、TX2、TX3And set of receive interfaces { RX }3Form a bi-directional interface S12, and receive the interface set { RX0、RX1、RX2Constitute a one-way interface D10. If the sending rate of each sending interface is R and the rate of each receiving interface is also R, the bidirectional interface S12 is an interface with the sending rate of 4R and the receiving rate of R; the unidirectional interface D10 is an interface with a reception rate of 3R. Wherein, a transmitting interface group { TX ] of a bidirectional interface S12 is formed0、TX1、TX2、TX3Each transmitting interface and receiving interface set in { RX } respectively3The receiving interface in (c) is connected to the same peer device (not shown in fig. 4 (b)).
As shown in (c) of fig. 4, assuming that X is 4 and Y is 2, the 4 transmission interface groups configured as needed may be represented as { TX ═ 40}、{TX1}、{TX2And { TX }3The set of 2 receive interfaces configured as required may be denoted as { RX }0、RX1、RX2And { RX }3Thus, in the embodiment of the present invention, the sending interfaces { TX }can be grouped0And set of receive interfaces { RX }3Form a bi-directional interface S13, and send the interface set { TX2And set of receive interfaces { RX }0、RX1、RX2Form another bidirectional interface S14; group of interfaces to transmit TX1Form a one-way interface D11, send interface set { TX3Constitute another unidirectional interface D12. If the sending rate of each sending interface is R and the rate of each receiving interface is also R, the bidirectional interface S13 is an interface with the sending rate of R and the receiving rate of R; the bidirectional interface S14 is an interface with a sending rate R and a receiving rate 3R; one-way interface D11 and sheetInterface D12 is all interfaces that send rate R. Wherein, a transmitting interface group { TX ] of a bidirectional interface S13 is formed0Set of transmit and receive interfaces { RX }3The receiving interface in (c) is connected with the same opposite terminal device (not shown in (c) of fig. 4); transmit interface set { TX } comprising bidirectional interface S142Set of transmit and receive interfaces { RX }0、RX1、RX2Each of the receiving interfaces in (c) is connected to the same peer device (not shown in fig. 4).
In the apparatus for configuring an interface provided in the embodiment of the present invention, because at least one sending interface group and at least one receiving interface group may be configured to form at least one bidirectional interface (i.e., an interface that can send data and receive data, and a receiving interface in the sending interface group and a receiving interface in the receiving interface group that form each bidirectional interface is the same as an opposite device), and the number of sending interfaces in the sending interface group and the number of receiving interfaces in the receiving interface group that form each bidirectional interface are different, that is, the number of sending interfaces in the sending interface group and the number of receiving interfaces in the receiving interface group that form each bidirectional interface may be configured as needed, an outgoing flow and an incoming flow on the bidirectional interface on the apparatus provided in the embodiment of the present invention may be different, for example, an incoming flow on the bidirectional interface may be greater than an outgoing flow on the bidirectional interface, therefore, in the application scene of unbalanced outgoing flow and incoming flow, the utilization rate of the transmission resource of the device can be improved.
For example, when the apparatus for configuring an interface according to the embodiment of the present invention transmits video services, since an incoming flow on the apparatus is usually much larger than an outgoing flow on the apparatus, that is, the outgoing flow and the incoming flow on the apparatus are usually unbalanced, when the apparatus for configuring an interface transmits video services using the bidirectional interface provided in the present application, the incoming flow of the apparatus on the bidirectional interface may be larger than the outgoing flow of the apparatus on the bidirectional interface, so that the utilization rate of transmission resources of the apparatus may be increased.
In the embodiment of the present invention, when another device (hereinafter, referred to as device a) transmits data to the above device for configuring an interface (hereinafter, referred to as device B), device a may transmit data to device B through a transmission interface on device a, and accordingly, device B may receive the data through a reception interface on device B, and when device B detects that data transmitted by device a received by device B is abnormal, device B needs to reply a notification message to device a through a transmission interface on device B that forms a bidirectional interface with the reception interface. In the embodiment of the present invention, the receiving interface and the sending interface forming a bidirectional interface on the device B are not in one-to-one correspondence (that is, the number of the receiving interface and the sending interface forming a bidirectional interface on the device B is different), and the receiving interface and the sending interface forming a bidirectional interface may be located on the same chip in the device B or may be located on different chips in the device B, so when the device B replies the notification message to the device a, the device B needs to indicate, in the notification message, the sending interface on the device a that data transmission to the device B is abnormal, so that the device a can know, according to the sending interface on the device a that data transmission is abnormal, which sending interface on the device a is specifically the sending interface on the device a that data transmission to the device B is abnormal (for example, data transmission is faulty or the flow rate of sending data exceeds the flow rate of receiving data at the receiving end and needs to suspend sending data, etc.), device a may then handle the exception occurring at the sending interface that sent the data.
Optionally, in this embodiment of the present invention, the notification message may be an ethernet frame, and the ethernet frame may be a PHYOAM ethernet frame or a BPDU ethernet frame.
Still taking the above-mentioned example that the device a sends data to the device B, and the device B detects that the data sent by the device a and received by the device B is abnormal, respectively performing, on the same chip in the device B, a receiving interface for receiving data and a sending interface for sending an ethernet frame, where a receiving interface group where the receiving interface is located and a sending interface group where the sending interface is located, form a bidirectional interface, for example, the bidirectional interface may be any one of the above-mentioned at least one bidirectional interface, and hereinafter, both are referred to as a first bidirectional interface, or the receive interface for receiving data and the transmit interface for transmitting ethernet frames on device B (i.e. the first bidirectional interface) are in the case of different chips in device B, when device B replies to device a with an ethernet frame, device B indicates, in the ethernet frame, a method of sending an interface on device a to send data to device B, where the data is abnormal.
The first optional implementation is: the transmitting interface in the transmitting interface group and the receiving interface in the receiving interface group which form the first bidirectional interface are located on the same chip in the device B.
In a first alternative implementation, the first bidirectional interface may be any one of the at least one bidirectional interface. Device B may send an ethernet frame to device a through a sending interface in a sending interface group that constitutes a first bidirectional interface on device B, where the ethernet frame may include an identifier of the first sending interface, the first sending interface is a sending interface that sends data to a first receiving interface on device a, and the first receiving interface is a receiving interface in a receiving interface group that constitutes the first bidirectional interface on device B.
For example, as shown in fig. 5, it is assumed that a receiving interface in device B, which is an abnormal receiving interface in the receiving interface group forming the first bidirectional interface, is denoted as RX1, a transmitting interface in device B, which is a transmitting interface group forming the first bidirectional interface, is denoted as TX1 (a receiving interface in the receiving interface group in which RX1 is located and a transmitting interface in the transmitting interface group in which TX1 is located may be on the same chip in device B; it is understood that RX1 and TX1 may be on the same chip in device B), a transmitting interface in device a, which is connected to RX1, is denoted as TX2, a receiving interface in device a, which is connected to TX1, is denoted as RX2 (a receiving interface in the receiving interface group in which RX2 is located and a transmitting interface in the transmitting interface group in which TX2 is located may also be on the same chip in device a, and a receiving interface in the receiving interface group in which RX2 is located and a transmitting interface in the transmitting interface group in which TX2 are located also constitute a bidirectional interface, RX2 and TX2 may be on the same chip in device a), then device a may receive the data through RX1 after transmitting the data to device B through TX2, when device B detects an anomaly in the data, device B may transmit an ethernet frame to device a through TX1, the ethernet frame including an identification of TX2, and after device a receives the ethernet frame through RX2, device a may determine that it may be that TX2 on device a has an anomaly in transmitting the data, so that device a may detect and process the anomaly in TX2 in time. Wherein RS in fig. 5 represents an adaptation sublayer(s) in the chip.
In the embodiment of the present invention, device B may directly send an ethernet frame to device a through TX 1; alternatively, as shown in fig. 5, device B may transmit an ethernet frame to device a through TX1 directly at a Physical Coding Sublayer (PCS).
The second alternative implementation is: the transmitting interface in the transmitting interface group and the receiving interface in the receiving interface group which constitute the first bidirectional interface are located on different chips in the device B.
In a second alternative implementation, the first bidirectional interface may be any one of the at least one bidirectional interface. The device B may send, to the device a, an ethernet frame through a sending interface in a sending interface group forming a first bidirectional interface on the device B on a data plane or a control plane, where the ethernet frame may include an identifier of a first sending interface, the first sending interface is a sending interface on the device a that sends data to a first receiving interface, and the first receiving interface is a receiving interface in a receiving interface group forming the first bidirectional interface on the device B.
Illustratively, as shown in fig. 6, device B transmits an ethernet frame to device a at the data side, and it is assumed that a receiving interface in device B, which is abnormal in the receiving interface group forming the first bidirectional interface, is denoted as RX1, one transmitting interface in device B, which is abnormal in the transmitting interface group forming the first bidirectional interface, is denoted as TX1 (the receiving interface in the receiving interface group in which RX1 is located and the transmitting interface in the transmitting interface group in which TX1 is located may be on different chips in device B; it is understood that RX1 and TX1 may be on different chips in device B), the transmitting interface in device a, which is connected to RX1, is denoted as TX2, the receiving interface in device a, which is connected to TX1, is denoted as RX2 (the receiving interface in the receiving interface group in which RX2 is located and the transmitting interface in the transmitting interface group in which TX2 is located may also be on different chips in device a, and the receiving interface in device a receiving interface in which RX2 is located and the transmitting interface in the transmitting interface group in TX2 are also denoted as one bidirectional interfaces, RX2 and TX2 may be on different chips in device a), then device a may receive the data through RX1 after transmitting the data to device B through TX2, when device B detects an anomaly in the data, device B may transmit an ethernet frame to device a through TX1 in the data plane, the ethernet frame including an identification of TX2, and after device a receives the ethernet frame through RX2, device a may determine that it may be that TX2 on device a transmits the data anomaly, so that device a may detect and process the anomaly in TX2 in time. Wherein, MAC in fig. 6 represents a MAC layer in a chip.
In fig. 6, since RX1 and TX1 are on different chips in device B, device B may forward the ethernet frame to the chip on which TX1 is located on the data plane (e.g., above the MAC layer) by the chip on which RX1 is located before sending the ethernet frame to device a by TX1, and then send the ethernet frame to device a by TX1 by TX 1. Accordingly, if RX2 and TX2 are also on different chips in device a, after device a receives the ethernet frame sent by device B through RX2, the chip on which RX2 is located may forward the ethernet frame to the chip on which TX2 is located on the data plane, and finally the chip on which TX2 is located processes the ethernet frame.
Illustratively, as shown in fig. 7, it is a schematic diagram of sending an ethernet frame to the device a for the device B in the control plane. For the description of fig. 7, reference may be made to the above description related to fig. 6, and details are not repeated here.
The difference between the processes shown in fig. 6 and fig. 7 is that, in fig. 6, before device B sends an ethernet frame to device a through TX1, the ethernet frame may be forwarded to the chip where TX1 is located by the chip where RX1 is located on the data plane (e.g., above the MAC layer), and sent to device a through TX1 by the chip where TX1 is located. In fig. 7, before device B sends an ethernet frame to device a through TX1, the chip on which RX1 is located may forward the ethernet frame to the CPU on the control plane (e.g., above the PCS) and the CPU on device B controls TX1 to send the ethernet frame to device a through TX 1. Accordingly, if RX2 and TX2 are also on different chips in device a, after device a receives the ethernet frame sent by device B through RX2, the chip on RX2 may forward the ethernet frame to the CPU in device a, the CPU in device a controls the chip on RX2 to forward the ethernet frame to the chip on TX2, and finally the chip on TX2 processes the ethernet frame.
Wherein RS in fig. 6 and 7 both represent the adaptation sublayer in the chip.
It should be noted that, in the embodiment of the present invention, the device B may detect that the data sent by the device a is abnormal at the PCS, may detect that the data sent by the device a is abnormal at a Physical Media Attachment (PMA) sublayer, and may detect that the data sent by the device a is abnormal at a Physical Media Dependent (PMD) sublayer, which is not specifically limited in the embodiment of the present invention. For convenience of description, the foregoing fig. 5, fig. 6 and fig. 7 are all exemplarily illustrated by taking an example that the device B detects an abnormality in data transmitted by the device a at the PCS.
It can be understood that, in the first optional implementation manner and the second optional implementation manner in the embodiment of the present invention, the identifier of the first sending interface in the ethernet frame sent by the device B to the device a may also be used to indicate a sending interface to which the ethernet frame applies, for example, data counted by the ethernet frame is sent by the sending interface. Of course, the identifier of the first sending interface in the ethernet frame may also indicate the sending interface to which the ethernet frame applies in any other possible situation, which is not listed here.
Optionally, in this embodiment of the present invention, in the first optional implementation manner and the second optional implementation manner, the identifier of the first sending interface may be a logic identifier of the first sending interface. The logical identifier of the first sending interface may be a logical link identifier of the first sending interface or a MAC address of the first sending interface. The identity of the first transmission interface may uniquely identify the first transmission interface in the apparatus/device in which the first transmission interface is located. When the logic identifier of the first sending interface is the logic link identifier of the first sending interface, the ethernet frame may be a PHY OAM ethernet frame or a BPDU ethernet frame; when the logical identifier of the first sending interface is the MAC address of the first sending interface, the ethernet frame may be a BPDU ethernet frame.
Optionally, in this embodiment of the present invention, when the logical identifier of the first sending interface is a logical link identifier of the first sending interface, the logical link identifier of the first sending interface may be added to the reserved field of the ethernet frame.
In this embodiment of the present invention, when the logical identifier of the first sending interface is the MAC address of the first sending interface, the first sending interface indicating that data transmission to the sending device on the receiving device is abnormal may be performed by setting the destination MAC address of the BPDU ethernet frame sent by the sending device (for example, the device B) as the MAC address of the first sending interface; or the BPDU ethernet frame sent by the sending device (e.g., the device B described above) may be encapsulated by using a tunneling encapsulation technique (i.e., encapsulating the BPDU ethernet frame into a new ethernet frame), and the destination MAC address of the encapsulated new ethernet frame is set as the MAC address of the first sending interface, so as to indicate the first sending interface on the receiving device that sends data to the sending device, where the data is abnormal. Specifically, any one of the above methods may be selected according to actual use requirements, and the embodiment of the present invention is not limited.
Optionally, in this embodiment of the present invention, for other normal ethernet frames except for the PHY OAM ethernet frame and the BPDU ethernet frame, when the transmitting device transmits the normal ethernet frames to other devices, it may not be necessary to indicate the identifier of the relevant interface in the normal ethernet frames. Specifically, when the transmitting device transmits the ordinary ethernet frames to other devices, all the transmitting interfaces in the transmitting interface group forming one bidirectional interface may transmit the ordinary ethernet frames according to a preset sharing policy, for example, all the transmitting interfaces in the transmitting interface group forming one bidirectional interface may share and transmit the ordinary ethernet frames averagely. In this way, when any one of the receiving interfaces of the other device connected to all the transmitting interfaces in the transmitting interface group forming a bidirectional interface on the transmitting device receives the ordinary ethernet frame, the other device can be regarded as an ethernet frame received by the bidirectional interface formed by the receiving interfaces on the other device.
Optionally, the device for configuring the interface provided in the embodiment of the present invention may be a chip. For the description of the chip, reference may be made to the description of the chip in the above embodiments, and details are not repeated here.
It is to be understood that, in the embodiment of the present invention, in the above first alternative implementation manner, the apparatus for configuring the interface provided in the embodiment of the present invention may be a chip, that is, the apparatus is a chip. In the second alternative implementation manner, the apparatus for configuring the interface provided by the embodiment of the present invention may include two or more chips, that is, the apparatus may be composed of different chips.
According to the device for configuring the interface provided by the embodiment of the invention, when the device detects that the data transmitted by other devices is abnormal, the device can indicate the transmitting interface with the abnormal data transmitted by other devices to other devices through the PHY OAM Ethernet frame, so that the device can perfectly support the transmission and processing of the PHY OAM Ethernet frame. In addition, when the device for configuring the interface indicates the other device to send the data to the other device, the device does not need to create a tunnel dedicated for indicating the sending interface, so that the tunnel dedicated for indicating the sending interface is avoided from being used for indicating the sending interface, and the efficiency of indicating the sending interface is improved.
An embodiment of the present invention further provides a forwarding device, where the forwarding device may include the apparatus for configuring an interface described in the foregoing embodiment. For example, the forwarding device may include at least one chip. It is to be understood that, in the above apparatus for configuring an interface, when the transmitting interface in the transmitting interface group and the receiving interface in the receiving interface group that constitute each bidirectional interface are on the same chip, the apparatus may include one chip; when the transmitting interface in the transmitting interface group and the receiving interface in the receiving interface group constituting each bidirectional interface are on different chips, or when the transmitting interface in the transmitting interface group and the receiving interface in the receiving interface group constituting a part of the bidirectional interfaces are on different chips, the apparatus may include a plurality of chips.
It should be noted that, for the descriptions of the forwarding device, the apparatus for configuring the interface, and the chip, reference may be specifically made to the descriptions of the forwarding device, the apparatus for configuring the interface, and the chip in the foregoing embodiments, and details are not described here again.
An embodiment of the present invention further provides a method for configuring an interface, where an execution main body of the method for configuring an interface may be the apparatus for configuring an interface (specifically, may be a chip, or may also be a device including a chip), and the apparatus may automatically identify a sending interface and a receiving interface on the apparatus by executing the method, and form a bidirectional interface with the corresponding sending interface and receiving interface. The method for configuring an interface according to the embodiment of the present invention is specifically described below by taking the apparatuses for configuring an interface as a first apparatus, a second apparatus, and a third apparatus as examples, and through an interaction process among the three apparatuses.
Illustratively, as shown in fig. 8, an embodiment of the present invention provides a method of configuring an interface, which may include S101-S113 described below.
S101, the first device sends a second detection message to the second device through a second sending interface on the first device.
Wherein, the second detection message includes the identifier of the first device and the identifier of the second sending interface. The second probe message is used to determine a relationship between the second sending interface and a receiving interface on the first device that is not configured as a bi-directional interface.
In this embodiment of the present invention, the identifier of the first apparatus may be used to uniquely identify the first apparatus in the device/forwarding device where the first apparatus is located, and the identifier of the second sending interface may be used to uniquely identify the second sending interface in the first apparatus where the second sending interface is located.
And S102, the second device receives a second detection message sent by the first device through a second sending interface on the first device through a second receiving interface on the second device.
S103, the second device judges whether the number of the marks in the second detection message is equal to 5.
In the case that the second device determines that the number of identifiers in the second detection message is equal to 5, the second device may continue to perform the step performed by the first device in S108 described below, specifically, the first device is taken as an example in S108 described below, and details thereof are not described here. In the case where the second device determines that the number of identifications in the second probe message is not equal to 5, for example, is less than 5, the second device continues to perform S104 to S105 described below. When the second apparatus determines that the number of identifiers in the second probe packet is not equal to 5, for example, is greater than 5, the second apparatus may discard the second probe packet.
S104, the second device adds the identifier of the second receiving interface on the second device, the identifier of the second device and the identifier of the first sending interface on the second device in the second detection message to generate a first detection message.
In this embodiment of the present invention, the identifier of the second apparatus may be used to uniquely identify the second apparatus in the device/forwarding device where the second apparatus is located, the identifier of the first sending interface may be used to uniquely identify the first sending interface in the second apparatus where the first sending interface is located, and the identifier of the second receiving interface may be used to uniquely identify the second receiving interface in the second apparatus where the second receiving interface is located. The second receiving interface is a receiving interface on the second device connected with the second sending interface on the first device.
S105, the second device sends the first detection message to the first device through a first sending interface on the second device.
S106, the first device receives a first detection message sent by the second device through a first sending interface on the second device through a first receiving interface on the first device.
The first detection message includes an identifier of the second device and an identifier of the first sending interface on the second device. The first probe message is used to determine a relationship between the first receiving interface and a transmitting interface on the first device that is not configured as a bi-directional interface.
S107, the first device judges whether the number of the marks in the first detection message is equal to 5.
In the case where the first device determines that the number of flags in the first probe message is equal to 5, the first device may proceed to S108 described below.
In this embodiment of the present invention, if the first probe packet sent by the second apparatus to the first apparatus is the probe packet originally sent by the second apparatus, in S107, a situation that the number of identifiers in the first probe packet is not equal to 5, for example, is less than 5, may also occur. Specifically, in the case that the first device determines that the number of identifiers in the first probe message is not equal to 5, for example, is less than 5, the first device may continue to perform S110-S111 described below or the first device may continue to perform S110-S111 and S110 '-S111' described below (only the first device continues to perform S110-S111 described below in fig. 8, which is illustrated by the first device not showing S110 '-S111' performed by the first device).
In addition, when the first device determines that the number of identifiers in the first probe packet is not equal to 5, for example, is greater than 5, the first device may discard the first probe packet.
S108, the first device detects whether the first identifier in the first detection message is the same as the identifier of the first device.
In the case where the first apparatus detects that the first identifier in the first probe message is the same as the identifier of the first apparatus, the first apparatus may proceed to S109 described below. In the case where the first device detects that the first identifier in the first probe message is different from the identifier of the first device, the first device may continue to perform S113 described below.
S109, the first device configures the first receiving interface and the second sending interface as a bidirectional interface.
And the second sending interface is a sending interface indicated by the second identifier in the first detection message on the first device. Namely a sending interface on the first device for sending the second detection message to the second device.
S110, the first device adds the identifier of the first receiving interface, the identifier of the first device, and the identifier of the third sending interface on the first device to the first detection packet, so as to generate a third detection packet.
The third sending interface is a sending interface on the first device connected with a third receiving interface on the third device. The identification of the third transmission interface may be used to uniquely identify the third transmission interface in the first device in which the third transmission interface is located. The third probe message is used by the third device to determine a relationship between a third receive interface on the third device and a transmit interface on the third device that is not configured as a bi-directional interface.
And S111, the first device sends a third detection message to the third device through a third sending interface on the first device.
Optionally, S110 '-S111' may specifically be:
s110', the first device adds the identifier of the first receiving interface, the identifier of the first device, and the identifier of the fourth sending interface on the first device in the first detection packet to generate a fourth detection packet.
The fourth sending interface is a sending interface which is configured into a bidirectional interface on the first device and is connected with a fourth receiving interface on the second device. The identification of the fourth transmission interface may be used to uniquely identify the fourth transmission interface in the first apparatus in which the fourth transmission interface is located. The fourth probe packet is used by the second device to determine a relationship between a fourth receive interface on the second device and the first transmit interface on the second device.
S111', the first device sends a fourth probe packet to the second device through a fourth sending interface on the first device.
S112, the third device receives, through a third receiving interface on the third device, a third probe packet sent by the first device through a third sending interface on the first device.
The steps executed after the third device receives the third detection packet are the same as the steps executed after the first device receives the first detection packet and the second device receives the second detection packet, and in particular, the above description of the steps executed after the first device receives the first detection packet and the steps executed after the second device receives the second detection packet can be referred to, and details are not described here.
Accordingly, corresponding to the above S110 ' -S111 ', the method for configuring an interface according to the embodiment of the present invention may further include S112 '.
S112', the second device receives, through the fourth receiving interface on the second device, the fourth probe packet sent by the first device through the fourth sending interface on the first device.
The fourth receiving interface on the second device is a receiving interface on the second device connected to the fourth sending interface on the first device. After the second device receives the fourth probe packet, the second device may determine that a fourth receiving interface on the second device connected to a fourth sending interface on the first device and a first sending interface on the second device sending the first probe packet to the first device may be configured as a bidirectional interface.
Accordingly, in fig. 8, S112 described above is executed only by the third device, and S112' executed by the second device is not shown.
S113, the first device discards the first detection packet.
In this embodiment of the present invention, the probe packet sent by one device to another device may also be used to determine a connection relationship between a sending interface on the one device that sends the probe packet and a receiving interface on the another device that receives the probe packet, that is, the sending interface is connected to the receiving interface. In this way, when the other device detects that the data sent by the one device and received by the other device is abnormal, the other device may determine which sending interface on the one device is specifically the sending interface connected to the receiving interface on the other device that receives the probe packet (i.e., the sending interface on the one device that sends the probe packet), so that the other device may specify, in the ethernet frame sent to the one device to indicate the abnormality, the identity of the sending interface on the one device that sends the probe packet.
For example, as shown in fig. 9, the first probe packet may also be used to determine a connection relationship between a first receiving interface a1 on the first device and a first sending interface B1 on the second device, that is, the first probe packet may also be used to determine a connection between a first receiving interface a1 on the first device and a first sending interface B1 on the second device. The second probe packet may also be used to determine a connection relationship between the second sending interface a2 on the first device and the second receiving interface B2 on the second device (i.e., the receiving interface on the second device that receives the second probe packet), that is, the second sending interface a2 on the first device is connected to the second receiving interface B2 on the second device. The third probe packet may also be used to determine a connection relationship between a third sending interface A3 on the first device and a third receiving interface C1 on the third device (i.e., a receiving interface on the third device that receives the third probe packet), that is, the third sending interface A3 on the first device is connected to the third receiving interface C1 on the third device. The fourth probe packet may also be used to determine a connection relationship between a fourth sending interface (not shown in fig. 9) on the first device and a fourth receiving interface (i.e., a receiving interface on the second device that receives the fourth probe packet, not shown in fig. 9) on the second device, that is, the fourth sending interface on the first device is connected to the fourth receiving interface on the second device.
It should be noted that, in the embodiment of the present invention, the first device, the second device, and the third device may respectively allocate, to each transmitting interface and each receiving interface on the first device, the second device, and the third device, an identifier for uniquely identifying each transmitting interface and each receiving interface, for example, as shown in fig. 9, the identifiers of each transmitting interface and each receiving interface on the first device, the second device, and the third device.
Optionally, in this embodiment of the present invention, the identifier of the first receiving interface on the first device may be a logic identifier of the first receiving interface; the identity of the second transmit interface on the first device may be a logical identity of the second transmit interface; the identity of the third transmit interface on the first device may be a logical identity of the third transmit interface; the identifier of the first sending interface on the second device may be a logical identifier of the first sending interface, and the identifier of the second receiving interface on the second device may be a logical identifier of the second receiving interface; the identification of the third receiving interface on the third device may be a logical identification of the third receiving interface. For the description of the logic identifier of each sending interface and the logic identifier of each receiving interface, reference may be specifically made to the description of the logic identifier of the first sending interface in the above embodiment of the apparatus for configuring an interface, and details are not described here again.
For example, as shown in fig. 9, it is assumed that the identifier of the first apparatus is a, the identifier of the second apparatus is B, the identifier of the third apparatus is C, the identifier of the first receiving interface on the first apparatus is a1, the identifier of the second sending interface on the first apparatus is a2, the identifier of the third sending interface on the first apparatus is A3, the identifier of the first sending interface on the second apparatus is B1, the identifier of the second receiving interface on the second apparatus is B2, and the identifier of the third receiving interface on the third apparatus is C1, and the method for configuring an interface according to the embodiment of the present invention is exemplarily described below with reference to fig. 9. In fig. 9, the receiving interfaces and the transmitting interfaces are respectively indicated by the identifiers of the receiving interfaces and the transmitting interfaces.
As shown in fig. 9, the first device sends a second probe message to the second device through a second sending interface a2 on the first device (the second probe message includes an identifier a of the first device and an identifier a2 of a second sending interface on the first device, and the second probe message may be denoted as { A, A2 }). After the second device receives, through the second receiving interface B2 on the second device, the second probe packet sent by the first device through the second sending interface a2 on the first device, the second device determines whether the number of identifiers in the second probe packet is equal to 5. And under the condition that the number of the identifiers in the second detection message is less than 5, after the second device adds the corresponding identifiers in the second detection message, the message after the corresponding identifiers are added is sent out through a sending interface which is not configured into a bidirectional interface on the second device. Specifically, as shown in fig. 9, the second device may add, to the second probe packet, an identifier B2 of the second receiving interface on the second device, an identifier B of the second device, and an identifier B1 of the first sending interface on the second device, so as to generate a first probe packet (the first probe packet may be denoted as { A, A2, B2, B, B1 }). The second device then sends the first probe packet to the first device via the first sending interface B1 on the second device. After the first device receives the first probe packet sent by the second device through the first sending interface B1 on the second device through the first receiving interface a1 on the first device, the first device determines whether the number of identifiers in the first probe packet is equal to 5, in case the number of identifiers in the first probe message is equal to 5 (e.g. the number of identifiers in the first probe message { A, A2, B2, B, B1} is equal to 5), the first device detects whether the first identifier in the first probe message is the same as the identifier of the first device, in the case that the first identifier in the first probe message is the same as the identifier of the first device (for example, the first identifier a in the first probe message { A, A2, B2, B, B1} is the same as the identifier a of the first device), the first device may configure the first receiving interface a1 on the first device and the second sending interface a2 on the first device as a bidirectional interface. It is understood that the receiving interface a4 on the first device can also receive a probe message (hereinafter, may be referred to as a fifth probe message, which may be denoted as { A, A2, B2, B, B3}) transmitted by the second device through the transmitting interface B3 on the second device, and since the first device determines that the number of identifiers in the fifth probe message is equal to 5 and the first identifier in the fifth probe message is the same as the identifier of the first device, the first device may configure the first receiving interface a1 on the first device, the second transmitting interface a2 on the first device, and the receiving interface a4 on the first device as a bidirectional interface. Through the above process, the first device may configure the bidirectional interfaces as needed (e.g., may be configured according to bandwidth requirements when data is actually transmitted) according to actual connection relationships between the interfaces on the first device and the interfaces on the other devices, that is, the first device may configure the bidirectional interfaces including the different numbers of the sending interfaces and the receiving interfaces as needed according to actual connection relationships between the interfaces on the first device and the interfaces on the other devices.
It should be noted that, in the embodiment of the present invention, all the transmitting interfaces and all the receiving interfaces configured as one bidirectional interface are connected to the same other device. For example, after the first device determines the actual connection relationship between each interface on the first device and each interface on the other device, the first device may determine which specific sending interfaces and which receiving interfaces on the first device are connected to the same other device, and then the first device may configure the sending interfaces and the receiving interfaces connected to the same other device as a bidirectional interface. It will be appreciated that if each interface on the first device is connected to a plurality of other devices, the first device may configure the transmit and receive interfaces connected to each other device as different bidirectional interfaces, respectively, i.e. the first device may configure a plurality of bidirectional interfaces on the first device (each bidirectional interface may be used for the first device to transfer data with the same other device).
Optionally, in this embodiment of the present invention, when the number of the identifiers in the first probe message is less than 5, the first device may add, to the first probe message, an identifier a1 of a first receiving interface on the first device, an identifier a of the first device, and an identifier A3 of a third sending interface on the first device, so as to generate a third probe message. The first device then sends the third probe message to the third device via the third sending interface a3 on the first device. After the third device receives the third probe packet sent by the first device through the third sending interface A3 on the first device through the third receiving interface C1 on the third device, the third device may continue to process the third probe packet according to the processing method after the second device receives the second probe packet or the processing method after the first device receives the first probe packet, which may be specifically described in the above related description in the embodiment shown in fig. 9, and details of this description are not repeated here.
Optionally, in this embodiment of the present invention, when the number of identifiers in the first probe message is less than 5, the first device may add, to the first probe message, an identifier a1 of a first receiving interface on the first device, an identifier a of the first device, and an identifier a2 of a second sending interface on the first device (at this time, the second sending interface may be considered as one sending interface that has been configured as a bidirectional interface on the first device), so as to generate a fourth probe message. The first device then sends the fourth probe packet to the second device via the second sending interface a2 on the first device. After the second device receives the fourth probe packet sent by the first device via the second sending interface a2 on the first device via the second receiving interface B2 on the second device, the second device may determine that the second receiving interface B2 on the second device and the first sending interface B1 on the second device sending the first probe packet to the first device may be configured as a bidirectional interface.
Optionally, in this embodiment of the present invention, because an original probe packet originally sent by a first device (for example, the second probe packet described above) may determine that the first device and the second device, or the first device and a third device have interfaces in a direct connection relationship, and then the first device configures, according to the interfaces in the direct connection relationship, corresponding sending interfaces and receiving interfaces on the first device as bidirectional interfaces, so that in a case where a first identifier in the first probe packet is different from an identifier of the first device (indicating that the original probe packet of the first probe packet is not a probe packet originally sent by the first device, that is, the number of identifiers in the first probe packet has reached 5, but the first probe packet cannot be used by the first device to determine a connection relationship between each interface on the first device and each interface on another device), the first device may discard the first probe packet.
It can be understood that, after each device (for example, the first device and the second device) receives a probe packet, if the number of identifiers in the probe packet is less than 5, the device continues to generate a new probe packet and forwards the new probe packet to another device through a sending interface that is not configured as a bidirectional interface on the device, so that when the other device is connected to the device through multiple receiving interfaces on the other device, the other device can receive corresponding probe packets through multiple receiving interfaces on the other device, and thus the other device can configure multiple receiving interfaces and multiple sending interfaces on the other device as a bidirectional interface. For example, as shown in fig. 9, after the first device sends the probe packet to the second device through the second sending interface a2 on the first device, the first device may receive different probe packets sent by the second device through the first receiving interface a1 on the first device and the receiving interface a4 on the first device, so that the first device may configure the first receiving interface a1 on the first device, the second sending interface a2 on the first device, and the receiving interface a4 on the first device as a bidirectional interface.
Optionally, in this embodiment of the present invention, after the first device receives the probe packets (for example, the first probe packet and the fourth probe packet) sent by the second device, the first device may first determine a connection relationship between each interface on the first device and a corresponding interface on the second device. For example, as shown in fig. 9, the first device may determine that a first receiving interface a1 on the first device is connected with a first transmitting interface B1 on the second device, a second transmitting interface a2 on the first device is connected with a second receiving interface B2 on the second device, and a receiving interface a4 on the first device is connected with a transmitting interface B3 on the second device. The relationship between the first receiving interface a1 on the first device and the first sending interface B1 on the second device, the second sending interface a2 on the first device and the second receiving interface B2 on the second device, and the receiving interface a4 on the first device and the sending interface B3 on the second device can be represented as { a < - > B (a1< -B1) (a2 < -B2) (a4< -B3) }. After the first device determines the connection relationship between each interface on the first device and the corresponding interface on the second device, the first device may determine which transmitting interfaces and which receiving interfaces on the first device may be configured as a bidirectional interface according to the connection relationship, and then the first device configures the transmitting interfaces and the receiving interfaces on the first device as a bidirectional interface.
In the embodiment of the present invention, after the first device determines the connection relationship between each interface on the first device and the corresponding interface on the second device, the first device may send the connection relationship to the second device through the second sending interface on the first device, so that the second device may also learn the connection relationship, and thus, when the second device receives a probe packet that is continuously sent by the first device through a sending interface on the first device that is not configured as a bidirectional interface, the second device may determine which specific sending interface on the second device is connected to the first device, so that the second device may directly select any sending interface on the second device that is configured as a bidirectional interface (i.e. a bidirectional interface connected to the first device) to send the corresponding probe packet to the first device, and after the first device receives the probe packet sent by the second device, the first device may determine a connection relationship between a sending interface on the first device that is not configured as a bidirectional interface and a corresponding receiving interface on the second device, and configure the sending interface on the first device that is not configured as a bidirectional interface and the corresponding receiving interface on the first device (i.e., the receiving interface that receives the probe packet sent by the second device) as one bidirectional interface. By analogy, each device can repeatedly perform the above process until all the transmitting interfaces and the receiving interfaces on each device are configured as bidirectional interfaces, and the configuration process of the interfaces is completed.
Optionally, in this embodiment of the present invention, if a sending interface in a sending interface group or a receiving interface in a receiving interface group configured as a bidirectional interface on a certain device is deleted (that is, the sending interface is no longer a sending interface in the sending interface group constituting the bidirectional interface or the receiving interface is no longer a receiving interface in the receiving interface group constituting the bidirectional interface), the device may notify the other device to delete a connection relationship between the receiving interface or the sending interface connected to the sending interface or the receiving interface, which is stored on the other device, so that the other device may update the connection relationship between the corresponding interface on the other device and the corresponding interface on the device in real time, and further enable the other device to accurately send data to the device using the corresponding sending interface on the other device, so that the data can be correctly transmitted.
For example, in this embodiment of the present invention, assuming that the first receiving interface on the first device is deleted, since the first receiving interface on the first device is connected to the first sending interface on the second device, the first device may notify the second device to delete the connection relationship between the first receiving interface on the first device and the first sending interface on the second device, which is saved on the second device. Specifically, the method for configuring an interface according to the embodiment of the present invention may further include the following steps S114 to S117.
And S114, the first device sends a notification message to the second device, wherein the notification message is used for notifying the second device to delete the connection relationship between the first receiving interface on the first device and the first sending interface on the second device, which is stored in the second device.
S115, the second device receives the notification message sent by the first device.
S116, the second device sends an acknowledgement message to the first device, where the acknowledgement message is used to confirm that the notification message is successfully received by the second device.
And S117, the first device receives the confirmation message sent by the second device.
It can be understood that, in the embodiment of the present invention, after the first interface on the first device is deleted, since the first receiving interface on the first device is connected to the first sending interface on the second device, the first device may also delete the connection relationship between the first receiving interface on the first device and the first sending interface on the second device, which is learned by the first device. When the second device sends the confirmation message to the first device, because the first receiving interface on the first device is deleted, the second device can send the confirmation message to the first device through any other sending interface except the first sending interface in the sending interface group which is connected with the first device on the second device and forms a bidirectional interface, so that the first device can successfully receive the confirmation message.
In the method for configuring interfaces provided in the embodiment of the present invention, each device can automatically identify the sending interface and the receiving interface that are not configured as bidirectional interfaces by executing the method, and automatically configure the sending interface and the receiving interface that are not configured as bidirectional interfaces (i.e., interfaces that can send data and receive data, and the sending interface and the receiving interface in the sending interface group that are configured as bidirectional interfaces are the same as the opposite device), so that the number of sending interfaces and the number of receiving interfaces that constitute each bidirectional interface can be different, that is, the number of sending interfaces and the number of receiving interfaces that constitute each bidirectional interface can be configured as needed according to the actual connection relationship of the interfaces, and thus the outgoing flow and the incoming flow on the bidirectional interfaces provided in the embodiment of the present invention can be different, for example, the incoming flow on the bidirectional interface may be larger than the outgoing flow on the bidirectional interface, so that in an application scenario where the outgoing flow and the incoming flow are not balanced, the utilization rate of the transmission resource of the apparatus may be increased.
For example, when each device transmits video traffic, since the incoming traffic on the device is usually much larger than the outgoing traffic on the device, that is, the outgoing traffic and the incoming traffic on the device are usually not balanced, when the device for configuring an interface transmits video traffic using the bidirectional interface provided by the present application, the incoming traffic on the bidirectional interface of the device may be larger than the outgoing traffic on the bidirectional interface of the device, so that the utilization rate of the transmission resource of the device may be increased.
The above description mainly introduces the solutions provided by the embodiments of the present invention from the perspective of interaction between the respective devices for configuring the interface. It is to be understood that each means for configuring the interface, such as the first means or the second means, etc., for implementing the functions described above, includes corresponding hardware structures and/or software modules for performing the respective functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present invention, the device for configuring an interface and the like provided in the embodiment of the present invention may be divided into functional modules according to the above method examples, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, the division of the modules in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
In the case of dividing each functional module by corresponding functions, fig. 10 shows a schematic diagram of a possible structure of an apparatus for configuring an interface according to an embodiment of the present invention, as shown in fig. 10, the apparatus may include: a receiving module 30, a detecting module 31 and a configuration module 32. The receiving module 30 may be configured to support the apparatus to perform S106 and S117 performed by the first apparatus in the above method embodiment; or S102, S115, and S112' performed by the second device; or S112 performed by the third device; the detection module 31 may be configured to support the apparatus to perform S107 and S108 performed by the first apparatus in the above method embodiment; or S103 performed by the second device; the configuration module 32 may be configured to support the apparatus to perform S109 and S113 performed by the first apparatus in the above method embodiment. Optionally, in conjunction with fig. 10, as shown in fig. 11, the apparatus may further include a sending module 33 and a generating module 34. The sending module 33 may be configured to support the apparatus to perform S101, S111, S114, and S111' performed by the first apparatus in the foregoing method embodiment; or S105 and S116 performed by the second device; the generating module 34 may be configured to support the apparatus to perform S110 and S110' performed by the first apparatus in the above method embodiments; or S104 performed by the second device. All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
Fig. 12 shows a schematic diagram of a possible configuration of the device for configuring an interface according to the above-described exemplary embodiment, in the case of an integrated unit. As shown in fig. 12, the apparatus may include: a processing module 40 and a communication module 41. The processing module 40 may be configured to control and manage the actions of the apparatus, for example, the processing module 40 may be configured to support the apparatus to perform S107, S108, S109, S113, S110 and S110' performed by the first apparatus in the above method embodiments; or S103 and S104 performed by the second device, and/or other processes for the techniques described herein. The communication module 41 may be configured to support communication between the apparatus and other apparatuses, for example, the communication module 41 may be configured to support the apparatus to perform S101, S106, S111, S114, S117, and S111' performed by the first apparatus in the above method embodiments; or S102, S105, S115, S116, and S112' performed by the second device; or S112 performed by the third device. Optionally, as shown in fig. 12, the apparatus may further include a storage module 42 for storing program codes and data of the apparatus.
The processing module 40 may be a processor or a controller (for example, the processor 20 shown in fig. 3), such as a Central Processing Unit (CPU), a general-purpose processor, a Digital Signal Processor (DSP), an application-specific integrated circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with the embodiment disclosure. The processor described above may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs and microprocessors, and the like. The communication module 41 may be a transceiver, a transceiver circuit, or a communication interface, etc. (e.g., the interface 220, the interface 221, the interface 222, and the interface 223 as described above in fig. 3). The storage module 42 may be a memory (e.g., may be the memory 21 described above with reference to fig. 3).
When the processing module 40 is a processor, the communication module 41 is an interface, and the storage module 42 is a memory, the processor, the interface, and the memory may be connected by a bus. The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc.
The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g., from one website, computer, server, or data center, by wired (e.g., coaxial cable, fiber optic, digital subscriber line (DS L)) or wireless (e.g., infrared, wireless, microwave, etc.) means to another website, computer, server, or data center, or may be transmitted from one website, computer, server, or data center to another website, computer, or data center by way of wire (e.g., digital subscriber line (DS L)), or by way of wireless (e.g., infrared, wireless, microwave, etc.), or may be embodied in whole or in part by software, hardware, firmware, or any combination thereof.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (7)

1. An apparatus for configuring an interface, the apparatus comprising N transmit interfaces and M receive interfaces;
the device comprises N sending interfaces, M receiving interfaces, at least one sending interface group, at least one receiving interface group and at least one sending interface group, wherein the N sending interfaces form X sending interface groups, the M receiving interfaces form Y receiving interface groups, at least one sending interface group in the X sending interface groups and at least one receiving interface group in the Y receiving interface groups form at least one bidirectional interface, the number of sending interfaces in the sending interface group and the number of receiving interfaces in the receiving interface group which form each bidirectional interface are different, the sending interfaces in the sending interface group and the receiving interfaces in the receiving interface group which form each bidirectional interface are connected with the same opposite terminal device, the opposite terminal device is a device connected with the device, each bidirectional interface is used for the device to send and receive data, N, M, X and Y are positive integers, and X < N and Y < M.
2. The apparatus of claim 1, wherein a transmitting interface in a transmitting interface group and a receiving interface in a receiving interface group constituting a first bidirectional interface are located on a same chip in the apparatus, and the first bidirectional interface is any one of the at least one bidirectional interface;
the device is configured to send an ethernet frame to another device through a sending interface in a sending interface group that forms the first bidirectional interface, where the ethernet frame includes an identifier of the first sending interface, the first sending interface is a sending interface on the other device that sends data to a first receiving interface, and the first receiving interface is a receiving interface in a receiving interface group that forms the first bidirectional interface.
3. The apparatus of claim 1, wherein a transmitting interface in a transmitting interface group and a receiving interface in a receiving interface group constituting a first bidirectional interface are located on different chips in the apparatus, and the first bidirectional interface is any one of the at least one bidirectional interface;
the device is configured to send, at a data plane or a control plane, an ethernet frame to another device through a sending interface in a sending interface group that forms the first bidirectional interface, where the ethernet frame includes an identifier of the first sending interface, the first sending interface is a sending interface on the other device that sends data to a first receiving interface, and the first receiving interface is a receiving interface in a receiving interface group that forms the first bidirectional interface.
4. The apparatus of claim 3,
the Ethernet frame is a physical layer operation administration maintenance PHY OAM Ethernet frame or a bridge protocol data unit BPDU Ethernet frame.
5. The device according to claim 1 or 2,
the device is a chip.
6. A forwarding device comprising an apparatus for configuring an interface according to any one of claims 1 to 5.
7. A data center system comprising the forwarding device of claim 6.
CN201710213500.7A 2017-04-01 2017-04-01 Method, device, forwarding equipment and system for configuring interface Expired - Fee Related CN108667645B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710213500.7A CN108667645B (en) 2017-04-01 2017-04-01 Method, device, forwarding equipment and system for configuring interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710213500.7A CN108667645B (en) 2017-04-01 2017-04-01 Method, device, forwarding equipment and system for configuring interface

Publications (2)

Publication Number Publication Date
CN108667645A CN108667645A (en) 2018-10-16
CN108667645B true CN108667645B (en) 2020-07-28

Family

ID=63783817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710213500.7A Expired - Fee Related CN108667645B (en) 2017-04-01 2017-04-01 Method, device, forwarding equipment and system for configuring interface

Country Status (1)

Country Link
CN (1) CN108667645B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1589440A (en) * 2001-10-10 2005-03-02 高通股份有限公司 Multiple-interface port multiplexer
CN1725761A (en) * 2005-06-10 2006-01-25 杭州华为三康技术有限公司 Method of implementing link aggregation of network equipment
CN102638589A (en) * 2012-04-12 2012-08-15 北京星网锐捷网络技术有限公司 Determining method of corresponding connection relation of channels, as well as related connecting ends and system
CN103718379A (en) * 2013-03-27 2014-04-09 华为技术有限公司 Multi-frequency active antenna
CN103973554A (en) * 2013-01-29 2014-08-06 华为技术有限公司 Routing method, routing system and related equipment
CN104486211A (en) * 2014-12-09 2015-04-01 深圳视爵光旭电子有限公司 Data frame routing device and LED (Light Emitting Diode) display control system
CN106302071A (en) * 2015-05-29 2017-01-04 华为技术有限公司 A kind of adapter, the network equipment and the method for port configuration

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1589440A (en) * 2001-10-10 2005-03-02 高通股份有限公司 Multiple-interface port multiplexer
CN1725761A (en) * 2005-06-10 2006-01-25 杭州华为三康技术有限公司 Method of implementing link aggregation of network equipment
CN102638589A (en) * 2012-04-12 2012-08-15 北京星网锐捷网络技术有限公司 Determining method of corresponding connection relation of channels, as well as related connecting ends and system
CN103973554A (en) * 2013-01-29 2014-08-06 华为技术有限公司 Routing method, routing system and related equipment
CN103718379A (en) * 2013-03-27 2014-04-09 华为技术有限公司 Multi-frequency active antenna
CN104486211A (en) * 2014-12-09 2015-04-01 深圳视爵光旭电子有限公司 Data frame routing device and LED (Light Emitting Diode) display control system
CN106302071A (en) * 2015-05-29 2017-01-04 华为技术有限公司 A kind of adapter, the network equipment and the method for port configuration

Also Published As

Publication number Publication date
CN108667645A (en) 2018-10-16

Similar Documents

Publication Publication Date Title
US8953631B2 (en) Interruption, at least in part, of frame transmission
CN107257291B (en) Network equipment data interaction method and system
CN110971445B (en) Network OAM method and device
CN104506408A (en) Data transmission method and device based on SDN
CN109391494B (en) Communication method, device and readable storage medium
EP3720075B1 (en) Data transmission method and virtual switch
CN112039796B (en) Data packet transmission method and device, storage medium and electronic equipment
CN111371634B (en) Communication method, device and system
CN109691031B (en) Service message transmission method and node equipment
EP3982600A1 (en) Qos policy method, device, and computing device for service configuration
US20190158627A1 (en) Method and device for generating forwarding information
CN107124393B (en) Remote host management over a network
CN112953785B (en) Link detection method and system for communication equipment of multi-core processor
CN107204924B (en) Link discovery method and device
TW201246854A (en) Method and system for low-latency networking
CN113300981A (en) Message transmission method, device and system
US11817970B2 (en) Method, device, and system for determining generic routing encapsulation GRE tunnel identifier
CN109286564B (en) Message forwarding method and device
CN108667645B (en) Method, device, forwarding equipment and system for configuring interface
CN111510394B (en) Message scheduling method, related equipment and computer storage medium
EP3605967B1 (en) Method and device for transmitting data
EP2582199A1 (en) M2m system and method for processing services thereof
JP2017098660A (en) Network system and switch
US9438744B2 (en) Method and data transmission device for data transmission within an xDSL data transmission system connecting at least two ethernet networks via xDSL links
CN111435918B (en) Network performance detection method and network performance detection device

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200728

CF01 Termination of patent right due to non-payment of annual fee