WO2021057150A1 - Port sharing method and apparatus, storage medium and electronic apparatus - Google Patents

Port sharing method and apparatus, storage medium and electronic apparatus Download PDF

Info

Publication number
WO2021057150A1
WO2021057150A1 PCT/CN2020/099025 CN2020099025W WO2021057150A1 WO 2021057150 A1 WO2021057150 A1 WO 2021057150A1 CN 2020099025 W CN2020099025 W CN 2020099025W WO 2021057150 A1 WO2021057150 A1 WO 2021057150A1
Authority
WO
WIPO (PCT)
Prior art keywords
port
shared
sub
virtual
sharing
Prior art date
Application number
PCT/CN2020/099025
Other languages
French (fr)
Chinese (zh)
Inventor
徐峰
朱永庆
陈华南
Original Assignee
南京中兴软件有限责任公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 南京中兴软件有限责任公司 filed Critical 南京中兴软件有限责任公司
Publication of WO2021057150A1 publication Critical patent/WO2021057150A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/58Association of routers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/58Association of routers
    • H04L45/586Association of routers of virtual routers

Definitions

  • the present disclosure relates to the field of communications, and in particular to a port sharing method and device, storage medium, and electronic device.
  • a physical router In an existing virtual network, in order to meet business or service requirements, a physical router is usually abstracted into multiple logical routers. Among them, a logical router (Logical Router, referred to as LR) refers to a physical router According to a certain resource division principle, the resources in the router are divided into different subsets, so that a physical router can be simulated as multiple routers performing separate routing tasks, which can provide functions previously performed by multiple physical routers to achieve independence and integration. Flexible management, reducing hardware and maintenance costs, different users can access LR independently without affecting each other.
  • LR Logical Router
  • the current approach is usually to allocate a certain number of ports on a physical device to different LRs in units of ports to achieve the purpose of different LRs sharing physical ports. .
  • the current port-based sharing method results in low port resource utilization and affects user experience.
  • the embodiments of the present invention provide a port sharing method and device, storage medium, and electronic device to solve the problem that when multiple abstract logical routers share a physical router based on ports in related technologies, the port utilization rate is not high, which affects user experience, etc. problem.
  • a port sharing method including: a port sharing method, including: creating a shared sub-port corresponding to the shared port of a physical router, and a virtual sub-port corresponding to the shared sub-port Port; based on the sub-port and the virtual sub-port for multiple logical routers of the physical router to perform port sharing.
  • a port sharing device including: a creation module configured to create a shared sub-port corresponding to the shared port of the physical router, and a virtual sub-port corresponding to the shared sub-port
  • the sharing module is configured to perform port sharing for multiple logical routers of the physical router based on the sub-port and the virtual sub-port.
  • a storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the foregoing method embodiments when running.
  • an electronic device including a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute any of the above Steps in the method embodiment.
  • a shared sub-port corresponding to the shared port of a physical router and a virtual sub-port corresponding to the shared sub-port are created; based on the sub-port and the virtual sub-port, multiple logical sub-ports of the physical router are created.
  • the router performs port sharing, that is, it can perform port sharing based on finer granular sub-ports and virtual sub-ports, which solves the problem of low port utilization when multiple abstract logical routers share a physical router based on ports in related technologies. User experience and other issues have further improved port utilization and user experience.
  • FIG. 1 is a block diagram of the hardware structure of a computer terminal of a port sharing method according to an embodiment of the present invention
  • Fig. 2 is a flowchart of a port sharing method according to an embodiment of the present invention.
  • Fig. 3 is a structural block diagram of a port sharing device according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of interaction of a shared port module according to an embodiment of the present invention.
  • Figure 5 is a schematic diagram of a shared port management method according to an embodiment of the present invention.
  • Figure 6 is a schematic diagram of a shared port verification method according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a method for allocating and reclaiming shared ports according to an embodiment of the present invention.
  • Fig. 8 is a schematic diagram of a shared port reallocation method according to an embodiment of the present invention.
  • FIG. 1 is a hardware structural block diagram of a computer terminal in a port sharing method according to an embodiment of the present invention.
  • the computer terminal 10 may include one or more (only one is shown in FIG. 1) processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA. ) And a memory 104 for storing data.
  • the above-mentioned computer terminal may also include a transmission device 106 and an input/output device 108 for communication functions.
  • FIG. 1 is only for illustration, and does not limit the structure of the foregoing computer terminal.
  • the computer terminal 10 may also include more or fewer components than those shown in FIG. 1, or have equivalent functions to those shown in FIG. 1 or more different configurations than those shown in FIG. 1.
  • the memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as the computer programs corresponding to the navigation method of online ride-hailing in the embodiment of the present invention.
  • the processor 102 runs the computer programs stored in the memory 104, Thereby, various functional applications and data processing are executed, that is, the above-mentioned method is realized.
  • the memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 104 may further include a memory remotely provided with respect to the processor 102, and these remote memories may be connected to the computer terminal 10 through a neural network model. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmission device 106 is used to receive or send data via a network.
  • the above-mentioned specific examples of the network may include a wireless network provided by the communication provider of the computer terminal 10.
  • the transmission device 106 includes a network adapter (Network Interface Controller, NIC for short), which can be connected to other network devices through a base station to communicate with the Internet.
  • the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.
  • RF radio frequency
  • FIG. 2 is a flowchart of a port sharing method according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:
  • Step S202 creating a shared sub-port corresponding to the shared port of the physical router, and a virtual sub-port corresponding to the shared sub-port;
  • Step S204 Perform port sharing for multiple logical routers of the physical router based on the subport and the virtual subport.
  • a shared sub-port corresponding to the shared port of a physical router and a virtual sub-port corresponding to the shared sub-port are created; based on the sub-port and the virtual sub-port, multiple logical sub-ports of the physical router are created.
  • the router performs port sharing, that is, it can perform port sharing based on finer granular sub-ports and virtual sub-ports, which solves the problem of low port utilization when multiple abstract logical routers share a physical router based on ports in related technologies. User experience and other issues have further improved port utilization and user experience.
  • the method further includes: passing through the plurality of logical routers The designated logical router in obtains and saves the shared information of the shared sub-port and the virtual sub-port, where the shared information is used to indicate at least one of the following: all the sub-ports that have been shared; all the sub-ports that have been shared The sub-ports respectively correspond to the logical routers, wherein all the sub-ports include at least one of the following: the shared sub-port and the virtual sub-port.
  • the method before performing port sharing for multiple logical routers of the physical router based on the subport and the virtual subport, the method further includes: determining the subport to be shared and the Whether the board on which the sub-port to be shared is located has been exclusively occupied by the logical router, wherein the sub-port to be shared includes: the shared sub-port and the virtual sub-port; if so, the sub-port to be shared Ports are prohibited from continuing to be shared; if not, the sub-ports to be shared are allocated.
  • the method before allocating the sub-ports to be shared, the method further includes: detecting whether the number of logical routers to which the sub-ports to be shared is allocated exceeds a set threshold; If it is, the sub-port to be shared is prohibited from continuing to share; if not, the sub-port to be shared is allocated.
  • the method further includes: after detecting that the to-be-shared port needs to be shared If the sub-port of is exclusively occupied by the logical router, it is determined whether the sub-port to be shared has been shared by the logical router, wherein the sub-port to be shared includes: the shared sub-port and the virtual sub-port; if If yes, send an instruction to the first logical router to instruct the first logical router to reclaim the sub-port to be shared, where the first logical router shares the sub-port to be shared.
  • the method further includes: reclaiming the reclaimed sub-port to be shared The sub-ports are allocated to the second logical router for exclusive use.
  • the specific implementation method can be summarized as a process of management, verification, allocation and recycling, and redistribution of shared ports and sub-ports.
  • the default logical router (LR0) manages and maintains all the shared ports and sub-port information of the current routing system. At the same time, it also manages the virtual sub-port related information created based on the shared sub-port under the current default logical router; the non-default logical router LRx maintains independent shared ports and sub-ports or virtual sub-ports created based on the shared port and other information, between different LRs They do not affect the use of shared sub-ports and newly created virtual sub-interfaces.
  • the above-mentioned technical solutions of the embodiments of the present invention can provide a method and mechanism for creating and managing sharable sub-ports in a virtual network, and creating and managing virtual sub-ports under shared sub-ports. Further improve the port utilization of network equipment and user experience.
  • the technical solution of the present invention essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes a number of instructions to enable a computer terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the method described in each embodiment of the present invention.
  • a computer terminal device which can be a mobile phone, a computer, a server, or a network device, etc.
  • a port sharing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementations, and those that have been described will not be repeated.
  • the term "module” can implement a combination of software and/or hardware with predetermined functions.
  • the devices described in the following embodiments are preferably implemented by software, implementation by hardware or a combination of software and hardware is also possible and conceived.
  • Fig. 3 is a structural block diagram of a port sharing device according to an embodiment of the present invention. As shown in Fig. 3, the device includes:
  • the creation module 30 is configured to create a shared sub-port corresponding to the shared port of the physical router, and a virtual sub-port corresponding to the shared sub-port;
  • the sharing module 32 is configured to perform port sharing for multiple logical routers of the physical router based on the sub-port and the virtual sub-port.
  • a shared sub-port corresponding to the shared port of a physical router and a virtual sub-port corresponding to the shared sub-port are created; based on the sub-port and the virtual sub-port, multiple logical sub-ports of the physical router are created.
  • the router performs port sharing, that is, it can perform port sharing based on finer granular sub-ports and virtual sub-ports, which solves the problem of low port utilization when multiple abstract logical routers share a physical router based on ports in related technologies. User experience and other issues have further improved port utilization and user experience.
  • the sharing module 32 is further configured to obtain and save the shared information of the shared sub-port and the virtual sub-port through a designated logical router among the plurality of logical routers, wherein the shared information is used for At least one of the following is indicated: all sub-ports that have been shared; logical routers corresponding to all sub-ports that have been shared, wherein all the sub-ports include at least one of the following: the shared sub-port, the virtual Sub port.
  • the creation module 30 is further configured to: determine whether the sub-port to be shared and the board on which the sub-port to be shared is located has been exclusively occupied by the logical router, wherein the to-be-shared sub-port is exclusively occupied by the logical router.
  • the sub-port includes: the shared sub-port and the virtual sub-port; if it is, the sub-port to be shared is prohibited from continuing to be shared; if not, the sub-port to be shared is allocated.
  • the creation module 30 is further configured to detect whether the number of logical routers assigned to the sub-port to be shared exceeds a set threshold; if so, the sub-port to be shared is prohibited Continue to share; if not, allocate the sub-ports to be shared.
  • the sharing module 32 is further configured to determine whether the sub-port to be shared has been shared by the logical router when it is detected that the sub-port to be shared needs to be exclusively occupied by the logical router, wherein, the sub-port to be shared includes: the shared sub-port and the virtual sub-port; if so, an instruction is sent to the first logical router to instruct the first logical router to reclaim the sub-port to be shared Port, wherein the first logical router shares the sub-port to be shared.
  • the sharing module 32 is further configured to allocate the recycled sub-ports to be shared to the second logical router for exclusive use.
  • each of the above modules can be implemented by software or hardware.
  • it can be implemented in the following manner, but not limited to this: the above modules are all located in the same processor; or, the above modules can be combined in any combination.
  • the forms are located in different processors.
  • the optional embodiment of the present invention provides a sharing mechanism and implementation for the port resources of the physical network device in the virtual network device.
  • the sharing mechanism Through the sharing mechanism, the flexibility of network port resource management, resource utilization, and user experience are greatly improved
  • the interaction process of each module based on the port sharing mechanism is further described in conjunction with FIG. 4.
  • SC is the system management control entity, which resides on the main control, including device resource management module (DRM), etc.
  • LR0 is the default entity for logical router management, which may include command line interface module (CLI) and model information Module (MIM) and device resource management agent module (DRM_A);
  • LRx is a non-default logical router entity, including modules such as MIM module and DRM_A.
  • the board port information and physical connection information maintained by the DRM module of the initial state of the system through the resource management are notified to the DRM_A agent module of LR0 through multicast or other message mechanisms, and are further synchronized to the MIM module, and finally through the command line or other interactive interface
  • the port resources are presented to the user, that is, the shared port belongs to LR0 by default when the port sharing configuration is not performed;
  • the CLI module in LR0 first synchronizes the port sharing information to the DRM in the SC through the MIM and DRM_A modules through the MIM and DRM_A modules, and simultaneously writes the local port ownership information to the library; Then DRM synchronizes the relevant information of the shared port to each LRx through multicast or other message mechanisms. After each LRx receives it, it judges if it belongs to its own message based on the LR identification ID and other information carried in the message, and then writes the shared port resource to the library. , Synchronize the MIM module and other related processing, and perform subsequent management, including creation, maintenance, etc., and finally present the shared port information to the users under the LRx.
  • the example of the present invention defines a port sharing method in a virtual network, and the main interaction processes are: system port resource management process, shared port verification process, shared port allocation process, and shared port redistribution process.
  • the embodiment of the present invention provides a shared port management process, which includes the following steps:
  • Shared port management includes the current port management mode of the system, the management mode after the shared port is allocated, and the synchronization to the interface management and presented to the user through the command line, network management or other interface, as shown in Figure 5, this embodiment provides a Sharing the port management mechanism, the specific steps are as follows:
  • DRM obtains the current physical port resource information and physical connection information of the system through resource reporting or other methods.
  • the system defaults that all ports belong to LR0.
  • the resource ownership information is written to the database and passed through the logical router module ( Hereinafter referred to as LRM) Collect the physical location information of the single board running on LR of LR0, and then synchronize the port resource information to DRM_A in LR0 through multicast or other message mechanisms;
  • the port resource information of the DRM synchronization DRM_A includes: physical slot information to which the port belongs and related attributes, etc.;
  • the DRM runs on the system main control management single board, and manages all resource information of the system
  • the DRM_A runs as a proxy module of the DRM on the line card to which each LR includes LR0 and LRx, and performs port resource information exchange with the DRM;
  • DRM_A under the LR0 receives the port resource information of the DRM, it writes the port information to the resource library, and further synchronizes it to the interface management module through MIM, and finally presents it to the user through a command line or other means;
  • LR0 manages the shared or non-shared information of all ports, and at the same time maintains its own newly-created sub-interfaces or virtual sub-interfaces;
  • the shared port can be shared to multiple LRs, including LR0 or LRx;
  • LR0 can see all the ports that are shared, and new sub-interfaces or virtual sub-interfaces under the current LR0, or other types of sub-interfaces;
  • LR0 can manage and maintain the information of all ports, including but not limited to whether it is shared or exclusive, shared LRs list information, and other related information.
  • LRx manages and maintains its own newly-created sub-interfaces or virtual sub-interfaces
  • LRx can see the shared port that has been shared to itself;
  • LRx can manage and maintain the shared port and the newly created sub-interface or virtual sub-interface.
  • the embodiment of the present invention provides a shared port verification process, which includes the following steps:
  • this embodiment provides a shared port filtering and checking mechanism. The specific steps are as follows:
  • S601 Check whether the port and the board to which the port belongs are exclusively occupied by other LRs. If they are exclusively occupied by other LRs, they cannot be shared;
  • the port verification is performed in the DRM module
  • the port or the single board to which the port belongs is exclusively occupied by other single boards, and the port or the single board to which the port belongs needs to be reclaimed. After reclaiming, the port sharing can be allocated;
  • S602 Check the number of LRs allocated to the shared port, if the maximum LR sharing the same port limit is exceeded, sharing is not allowed;
  • the maximum LR sharing the same port limit is comprehensively set according to system performance, user usage, and other factors;
  • the embodiment of the present invention provides a shared port allocation and recycling process, which includes the following steps:
  • the port allocation process requires LR0 to perform write library management, and then synchronize to other LRs.
  • LR0 performs unified management of port resources, as shown in Figure 7. The specific steps are as follows:
  • DRM_A in LP0 writes the configuration library according to the command, and at the same time notifies DRM for further processing;
  • DRM first performs shared port verification, and the verification passes. DRM first writes the LR and other related information of the shared port to the port resource allocation library, and at the same time advertises port ownership related information to other LRs through multicast or other message mechanisms;
  • DRM_A in LR0 After DRM_A in LR0 receives the updated port attribution information sent by DRM, it updates the port attribution information database, and records information such as LR related to port sharing;
  • DRM_A in LRx After DRM_A in LRx receives the updated port ownership information sent by DRM, it determines if it is the information of this LR, updates the port ownership information database, and at the same time notifies MIM through multicast or other messages, and finally presents it through command prompts or other methods To the user, so that the user can see the port information under the current LR;
  • the shared port recovery process is similar to the allocation process.
  • LR0 or LRx After receiving the port attribution information of DRM, LR0 or LRx updates the corresponding port information attribution database. LRx also informs MIM and presents it to MIM through command line or other methods. user.
  • the embodiment of the present invention provides a shared port redistribution process, as shown in FIG. 8, which mainly includes the following steps:
  • the port and the board to which it belongs can no longer be allocated to other LRs for resource exclusive use. If the port or the board to which the port belongs needs to be allocated to other LRs for exclusive use, the shared port needs to be recycled, as shown in the figure As shown in 8, the specific steps are as follows:
  • the shared port recovery specifically, after the port shared recovery instruction is issued, DRM_A in LP0 writes the configuration database according to the command, updates the port attribution information database, and synchronizes to DRM; further, DRM is notified through synchronization or other message mechanisms LRx deletes the port information distribution library and has completed the recovery of the shared port.
  • the embodiment of the present invention also provides a storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the foregoing method embodiments when running.
  • the aforementioned storage medium may be configured to store a computer program for executing the following steps:
  • S2 Perform port sharing for multiple logical routers of the physical router based on the subport and the virtual subport.
  • the foregoing storage medium may include, but is not limited to: U disk, Read-Only Memory (Read-Only Memory, ROM for short), Random Access Memory (Random Access Memory, RAM for short), Various media that can store computer programs, such as mobile hard disks, magnetic disks, or optical disks.
  • the embodiment of the present invention also provides a storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the foregoing method embodiments when running.
  • An embodiment of the present invention also provides an electronic device, including a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the foregoing method embodiments.
  • the aforementioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the aforementioned processor, and the input-output device is connected to the aforementioned processor.
  • the foregoing processor may be configured to execute the following steps through a computer program:
  • S2 Perform port sharing for multiple logical routers of the physical router based on the subport and the virtual subport.
  • An embodiment of the present invention also provides an electronic device, including a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the foregoing method embodiments.
  • the aforementioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the aforementioned processor, and the input-output device is connected to the aforementioned processor.
  • modules or steps of the present invention can be implemented by a general computing device, and they can be concentrated on a single computing device or distributed on a nerve composed of multiple computing devices.
  • they can be implemented with program codes executable by a computing device, so that they can be stored in a storage device for execution by the computing device, and in some cases, they can be different from here.
  • the steps shown or described are performed in the order of, or they are respectively fabricated into individual integrated circuit modules, or multiple modules or steps of them are fabricated into a single integrated circuit module to achieve. In this way, the present invention is not limited to any specific combination of hardware and software.
  • a shared sub-port corresponding to the shared port of a physical router and a virtual sub-port corresponding to the shared sub-port are created; based on the sub-port and the virtual sub-port, multiple logical sub-ports of the physical router are created.
  • the router performs port sharing, that is, it can perform port sharing based on finer granular sub-ports and virtual sub-ports, which solves the problem of low port utilization when multiple abstract logical routers share a physical router based on ports in related technologies. User experience and other issues have further improved port utilization.

Abstract

Provided are a port sharing method and apparatus, a storage medium and an electronic apparatus. The method comprises: creating a sharing sub-port corresponding to a sharing port of a physical router, and a virtual sub-port corresponding to the sharing sub-port; and performing port sharing for a plurality of logic routers of the physical router on the basis of the sub-port and the virtual sub-port. By means of the technical solution, the problems in the related art of low port utilization rate, user experience being impacted, etc., when a plurality of abstract logic routers share one physical router on the basis of a port are solved.

Description

端口共享方法及装置、存储介质、电子装置Port sharing method and device, storage medium, and electronic device 技术领域Technical field
本公开涉及通信领域,具体而言,涉及一种端口共享方法及装置、存储介质、电子装置。The present disclosure relates to the field of communications, and in particular to a port sharing method and device, storage medium, and electronic device.
背景技术Background technique
在现有的虚拟网络中,为了满足业务或者服务的需求,一台物理路由器通常会被抽象成多个逻辑路由器,其中,逻辑路由器(Logical Router,简称为LR)是指在一台物理路由器上根据一定的资源划分原则将路由器中的资源划分成不同的子集,使一台物理路由器模拟成多个执行单独路由任务的路由器,可提供以前由多个物理路由器所执行的功能,达到独立和灵活管理、降低硬件和维护成本,不同用户可以独立访问LR,互不影响。In an existing virtual network, in order to meet business or service requirements, a physical router is usually abstracted into multiple logical routers. Among them, a logical router (Logical Router, referred to as LR) refers to a physical router According to a certain resource division principle, the resources in the router are divided into different subsets, so that a physical router can be simulated as multiple routers performing separate routing tasks, which can provide functions previously performed by multiple physical routers to achieve independence and integration. Flexible management, reducing hardware and maintenance costs, different users can access LR independently without affecting each other.
其中,在不同逻辑路由器LR之间端口资源共享方面,目前通常采取的做法是,把物理设备上的一定数量的端口,以端口为单位分配给不同的LR,以达到不同LR共享物理端口的目的。Among them, in terms of port resource sharing between different logical router LRs, the current approach is usually to allocate a certain number of ports on a physical device to different LRs in units of ports to achieve the purpose of different LRs sharing physical ports. .
上述方法中,在实际网络环境中,随着光网络等高带宽的普及,由于用户的分布情况的差异,目前基于端口进行共享的方式,导致端口资源利用率不高,影响用户的体验。In the above method, in the actual network environment, with the popularization of high bandwidth such as optical networks, due to differences in user distribution, the current port-based sharing method results in low port resource utilization and affects user experience.
针对相关技术中,对于多个抽象的逻辑路由器基于端口共享一个物理路由器时,端口利用率不高,影响用户体验等问题,尚未提出有效的解决方案。In related technologies, when multiple abstract logical routers share a physical router based on ports, the port utilization rate is not high, and user experience is affected, and no effective solutions have been proposed.
发明内容Summary of the invention
本发明实施例提供了一种端口共享方法及装置、存储介质、电子装置,以解决相关技术中对于多个抽象的逻辑路由器基于端口共享一个物理路由器时,端口利用率不高,影响用户体验等问题。The embodiments of the present invention provide a port sharing method and device, storage medium, and electronic device to solve the problem that when multiple abstract logical routers share a physical router based on ports in related technologies, the port utilization rate is not high, which affects user experience, etc. problem.
根据本发明的一个实施例,提供了一种端口共享方法,包括:一种端 口共享方法,包括:创建与物理路由器的共享端口对应的共享子端口,以及与所述共享子端口对应的虚拟子端口;基于所述子端口和所述虚拟子端口为所述物理路由器的多个逻辑路由器进行端口共享。According to an embodiment of the present invention, there is provided a port sharing method, including: a port sharing method, including: creating a shared sub-port corresponding to the shared port of a physical router, and a virtual sub-port corresponding to the shared sub-port Port; based on the sub-port and the virtual sub-port for multiple logical routers of the physical router to perform port sharing.
根据本发明的另一个实施例,还提供了一种端口共享装置,包括:创建模块,设置为创建与物理路由器的共享端口对应的共享子端口,以及与所述共享子端口对应的虚拟子端口;共享模块,设置为基于所述子端口和所述虚拟子端口为所述物理路由器的多个逻辑路由器进行端口共享。According to another embodiment of the present invention, there is also provided a port sharing device, including: a creation module configured to create a shared sub-port corresponding to the shared port of the physical router, and a virtual sub-port corresponding to the shared sub-port The sharing module is configured to perform port sharing for multiple logical routers of the physical router based on the sub-port and the virtual sub-port.
根据本发明的又一个实施例,还提供了一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to another embodiment of the present invention, there is also provided a storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the foregoing method embodiments when running.
根据本发明的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute any of the above Steps in the method embodiment.
通过本公开,创建与物理路由器的共享端口对应的共享子端口,以及与所述共享子端口对应的虚拟子端口;基于所述子端口和所述虚拟子端口为所述物理路由器的多个逻辑路由器进行端口共享,即能够基于粒度更细的子端口和虚拟子端口进行端口共享,解决了相关技术中,对于多个抽象的逻辑路由器基于端口共享一个物理路由器时,端口利用率不高,影响用户体验等问题,进而提高了端口利用率,以及用户体验度。Through the present disclosure, a shared sub-port corresponding to the shared port of a physical router and a virtual sub-port corresponding to the shared sub-port are created; based on the sub-port and the virtual sub-port, multiple logical sub-ports of the physical router are created. The router performs port sharing, that is, it can perform port sharing based on finer granular sub-ports and virtual sub-ports, which solves the problem of low port utilization when multiple abstract logical routers share a physical router based on ports in related technologies. User experience and other issues have further improved port utilization and user experience.
附图说明Description of the drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described here are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention, and do not constitute an improper limitation of the present invention. In the attached picture:
图1是本发明实施例的一种端口共享方法的计算机终端的硬件结构框图;1 is a block diagram of the hardware structure of a computer terminal of a port sharing method according to an embodiment of the present invention;
图2是根据本发明实施例的端口共享方法的流程图;Fig. 2 is a flowchart of a port sharing method according to an embodiment of the present invention;
图3是根据本发明实施例的端口共享装置的结构框图;Fig. 3 is a structural block diagram of a port sharing device according to an embodiment of the present invention;
图4是根据本发明实施例的一种共享端口模块交互示意图;4 is a schematic diagram of interaction of a shared port module according to an embodiment of the present invention;
图5是根据本发明实施例的一种共享端口管理方法示意图;Figure 5 is a schematic diagram of a shared port management method according to an embodiment of the present invention;
图6是根据本发明实施例的一种共享端口校验方法示意图;Figure 6 is a schematic diagram of a shared port verification method according to an embodiment of the present invention;
图7是根据本发明实施例的一种共享端口分配和回收方法示意图;FIG. 7 is a schematic diagram of a method for allocating and reclaiming shared ports according to an embodiment of the present invention;
图8是根据本发明实施例的一种共享端口重分配方法示意图。Fig. 8 is a schematic diagram of a shared port reallocation method according to an embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the present invention will be described in detail with reference to the drawings and in conjunction with the embodiments. It should be noted that the embodiments in this application and the features in the embodiments can be combined with each other if there is no conflict.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms “first” and “second” in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and not necessarily used to describe a specific sequence or sequence.
实施例1Example 1
本申请实施例1所提供的方法实施例可以在计算机终端或者类似的运算装置中执行。以运行在计算机终端上为例,图1是本发明实施例的一种端口共享方法的计算机终端的硬件结构框图。如图1所示,计算机终端10可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器104,可选地,上述计算机终端还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述计算机终端的结构造成限定。例如,计算机终端10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示等同功能或比图1所示功能更多的不同的配置。The method embodiment provided in Embodiment 1 of the present application may be executed in a computer terminal or similar computing device. Taking running on a computer terminal as an example, FIG. 1 is a hardware structural block diagram of a computer terminal in a port sharing method according to an embodiment of the present invention. As shown in FIG. 1, the computer terminal 10 may include one or more (only one is shown in FIG. 1) processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA. ) And a memory 104 for storing data. Optionally, the above-mentioned computer terminal may also include a transmission device 106 and an input/output device 108 for communication functions. A person of ordinary skill in the art can understand that the structure shown in FIG. 1 is only for illustration, and does not limit the structure of the foregoing computer terminal. For example, the computer terminal 10 may also include more or fewer components than those shown in FIG. 1, or have equivalent functions to those shown in FIG. 1 or more different configurations than those shown in FIG. 1.
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本发明实施例中的网约车的导航方法对应的计算机程序,处理器 102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过神经网络模型连接至计算机终端10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as the computer programs corresponding to the navigation method of online ride-hailing in the embodiment of the present invention. The processor 102 runs the computer programs stored in the memory 104, Thereby, various functional applications and data processing are executed, that is, the above-mentioned method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely provided with respect to the processor 102, and these remote memories may be connected to the computer terminal 10 through a neural network model. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括计算机终端10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC for short), which can be connected to other network devices through a base station to communicate with the Internet. In an example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.
在本实施例中提供了一种运行于计算机终端的端口共享方法,图2是根据本发明实施例的端口共享方法的流程图,如图2所示,该流程包括如下步骤:In this embodiment, a port sharing method running on a computer terminal is provided. FIG. 2 is a flowchart of a port sharing method according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:
步骤S202,创建与物理路由器的共享端口对应的共享子端口,以及与所述共享子端口对应的虚拟子端口;Step S202, creating a shared sub-port corresponding to the shared port of the physical router, and a virtual sub-port corresponding to the shared sub-port;
步骤S204,基于所述子端口和所述虚拟子端口为所述物理路由器的多个逻辑路由器进行端口共享。Step S204: Perform port sharing for multiple logical routers of the physical router based on the subport and the virtual subport.
通过本发明,创建与物理路由器的共享端口对应的共享子端口,以及与所述共享子端口对应的虚拟子端口;基于所述子端口和所述虚拟子端口为所述物理路由器的多个逻辑路由器进行端口共享,即能够基于粒度更细的子端口和虚拟子端口进行端口共享,解决了相关技术中,对于多个抽象的逻辑路由器基于端口共享一个物理路由器时,端口利用率不高,影响用户体验等问题,进而提高了端口利用率,以及用户体验度。Through the present invention, a shared sub-port corresponding to the shared port of a physical router and a virtual sub-port corresponding to the shared sub-port are created; based on the sub-port and the virtual sub-port, multiple logical sub-ports of the physical router are created. The router performs port sharing, that is, it can perform port sharing based on finer granular sub-ports and virtual sub-ports, which solves the problem of low port utilization when multiple abstract logical routers share a physical router based on ports in related technologies. User experience and other issues have further improved port utilization and user experience.
在本发明一可选实施例中,建立与物理路由器的共享端口对应的共享 子端口,以及与所述共享子端口对应的虚拟子端口之后,所述方法还包括:通过所述多个逻辑路由器中的指定逻辑路由器获取并保存所述共享子端口和所述虚拟子端口的共享信息,其中,所述共享信息用于至少指示以下之一:已被共享的所有子端口;已被共享的所有子端口分别对应的逻辑路由器,其中,所述所有子端口包括以下至少之一:所述共享子端口,所述虚拟子端口。In an optional embodiment of the present invention, after the shared sub-port corresponding to the shared port of the physical router and the virtual sub-port corresponding to the shared sub-port are established, the method further includes: passing through the plurality of logical routers The designated logical router in obtains and saves the shared information of the shared sub-port and the virtual sub-port, where the shared information is used to indicate at least one of the following: all the sub-ports that have been shared; all the sub-ports that have been shared The sub-ports respectively correspond to the logical routers, wherein all the sub-ports include at least one of the following: the shared sub-port and the virtual sub-port.
在本发明一可选实施例中,基于所述子端口和所述虚拟子端口为所述物理路由器的多个逻辑路由器进行端口共享之前,所述方法还包括:确定待共享的子端口以及所述待共享的子端口所在的单板是否已被逻辑路由器独占,其中,所述待共享的子端口包括:所述共享子端口和所述虚拟子端口;如果是,则所述待共享的子端口禁止继续共享;如果不是,则对所述待共享的子端口进行分配。In an optional embodiment of the present invention, before performing port sharing for multiple logical routers of the physical router based on the subport and the virtual subport, the method further includes: determining the subport to be shared and the Whether the board on which the sub-port to be shared is located has been exclusively occupied by the logical router, wherein the sub-port to be shared includes: the shared sub-port and the virtual sub-port; if so, the sub-port to be shared Ports are prohibited from continuing to be shared; if not, the sub-ports to be shared are allocated.
在本发明一可选实施例中,对所述待共享的子端口进行分配之前,所述方法还包括:检测所述待共享的子端口被分配的逻辑路由器的数量是否超过了设定阈值;如果是,则所述待共享的子端口禁止继续共享;如果不是,则对所述待共享的子端口进行分配。In an optional embodiment of the present invention, before allocating the sub-ports to be shared, the method further includes: detecting whether the number of logical routers to which the sub-ports to be shared is allocated exceeds a set threshold; If it is, the sub-port to be shared is prohibited from continuing to share; if not, the sub-port to be shared is allocated.
在本发明一可选实施例中,建立与物理路由器的共享端口对应的共享子端口,以及与所述共享子端口对应的虚拟子端口之后,所述方法还包括:在检测到需要将待共享的子端口被逻辑路由器独占的情况下,确定所述待共享的子端口是否已被逻辑路由器共享,其中,所述待共享的子端口包括:所述共享子端口和所述虚拟子端口;如果是,则向第一逻辑路由器发送指令,以指示所述第一逻辑路由器回收所述待共享的子端口,其中,所述第一逻辑路由器共享了所述待共享的子端口。In an optional embodiment of the present invention, after establishing the shared sub-port corresponding to the shared port of the physical router and the virtual sub-port corresponding to the shared sub-port, the method further includes: after detecting that the to-be-shared port needs to be shared If the sub-port of is exclusively occupied by the logical router, it is determined whether the sub-port to be shared has been shared by the logical router, wherein the sub-port to be shared includes: the shared sub-port and the virtual sub-port; if If yes, send an instruction to the first logical router to instruct the first logical router to reclaim the sub-port to be shared, where the first logical router shares the sub-port to be shared.
在本发明一可选实施例中,向所述第一逻辑路由器发送指令,以指示所述第一逻辑路由器回收所述待共享的子端口之后,所述方法还包括:将已回收的待共享的子端口分配给第二逻辑路由器进行独占。In an optional embodiment of the present invention, after sending an instruction to the first logical router to instruct the first logical router to reclaim the sub-port to be shared, the method further includes: reclaiming the reclaimed sub-port to be shared The sub-ports are allocated to the second logical router for exclusive use.
可见,通过本发明实施例的技术方案,在基于物理端口共享基础上, 提供一种在虚拟网络设备中,对物理网络设备的子端口共享,同时在共享的子端口下创建和管理虚拟子端口的方法,以实现网络端口更细化的资源共享,提高端口资源的利用率和用户体验。It can be seen that, through the technical solution of the embodiment of the present invention, on the basis of physical port sharing, a method is provided for sub-port sharing of the physical network device in a virtual network device, and at the same time, virtual sub-ports are created and managed under the shared sub-ports. In order to realize more detailed resource sharing of network ports, improve the utilization rate of port resources and user experience.
具体实施方法可以概括为是一种对共享端口和子端口的管理、校验、分配回收及重新分配等过程,其中,默认逻辑路由器(LR0)管理和维护当前路由系统所有的共享端口和子端口信息,同时也管理当前默认逻辑路由器下基于共享子端口所创建的虚拟子端口相关信息;非默认逻辑路由器LRx维护独自的共享端口和子端口或者基于共享端口所创建的虚拟子端口等信息,不同LRs之间互不影响共享子端口和新创建虚拟子接口的使用。The specific implementation method can be summarized as a process of management, verification, allocation and recycling, and redistribution of shared ports and sub-ports. Among them, the default logical router (LR0) manages and maintains all the shared ports and sub-port information of the current routing system. At the same time, it also manages the virtual sub-port related information created based on the shared sub-port under the current default logical router; the non-default logical router LRx maintains independent shared ports and sub-ports or virtual sub-ports created based on the shared port and other information, between different LRs They do not affect the use of shared sub-ports and newly created virtual sub-interfaces.
与现有技术相比,本发明实施例的上述技术方案,能够提供一种在虚拟网络中,创建和管理可共享的子端口,以及共享子端口下创建和管理虚拟子端口的方法和机制,进一步提高网络设备的端口利用率和用户体验。Compared with the prior art, the above-mentioned technical solutions of the embodiments of the present invention can provide a method and mechanism for creating and managing sharable sub-ports in a virtual network, and creating and managing virtual sub-ports under shared sub-ports. Further improve the port utilization of network equipment and user experience.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台计算机终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is Better implementation. Based on this understanding, the technical solution of the present invention essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes a number of instructions to enable a computer terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the method described in each embodiment of the present invention.
在本实施例中还提供了一种端口共享装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a port sharing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementations, and those that have been described will not be repeated. As used below, the term "module" can implement a combination of software and/or hardware with predetermined functions. Although the devices described in the following embodiments are preferably implemented by software, implementation by hardware or a combination of software and hardware is also possible and conceived.
图3是根据本发明实施例的端口共享装置的结构框图,如图3所示,该装置包括:Fig. 3 is a structural block diagram of a port sharing device according to an embodiment of the present invention. As shown in Fig. 3, the device includes:
创建模块30,设置为创建与物理路由器的共享端口对应的共享子端口,以及与所述共享子端口对应的虚拟子端口;The creation module 30 is configured to create a shared sub-port corresponding to the shared port of the physical router, and a virtual sub-port corresponding to the shared sub-port;
共享模块32,设置为基于所述子端口和所述虚拟子端口为所述物理路由器的多个逻辑路由器进行端口共享。The sharing module 32 is configured to perform port sharing for multiple logical routers of the physical router based on the sub-port and the virtual sub-port.
通过本发明,创建与物理路由器的共享端口对应的共享子端口,以及与所述共享子端口对应的虚拟子端口;基于所述子端口和所述虚拟子端口为所述物理路由器的多个逻辑路由器进行端口共享,即能够基于粒度更细的子端口和虚拟子端口进行端口共享,解决了相关技术中,对于多个抽象的逻辑路由器基于端口共享一个物理路由器时,端口利用率不高,影响用户体验等问题,进而提高了端口利用率,以及用户体验度。Through the present invention, a shared sub-port corresponding to the shared port of a physical router and a virtual sub-port corresponding to the shared sub-port are created; based on the sub-port and the virtual sub-port, multiple logical sub-ports of the physical router are created. The router performs port sharing, that is, it can perform port sharing based on finer granular sub-ports and virtual sub-ports, which solves the problem of low port utilization when multiple abstract logical routers share a physical router based on ports in related technologies. User experience and other issues have further improved port utilization and user experience.
可选地,所述共享模块32,还设置为通过所述多个逻辑路由器中的指定逻辑路由器获取并保存所述共享子端口和所述虚拟子端口的共享信息,其中,所述共享信息用于至少指示以下之一:已被共享的所有子端口;已被共享的所有子端口分别对应的逻辑路由器,其中,所述所有子端口包括以下至少之一:所述共享子端口,所述虚拟子端口。Optionally, the sharing module 32 is further configured to obtain and save the shared information of the shared sub-port and the virtual sub-port through a designated logical router among the plurality of logical routers, wherein the shared information is used for At least one of the following is indicated: all sub-ports that have been shared; logical routers corresponding to all sub-ports that have been shared, wherein all the sub-ports include at least one of the following: the shared sub-port, the virtual Sub port.
在本发明一可选实施例中,创建模块30还设置为:确定确定待共享的子端口以及所述待共享的子端口所在的单板是否已被逻辑路由器独占,其中,所述待共享的子端口包括:所述共享子端口和所述虚拟子端口;如果是,则所述待共享的子端口禁止继续共享;如果不是,则对所述待共享的子端口进行分配。In an optional embodiment of the present invention, the creation module 30 is further configured to: determine whether the sub-port to be shared and the board on which the sub-port to be shared is located has been exclusively occupied by the logical router, wherein the to-be-shared sub-port is exclusively occupied by the logical router. The sub-port includes: the shared sub-port and the virtual sub-port; if it is, the sub-port to be shared is prohibited from continuing to be shared; if not, the sub-port to be shared is allocated.
在本发明一可选实施例中,创建模块30还设置为检测所述待共享的子端口被分配的逻辑路由器的数量是否超过了设定阈值;如果是,则所述待共享的子端口禁止继续共享;如果不是,则对所述待共享的子端口进行分配。In an optional embodiment of the present invention, the creation module 30 is further configured to detect whether the number of logical routers assigned to the sub-port to be shared exceeds a set threshold; if so, the sub-port to be shared is prohibited Continue to share; if not, allocate the sub-ports to be shared.
在本发明一可选实施例中,共享模块32,还设置为在检测到需要将待共享的子端口被逻辑路由器独占的情况下,确定所述待共享的子端口是否已被逻辑路由器共享,其中,所述待共享的子端口包括:所述共享子端口 和所述虚拟子端口;如果是,则向第一逻辑路由器发送指令,以指示所述第一逻辑路由器回收所述待共享的子端口,其中,所述第一逻辑路由器共享了所述待共享的子端口。In an optional embodiment of the present invention, the sharing module 32 is further configured to determine whether the sub-port to be shared has been shared by the logical router when it is detected that the sub-port to be shared needs to be exclusively occupied by the logical router, Wherein, the sub-port to be shared includes: the shared sub-port and the virtual sub-port; if so, an instruction is sent to the first logical router to instruct the first logical router to reclaim the sub-port to be shared Port, wherein the first logical router shares the sub-port to be shared.
在本发明一可选实施例中,共享模块32,还设置为将已回收的待共享的子端口分配给第二逻辑路由器进行独占。In an optional embodiment of the present invention, the sharing module 32 is further configured to allocate the recycled sub-ports to be shared to the second logical router for exclusive use.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that each of the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following manner, but not limited to this: the above modules are all located in the same processor; or, the above modules can be combined in any combination. The forms are located in different processors.
本发明可选实施例在虚拟网络设备中,对物理网络设备的端口资源提供一种共享机制和实现,通过该共享机制,极大的提高网络端口资源管理的灵活性、资源利用率以及用户体验,以下结合图4进一步描述基于端口共享机制的各模块的交互过程。The optional embodiment of the present invention provides a sharing mechanism and implementation for the port resources of the physical network device in the virtual network device. Through the sharing mechanism, the flexibility of network port resource management, resource utilization, and user experience are greatly improved In the following, the interaction process of each module based on the port sharing mechanism is further described in conjunction with FIG. 4.
如图4所示,SC为系统管理控制实体,驻留在主控上,包括设备资源管理模块(DRM)等;LR0为逻辑路由器管理默认实体,可包括命令行接口模块(CLI)、模型信息模块(MIM)以及设备资源管理代理模块(DRM_A);LRx为非默认逻辑路由器实体,包括MIM模块及DRM_A等模块。As shown in Figure 4, SC is the system management control entity, which resides on the main control, including device resource management module (DRM), etc.; LR0 is the default entity for logical router management, which may include command line interface module (CLI) and model information Module (MIM) and device resource management agent module (DRM_A); LRx is a non-default logical router entity, including modules such as MIM module and DRM_A.
其中,系统初始状态DRM模块通过资源管理的维护的单板端口信息以及物理连接信息通过组播或其他消息机制通知给LR0的DRM_A代理模块,进一步同步给MIM模块,最终通过命令行或其他交互接口把端口资源呈现给用户,也即,在不进行端口共享配置时共享端口默认归属于LR0;Among them, the board port information and physical connection information maintained by the DRM module of the initial state of the system through the resource management are notified to the DRM_A agent module of LR0 through multicast or other message mechanisms, and are further synchronized to the MIM module, and finally through the command line or other interactive interface The port resources are presented to the user, that is, the shared port belongs to LR0 by default when the port sharing configuration is not performed;
如果用户通过命令行对端口共享进行归属配置给其他的LRx,LR0中的CLI模块首先通过MIM和DRM_A模块采用消息的方式把端口共享信息同步给SC中DRM,同时进行本地端口归属信息写库;然后DRM通过组播或其他消息机制把共享端口的相关信息同步给各个LRx,每个LRx收到之后,根据消息携带的LR标识ID等信息判断如果属于自己的消息,则进行共享端口资源写库、同步MIM模块等相关处理,并进行后续管理, 包括创建、维护等,最终把共享的端口信息呈现给所属LRx下的用户。If the user configures the port sharing to other LRx through the command line, the CLI module in LR0 first synchronizes the port sharing information to the DRM in the SC through the MIM and DRM_A modules through the MIM and DRM_A modules, and simultaneously writes the local port ownership information to the library; Then DRM synchronizes the relevant information of the shared port to each LRx through multicast or other message mechanisms. After each LRx receives it, it judges if it belongs to its own message based on the LR identification ID and other information carried in the message, and then writes the shared port resource to the library. , Synchronize the MIM module and other related processing, and perform subsequent management, including creation, maintenance, etc., and finally present the shared port information to the users under the LRx.
为使本发明的目的、技术方案和优点更加清楚明白,下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。In order to make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments in this application and the features in the embodiments can be combined with each other arbitrarily if there is no conflict.
本发明示例在虚拟网络中定义了一种端口共享的方法,主要交互过程:系统端口资源管理过程、共享端口校验过程、共享端口分配过程以及共享端口重分配过程。The example of the present invention defines a port sharing method in a virtual network, and the main interaction processes are: system port resource management process, shared port verification process, shared port allocation process, and shared port redistribution process.
可选地,本发明实施例提供了一种共享端口管理过程,包括如下步骤:Optionally, the embodiment of the present invention provides a shared port management process, which includes the following steps:
共享端口管理包括系统当前端口管理方式、共享端口分配后的管理方式,以及同步给接口管理并通过命令行、网管或其他交接口呈现给用户,如图5所示,本实施例提供了一种分享端口管理机制,具体步骤如下:Shared port management includes the current port management mode of the system, the management mode after the shared port is allocated, and the synchronization to the interface management and presented to the user through the command line, network management or other interface, as shown in Figure 5, this embodiment provides a Sharing the port management mechanism, the specific steps are as follows:
S501:虚拟网络路由器环境中,DRM通过资源上报或其他方式,获取系统当前物理端口资源信息和物理连接信息,其中,系统默认所有端口均属于LR0,把资源归属信息写库并通过逻辑路由器模块(以下简称为LRM)搜集到LR0的LR运行的单板物理位置信息,然后通过组播或其他消息机制把端口资源信息同步到LR0中的DRM_A;S501: In the virtual network router environment, DRM obtains the current physical port resource information and physical connection information of the system through resource reporting or other methods. The system defaults that all ports belong to LR0. The resource ownership information is written to the database and passed through the logical router module ( Hereinafter referred to as LRM) Collect the physical location information of the single board running on LR of LR0, and then synchronize the port resource information to DRM_A in LR0 through multicast or other message mechanisms;
其中,所述DRM同步DRM_A的端口资源信息包括:端口所属的物理槽位信息以及相关属性等;Wherein, the port resource information of the DRM synchronization DRM_A includes: physical slot information to which the port belongs and related attributes, etc.;
其中,所述DRM运行在系统主控管理单板上,管理系统所有资源信息;Wherein, the DRM runs on the system main control management single board, and manages all resource information of the system;
其中,所述DRM_A作为DRM的代理模块运行在每个LR包括LR0和LRx所属的线卡上,与DRM进行端口资源信息交互;Wherein, the DRM_A runs as a proxy module of the DRM on the line card to which each LR includes LR0 and LRx, and performs port resource information exchange with the DRM;
其中,所述LR0下的DRM_A接收到DRM的端口资源信息后,把端口信息写资源库,并通过MIM进一步同步到接口管理模块,最终通过命令行或其他方式呈现给用户;Wherein, after DRM_A under the LR0 receives the port resource information of the DRM, it writes the port information to the resource library, and further synchronizes it to the interface management module through MIM, and finally presents it to the user through a command line or other means;
S502:LR0管理所有端口的共享或非共享信息,同时维护自身新建的 子接口或者虚拟子接口;S502: LR0 manages the shared or non-shared information of all ports, and at the same time maintains its own newly-created sub-interfaces or virtual sub-interfaces;
其中,所述共享端口可以共享给多个LRs,包括LR0或者LRx;Wherein, the shared port can be shared to multiple LRs, including LR0 or LRx;
其中,LR0可以看到所述共享出去的所有端口,和当前LR0下新建的子接口或者虚拟子接口,或其他类型的子接口;Among them, LR0 can see all the ports that are shared, and new sub-interfaces or virtual sub-interfaces under the current LR0, or other types of sub-interfaces;
其中,LR0可以管理维护所有端口的信息,包括并不限于:是否共享或独占、共享LRs列表信息以及其他相关信息。Among them, LR0 can manage and maintain the information of all ports, including but not limited to whether it is shared or exclusive, shared LRs list information, and other related information.
S503:LRx管理和维护自身新建的子接口或者虚拟子接口;S503: LRx manages and maintains its own newly-created sub-interfaces or virtual sub-interfaces;
其中,LRx可以看到已共享给自己的共享端口;Among them, LRx can see the shared port that has been shared to itself;
其中,LRx可以管理和维护所述共享端口以及新创建的子接口或者虚拟子接口。Among them, LRx can manage and maintain the shared port and the newly created sub-interface or virtual sub-interface.
可选地,本发明实施例提供了一种共享端口校验过程,包括如下步骤:Optionally, the embodiment of the present invention provides a shared port verification process, which includes the following steps:
共享端口分配时,首先要对端口进行检查校验,符合条件后,进行端口共享分配过程,如图6所示,本实施例提供了一种分享端口过滤检查机制,具体步骤如下:When the shared port is allocated, the port must first be checked and verified. After the conditions are met, the port sharing allocation process is performed. As shown in Figure 6, this embodiment provides a shared port filtering and checking mechanism. The specific steps are as follows:
S601:检查该端口及该端口所属单板是否被其他LRs独占,如果被其他LRs独占,则不可以进行共享;S601: Check whether the port and the board to which the port belongs are exclusively occupied by other LRs. If they are exclusively occupied by other LRs, they cannot be shared;
其中,所述端口校验是在DRM模块中进行;Wherein, the port verification is performed in the DRM module;
其中,所述端口或者端口所属单板被其他单板独占,需要对所述端口或者端口所属单板进行回收,回收之后,才能进行端口共享的分配;Wherein, the port or the single board to which the port belongs is exclusively occupied by other single boards, and the port or the single board to which the port belongs needs to be reclaimed. After reclaiming, the port sharing can be allocated;
S602:检查该共享端口已分配的LRs个数,如果超出最大LR共享同一端口限制则不可进行共享;S602: Check the number of LRs allocated to the shared port, if the maximum LR sharing the same port limit is exceeded, sharing is not allowed;
其中,所述最大LR共享同一端口限制是根据系统性能、用户使用量以及其他因素综合设定;Wherein, the maximum LR sharing the same port limit is comprehensively set according to system performance, user usage, and other factors;
S603:端口校验通过,进行端口共享的分配处理。S603: The port verification is passed, and the port sharing allocation processing is performed.
可选地,本发明实施例提供了一种共享端口分配和回收过程,包括如 下步骤:Optionally, the embodiment of the present invention provides a shared port allocation and recycling process, which includes the following steps:
端口的分配过程需要LR0进行写库管理,然后同步给其他的LRs,LR0进行端口资源的统一管理,如图7所示,具体步骤如下:The port allocation process requires LR0 to perform write library management, and then synchronize to other LRs. LR0 performs unified management of port resources, as shown in Figure 7. The specific steps are as follows:
S701:端口共享分配指令下发后,LP0中的DRM_A根据命令写配置库,同时通知DRM进一步处理;S701: After the port sharing allocation instruction is issued, DRM_A in LP0 writes the configuration library according to the command, and at the same time notifies DRM for further processing;
S702:DRM首先进行共享端口校验,校验通过,DRM首先把共享端口所属LR及其他相关信息写端口资源分配库,同时通过组播或其他消息机制把端口归属相关信息通告给其他的LRs;S702: DRM first performs shared port verification, and the verification passes. DRM first writes the LR and other related information of the shared port to the port resource allocation library, and at the same time advertises port ownership related information to other LRs through multicast or other message mechanisms;
S703:LR0中的DRM_A收到DRM发送的更新端口归属信息后,更新端口归属信息库,记录端口共享相关的LR等信息;S703: After DRM_A in LR0 receives the updated port attribution information sent by DRM, it updates the port attribution information database, and records information such as LR related to port sharing;
S704:LRx中的DRM_A收到DRM发送的更新端口归属信息后,判断如果是本LR的信息,更新端口归属信息库,同时通过组播或其他消息通知到MIM,最终通过命令提示或其他方式呈现给用户,使用户能看到当前LR下的端口信息;S704: After DRM_A in LRx receives the updated port ownership information sent by DRM, it determines if it is the information of this LR, updates the port ownership information database, and at the same time notifies MIM through multicast or other messages, and finally presents it through command prompts or other methods To the user, so that the user can see the port information under the current LR;
其中,所述共享端口回收过程和所述分配过程类似,LR0或者LRx接收到DRM的端口归属信息后,更新对应的端口信息归属库,其中LRx也通知到MIM,通过命令行或其他方式呈现给用户。Wherein, the shared port recovery process is similar to the allocation process. After receiving the port attribution information of DRM, LR0 or LRx updates the corresponding port information attribution database. LRx also informs MIM and presents it to MIM through command line or other methods. user.
可选地,本发明实施例提供了一种共享端口重分配过程,如图8所示,主要包括以下步骤:Optionally, the embodiment of the present invention provides a shared port redistribution process, as shown in FIG. 8, which mainly includes the following steps:
端口共享后,该端口以及所属单板均不能再分配给其他的LRs进行资源独占,如果需要分配所述端口或者端口所属的单板给其他LRs独占,需要对所述共享端口进行回收,如图8所示,具体步骤如下:After the port is shared, the port and the board to which it belongs can no longer be allocated to other LRs for resource exclusive use. If the port or the board to which the port belongs needs to be allocated to other LRs for exclusive use, the shared port needs to be recycled, as shown in the figure As shown in 8, the specific steps are as follows:
S801:如果端口或者端口所在的单板需要分给其他的LRs独占,首先要检查该端口已共享给哪些LRs,如果已分配共享,首先要对所述端口进行回收;S801: If the port or the board on which the port is located needs to be allocated to other LRs for exclusive use, first check which LRs the port has been shared with, and if it has been allocated for sharing, first reclaim the port;
S802:共享端口回收后,才可以把此端口或者所属单板分配给其他的 LRs进行独占;S802: After the shared port is reclaimed, the port or its own board can be allocated to other LRs for exclusive use;
其中,所述共享端口回收,具体是端口共享回收指令下发后,LP0中的DRM_A根据命令写配置库,更新端口归属信息库,同时同步到DRM;进一步的,DRM通过同步或者其他消息机制通知LRx进行删除端口信息分配库,已完成对共享端口的回收。Wherein, the shared port recovery, specifically, after the port shared recovery instruction is issued, DRM_A in LP0 writes the configuration database according to the command, updates the port attribution information database, and synchronizes to DRM; further, DRM is notified through synchronization or other message mechanisms LRx deletes the port information distribution library and has completed the recovery of the shared port.
本发明的实施例还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。The embodiment of the present invention also provides a storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the foregoing method embodiments when running.
可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的计算机程序:Optionally, in this embodiment, the aforementioned storage medium may be configured to store a computer program for executing the following steps:
S1,创建与物理路由器的共享端口对应的共享子端口,以及与所述共享子端口对应的虚拟子端口;S1, creating a shared sub-port corresponding to the shared port of the physical router, and a virtual sub-port corresponding to the shared sub-port;
S2,基于所述子端口和所述虚拟子端口为所述物理路由器的多个逻辑路由器进行端口共享。S2: Perform port sharing for multiple logical routers of the physical router based on the subport and the virtual subport.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。Optionally, in this embodiment, the foregoing storage medium may include, but is not limited to: U disk, Read-Only Memory (Read-Only Memory, ROM for short), Random Access Memory (Random Access Memory, RAM for short), Various media that can store computer programs, such as mobile hard disks, magnetic disks, or optical disks.
本发明的实施例还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。The embodiment of the present invention also provides a storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the foregoing method embodiments when running.
本发明的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。An embodiment of the present invention also provides an electronic device, including a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the foregoing method embodiments.
可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。Optionally, the aforementioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the aforementioned processor, and the input-output device is connected to the aforementioned processor.
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:Optionally, in this embodiment, the foregoing processor may be configured to execute the following steps through a computer program:
S1,创建与物理路由器的共享端口对应的共享子端口,以及与所述共享子端口对应的虚拟子端口;S1, creating a shared sub-port corresponding to the shared port of the physical router, and a virtual sub-port corresponding to the shared sub-port;
S2,基于所述子端口和所述虚拟子端口为所述物理路由器的多个逻辑路由器进行端口共享。S2: Perform port sharing for multiple logical routers of the physical router based on the subport and the virtual subport.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the above-mentioned embodiments and optional implementation manners, and details are not described herein again in this embodiment.
本发明的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。An embodiment of the present invention also provides an electronic device, including a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the foregoing method embodiments.
可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。Optionally, the aforementioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the aforementioned processor, and the input-output device is connected to the aforementioned processor.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the above-mentioned embodiments and optional implementation manners, and details are not described herein again in this embodiment.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的神经网络模型上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general computing device, and they can be concentrated on a single computing device or distributed on a nerve composed of multiple computing devices. On the network model, optionally, they can be implemented with program codes executable by a computing device, so that they can be stored in a storage device for execution by the computing device, and in some cases, they can be different from here. The steps shown or described are performed in the order of, or they are respectively fabricated into individual integrated circuit modules, or multiple modules or steps of them are fabricated into a single integrated circuit module to achieve. In this way, the present invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于 本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above are only preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various modifications and changes. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
工业实用性Industrial applicability
通过本公开,创建与物理路由器的共享端口对应的共享子端口,以及与所述共享子端口对应的虚拟子端口;基于所述子端口和所述虚拟子端口为所述物理路由器的多个逻辑路由器进行端口共享,即能够基于粒度更细的子端口和虚拟子端口进行端口共享,解决了相关技术中,对于多个抽象的逻辑路由器基于端口共享一个物理路由器时,端口利用率不高,影响用户体验等问题,进而提高了端口利用率。Through the present disclosure, a shared sub-port corresponding to the shared port of a physical router and a virtual sub-port corresponding to the shared sub-port are created; based on the sub-port and the virtual sub-port, multiple logical sub-ports of the physical router are created. The router performs port sharing, that is, it can perform port sharing based on finer granular sub-ports and virtual sub-ports, which solves the problem of low port utilization when multiple abstract logical routers share a physical router based on ports in related technologies. User experience and other issues have further improved port utilization.

Claims (10)

  1. 一种端口共享方法,包括:A port sharing method, including:
    创建与物理路由器的共享端口对应的共享子端口,以及与所述共享子端口对应的虚拟子端口;Creating a shared sub-port corresponding to the shared port of the physical router, and a virtual sub-port corresponding to the shared sub-port;
    基于所述子端口和所述虚拟子端口为所述物理路由器的多个逻辑路由器进行端口共享。Port sharing is performed for multiple logical routers of the physical router based on the subport and the virtual subport.
  2. 根据权利要求1所述的方法,其中,建立与物理路由器的共享端口对应的共享子端口,以及与所述共享子端口对应的虚拟子端口之后,所述方法还包括:The method according to claim 1, wherein after establishing a shared subport corresponding to a shared port of a physical router and a virtual subport corresponding to the shared subport, the method further comprises:
    通过所述多个逻辑路由器中的指定逻辑路由器获取并保存所述共享子端口和所述虚拟子端口的共享信息,其中,所述共享信息用于至少指示以下之一:已被共享的所有子端口;已被共享的所有子端口分别对应的逻辑路由器,其中,所述所有子端口包括以下至少之一:所述共享子端口,所述虚拟子端口。Acquire and save the shared information of the shared sub-port and the virtual sub-port through a designated logical router among the plurality of logical routers, where the shared information is used to indicate at least one of the following: all the sub-ports that have been shared Port; a logical router corresponding to all subports that have been shared, wherein all subports include at least one of the following: the shared subport, and the virtual subport.
  3. 根据权利要求1所述的方法,其中,基于所述子端口和所述虚拟子端口为所述物理路由器的多个逻辑路由器进行端口共享之前,所述方法还包括:The method according to claim 1, wherein, before performing port sharing for a plurality of logical routers of the physical router based on the sub-port and the virtual sub-port, the method further comprises:
    确定待共享的子端口以及所述待共享的子端口所在的单板是否已被逻辑路由器独占,其中,所述待共享的子端口包括:所述共享子端口和所述虚拟子端口;Determining whether the sub-port to be shared and the board on which the sub-port to be shared is located have been exclusively occupied by a logical router, wherein the sub-port to be shared includes: the shared sub-port and the virtual sub-port;
    如果是,则所述待共享的子端口禁止继续共享;If it is, the sub-port to be shared is prohibited from continuing to be shared;
    如果不是,则对所述待共享的子端口进行分配。If not, then allocate the sub-port to be shared.
  4. 根据权利要求3所述的方法,其中,对所述待共享的子端口进行分配之前,所述方法还包括:The method according to claim 3, wherein, before allocating the sub-ports to be shared, the method further comprises:
    检测所述待共享的子端口被分配的逻辑路由器的数量是否超过了设定阈值;Detecting whether the number of logical routers to which the sub-port to be shared is allocated exceeds a set threshold;
    如果是,则所述待共享的子端口禁止继续共享;If it is, the sub-port to be shared is prohibited from continuing to be shared;
    如果不是,则对所述待共享的子端口进行分配。If not, then allocate the sub-port to be shared.
  5. 根据权利要求1所述的方法,其中,建立与物理路由器的共享端口对应的共享子端口,以及与所述共享子端口对应的虚拟子端口之后,所述方法还包括:The method according to claim 1, wherein after establishing a shared subport corresponding to a shared port of a physical router and a virtual subport corresponding to the shared subport, the method further comprises:
    在检测到需要将待共享的子端口被逻辑路由器独占的情况下,确定所述待共享的子端口是否已被逻辑路由器共享,其中,所述待共享的子端口包括:所述共享子端口和所述虚拟子端口;In the case where it is detected that the sub-port to be shared needs to be exclusively occupied by the logical router, it is determined whether the sub-port to be shared has been shared by the logical router, wherein the sub-port to be shared includes: the shared sub-port and The virtual sub-port;
    如果是,则向第一逻辑路由器发送指令,以指示所述第一逻辑路由器回收所述待共享的子端口,其中,所述第一逻辑路由器共享了所述待共享的子端口。If yes, send an instruction to the first logical router to instruct the first logical router to reclaim the sub-port to be shared, where the first logical router shares the sub-port to be shared.
  6. 根据权利要求5所述的方法,其中,向所述第一逻辑路由器发送指令,以指示所述第一逻辑路由器回收所述待共享的子端口之后,所述方法还包括:The method according to claim 5, wherein after sending an instruction to the first logical router to instruct the first logical router to reclaim the sub-port to be shared, the method further comprises:
    将已回收的待共享的子端口分配给第二逻辑路由器进行独占。The reclaimed sub-ports to be shared are allocated to the second logical router for exclusive use.
  7. 一种端口共享装置,包括:A port sharing device includes:
    创建模块,设置为创建与物理路由器的共享端口对应的共享子端口,以及与所述共享子端口对应的虚拟子端口;A creation module, configured to create a shared sub-port corresponding to the shared port of the physical router, and a virtual sub-port corresponding to the shared sub-port;
    共享模块,设置为基于所述子端口和所述虚拟子端口为所述物理路由器的多个逻辑路由器进行端口共享。The sharing module is configured to perform port sharing for multiple logical routers of the physical router based on the sub-port and the virtual sub-port.
  8. 根据权利要求7所述的装置,其中,所述共享模块,还设置为通过所述多个逻辑路由器中的指定逻辑路由器获取并保存所述共享子端口和所述虚拟子端口的共享信息,其中,所述共享信息用于至少指示以下之一:已被共享的所有子端口;已被共享的所有子端口分别对应的逻辑路由器,其中,所述所有子端口包括以下至少之一:所述共享子端口,所述虚拟子端口。7. The device according to claim 7, wherein the sharing module is further configured to obtain and save the shared information of the shared sub-port and the virtual sub-port through a designated logical router among the plurality of logical routers, wherein , The sharing information is used to indicate at least one of the following: all sub-ports that have been shared; logical routers corresponding to all the sub-ports that have been shared, wherein all the sub-ports include at least one of the following: the shared Sub-port, the virtual sub-port.
  9. 一种计算机可读的存储介质,所述存储介质中存储有计算机 程序,其中,所述计算机程序被设置为运行时执行所述权利要求1至6中任一项中所述的方法。A computer-readable storage medium in which a computer program is stored, wherein the computer program is set to execute the method described in any one of claims 1 to 6 when running.
  10. 一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行所述权利要求1至6中任一项中所述的方法。An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the method described in any one of claims 1 to 6 .
PCT/CN2020/099025 2019-09-29 2020-06-29 Port sharing method and apparatus, storage medium and electronic apparatus WO2021057150A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910937025.7A CN111654385A (en) 2019-09-29 2019-09-29 Port sharing method and device, storage medium and electronic device
CN201910937025.7 2019-09-29

Publications (1)

Publication Number Publication Date
WO2021057150A1 true WO2021057150A1 (en) 2021-04-01

Family

ID=72346242

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/099025 WO2021057150A1 (en) 2019-09-29 2020-06-29 Port sharing method and apparatus, storage medium and electronic apparatus

Country Status (2)

Country Link
CN (1) CN111654385A (en)
WO (1) WO2021057150A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760359A (en) * 2022-04-12 2022-07-15 以萨技术股份有限公司 Method, system, server and computer readable storage medium for data sharing

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070140235A1 (en) * 2005-12-21 2007-06-21 Nortel Networks Limited Network visible inter-logical router links
US7415507B1 (en) * 2004-02-05 2008-08-19 Cisco Technology, Inc. Logical routers
US20110032830A1 (en) * 2009-08-06 2011-02-10 Jacobus Van Der Merwe Live Router Migration
CN102843286A (en) * 2011-06-24 2012-12-26 中兴通讯股份有限公司 Implementation method, device and system of virtual routers
CN106165358A (en) * 2014-03-21 2016-11-23 Nicira股份有限公司 Dynamic routing for router logic

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100337450C (en) * 2002-08-05 2007-09-12 华为技术有限公司 Communication method between virtual local area webs
US9225771B2 (en) * 2012-05-09 2015-12-29 Cisco Technology, Inc. Sharing excess committed network appliance resources
CN105681191B (en) * 2016-02-25 2019-04-30 烽火通信科技股份有限公司 SDN platform and implementation method based on router virtual

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7415507B1 (en) * 2004-02-05 2008-08-19 Cisco Technology, Inc. Logical routers
US20070140235A1 (en) * 2005-12-21 2007-06-21 Nortel Networks Limited Network visible inter-logical router links
US20110032830A1 (en) * 2009-08-06 2011-02-10 Jacobus Van Der Merwe Live Router Migration
CN102843286A (en) * 2011-06-24 2012-12-26 中兴通讯股份有限公司 Implementation method, device and system of virtual routers
CN106165358A (en) * 2014-03-21 2016-11-23 Nicira股份有限公司 Dynamic routing for router logic

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760359A (en) * 2022-04-12 2022-07-15 以萨技术股份有限公司 Method, system, server and computer readable storage medium for data sharing
CN114760359B (en) * 2022-04-12 2023-08-01 以萨技术股份有限公司 Method, system, server and computer readable storage medium for data sharing

Also Published As

Publication number Publication date
CN111654385A (en) 2020-09-11

Similar Documents

Publication Publication Date Title
US11704144B2 (en) Creating virtual machine groups based on request
US9999030B2 (en) Resource provisioning method
US9054958B2 (en) System and method for reducing information loss in an aggregated information handling system
CN103078965B (en) The IP address management method of virtual machine
CN108632063B (en) Method, device and system for managing network slice instances
WO2017161979A1 (en) Cloud platform-based method and device for managing servers
CN103200020A (en) Resource allocating method and resource allocating system
CN110830574B (en) Method for realizing intranet load balance based on docker container
CN106134141A (en) A kind of method and device updating network service describer NSD
CN111585887B (en) Communication method and device based on multiple networks, electronic equipment and storage medium
US20210176328A1 (en) Management Services for Distributed Computing Architectures Using Rolling Changes
CN113504954A (en) Method, system and medium for calling CSI LVM plug-in, dynamic persistent volume provisioning
CN108390956A (en) A kind of method and system for virtual machine configuration internet protocol address
CN106326226A (en) Method and system for starting database service on public cloud
WO2016095524A1 (en) Resource allocation method and apparatus
CN104506654A (en) Cloud computing system and backup method of dynamic host configuration protocol server
CN110224917B (en) Data transmission method, device and system and server
CN105704042A (en) Message processing method, BNG and BNG cluster system
CN109995890B (en) Method and server for managing Network Address Translation (NAT) gateway
JP2016116184A (en) Network monitoring device and virtual network management method
WO2021057150A1 (en) Port sharing method and apparatus, storage medium and electronic apparatus
CN104601412A (en) Independent test network system and establishing method thereof
US10305987B2 (en) Method to syncrhonize VSAN node status in VSAN cluster
CN112910796B (en) Traffic management method, apparatus, device, storage medium, and program product
CN111683164B (en) IP address configuration method and VPN service system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20870418

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20870418

Country of ref document: EP

Kind code of ref document: A1