A port binding method and device

By enabling the LLDP function on the ad hoc network device, automatically learning and binding ports and global VLANs, the problems of cumbersome port binding and high labor cost in the existing technology are solved, and automated port binding and new equipment joining are realized Automatic configuration of ad hoc network.

CN115865658BActive Publication Date: 2024-12-03NEW H3C TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310105131.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-31
Publication Date
2024-12-03
Estimated Expiration
2043-01-31

AI Technical Summary

Technical Problem

In the existing ad hoc network, administrators need to manually bind the ports of the master and slave devices, resulting in high labor costs and cumbersome operations, especially when new devices are added, additional binding operations are required.

Method used

By enabling the Link Layer Discovery Protocol (LLDP) function on the network device, learning and recording LLDP information, and automatically binding the port and the global VLAN according to the preset binding rules. The administrator of the main device configures the global VLAN and Automatically push to slave device.

Benefits of technology

There is no need for an administrator to manually bind ports on site, automatic operation greatly saves labor costs, simplifies the process, and supports the automatic addition of new devices to the ad hoc network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115865658B_ABST
    Figure CN115865658B_ABST
Patent Text Reader

Abstract

The present application provides a port binding method and device. The method is applied to a network device with a self-organizing network function, and includes: after configuring the global VLAN that the self-organizing network needs to use, if the self-organizing network has enabled the LLDP function, then judging whether the local has LLDP information recorded; if the judgment result is yes, then according to the preset binding rule, binding the port on the self that has learned the LLDP information and the global VLAN; if the judgment result is no, then when learning the LLDP information through any port on the self, recording the LLDP information learned by the port locally, and according to the preset binding rule, binding the port and the global VLAN. The present application can greatly save labor costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a port binding method and device. Background Art

[0002] Network devices with ad hoc networking functions are connected together through network cables. When powered on, the ad hoc network is automatically established. That is, the network devices elect a master device according to the preset election mechanism, and the rest are slave devices. The master device is responsible for managing the entire ad hoc network, for example, the management password of the entire network, the virtual local area network (VLAN) of the entire network, the Wi-Fi configuration of the entire network, etc., as well as collecting and maintaining the topology of the entire network, etc., and automatically managing and configuring newly added network devices.

[0003] When the master device in an ad hoc network fails or loses power, a master device will be re-elected among the remaining slave devices, and the newly elected master device will take over the entire ad hoc network, so that the relevant configurations of the entire ad hoc network remain unchanged and the user is unaware.

[0004] At present, in an ad hoc network, an administrator is usually required to manually bind the VLANs needed for the ad hoc network to the relevant ports on the master and slave devices in the ad hoc network on site. Moreover, when a new network device is added to the ad hoc network, the administrator is also required to bind the VLANs needed for the ad hoc network to the relevant ports on the newly added network device on site. Obviously, this port binding method consumes a lot of manpower costs and is cumbersome to operate. Summary of the invention

[0005] In order to overcome the problems existing in the related art, the present application provides a port binding method and device. According to a first aspect of an embodiment of the present application, a port binding method is provided, the method is applied to a network device with a self-organizing network function, and the method includes:

[0006] After configuring the global VLAN that the self-organizing network needs to use, if the Link Layer Discovery Protocol (LLDP) function is enabled, determine whether LLDP information is recorded locally;

[0007] If the judgment result is yes, then according to the preset binding rule, a binding operation is performed on the port on itself that has learned the LLDP information and the global VLAN, wherein the LLDP information is the LLDP information corresponding to other network devices with self-organizing network function connected to the port corresponding to the LLDP information on the network device with self-organizing network function;

[0008] If the result of the judgment is no, when the LLDP information is learned through any port on itself, the LLDP information learned by the port is recorded locally, and a binding operation is performed on the port and the global VLAN according to the preset binding rule;

[0009] Wherein, when the network device with the self-organizing network function is a master device, the global VLAN is configured by the network device with the self-organizing network function according to a configuration instruction input by an administrator for configuring the global VLAN;

[0010] When the network device with self-organizing network function is a slave device, the global VLAN is configured by the network device with self-organizing network function according to the configuration instruction for configuring the global VLAN input by the administrator and sent after the master device configures the global VLAN locally.

[0011] According to a second aspect of an embodiment of the present application, a port binding device is provided, the device being applied to a network device having a self-organizing network function, the device comprising:

[0012] The configuration judgment module is used to judge whether LLDP information is recorded locally after configuring the global VLAN to be used by the self-organizing network, if the LLDP function is enabled;

[0013] A first binding module, configured to, if the judgment result of the first configuration judgment module is yes, perform a binding operation on the port on itself that has learned the LLDP information and the global VLAN according to a preset binding rule, wherein the LLDP information is LLDP information corresponding to other network devices with self-organizing network function connected to the port corresponding to the LLDP information on the network device with self-organizing network function;

[0014] A second binding module is used to locally record the LLDP information learned by the port when the judgment result of the first configuration judgment module is no and the LLDP information is learned through any port on itself, and perform a binding operation on the port and the global VLAN according to the preset binding rule;

[0015] Wherein, when the network device with the self-organizing network function is a master device, the global VLAN is configured by the network device with the self-organizing network function according to a configuration instruction input by an administrator for configuring the global VLAN;

[0016] When the network device with self-organizing network function is a slave device, the global VLAN is configured by the network device with self-organizing network function according to the configuration instruction for configuring the global VLAN input by the administrator and sent after the master device configures the global VLAN locally.

[0017] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0018] In the embodiment of the present application, there is no need for the administrator to go to the site to manually bind the VLAN required for the self-organizing network to the relevant ports on the master device and the slave device in the self-organizing network. The administrator only needs to configure the global VLAN required for the self-organizing network on the network device with the self-organizing network function as the master device, and the master device and the network device with the self-organizing network function as the slave device automatically implement the binding operation of the relevant ports and the global VLAN. In this way, the labor cost can be greatly saved and the operation process is relatively simple.

[0019] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings, which are incorporated in the specification and constitute a part of this application, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.

[0021] Figure 1 A flow chart of a port binding method provided in an embodiment of the present application;

[0022] Figure 2 A schematic diagram of the architecture of a self-organizing network provided in an embodiment of the present application;

[0023] Figure 3 A schematic diagram of the structure of a port binding device provided in an embodiment of the present application;

[0024] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0026] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0027] It should be understood that, although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" or "if" as used herein may be interpreted as "at the time of" or "when...".

[0028] Next, the embodiments of the present application are described in detail.

[0029] The embodiment of the present application provides a port binding method, which is applied to a network device with a self-organizing network function, such as Figure 1 As shown, the method may include the following steps:

[0030] S11. After configuring the global VLAN that the self-organizing network needs to use, if the LLDP function is enabled, determine whether LLDP information is recorded locally; if the judgment result is yes, execute step S12; if the judgment result is no, execute step S13.

[0031] In this step, when the network device with the self-organizing network function is the main device, the global VLAN is configured by the network device with the self-organizing network function according to the configuration instruction input by the administrator for configuring the global VLAN;

[0032] When the network device with self-organizing network function is a slave device, the global VLAN is configured by the network device with self-organizing network function according to the configuration instruction for configuring the global VLAN input by the administrator sent by the master device after the master device configures the local VLAN completely.

[0033] S12: According to the preset binding rule, the port on itself that has learned the LLDP information is bound to the global VLAN.

[0034] In this step, the LLDP information is LLDP information corresponding to other network devices with self-organizing network functions connected to the port corresponding to the LLDP information on the network device with self-organizing network functions.

[0035] S13. When LLDP information is learned through any port on the device, the LLDP information learned by the port is recorded locally, and a binding operation is performed on the port and the global VLAN according to a preset binding rule.

[0036] It should be noted that, in the embodiment of the present application, the self-organizing network in which the network device with self-organizing network function is located may include multiple fat (Fat) access points (AP) and at least one switching device. In this network scenario, the network device with self-organizing network function can be a Fat AP or a switching device. Here, each switching device defaults to being a slave device role and does not participate in the election of the master device.

[0037] The ad hoc network in which the network device with ad hoc network function resides may also include an AC under the Access Controller (AC) + Thin AP architecture and at least one switching device under the architecture. In this network scenario, the network device with ad hoc network function may be an AC or a switching device. Here, each switching device is a slave device by default and does not participate in the election of the master device.

[0038] Of course, the embodiments of the present application are not limited to the above two network scenarios.

[0039] It should be further explained that in the embodiment of the present application, the administrator can configure the global VLAN only once on the network device with self-organizing network function that serves as the main device, and can also configure the global VLAN multiple times on the network device with self-organizing network function that serves as the main device. As long as the global VLAN is configured once, the relevant network device with self-organizing network function executes the above steps S11 and S12 once, or executes the above steps S11 and S13 once, so as to ensure that the data packets on the wired terminal or wireless terminal side connected to the self-organizing network can be forwarded normally in the self-organizing network.

[0040] In one example, the administrator can log in to the management page of the network device with the self-organizing network function as the master device, and enter the configuration instruction for configuring the global VLAN on the management page, and the master device configures the global VLAN according to the configuration instruction. Of course, the administrator can also use other ways to enter the configuration instruction, which will not be listed here one by one.

[0041] Specifically, in the above step S12, the network device with the ad hoc networking function can implement the binding operation of the port on itself that has learned the LLDP information and the global VLAN in the following manner:

[0042] If the port type of the port that has learned the LLDP information is an access port, the port type of the port that has learned the LLDP information is changed to a trunk port, the port-based VLAN identifier (PVID) of the port that has learned the LLDP information is configured as the initial access VLAN of the port that has learned the LLDP information, and the port that has learned the LLDP information is bound to the global VLAN;

[0043] If the port type of the port that learns the LLDP information is a Trunk port, the port that learns the LLDP information is directly bound to the global VLAN.

[0044] Here, the initial Access VLAN and the global VLAN can be the same VLAN or different VLANs, and the two can be presented in the form of VLAN ID. In addition, the initial Access VLAN can be understood as the VLAN set by the administrator when the port type of the port that learns LLDP information on the network device with self-organizing network function is the Access port.

[0045] In the above step S13, the network device with the ad hoc networking function can implement the binding operation between the port and the global VLAN in the following manner:

[0046] If the port type is an Access port, change the port type to a Trunk port, configure the port's PVID as the initial Access VLAN of the port, and bind the port to the global VLAN.

[0047] If the port type is a Trunk port, directly bind the port to the global VLAN.

[0048] Further, in the embodiment of the present application, after the network device with the self-organizing network function performs a binding operation on the port on itself that has learned the LLDP information and the global VLAN, it can also perform the following operations:

[0049] If LLDP information is learned through any other port on the device except the port that has learned LLDP information, the LLDP information learned by the other port is recorded locally, and a binding operation is performed on the other port and the global VLAN according to a preset binding rule.

[0050] Through the above operation process, the global VLAN binding operation of the port of the network device with self-organizing network function connected to the network device with self-organizing network function newly added to the self-organizing network can be automatically implemented without the participation of the administrator.

[0051] In addition, in an embodiment of the present application, for any port on the network that is bound to the global VLAN, if a Down event is detected at the port, the network device with a self-organizing network function changes the port type from a Trunk port to an Access port when the port type before the port is changed is an Access port, restores the PVID of the port to the initial Access VLAN, and unbinds the port from the global VLAN; when the port type before the port is changed is a Trunk port, directly unbinds the port from the global VLAN.

[0052] Furthermore, in the embodiment of the present application, the network device with the self-organizing network function can also perform the following operations:

[0053] After configuring the global VLAN that the ad hoc network needs to use, if the LLDP function is not enabled and there are designated ports on the ad hoc network that need to be bound to the global VLAN, the designated port and the global VLAN are bound according to the preset binding rules.

[0054] The following operation process can be used to implement the binding operation of global VLAN for related ports when a network device with self-organizing network function but not LLDP function needs to use global VLAN for data communication with a network device without self-organizing network function, which can be applied to various network scenarios.

[0055] The above port binding method is described in detail below in conjunction with specific embodiments.

[0056] like Figure 2 As shown in the figure, it is assumed that Fat AP1, Fat AP2, Fat AP3 and switch device 1 are all network devices with self-organizing network function and LLDP function enabled. After these network devices are powered on, the adjacent devices will learn the LLDP information of the other end, and the master device will be elected among these network devices to form a self-organizing network.

[0057] Assume that Fat AP1 is elected as the master device, and Fat AP2, Fat AP3, and switching device 1 are all slave devices. Assume that the administrator logs in to the management page of Fat AP1 and enters configuration instruction 1 on the management page for configuring the global VLAN 10 required for the self-organizing network. After receiving configuration instruction 1, Fat AP1 configures global VLAN 10 according to configuration instruction 1.

[0058] After Fat AP1 configures the entire VLAN 10, it sends configuration instruction 1 to Fat AP2, Fat AP3, and switch 1. At the same time, Fat AP1 finds that it has enabled the LLDP function. Fat AP1 determines whether LLDP information is recorded locally. Assuming that no LLDP information is recorded locally, the judgment result is no. At this time, Fat AP1 does not perform any operation. Subsequently, it is assumed that Fat AP1 learns LLDP information through port 1. In this case, Fat AP1 records the LLDP information learned by Port 1 locally, and binds Port 1 to the global VLAN 10 according to the preset binding rules to ensure that the wired terminal or wireless terminal (for example, Figure 2 The data message on the mobile phone side shown in the figure can be forwarded normally in the self-organizing network.

[0059] Here, assuming that the port type of Port1 is a Trunk port, Fat AP1 directly binds Port1 to the global VLAN10.

[0060] For Fat AP2, Fat AP3 and switch device 1, after receiving configuration instruction 1, they will configure global VLAN 10 locally. Taking switch device 1 as an example, after configuring local VLAN 10, it is found that the LLDP function is enabled. At this time, switch device 1 determines whether LLDP information is recorded locally; assuming that switch device 1 has recorded the LLDP information learned by Port 11, Port 12 and Port 13 locally, the judgment result is yes, and switch device 1 binds these three ports (i.e., Port 11, Port 12 and Port 13) and global VLAN 10 according to the above preset binding rules.

[0061] Here, assuming that the port types of Port11, Port12 and Port13 are also Trunk ports, then the switching device 1 directly binds these three ports (Port11, Port12 and Port13) to the global VLAN10.

[0062] Next, after a while, suppose that switch device 1 receives a message through Port 14 ( Figure 2 (not shown) learns new LLDP information, the switching device 1 records the LLDP information learned by Port14, and performs a binding operation on Port14 and the global VLAN10 according to the above preset binding rule.

[0063] Here, assuming that the port type of Port 14 is also a Trunk port, then the switching device 1 directly binds Port 14 to the global VLAN 10.

[0064] It is assumed that the administrator subsequently logs in to the management page of Fat AP1 and enters configuration instruction 2 for configuring global VLAN 20 on the management page. After receiving configuration instruction 2, Fat AP1 configures global VLAN 20 according to configuration instruction 2.

[0065] After configuring the global VLAN 20, Fat AP1 sends configuration instruction 2 to Fat AP2, Fat AP3, and switch device 1. At the same time, Fat AP1 finds that the LLDP function is enabled on itself. Fat AP1 determines whether LLDP information is recorded locally. Since the LLDP information learned by Port1 has been recorded locally, the judgment result is yes. At this time, Fat AP1 binds Port1 to the global VLAN 20.

[0066] For Fat AP2, Fat AP3 and switch device 1, after receiving configuration instruction 2, they will configure global VLAN 20 locally. Taking switch device 1 as an example, after configuring local VLAN 20, it is found that the LLDP function is enabled. At this time, switch device 1 determines whether LLDP information is recorded locally; assuming that switch device 1 has recorded the LLDP information learned by Port11, Port12, Port13 and Port14 locally, the judgment result is yes. At this time, switch device 1 binds these four ports (i.e., Port11, Port12, Port13 and Port14) to global VLAN20.

[0067] It is subsequently assumed that at some point in time, switch device 1 detects that a Down event has occurred on Port 14. Since the port type of Port 14 is a Trunk port, switch device 1 directly unbinds Port 14 from global VLAN 10 and global VLAN 120.

[0068] It can be seen from the above technical solution that in the embodiment of the present application, there is no need for the administrator to go to the site to manually bind the VLAN required for the self-organizing network to the relevant ports on the master device and the slave device in the self-organizing network. The administrator only needs to configure the global VLAN required for the self-organizing network on the network device with self-organizing network function as the master device, and the master device and the network device with self-organizing network function as the slave device automatically implement the binding operation of the relevant ports and the global VLAN. In this way, labor costs can be greatly saved and the operation process is relatively simple.

[0069] Based on the same inventive concept, the present application also provides a port binding device, which is applied to a network device with a self-organizing network function. Figure 3 As shown, specifically including:

[0070] The configuration judgment module 31 is used to judge whether LLDP information is recorded locally after configuring the global VLAN to be used by the self-organizing network, if the self-organizing network has enabled the LLDP function;

[0071] A first binding module 32 is used for, if the judgment result of the first configuration judgment module 31 is yes, binding the port on itself that has learned the LLDP information and the global VLAN according to a preset binding rule, wherein the LLDP information is the LLDP information corresponding to other network devices with self-organizing network function connected to the port corresponding to the LLDP information on the network device with self-organizing network function;

[0072] The second binding module 33 is used to locally record the LLDP information learned by the port when the judgment result of the first configuration judgment module 31 is no and the LLDP information is learned through any port on itself, and perform a binding operation on the port and the global VLAN according to the preset binding rule;

[0073] Wherein, when the network device with the self-organizing network function is a master device, the global VLAN is configured by the network device with the self-organizing network function according to a configuration instruction input by an administrator for configuring the global VLAN;

[0074] When the network device with self-organizing network function is a slave device, the global VLAN is configured by the network device with self-organizing network function according to the configuration instruction for configuring the global VLAN input by the administrator and sent after the master device configures the global VLAN locally.

[0075] Preferably, the first binding module 32 is specifically used for:

[0076] If the port type of the port that has learned the LLDP information is an access port, the port type of the port that has learned the LLDP information is changed to an aggregation Trunk port, the PVID of the port that has learned the LLDP information is configured as the initial Access VLAN of the port that has learned the LLDP information, and the port that has learned the LLDP information is bound to the global VLAN;

[0077] If the port type of the port for which the LLDP information is learned is a Trunk port, the port for which the LLDP information is learned is directly bound to the global VLAN.

[0078] Preferably, the second binding module 33 is specifically used for:

[0079] If the port type of the port is an Access port, change the port type of the port to a Trunk port, configure the PVID of the port as the initial Access VLAN of the port, and bind the port to the global VLAN;

[0080] If the port type of the port is a Trunk port, the port is directly bound to the global VLAN.

[0081] Preferably, the device further comprises:

[0082] The third binding module is used to locally record the LLDP information learned by the other port after the configuration judgment module performs a binding operation on the port on itself that has learned the LLDP information and the global VLAN, and perform a binding operation on the other port and the global VLAN according to the preset binding rule if the LLDP information is learned through any other port on itself except the port that has learned the LLDP information.

[0083] Preferably, the device further comprises:

[0084] The unbinding module is used for, for any port bound to the global VLAN, if a Down event is detected on the port, if the port type of the port before the change is an Access port, changing the port type from a Trunk port to an Access port, restoring the PVID of the port to the initial Access VLAN, and unbinding the port from the global VLAN;

[0085] When the port type of the port before being changed is a Trunk port, the port and the global VLAN are directly unbound. The port and the global VLAN are unbound.

[0086] Preferably, the device further comprises:

[0087] The fourth binding module is used to bind the designated port and the global VLAN according to the preset binding rules after the configuration judgment module has configured the global VLAN that the self-organizing network needs to use, if the LLDP function is not enabled and there is a designated port on itself that needs to be bound to the global VLAN.

[0088] It can be seen from the above technical solution that in the embodiment of the present application, there is no need for the administrator to go to the site to manually bind the VLAN required for the self-organizing network to the relevant ports on the master device and the slave device in the self-organizing network. The administrator only needs to configure the global VLAN required for the self-organizing network on the network device with self-organizing network function as the master device, and the master device and the network device with self-organizing network function as the slave device automatically implement the binding operation of the relevant ports and the global VLAN. In this way, labor costs can be greatly saved and the operation process is relatively simple.

[0089] The present application also provides an electronic device, such as Figure 4 As shown, it includes a processor 41 and a machine-readable storage medium 42, wherein the machine-readable storage medium 42 stores machine-executable instructions that can be executed by the processor 41, and the processor 41 is prompted by the machine-executable instructions to implement the steps of the above-mentioned port binding method.

[0090] The machine-readable storage medium may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk storage. Optionally, the machine-readable storage medium may also be at least one storage device located away from the processor.

[0091] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0092] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned port binding method are implemented.

[0093] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A port binding method, It is characterized in that The method is applied to a network device having a self-organizing network function, and the method comprises: After configuring the global VLAN that the ad hoc network needs to use, if the LLDP function is enabled, determine whether LLDP information is recorded locally; If the judgment result is yes, then according to the preset binding rule, a binding operation is performed on the port on itself that has learned the LLDP information and the global VLAN, wherein the LLDP information is the LLDP information corresponding to other network devices with self-organizing network function connected to the port corresponding to the LLDP information on the network device with self-organizing network function; If the result of the judgment is no, when the LLDP information is learned through any port on itself, the LLDP information learned by the port is recorded locally, and a binding operation is performed on the port and the global VLAN according to the preset binding rule; Wherein, when the network device with the self-organizing network function is a master device, the global VLAN is configured by the network device with the self-organizing network function according to a configuration instruction input by an administrator for configuring the global VLAN; When the network device with a self-organizing network function is a slave device, the global VLAN is configured by the network device with a self-organizing network function according to a configuration instruction for configuring the global VLAN input by the administrator and sent by the master device after the master device configures the global VLAN locally; According to a preset binding rule, a binding operation is performed on the port on itself that has learned the LLDP information and the global VLAN, specifically including: If the port type of the port that has learned the LLDP information is an access port, the port type of the port that has learned the LLDP information is changed to an aggregation Trunk port, the PVID of the port that has learned the LLDP information is configured as the initial AccessVLAN of the port that has learned the LLDP information, and the port that has learned the LLDP information is bound to the global VLAN; If the port type of the port for which the LLDP information is learned is a Trunk port, the port for which the LLDP information is learned is directly bound to the global VLAN.

2. The method according to claim 1, It is characterized in that According to the preset binding rule, the port and the global VLAN are bound, specifically including: If the port type of the port is an Access port, the port type of the port is changed to a Trunk port, the PVID of the port is configured as the initial AccessVLAN of the port, and the port is bound to the global VLAN; If the port type of the port is a Trunk port, the port is directly bound to the global VLAN.

3. The method according to claim 1, It is characterized in that After binding the port on the device that has learned the LLDP information to the global VLAN, the method further includes: If LLDP information is learned through any other port on itself except the port that has learned the LLDP information, the LLDP information learned by the other port is recorded locally, and a binding operation is performed on the other port and the global VLAN according to the preset binding rule.

4. The method according to claim 2 or 3, It is characterized in that The method further comprises: For any port on the device that is bound to the global VLAN, if a Down event is detected on the port, if the port type of the port before the change is an Access port, the port type of the port is changed from a Trunk port to an Access port, the PVID of the port is restored to the initial Access VLAN, and the port is unbound from the global VLAN; When the port type of the port before being changed is a Trunk port, the port and the global VLAN are directly unbound. The port and the global VLAN are unbound.

5. The method according to claim 1, It is characterized in that The method further comprises: After configuring the global VLAN that the ad hoc network itself needs to use, if the LLDP function is not enabled and there is a designated port on itself that needs to be bound to the global VLAN, the designated port and the global VLAN are bound according to the preset binding rules.

6. A port binding device, It is characterized in that The device is applied to a network device with a self-organizing network function, and the device includes: A configuration judgment module is used to judge whether LLDP information is recorded locally after configuring the global VLAN to be used by the self-organizing network, if the LLDP function is enabled; A first binding module is used for, when the judgment result of the configuration judgment module is yes, binding the port on itself that has learned the LLDP information and the global VLAN according to a preset binding rule, wherein the LLDP information is the LLDP information corresponding to other network devices with self-organizing network function connected to the port corresponding to the LLDP information on the network device with self-organizing network function; A second binding module is used to locally record the LLDP information learned by the port when the judgment result of the configuration judgment module is no and the LLDP information is learned through any port on itself, and perform a binding operation on the port and the global VLAN according to the preset binding rule; Wherein, when the network device with the self-organizing network function is a master device, the global VLAN is configured by the network device with the self-organizing network function according to a configuration instruction input by an administrator for configuring the global VLAN; When the network device with a self-organizing network function is a slave device, the global VLAN is configured by the network device with a self-organizing network function according to a configuration instruction for configuring the global VLAN input by the administrator and sent by the master device after the master device configures the global VLAN locally; The first binding module is specifically used for: If the port type of the port that has learned the LLDP information is an access port, the port type of the port that has learned the LLDP information is changed to an aggregation Trunk port, the PVID of the port that has learned the LLDP information is configured as the initial Access VLAN of the port that has learned the LLDP information, and the port that has learned the LLDP information is bound to the global VLAN; If the port type of the port for which the LLDP information is learned is a Trunk port, the port for which the LLDP information is learned is directly bound to the global VLAN.

7. The device according to claim 6, It is characterized in that The second binding module is specifically used for: If the port type of the port is an Access port, change the port type of the port to a Trunk port, configure the PVID of the port as the initial Access VLAN of the port, and bind the port to the global VLAN; If the port type of the port is a Trunk port, the port is directly bound to the global VLAN.

8. The device according to claim 6, It is characterized in that The device also includes: The third binding module is used to locally record the LLDP information learned by the other port after the configuration judgment module performs a binding operation on the port on itself that has learned the LLDP information and the global VLAN, and perform a binding operation on the other port and the global VLAN according to the preset binding rule if the LLDP information is learned through any other port on itself except the port that has learned the LLDP information.

9. The device according to claim 7 or 8, It is characterized in that The device also includes: The unbinding module is used for, for any port bound to the global VLAN, if a Down event is detected on the port, if the port type of the port before the change is an Access port, changing the port type from a Trunk port to an Access port, restoring the PVID of the port to the initial Access VLAN, and unbinding the port from the global VLAN; When the port type of the port before being changed is a Trunk port, the port and the global VLAN are directly unbound. The port and the global VLAN are unbound.

10. The device according to claim 6, It is characterized in that The device also includes: The fourth binding module is used to bind the designated port and the global VLAN according to the preset binding rules after the configuration judgment module has configured the global VLAN that the self-organizing network needs to use, if the LLDP function is not enabled and there is a designated port on itself that needs to be bound to the global VLAN.