[go: up one dir, main page]

CN118473908B - Port determination method, device, electronic device and storage medium - Google Patents

Port determination method, device, electronic device and storage medium

Info

Publication number
CN118473908B
CN118473908B CN202410475537.7A CN202410475537A CN118473908B CN 118473908 B CN118473908 B CN 118473908B CN 202410475537 A CN202410475537 A CN 202410475537A CN 118473908 B CN118473908 B CN 118473908B
Authority
CN
China
Prior art keywords
port
virtualized network
opposite
candidate
network device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410475537.7A
Other languages
Chinese (zh)
Other versions
CN118473908A (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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN202410475537.7A priority Critical patent/CN118473908B/en
Publication of CN118473908A publication Critical patent/CN118473908A/en
Application granted granted Critical
Publication of CN118473908B publication Critical patent/CN118473908B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The application provides a port determination method, a port determination device, electronic equipment and a storage medium. The method is applied to any one of two pieces of physical equipment with a main-standby relation, and comprises the steps of sending a notification message to opposite-end virtualization network equipment when determining that the communication port needs to be actively determined as the main equipment, judging whether the opposite-end virtualization network equipment supports the function of not selecting the port connected with the opposite-end virtualization network equipment on the standby equipment in the virtualization network equipment, if so, determining a set number of candidate ports, synchronizing the determined candidate ports to the opposite-end virtualization network equipment, and finally determining the communication port as the candidate port, wherein the candidate port is connected with the received candidate port, in the candidate ports determined by the opposite-end virtualization network equipment when the candidate port is received by the main equipment in the opposite-end virtualization network equipment and synchronized by the opposite-end virtualization network equipment. The application can save port resources and bandwidth resources.

Description

Port determining method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and apparatus for determining a port, an electronic device, and a storage medium.
Background
Under a network scene, a plurality of physical devices are virtualized into one network device (called virtualized network device) through a private protocol, the virtualized network devices are physically connected through physical links established between the physical devices (which can comprise a main device and a standby device) arranged in the virtualized network devices, and dynamic aggregation links are configured between ports corresponding to the physical links, so that the virtualized network device can normally process service messages when one physical device arranged in the virtualized network device is abnormal, and even if one physical device arranged in the virtualized network device is abnormal and one physical device in the opposite-end virtual network device is abnormal, the virtualized network device can normally process service messages.
When the virtual network device works normally, the determined communication ports for communicating with the opposite-end virtual network device generally comprise ports on the main device and the standby device, so that the main device and the standby device in the virtual network device can both receive a part of service messages, and the standby device does not process the service messages, so that a data channel needs to be established between the main device and the standby device, and the standby device sends the service messages to the main device for processing through the data channel, and thus, more port resources and bandwidth resources are occupied.
Disclosure of Invention
In order to overcome the problems in the related art, the application provides a port determination method, a device, electronic equipment and a storage medium.
According to a first aspect of an embodiment of the present application, there is provided a port determining method applied to any one of virtualized network devices provided with two physical devices in a master-slave relationship, the method including:
When determining that the communication port of the virtualized network device and the opposite-end virtualized network device which are required to be actively determined as the master device are in service communication, sending a notification message for notifying the master device in the opposite-end virtualized network device to determine the communication port of the opposite-end virtualized network device and the virtualized network device to be in service communication to the opposite-end virtualized network device, and judging whether the function of not selecting the port connected with the opposite-end virtualized network device on the standby device in the virtualized network device is supported by the master device;
When the judgment result is yes, determining a set number of candidate ports according to equipment where each port corresponding to a dynamic aggregation link established between the virtualized network equipment on the virtualized network equipment and the opposite-end virtualized network equipment is located, port state of each port, aggregation capability information of a port connected with each port on the opposite-end virtualized network equipment and identification information of each port, wherein the determined candidate ports do not comprise ports connected with the opposite-end virtualized network equipment on the standby equipment, and a data channel is not established between the main equipment and the standby equipment;
and synchronizing the determined candidate ports to the opposite-end virtualization network equipment, and when the candidate ports which are synchronized by the opposite-end virtualization network equipment and determined by the main equipment in the opposite-end virtualization network equipment are received, determining the candidate ports which are connected with the received candidate ports in the determined candidate ports as communication ports.
According to a second aspect of an embodiment of the present application, there is provided a port determination method applied to any one of virtualized network devices provided with two physical devices in a master-slave relationship, the method including:
when receiving a notification message for notifying a master device to determine a communication port for performing service communication between the virtualized network device and an opposite-end virtualized network device, the master device judges whether the master device supports a function of not selecting a port connected with the opposite-end virtualized network device on a standby device in the virtualized network device;
When the judgment result is yes, determining a set number of candidate ports according to equipment where each port corresponding to the dynamic aggregation link established by the virtualized network equipment on the virtualized network equipment and the opposite-end virtualized network equipment is located, port state of each port, aggregation capability information of a port connected with each port on the opposite-end virtualized network equipment and identification information of each port corresponding to the dynamic aggregation link on the opposite-end virtualized network equipment carried in the notification message, wherein the determined candidate ports do not comprise ports connected with the opposite-end virtualized network equipment on the standby equipment, and a data channel is not established between the main equipment and the standby equipment;
And synchronizing the determined candidate port to the master equipment in the opposite-end virtualized network equipment when the candidate port determined by the master equipment in the opposite-end virtualized network equipment is received, and finally determining the candidate port connected with the received candidate port as a communication port.
According to a third aspect of an embodiment of the present application, there is provided a port determination apparatus applied to any one of virtualized network devices provided with two physical devices in a master-slave relationship, the apparatus including:
A notification judging module, configured to send, to an opposite-end virtualized network device, a notification message for notifying the opposite-end virtualized network device to determine a communication port where the opposite-end virtualized network device performs service communication with the virtualized network device when determining that the communication port where the virtualized network device performs service communication with the opposite-end virtualized network device needs to be actively determined as a master device, and judge whether a function of not selecting a port on a standby device in the virtualized network device, which is connected with the opposite-end virtualized network device, is supported by the notification judging module;
A first determining module, configured to determine, when the determination result of the notification determining module is yes, a set number of candidate ports according to a device where each port of the virtualized network device on the virtualized network device corresponds to a dynamic aggregation link established by an opposite-end virtualized network device, a port state of each port, aggregation capability information of a port connected to each port on the opposite-end virtualized network device, and identification information of each port, where the determined candidate ports do not include a port connected to the opposite-end virtualized network device on the standby device, and no data channel is established between the main device and the standby device;
And the second determining module is used for synchronizing the determined candidate ports to the opposite-end virtualized network equipment, and when receiving the candidate ports which are synchronized by the opposite-end virtualized network equipment and determined by the main equipment in the opposite-end virtualized network equipment, determining the candidate ports which are connected with the received candidate ports in the determined candidate ports as communication ports.
According to a fourth aspect of an embodiment of the present application, there is provided a port determination apparatus applied to any one of virtualized network devices provided with two physical devices in a master-slave relationship, the apparatus including:
The judging module is used for judging whether the function of not selecting the port connected with the opposite-end virtualized network equipment on the standby equipment in the virtualized network equipment is supported or not when the judging module is used as the main equipment to receive a notification message for notifying the main equipment to determine the communication port for carrying out service communication between the virtualized network equipment and the opposite-end virtualized network equipment;
a first determining module, configured to determine, when the determination result of the determining module is yes, a set number of candidate ports according to a device where each port of the virtualized network device on the virtualized network device corresponds to a dynamic aggregation link established by an opposite-end virtualized network device, a port state of each port, aggregation capability information of a port connected to each port on the opposite-end virtualized network device, and identification information of each port corresponding to the dynamic aggregation link on the opposite-end virtualized network device carried in the notification packet, where the determined candidate ports do not include a port connected to the opposite-end virtualized network device on the standby device, and no data channel is established between the main device and the standby device;
And the second determining module is used for synchronizing the candidate port determined by the host equipment in the opposite-end virtualized network equipment to the host equipment in the opposite-end virtualized network equipment when receiving the candidate port determined by the host equipment in the opposite-end virtualized network equipment, and finally determining the candidate port connected with the received candidate port in the candidate port determined by the host equipment as the communication port.
According to a fifth aspect of embodiments of the present application there is provided an electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor to cause the processor to perform the method steps of any of the port determination methods described above.
According to a sixth aspect of embodiments of the present application, there is provided a computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the method steps of any of the port determination methods described above.
The technical scheme provided by the embodiment of the application can comprise the following beneficial effects:
In the embodiment of the application, for any one of the two physical devices arranged in a primary-backup relationship, in the case of determining a communication port required to be used as a primary device to determine that the virtualized network device and the opposite-end virtualized network device perform service communication, if the physical device serving as the primary device in the virtualized network device supports a function of not selecting a port connected with the opposite-end virtualized network device on a backup device in the virtualized network device, when determining the communication port for communicating with the opposite-end virtualized network device, the relevant port on the backup device is not determined as the communication port. In this way, a data channel is not required to be established between the main equipment and the standby equipment, and port resources and bandwidth resources are saved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic flow chart of a port determining method according to an embodiment of the present application;
FIG. 2 is a second flowchart of a method for determining a port according to an embodiment of the present application;
fig. 3 is a schematic interaction diagram between a virtualized network device a and a virtualized network device B according to an embodiment of the present application;
Fig. 4 is a schematic structural diagram of a port determining device according to an embodiment of the present application;
FIG. 5 is a second schematic diagram of a port determining apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the application. Depending on the context of the user, the terms "if" or "if" as used herein may be used interpreted as "at." or "when.
The embodiments of the present application will be described in detail.
The embodiment of the application provides a port determination method, which is applied to any one physical device in virtualized network equipment provided with two physical devices in a main-standby relation, as shown in fig. 1, and can comprise the following steps:
S11, when determining that the communication port of the virtualized network device and the opposite-end virtualized network device need to be actively determined as the master device, sending a notification message for notifying the master device in the opposite-end virtualized network device to determine the communication port of the opposite-end virtualized network device and the virtualized network device to carry out service communication to the opposite-end virtualized network device, judging whether the function of not selecting the port connected with the opposite-end virtualized network device on the standby device in the virtualized network device is supported by the master device or not, executing step S12 when the judging result is NO, and executing step S13 and step S14 when the judging result is yes.
S12, determining a communication port for carrying out service communication with the opposite-end virtualized network equipment according to the existing port determination flow.
S13, determining a set number of candidate ports according to equipment where each port corresponding to a dynamic aggregation link established by the virtualized network equipment on the virtualized network equipment and the opposite-end virtualized network equipment is located, port state of each port, aggregation capability information of ports connected with each port on the opposite-end virtualized network equipment and identification information of each port.
In the step, the determined candidate ports do not include ports on the standby equipment, which are connected with the opposite-end virtualized network equipment, and a data channel is not established between the main equipment and the standby equipment.
In addition, the aggregation capability information is used to characterize the aggregation capability of the port. For example, the aggregation capability information may be an operation Key.
And S14, synchronizing the determined candidate ports to the opposite-end virtualization network equipment, and when the candidate ports which are synchronized by the opposite-end virtualization network equipment and determined by the main equipment in the opposite-end virtualization network equipment are received, determining the candidate ports which are connected with the received candidate ports in the determined candidate ports as communication ports.
It should be noted that, after the physical device performs the step S14, the determined communication port is used to send the service packet to the peer virtualized network device, and the specific use process is the prior art, which is not described in detail herein.
Specifically, in the above step S11, the physical device may determine, as the master device, a communication port required to determine that the virtualized network device performs service communication with the peer virtualized network device by:
When the device role of the device is monitored as the main device for the first time and the device ID of the virtualized network device is determined to be smaller than the device ID of the opposite-end virtualized network device, or when the device role of the device is monitored as the main device and the device ID of the virtualized network device is determined to be smaller than the device ID of the opposite-end virtualized network device and the port state of the port connected with the opposite-end virtualized network device on the device is changed, or when the device role of the device is monitored to be updated from the standby device to the main device and the device ID of the virtualized network device is determined to be smaller than the device ID of the opposite-end virtualized network device, or when the device role of the device is monitored to be the main device for the first time, a preset period is reached and the device ID of the virtualized network device is determined to be smaller than the device ID of the opposite-end virtualized network device, all ports corresponding to dynamic aggregation links between the virtualized network device and the opposite-end virtualized network device need to be traversed as the main device are determined.
That is, in the embodiment of the present application, the physical device needs to determine, as a master device, a communication port at which the virtualized network device performs traffic communication with the peer virtualized network device, upon occurrence of any one of the following cases:
Firstly, monitoring the own equipment role as a master equipment, and determining that the equipment ID of the virtualized network equipment is smaller than the equipment ID of the opposite-end virtualized network equipment;
Monitoring the equipment role of the equipment serving as the main equipment, determining that the equipment ID of the virtualized network equipment is smaller than the equipment ID of the opposite-end virtualized network equipment, and changing the port state of a port connected with the opposite-end virtualized network equipment;
The third situation is that the equipment role of the equipment is monitored to be updated from the standby equipment to the main equipment, and the equipment ID of the virtualized network equipment is determined to be smaller than the equipment ID of the opposite-end virtualized network equipment;
And in the fourth situation, after the device role of the device is monitored as the master device for the first time, the preset period is reached, and the fact that the device ID of the virtualized network device is smaller than the device ID of the opposite-end virtualized network device is determined.
It should be noted that, a specific determination procedure for determining whether the device ID of the virtualized network device is smaller than the device ID of the peer virtualized network device is a prior art, and will not be described in detail herein.
It should be further noted that the preset period may be set by an administrator according to a network experience of the network where the virtualized network device is located, and configured on the virtualized network device in advance.
It should be further noted that the virtualized network device and the peer virtualized network device may be smart elastic Framework (INTELLIGENT RESILIENT Framework, IRF) devices, and the like.
Specifically, in the above step S13, the physical device determines the set number of candidate ports by:
sequencing all ports according to the sequence from small port numbers to large port numbers of all ports;
for the current port in the traversed sequenced ports, if no candidate port exists locally, determining the current port as a candidate port when the physical device where the current port is located is not a standby device and the port state of the current port is an UP state, and continuing to traverse the next port;
if there are candidate ports locally, when the physical device where the current port is located is not a standby device, the port state of the current port is an UP state, the aggregation capability information of the current port is the same as the aggregation capability information of the candidate port determined last time, the current port and the candidate port determined last time are located on the same hardware chip, the aggregation capability information of the current port is the same as the aggregation capability information of the port connected with the current port on the opposite-end virtualized network device, and the total number of the current candidate ports does not reach the set number, determining the current port as the candidate port, continuing traversing the next port, and stopping traversing until the determined total number of the candidate ports reaches the set number.
That is, for the physical device, when there is a candidate port locally, the current port is determined as a candidate port only if the physical device in which the current port is located is not a standby device, the port state of the current port is an UP state, the aggregation capability information of the current port is the same as the aggregation capability information of the candidate port determined last time, the current port is located on the same hardware chip as the candidate port determined last time, the aggregation capability information of the current port is the same as the aggregation capability information of the port connected to the current port on the opposite-end virtualized network device, and the total number of the current candidate ports is not UP to the set number, and the current port is not determined as a candidate port in any other cases except the above cases.
Here, the set number may be set by an administrator according to network experience of a network in which the virtualized network device is located, and set on the physical device in advance.
It should be noted that, in the application embodiment, after the physical device sends, to the peer virtualized network device, a notification message for notifying the master device in the peer virtualized network device that determines the communication port where the peer virtualized network device performs service communication with the virtualized network device, it may be that, for the peer virtualized network device, the physical device in the peer virtualized network device as the master device directly receives the notification message, or that, for the peer virtualized network device, the physical device in the peer virtualized network device as the slave device directly receives the notification message, and in this case, the slave device in the peer virtualized network device forwards the notification message to the master device in the peer virtualized network device through a control channel established with the master device in the peer virtualized network device.
Subsequently, if the master device in the peer virtualized network device does not support a function of not selecting a port on the standby device in the peer virtualized network device, which is connected to the virtualized network device, the master device determines candidate ports according to the existing port candidate flow.
In this case, a data channel is established between the physical device as a master device and the physical device as a slave device in the peer-virtualized network device.
If a master device in the peer virtualized network device supports a function that does not select a port on a standby device in the peer virtualized network device that is connected to the virtualized network device, the master device may perform the following operations to obtain a candidate port:
sequencing all ports corresponding to the dynamic aggregation links on the opposite-end virtualization network equipment according to the sequence from small port numbers to large port numbers of all ports corresponding to the dynamic aggregation links on the virtualization network equipment, wherein a data channel is not established between physical equipment serving as main equipment and physical equipment serving as standby equipment in the opposite-end virtualization network equipment;
for the current port in the traversed sequenced ports, if no candidate port exists locally, determining the current port as a candidate port when the physical device where the current port is located is not a standby device and the port state of the current port is an UP state, and continuing to traverse the next port;
If there are candidate ports locally, when the physical device where the current port is located is not a standby device, the port state of the current port is an UP state, the aggregation capability information of the current port is the same as the aggregation capability information of the candidate port determined last time, the current port is located on the same hardware chip as the candidate port determined last time, the aggregation capability information of the current port is the same as the aggregation capability information of the port connected with the current port on the virtualized network device, and the total number of the current candidate ports does not reach the set number, the current port is determined as the candidate port, the next port is continuously traversed, and traversing is stopped until the total number of the determined candidate ports reaches the set number.
It should be further noted that, in the embodiment of the present application, a specific transmission manner of the notification message sent by the physical device is a prior art, and will not be described in detail herein.
Here, the notification message may be a first link aggregation control protocol data unit (Link Aggregation Control Protocol Data Unit, LACPDU) message.
It should be further noted that, in the step S14, the physical device may send the second LACPDU packet carrying the determined candidate port to the peer virtualized network device, so as to synchronize the candidate port determined by the physical device.
Correspondingly, the master device in the peer virtualized network device may also send a third LACPDU packet carrying the determined candidate port to the virtualized network device, so as to synchronize the candidate port determined by the master device.
The embodiment of the application also provides a port determining method which is applied to any one physical device in the virtualized network device provided with two physical devices in a main-standby relation, as shown in fig. 2, and the method can comprise the following steps:
S21, when the main equipment receives a notification message for notifying the main equipment to determine the communication port of the virtualized network equipment and the opposite-end virtualized network equipment to carry out service communication, judging whether the main equipment supports the function of not selecting the port connected with the opposite-end virtualized network equipment on the standby equipment in the virtualized network equipment, executing the step S22 when the judging result is NO, and executing the steps S23 and S24 when the judging result is NO.
In this step, the notification message is sent when the master device in the peer-to-peer virtualized network device determines that the master device needs to actively determine a communication port through which the virtualized network device and the peer-to-peer virtualized network device perform service communication, or the notification message is forwarded when the backup device in the virtualized network device receives the notification message sent by the master device in the peer-to-peer virtualized network device.
S22, determining a communication port for carrying out service communication with the opposite-end virtualized network equipment according to the existing port determination flow.
S23, determining a set number of candidate ports according to equipment where each port corresponding to the dynamic aggregation link established by the virtualized network equipment on the virtualized network equipment and the opposite-end virtualized network equipment is located, port state of each port, aggregation capability information of ports connected with each port on the opposite-end virtualized network equipment, and identification information of each port corresponding to the dynamic aggregation link on the opposite-end virtualized network equipment carried in the notification message.
In the step, the determined candidate ports do not include ports on the standby equipment, which are connected with the opposite-end virtualized network equipment, and a data channel is not established between the main equipment and the standby equipment.
And S24, synchronizing the candidate port determined by the host equipment in the opposite terminal virtualization network equipment to the host equipment in the opposite terminal virtualization network equipment when receiving the candidate port determined by the host equipment in the opposite terminal virtualization network equipment, and finally determining the candidate port connected with the received candidate port in the candidate port determined by the host equipment as the communication port.
It should be noted that, after the physical device performs the step S24, the determined communication port is used to send the service packet to the peer virtualized network device, and the specific use process is the prior art, which is not described in detail herein.
Specifically, the physical device may determine the set number of candidate ports by:
Sequencing all ports corresponding to the dynamic aggregation links on the virtualized network equipment according to the sequence from small port numbers to large port numbers of all ports corresponding to the dynamic aggregation links on the virtualized network equipment at the opposite end;
for the current port in the traversed sequenced ports, if no candidate port exists locally, determining the current port as a candidate port when the physical device where the current port is located is not a standby device and the port state of the current port is an UP state, and continuing to traverse the next port;
if there are candidate ports locally, when the physical device where the current port is located is not a standby device, the port state of the current port is an UP state, the aggregation capability information of the current port is the same as the aggregation capability information of the candidate port determined last time, the current port and the candidate port determined last time are located on the same hardware chip, the aggregation capability information of the current port is the same as the aggregation capability information of the port connected with the current port on the opposite-end virtualized network device, and the total number of the current candidate ports does not reach the set number, determining the current port as the candidate port, continuing traversing the next port, and stopping traversing until the determined total number of the candidate ports reaches the set number.
Here, the set number may be set by an administrator according to network experience of a network in which the virtualized network device is located, and configured on the virtualized network device in advance.
It should be noted that, the virtualized network device and the peer virtualized network device may be intelligent elastic Framework (INTELLIGENT RESILIENT Framework, IRF) devices, and the like.
It should be further noted that, in the application embodiment, the process flow of the peer virtualized network device after sending the notification message is described in the implementation process of the last port determination method, which is not described in detail herein.
The above-described port determination method is described in detail with reference to specific embodiments.
As shown in fig. 3, in a network networking, only virtualized network device a, virtualized network device B, and network device C are shown, and other network devices not shown are included in the networking. The virtual network device A is provided with a physical device A1 and a physical device A2, the physical device A1 and the physical device A2 can be in a primary-backup relationship, a data channel is not established between the physical device A1 and the physical device A2, the virtual network device B is provided with a physical device B1 and a physical device B2, the physical device B1 and the physical device B2 can be in a primary-backup relationship, and a data channel is not established between the physical device B1 and the physical device B2.
It is assumed that the device ID of the virtualized network device a is smaller than the device ID of the virtualized network device B, and that a dynamic aggregation link is also established between the virtualized network device a and the virtualized network device B. The ports corresponding to the dynamic aggregation links at the side of the virtualized network equipment A are Port_A1, port_A2, port_A3 and Port_A4, and the ports corresponding to the dynamic aggregation links at the side of the virtualized network equipment B are Port_B1, port_B2, port_B3 and Port_B4.
Taking the physical device A1 as an example, assuming that the device role of the physical device A1 is monitored for the first time as a master device, and it is determined that the device ID of the virtual network device a is smaller than the device ID of the virtual network device B, at this time, a communication port that needs to be actively determined as the master device to perform service communication with the virtual network device B is determined, a notification message 1 for notifying the master device (for example, the physical device B1) in the virtual network device B to determine that the virtual network device a performs service communication with the virtual network device B is sent to the virtual network device B, and whether the physical device B supports a function of not selecting a port on a standby device in the virtual network device to be connected with the opposite-end virtual network device is determined.
Here, the notification message 1 may at least carry the device ID of the virtualized network device a and the port numbers of all ports corresponding to the dynamic aggregation link established by the virtualized network device a and the peer virtualized network device B on the virtualized network device a.
If the judgment result is yes, at this time, the physical device A1 ranks all ports (i.e., port_a1, port_a2, port_a3, and port_a4) corresponding to the dynamic aggregation link established by the virtualized network device a on the virtualized network device a and the peer virtualized network device B in order from small to large.
Assuming that the ordered ports are port_a3, port_a4, port_a1, and port_a2, then physical device A1 begins traversing the first ordered Port (i.e., port_a3), there is no candidate Port currently locally, but the physical device where port_a3 is located is a standby device, at which point physical device A1 does not determine port_a3 as a candidate Port.
Continuing to traverse the second Port (i.e., port_a4) after sequencing, no candidate Port is currently locally available, but the physical device in which port_a4 is located is a standby device, where physical device A1 does not determine port_a4 as a candidate Port.
Continuing to traverse the third Port (i.e., port_a1) after sequencing, no candidate Port is currently locally available, and assuming that the Port state of port_a1 is UP, then in the case that the physical device in which port_a1 is located is not a standby device and the Port state of port_a1 is UP, the physical device A1 determines port_a1 as a candidate Port.
Continuing to traverse the fourth Port (i.e., port_a2) after sequencing, if the Port state of port_a2 is UP, the aggregate capability information of port_a2 is the same as that of the last determined candidate Port (i.e., port_a1), port_a2 is on the same hardware chip as the last determined candidate Port, and the aggregate capability information of port_a2 is the same as that of the Port (i.e., port_b2) connected to port_a2 on the virtualized network device B, then, if the physical device in which port_a2 is located is not a standby device, the Port state of port_a2 is UP, the aggregate capability information of port_a2 is the same as that of the last determined candidate Port (i.e., port_a1), the aggregate capability information of port_a2 is on the same hardware chip as that of the last determined candidate Port, the aggregate capability information of port_a2 is on the same hardware chip as that of the virtualized network device B is connected to port_a2 (i.e., port_b2), and the total number of ports (i.e., port_a2) is not determined as that of the current port_a2).
Accordingly, assuming that the physical device B1 in the virtualized network device B directly receives the notification message 1, it is determined whether the function of not selecting a port connected to the virtualized network device a on the standby device in the virtualized network device B is supported.
If the judgment result is yes, at this time, the physical device B1 sorts all ports (i.e., port_b1, port_b2, port_b3 and port_b4) corresponding to the dynamic aggregation link established by the opposite-end virtualized network device B by the virtualized network device a on the virtualized network device B according to the order of the Port numbers of all ports (i.e., port_a1, port_a2, port_a3 and port_a4) corresponding to the dynamic aggregation link established by the opposite-end virtualized network device B, which are carried in the notification message 1. Namely, the ports after sequencing are port_b3, port_b4, port_b1 and port_b2, and the sequence of the ports is the same as the sequence after sequencing the ports_a1, port_a2, port_a3 and port_a4.
Physical device B begins traversing the first Port (i.e., port_b3) after ordering, there is no candidate Port currently locally, but the physical device where port_b3 is located is a standby device, at which point physical device B does not determine port_b3 as a candidate Port.
Continuing to traverse the second Port (namely, port_b4) after sequencing, no candidate Port is currently locally available, but the physical device where port_b4 is located is a standby device, and at this time, the physical device B does not determine port_b4 as a candidate Port.
Continuing to traverse the third Port after sequencing (namely, port_b1), no candidate Port is currently locally available, and assuming that the Port state of port_b1 is UP, if the physical device where port_b1 is located is not a standby device and the Port state of port_b1 is UP, then the physical device B determines port_b1 as a candidate Port.
Continuing to traverse the fourth Port (i.e., port_b2) after sequencing, if the Port state of port_b2 is the UP state, the aggregate capability information of port_b2 is the same as that of the last determined candidate Port (i.e., port_b1), port_b2 is on the same hardware chip as the last determined candidate Port, and the aggregate capability information of port_b2 is the same as that of the Port (i.e., port_b2) connected to port_b2 on the virtualized network device B, then, if the physical device where port_b2 is located is not a standby device, the Port state of port_b2 is the UP state, the aggregate capability information of port_b2 is the same as that of the last determined candidate Port (i.e., port_b1), the aggregate capability information of port_b2 is on the same hardware chip as that of the last determined candidate Port, the aggregate capability information of port_b2 is the same as that of the Port (i.e., port_b2) connected to port_b2 on the virtualized network device B, and the total number of ports (i.e., port_b2) is not determined, and the current Port state of port_b2 is not reached.
The subsequent physical device A1 synchronizes the determined candidate ports (i.e., port_a1 and port_a2) to the virtualized network device B, and when receiving the candidate ports (i.e., port_b1 and port_b2) determined by the master device (i.e., physical device B1) in the virtualized network device B and synchronized by the virtualized network device B, determines the candidate Port connected to the received candidate Port from the determined candidate ports as a communication Port, i.e., the physical device A1 determines the port_a1 and the port_a2 as the communication Port.
In one example, the physical device A1 may send a service packet to the virtualized network device B using one of the determined communication ports, and the virtualized network device B sends the service packet to the network device C for processing.
Accordingly, when receiving the candidate ports (i.e., port_a1 and port_a2) determined by the master device (i.e., the physical device A1) in the virtualized network device a and synchronized by the virtualized network device a, the physical device B determines the candidate Port connected with the received candidate Port from the determined candidate ports as the communication Port, that is, the physical device B1 determines the port_b1 and the port_b2 as the communication Port.
As can be seen from the above technical solutions, in the embodiment of the present application, for any physical device in a virtualized network device provided with two physical devices that are in a master-slave relationship, when determining that a communication port for determining that the virtualized network device and a peer virtualized network device are to be used as a master device is in service communication, if the physical device serving as the master device in the virtualized network device supports a function of not selecting a port on a standby device in the virtualized network device, which is connected to the peer virtualized network device, then, when determining a communication port for communicating with the peer virtualized network device, the relevant port on the standby device is not determined as the communication port. In this way, a data channel is not required to be established between the main equipment and the standby equipment, and port resources and bandwidth resources are saved.
Based on the same inventive concept, the application also provides a port determining device, which is applied to any one of virtualized network devices provided with two physical devices in a primary-backup relationship, wherein the structural schematic diagram of the device is shown in fig. 4, and the device specifically comprises:
A notification judgment module 41, configured to send, to an opposite-end virtualized network device, a notification message for notifying the opposite-end virtualized network device to determine a communication port where the opposite-end virtualized network device performs service communication with the virtualized network device when determining that the communication port where the virtualized network device performs service communication with the opposite-end virtualized network device needs to be actively determined as a master device, and judge whether a function of not selecting a port on a standby device in the virtualized network device, which is connected with the opposite-end virtualized network device, is supported by itself;
A first determining module 42, configured to determine, when the determination result of the notification determining module 41 is yes, a set number of candidate ports according to a device where each port of the virtualized network device corresponds to a dynamic aggregation link established by an opposite-end virtualized network device, a port state of each port, aggregation capability information of a port connected to each port of the opposite-end virtualized network device, and identification information of each port, where the determined candidate ports do not include a port connected to the opposite-end virtualized network device on the standby device, and no data channel is established between the host device and the standby device;
And the second determining module 43 is configured to synchronize the determined candidate ports to the peer virtualized network device, and when receiving the candidate ports determined by the master device in the peer virtualized network device and synchronized by the peer virtualized network device, determine, as the communication ports, the candidate ports connected to the received candidate ports from among the candidate ports determined by the peer virtualized network device.
Preferably, the notification judgment module 41 is specifically configured to determine, as the master device, a communication port for determining that the virtualized network device performs service communication with the peer virtualized network device by:
When the device role of the device is monitored as the master device for the first time and the device ID of the virtualized network device is determined to be smaller than the device ID of the opposite-end virtualized network device, or when the device role of the device is monitored as the master device and the device ID of the virtualized network device is determined to be smaller than the device ID of the opposite-end virtualized network device and the port state of a port connected with the opposite-end virtualized network device on the device is changed, or when the device role of the device is monitored to be updated from the backup device to the master device and the device ID of the virtualized network device is determined to be smaller than the device ID of the opposite-end virtualized network device, or when the device role of the device is monitored as the master device for the first time and the preset period is reached, and the device ID of the virtualized network device is determined to be smaller than the device ID of the opposite-end virtualized network device, all ports corresponding to the dynamic aggregation link between the virtualized network device and the opposite-end virtualized network device need to be traversed as the master device are determined.
Preferably, the first determining module 42 is specifically configured to determine the set number of candidate ports by:
sequencing all ports according to the sequence from small port numbers to large port numbers of all ports;
for the current port in the traversed sequenced ports, if no candidate port exists locally, when the physical device where the current port is located is not the standby device and the port state of the current port is the UP state, determining the current port as the candidate port, and continuing to traverse the next port;
If there are candidate ports locally, when the physical device where the current port is located is not the standby device, the port state of the current port is an UP state, the aggregation capability information of the current port is the same as the aggregation capability information of the candidate port determined last time, the current port is located on the same hardware chip as the candidate port determined last time, the aggregation capability information of the current port is the same as the aggregation capability information of the port connected with the current port on the opposite-end virtualized network device, and the total number of the current candidate ports does not reach the set number, determining the current port as the candidate port, and continuing to traverse the next port until the total number of the determined candidate ports reaches the set number, and stopping traversing.
The application also provides a port determining device, which is applied to any one physical device in the virtualized network device provided with two physical devices in a main-standby relation, the structure schematic diagram of which is shown in fig. 5, and specifically comprises:
a judging module 51, configured to, when receiving, as a master device, a notification message for notifying itself to determine a communication port for performing service communication between the virtualized network device and an opposite-end virtualized network device, judge whether itself supports a function of not selecting a port on a standby device in the virtualized network device, the port being connected to the opposite-end virtualized network device;
A first determining module 52, configured to determine, when the determination result of the determining module 51 is yes, a set number of candidate ports according to a device where each port of the virtualized network device on the virtualized network device corresponds to a dynamic aggregation link established by an opposite-end virtualized network device, a port state of each port, aggregation capability information of a port connected to each port on the opposite-end virtualized network device, and identification information of each port corresponding to the dynamic aggregation link on the opposite-end virtualized network device carried in the notification packet, where the determined candidate ports do not include a port connected to the opposite-end virtualized network device on the backup device, and no data channel is established between the master device and the backup device;
and the second determining module 53 is configured to synchronize the candidate port determined by the host device in the peer virtualized network device to the host device in the peer virtualized network device when receiving the candidate port determined by the host device in the peer virtualized network device and synchronizing the candidate port determined by the host device to the host device in the peer virtualized network device, and finally determine the candidate port connected to the received candidate port as the communication port.
Preferably, the first determining module 52 is specifically configured to determine the set number of candidate ports by:
Sequencing all ports corresponding to the dynamic aggregation links on the virtualized network equipment according to the sequence from small port numbers to large port numbers of all ports corresponding to the dynamic aggregation links on the opposite-end virtualized network equipment;
for the current port in the traversed sequenced ports, if no candidate port exists locally, when the physical device where the current port is located is not the standby device and the port state of the current port is the UP state, determining the current port as the candidate port, and continuing to traverse the next port;
If there are candidate ports locally, when the physical device where the current port is located is not the standby device, the port state of the current port is an UP state, the aggregation capability information of the current port is the same as the aggregation capability information of the candidate port determined last time, the current port is located on the same hardware chip as the candidate port determined last time, the aggregation capability information of the current port is the same as the aggregation capability information of the port connected with the current port on the opposite-end virtualized network device, and the total number of the current candidate ports does not reach the set number, determining the current port as the candidate port, and continuing to traverse the next port until the total number of the determined candidate ports reaches the set number, and stopping traversing.
As can be seen from the above technical solutions, in the embodiment of the present application, for any physical device in a virtualized network device provided with two physical devices that are in a master-slave relationship, when determining that a communication port for determining that the virtualized network device and a peer virtualized network device are to be used as a master device is in service communication, if the physical device serving as the master device in the virtualized network device supports a function of not selecting a port on a standby device in the virtualized network device, which is connected to the peer virtualized network device, then, when determining a communication port for communicating with the peer virtualized network device, the relevant port on the standby device is not determined as the communication port. In this way, a data channel is not required to be established between the main equipment and the standby equipment, and port resources and bandwidth resources are saved.
An embodiment of the present application also provides an electronic device, as shown in fig. 6, including a processor 61 and a machine-readable storage medium 62, the machine-readable storage medium 62 storing machine-executable instructions capable of being executed by the processor 61, the processor 61 being caused by the machine-executable instructions to implement steps of any of the port determination methods.
The machine-readable storage medium may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. In the alternative, the machine-readable storage medium may also be at least one memory device located remotely from the foregoing processor.
The Processor may be a general-purpose Processor including a central processing unit (Central Processing Unit, CPU), a network Processor (Network Processor, NP), etc., or may be a digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In yet another embodiment of the present application, a computer readable storage medium is provided, in which a computer program is stored, which when executed by a processor, implements the steps of any of the port determination methods described above.
The foregoing description of the preferred embodiments of the application is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the application.

Claims (12)

1. A port determining method, wherein the method is applied to any one of virtualized network devices provided with two physical devices in a master-slave relationship, the method comprising:
When determining that the communication port of the virtualized network device and the opposite-end virtualized network device which are required to be actively determined as the master device are in service communication, sending a notification message for notifying the master device in the opposite-end virtualized network device to determine the communication port of the opposite-end virtualized network device and the virtualized network device to be in service communication to the opposite-end virtualized network device, and judging whether the function of not selecting the port connected with the opposite-end virtualized network device on the standby device in the virtualized network device is supported by the master device;
When the judgment result is yes, determining a set number of candidate ports according to equipment where each port corresponding to a dynamic aggregation link established between the virtualized network equipment on the virtualized network equipment and the opposite-end virtualized network equipment is located, port state of each port, aggregation capability information of a port connected with each port on the opposite-end virtualized network equipment and identification information of each port, wherein the determined candidate ports do not comprise ports connected with the opposite-end virtualized network equipment on the standby equipment, and a data channel is not established between the main equipment and the standby equipment;
and synchronizing the determined candidate ports to the opposite-end virtualization network equipment, and when the candidate ports which are synchronized by the opposite-end virtualization network equipment and determined by the main equipment in the opposite-end virtualization network equipment are received, determining the candidate ports which are connected with the received candidate ports in the determined candidate ports as communication ports.
2. The method of claim 1, wherein the communication port at which the virtualized network device is in traffic communication with the peer virtualized network device is determined by determining as a master device:
When the device role of the device is monitored as the master device for the first time and the device ID of the virtualized network device is determined to be smaller than the device ID of the opposite-end virtualized network device, or when the device role of the device is monitored as the master device and the device ID of the virtualized network device is determined to be smaller than the device ID of the opposite-end virtualized network device and the port state of a port connected with the opposite-end virtualized network device on the device is changed, or when the device role of the device is monitored to be updated from the backup device to the master device and the device ID of the virtualized network device is determined to be smaller than the device ID of the opposite-end virtualized network device, or when the device role of the device is monitored as the master device for the first time and the preset period is reached, and the device ID of the virtualized network device is determined to be smaller than the device ID of the opposite-end virtualized network device, all ports corresponding to the dynamic aggregation link between the virtualized network device and the opposite-end virtualized network device need to be traversed as the master device are determined.
3. The method of claim 1, wherein the set number of candidate ports is determined by:
sequencing all ports according to the sequence from small port numbers to large port numbers of all ports;
for the current port in the traversed sequenced ports, if no candidate port exists locally, when the physical device where the current port is located is not the standby device and the port state of the current port is the UP state, determining the current port as the candidate port, and continuing to traverse the next port;
If there are candidate ports locally, when the physical device where the current port is located is not the standby device, the port state of the current port is an UP state, the aggregation capability information of the current port is the same as the aggregation capability information of the candidate port determined last time, the current port is located on the same hardware chip as the candidate port determined last time, the aggregation capability information of the current port is the same as the aggregation capability information of the port connected with the current port on the opposite-end virtualized network device, and the total number of the current candidate ports does not reach the set number, determining the current port as the candidate port, and continuing to traverse the next port until the total number of the determined candidate ports reaches the set number, and stopping traversing.
4. A port determining method, wherein the method is applied to any one of virtualized network devices provided with two physical devices in a master-slave relationship, the method comprising:
when receiving a notification message for notifying a master device to determine a communication port for performing service communication between the virtualized network device and an opposite-end virtualized network device, the master device judges whether the master device supports a function of not selecting a port connected with the opposite-end virtualized network device on a standby device in the virtualized network device;
When the judgment result is yes, determining a set number of candidate ports according to equipment where each port corresponding to the dynamic aggregation link established by the virtualized network equipment on the virtualized network equipment and the opposite-end virtualized network equipment is located, port state of each port, aggregation capability information of a port connected with each port on the opposite-end virtualized network equipment and identification information of each port corresponding to the dynamic aggregation link on the opposite-end virtualized network equipment carried in the notification message, wherein the determined candidate ports do not comprise ports connected with the opposite-end virtualized network equipment on the standby equipment, and a data channel is not established between the main equipment and the standby equipment;
And synchronizing the determined candidate port to the master equipment in the opposite-end virtualized network equipment when the candidate port determined by the master equipment in the opposite-end virtualized network equipment is received, and finally determining the candidate port connected with the received candidate port as a communication port.
5. The method of claim 4, wherein the set number of candidate ports is determined by:
Sequencing all ports corresponding to the dynamic aggregation links on the virtualized network equipment according to the sequence from small port numbers to large port numbers of all ports corresponding to the dynamic aggregation links on the opposite-end virtualized network equipment;
for the current port in the traversed sequenced ports, if no candidate port exists locally, when the physical device where the current port is located is not the standby device and the port state of the current port is the UP state, determining the current port as the candidate port, and continuing to traverse the next port;
If there are candidate ports locally, when the physical device where the current port is located is not the standby device, the port state of the current port is an UP state, the aggregation capability information of the current port is the same as the aggregation capability information of the candidate port determined last time, the current port is located on the same hardware chip as the candidate port determined last time, the aggregation capability information of the current port is the same as the aggregation capability information of the port connected with the current port on the opposite-end virtualized network device, and the total number of the current candidate ports does not reach the set number, determining the current port as the candidate port, and continuing to traverse the next port until the total number of the determined candidate ports reaches the set number, and stopping traversing.
6. A port determining apparatus, the apparatus being applied to any one of virtualized network devices provided with two physical devices in a master-slave relationship with each other, the apparatus comprising:
A notification judging module, configured to send, to an opposite-end virtualized network device, a notification message for notifying the opposite-end virtualized network device to determine a communication port where the opposite-end virtualized network device performs service communication with the virtualized network device when determining that the communication port where the virtualized network device performs service communication with the opposite-end virtualized network device needs to be actively determined as a master device, and judge whether a function of not selecting a port on a standby device in the virtualized network device, which is connected with the opposite-end virtualized network device, is supported by the notification judging module;
A first determining module, configured to determine, when the determination result of the notification determining module is yes, a set number of candidate ports according to a device where each port of the virtualized network device on the virtualized network device corresponds to a dynamic aggregation link established by an opposite-end virtualized network device, a port state of each port, aggregation capability information of a port connected to each port on the opposite-end virtualized network device, and identification information of each port, where the determined candidate ports do not include a port connected to the opposite-end virtualized network device on the standby device, and no data channel is established between the main device and the standby device;
And the second determining module is used for synchronizing the determined candidate ports to the opposite-end virtualized network equipment, and when receiving the candidate ports which are synchronized by the opposite-end virtualized network equipment and determined by the main equipment in the opposite-end virtualized network equipment, determining the candidate ports which are connected with the received candidate ports in the determined candidate ports as communication ports.
7. The apparatus according to claim 6, wherein the notification determination module is specifically configured to determine, as the master device, a communication port through which the virtualized network device is in traffic communication with the peer virtualized network device by:
When the device role of the device is monitored as the master device for the first time and the device ID of the virtualized network device is determined to be smaller than the device ID of the opposite-end virtualized network device, or when the device role of the device is monitored as the master device and the device ID of the virtualized network device is determined to be smaller than the device ID of the opposite-end virtualized network device and the port state of a port connected with the opposite-end virtualized network device on the device is changed, or when the device role of the device is monitored to be updated from the backup device to the master device and the device ID of the virtualized network device is determined to be smaller than the device ID of the opposite-end virtualized network device, or when the device role of the device is monitored as the master device for the first time and the preset period is reached, and the device ID of the virtualized network device is determined to be smaller than the device ID of the opposite-end virtualized network device, all ports corresponding to the dynamic aggregation link between the virtualized network device and the opposite-end virtualized network device need to be traversed as the master device are determined.
8. The apparatus according to claim 6, wherein the first determining module is configured to determine the set number of candidate ports by:
sequencing all ports according to the sequence from small port numbers to large port numbers of all ports;
for the current port in the traversed sequenced ports, if no candidate port exists locally, when the physical device where the current port is located is not the standby device and the port state of the current port is the UP state, determining the current port as the candidate port, and continuing to traverse the next port;
If there are candidate ports locally, when the physical device where the current port is located is not the standby device, the port state of the current port is an UP state, the aggregation capability information of the current port is the same as the aggregation capability information of the candidate port determined last time, the current port is located on the same hardware chip as the candidate port determined last time, the aggregation capability information of the current port is the same as the aggregation capability information of the port connected with the current port on the opposite-end virtualized network device, and the total number of the current candidate ports does not reach the set number, determining the current port as the candidate port, and continuing to traverse the next port until the total number of the determined candidate ports reaches the set number, and stopping traversing.
9. A port determining apparatus, the apparatus being applied to any one of virtualized network devices provided with two physical devices in a master-slave relationship with each other, the apparatus comprising:
The judging module is used for judging whether the function of not selecting the port connected with the opposite-end virtualized network equipment on the standby equipment in the virtualized network equipment is supported or not when the judging module is used as the main equipment to receive a notification message for notifying the main equipment to determine the communication port for carrying out service communication between the virtualized network equipment and the opposite-end virtualized network equipment;
a first determining module, configured to determine, when the determination result of the determining module is yes, a set number of candidate ports according to a device where each port of the virtualized network device on the virtualized network device corresponds to a dynamic aggregation link established by an opposite-end virtualized network device, a port state of each port, aggregation capability information of a port connected to each port on the opposite-end virtualized network device, and identification information of each port corresponding to the dynamic aggregation link on the opposite-end virtualized network device carried in the notification packet, where the determined candidate ports do not include a port connected to the opposite-end virtualized network device on the standby device, and no data channel is established between the main device and the standby device;
And the second determining module is used for synchronizing the candidate port determined by the host equipment in the opposite-end virtualized network equipment to the host equipment in the opposite-end virtualized network equipment when receiving the candidate port determined by the host equipment in the opposite-end virtualized network equipment, and finally determining the candidate port connected with the received candidate port in the candidate port determined by the host equipment as the communication port.
10. The apparatus according to claim 9, wherein the first determining module is configured to determine the set number of candidate ports by:
Sequencing all ports corresponding to the dynamic aggregation links on the virtualized network equipment according to the sequence from small port numbers to large port numbers of all ports corresponding to the dynamic aggregation links on the opposite-end virtualized network equipment;
for the current port in the traversed sequenced ports, if no candidate port exists locally, when the physical device where the current port is located is not the standby device and the port state of the current port is the UP state, determining the current port as the candidate port, and continuing to traverse the next port;
If there are candidate ports locally, when the physical device where the current port is located is not the standby device, the port state of the current port is an UP state, the aggregation capability information of the current port is the same as the aggregation capability information of the candidate port determined last time, the current port is located on the same hardware chip as the candidate port determined last time, the aggregation capability information of the current port is the same as the aggregation capability information of the port connected with the current port on the opposite-end virtualized network device, and the total number of the current candidate ports does not reach the set number, determining the current port as the candidate port, and continuing to traverse the next port until the total number of the determined candidate ports reaches the set number, and stopping traversing.
11. An electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor to cause the processor to perform the method steps recited in any one of claims 1-3 or 4-5.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-3 or 4-5.
CN202410475537.7A 2024-04-19 Port determination method, device, electronic device and storage medium Active CN118473908B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410475537.7A CN118473908B (en) 2024-04-19 Port determination method, device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410475537.7A CN118473908B (en) 2024-04-19 Port determination method, device, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN118473908A CN118473908A (en) 2024-08-09
CN118473908B true CN118473908B (en) 2025-10-03

Family

ID=

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108600100A (en) * 2018-07-13 2018-09-28 新华三技术有限公司合肥分公司 Member port choosing method and device
CN112751755A (en) * 2019-10-30 2021-05-04 中兴通讯股份有限公司 Equipment virtualization method, device, system, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108600100A (en) * 2018-07-13 2018-09-28 新华三技术有限公司合肥分公司 Member port choosing method and device
CN112751755A (en) * 2019-10-30 2021-05-04 中兴通讯股份有限公司 Equipment virtualization method, device, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
US9270524B2 (en) Method and device for LACP link switching and data transmission
EP3316555B1 (en) Mac address synchronization method, device and system
US9288075B2 (en) Method and system for auto-configuration, and network node
CN101102222A (en) A communication network connection method and its device
CN104184756A (en) Data synchronization method, device and system
CN111372272A (en) Method and device for recovering abnormity of wireless bridging network
CN110769019B (en) Session processing method, device, system, storage medium and computing equipment
CN110661836B (en) Message routing method, device and system, and storage medium
CN112333013A (en) Self-adaptive networking method, device, router and storage medium
CN111884875A (en) Offline device determination method and device
US20170041181A1 (en) Event Processing in a Network Management System
CN109450707B (en) A data transmission method, apparatus, gateway device and readable storage medium
CN103281720B (en) The hot standby changing method of wireless controller and device, wireless controller, connecting system
CN112383414B (en) Dual-machine hot backup quick switching method and device
CN106453074A (en) Switching method and apparatus
CN108989204B (en) Method and device for determining link status
WO2020177471A1 (en) Message transmission method, apparatus and storage medium
CN108900441B (en) Network switching method, first electronic device and readable storage medium
CN113194494B (en) Air interface resource control method, device, network side equipment and terminal
JP2009194787A (en) Gateway device
CN118473908B (en) Port determination method, device, electronic device and storage medium
CN114422335A (en) Communication method, communication device, server and storage medium
RU2693903C1 (en) Method, apparatus and processing system for expanded port
CN111988808A (en) Core network disaster tolerance backup method and device
CN111314272B (en) Task processing method and device

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant