CN111654385A - Port sharing method and device, storage medium and electronic device - Google Patents

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

Info

Publication number
CN111654385A
CN111654385A CN201910937025.7A CN201910937025A CN111654385A CN 111654385 A CN111654385 A CN 111654385A CN 201910937025 A CN201910937025 A CN 201910937025A CN 111654385 A CN111654385 A CN 111654385A
Authority
CN
China
Prior art keywords
port
sub
shared
ports
router
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910937025.7A
Other languages
Chinese (zh)
Inventor
徐峰
朱永庆
陈华南
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
Nanjing ZTE New Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing ZTE New Software Co Ltd filed Critical Nanjing ZTE New Software Co Ltd
Priority to CN201910937025.7A priority Critical patent/CN111654385A/en
Priority to PCT/CN2020/099025 priority patent/WO2021057150A1/en
Publication of CN111654385A publication Critical patent/CN111654385A/en
Pending legal-status Critical Current

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

Landscapes

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

Abstract

The embodiment of the invention provides a port sharing method and device, a storage medium and an electronic device, wherein the method comprises the following steps: creating a shared sub-port corresponding to a shared port of a physical router and a virtual sub-port corresponding to the shared sub-port; the technical scheme is adopted to solve the problems that when a plurality of abstract logic routers share one physical router based on the ports, the utilization rate of the ports is low, the user experience is influenced and the like in the related technology.

Description

Port sharing method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a port sharing method and apparatus, a storage medium, and an electronic apparatus.
Background
In an existing virtual network, in order to meet the requirements of services or services, a physical Router is usually abstracted into a plurality of Logical routers, where a Logical Router (LR) refers to a physical Router on which resources in the Router are divided into different subsets according to a certain resource division principle, and thus one physical Router is simulated into a plurality of routers executing separate routing tasks, which can provide functions previously executed by the plurality of physical routers, achieve independent and flexible management, reduce hardware and maintenance costs, and different users can access the LR independently without affecting each other.
In the aspect of port resource sharing among different logical routers LR, currently, a certain number of ports on a physical device are allocated to different LRs in units of ports, so as to achieve the purpose that different LRs share a physical port.
In the method, in an actual network environment, with the popularization of high bandwidths such as an optical network and the like, due to the difference of distribution conditions of users, the port resource utilization rate is not high due to the current port-based sharing mode, and the user experience is influenced.
Aiming at the problems that in the related technology, when a plurality of abstract logic routers share one physical router based on ports, the utilization rate of the ports is not high, the user experience is influenced and the like, an effective solution is not provided.
Disclosure of Invention
The embodiment of the invention provides a port sharing method and device, a storage medium and an electronic device, and aims to solve the problems that in the prior art, when a plurality of abstract logical routers share one physical router based on ports, the utilization rate of the ports is low, the user experience is influenced and the like.
According to an embodiment of the present invention, there is provided a port sharing method including: a method of port sharing, comprising: creating a shared sub-port corresponding to a shared port of a physical router and a virtual sub-port corresponding to the shared sub-port; port sharing is performed for a plurality of logical routers of the physical router based on the sub-ports and the virtual sub-ports.
In this embodiment of the present invention, after establishing a shared sub-port corresponding to a shared port of a physical router and a virtual sub-port corresponding to the shared sub-port, the method further includes: acquiring and storing, by a designated logical router of the plurality of logical routers, shared information of the shared sub-port and the virtual sub-port, wherein the shared information is used to indicate at least one of: all the sub-ports that have been shared; and all the sub-ports which are shared respectively correspond to the logic routers, wherein all the sub-ports comprise at least one of the following: the shared sub-port, the virtual sub-port.
In this embodiment of the present invention, before port sharing is performed for multiple logical routers of the physical router based on the sub-port and the virtual sub-port, the method further includes: determining whether a sub-port to be shared and a board where the sub-port to be shared is located are exclusively owned by a logical router, wherein the sub-port to be shared includes: the shared sub-port and the virtual sub-port; if yes, the sub-port to be shared forbids to continue sharing; and if not, allocating the sub-ports to be shared.
In this embodiment of the present invention, before allocating the sub-port to be shared, the method further includes: detecting whether the number of the logic routers distributed to the sub-ports to be shared exceeds a set threshold value; if yes, the sub-port to be shared forbids to continue sharing; and if not, allocating the sub-ports to be shared.
In this embodiment of the present invention, after establishing a shared sub-port corresponding to a shared port of a physical router and a virtual sub-port corresponding to the shared sub-port, the method further includes: under the condition that it is detected that a sub-port to be shared needs to be exclusively shared by a logic router, determining whether the sub-port to be shared is shared by the logic router, wherein the sub-port to be shared comprises: the shared sub-port and the virtual sub-port; if so, sending an instruction to a first logic router to instruct the first logic router to recycle the sub-port to be shared, wherein the first logic router shares the sub-port to be shared.
In this 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: and allocating the recovered sub-port to be shared to a second logic router for exclusive use.
According to another embodiment of the present invention, there is also provided a port sharing apparatus including: the system comprises a creating module and a processing module, wherein the creating module is used for creating a shared sub-port corresponding to a shared port of a physical router and a virtual sub-port corresponding to the shared sub-port; a sharing module, configured to perform port sharing for multiple logical routers of the physical router based on the sub-port and the virtual sub-port.
In this embodiment of the present invention, the sharing module is further configured to acquire and store, by a designated logical router of the plurality of logical routers, shared information of the shared sub-port and the virtual sub-port, where the shared information is used to indicate at least one of: all the sub-ports that have been shared; and all the sub-ports which are shared respectively correspond to the logic routers, wherein all the sub-ports comprise at least one of the following: the shared sub-port, the virtual sub-port.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, a sharing sub-port corresponding to a sharing port of a physical router and a virtual sub-port corresponding to the sharing sub-port are created; the ports of the plurality of logical routers of the physical router are shared based on the sub-ports and the virtual sub-ports, that is, the ports of the plurality of logical routers can be shared based on the sub-ports and the virtual sub-ports with finer granularity.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a computer terminal of a port sharing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a port sharing method according to an embodiment of the present invention;
fig. 3 is a block diagram of a port sharing apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a shared port module interaction according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating a method for managing a shared port according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating a method for verifying a shared port according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a shared port allocation and reclamation method according to an embodiment of the invention;
fig. 8 is a schematic diagram of a shared port reallocation method according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
The method provided by the embodiment 1 of the present application can be executed in a computer terminal or a similar computing device. Taking the example of running on a computer terminal, fig. 1 is a hardware structure block diagram of a computer terminal of 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 shown in fig. 1) processors 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, and optionally, a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of an application software, such as a computer program corresponding to the navigation method of the networked car reservation in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include 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 memory located remotely from the processor 102, which may be connected to the computer terminal 10 through a neural network model. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a port sharing method operating in a computer terminal is provided, and fig. 2 is a flowchart of the port sharing method according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, a sharing sub-port corresponding to a sharing port of a physical router and a virtual sub-port corresponding to the sharing sub-port are created;
step S204, based on the sub-port and the virtual sub-port, performing port sharing for a plurality of logical routers of the physical router.
According to the invention, a sharing sub-port corresponding to a sharing port of a physical router and a virtual sub-port corresponding to the sharing sub-port are created; the ports of the plurality of logical routers of the physical router are shared based on the sub-ports and the virtual sub-ports, that is, the ports of the plurality of logical routers can be shared based on the sub-ports and the virtual sub-ports with finer granularity.
In an optional embodiment of the present invention, after establishing a shared sub-port corresponding to a shared port of a physical router and a virtual sub-port corresponding to the shared sub-port, the method further includes: acquiring and storing, by a designated logical router of the plurality of logical routers, shared information of the shared sub-port and the virtual sub-port, wherein the shared information is used to indicate at least one of: all the sub-ports that have been shared; and all the sub-ports which are shared respectively correspond to the logic routers, wherein all the sub-ports comprise at least one of the following: the shared sub-port, 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 sub-port and the virtual sub-port, the method further includes: determining whether a sub-port to be shared and a board where the sub-port to be shared is located are exclusively owned by a logical router, wherein the sub-port to be shared includes: the shared sub-port and the virtual sub-port; if yes, the sub-port to be shared forbids to continue sharing; and if not, allocating the sub-ports to be shared.
In an optional embodiment of the present invention, before allocating the sub-port to be shared, the method further includes: detecting whether the number of the logic routers distributed to the sub-ports to be shared exceeds a set threshold value; if yes, the sub-port to be shared forbids to continue sharing; and if not, allocating the sub-ports to be shared.
In an optional embodiment of the present invention, after establishing a shared sub-port corresponding to a shared port of a physical router and a virtual sub-port corresponding to the shared sub-port, the method further includes: under the condition that it is detected that a sub-port to be shared needs to be exclusively shared by a logic router, determining whether the sub-port to be shared is shared by the logic router, wherein the sub-port to be shared comprises: the shared sub-port and the virtual sub-port; if so, sending an instruction to a first logic router to instruct the first logic router to recycle the sub-port to be shared, wherein the first logic 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: and allocating the recovered sub-port to be shared to a second logic router for exclusive use.
Therefore, according to the technical scheme of the embodiment of the invention, on the basis of physical port sharing, the method for sharing the sub-ports of the physical network equipment and simultaneously creating and managing the virtual sub-ports under the shared sub-ports in the virtual network equipment is provided, so that more detailed resource sharing of the network ports is realized, and the utilization rate of port resources and user experience are improved.
The specific implementation method can be summarized as a process of managing, checking, allocating, recovering, reallocating and the like of the shared port and the sub-port, wherein a default logical router (LR0) manages and maintains all information of the shared port and the sub-port of the current routing system, and simultaneously manages the related information of the virtual sub-port created based on the shared sub-port under the current default logical router; the non-default logic router LRx maintains the independent shared port and the sub-port or the information such as the virtual sub-port created based on the shared port, and the use of the shared sub-port and the newly created virtual sub-interface is not influenced by different LRs.
Compared with the prior art, the technical scheme of the embodiment of the invention can provide a method and a mechanism for creating and managing sharable sub-ports in a virtual network and creating and managing virtual sub-ports under the shared sub-ports, thereby further improving the port utilization rate and the user experience of network equipment.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a computer terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a port sharing device is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and the description already made is omitted for brevity. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 3 is a block diagram of a port sharing apparatus according to an embodiment of the present invention, as shown in fig. 3, the apparatus including:
a creating module 30, configured to create a shared sub-port corresponding to a shared port of a physical router, and a virtual sub-port corresponding to the shared sub-port;
a sharing module 32, 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 the invention, a sharing sub-port corresponding to a sharing port of a physical router and a virtual sub-port corresponding to the sharing sub-port are created; the ports of the plurality of logical routers of the physical router are shared based on the sub-ports and the virtual sub-ports, that is, the ports of the plurality of logical routers can be shared based on the sub-ports and the virtual sub-ports with finer granularity.
Optionally, the sharing module 32 is further configured to acquire and store, by a designated logical router of the plurality of logical routers, shared information of the shared sub-port and the virtual sub-port, where the shared information is used to indicate at least one of: all the sub-ports that have been shared; and all the sub-ports which are shared respectively correspond to the logic routers, wherein all the sub-ports comprise at least one of the following: the shared sub-port, the virtual sub-port.
In an optional embodiment of the present invention, the creating module 30 is further configured to: determining whether a child port to be shared and a board where the child port to be shared is located have been exclusively owned by a logical router, wherein the child port to be shared includes: the shared sub-port and the virtual sub-port; if yes, the sub-port to be shared forbids to continue sharing; and if not, allocating the sub-ports to be shared.
In an optional embodiment of the present invention, the creating module 30 is further configured to detect whether the number of logical routers allocated to the sub-port to be shared exceeds a set threshold; if yes, the sub-port to be shared forbids to continue sharing; and if not, allocating the sub-ports to be shared.
In an optional embodiment of the present invention, the sharing module 32 is further configured to, when it is detected that the sub-port to be shared needs to be exclusively shared by a logical router, determine whether the sub-port to be shared has already been shared by the logical router, where the sub-port to be shared includes: the shared sub-port and the virtual sub-port; if so, sending an instruction to a first logic router to instruct the first logic router to recycle the sub-port to be shared, wherein the first logic router shares the sub-port to be shared.
In an optional embodiment of the present invention, the sharing module 32 is further configured to allocate the recovered sub-port to be shared to the second logical router for exclusive use.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
The optional embodiment of the present invention provides a sharing mechanism and implementation for port resources of a physical network device in a virtual network device, and through the sharing mechanism, the flexibility of network port resource management, resource utilization rate and user experience are greatly improved, and the interaction process of each module based on the port sharing mechanism is further described below with reference to fig. 4.
As shown in fig. 4, the SC is a system management control entity, and resides on the master, and includes a device resource management module (DRM), etc.; LR0 is a logical router management default entity that may include a command line interface module (CLI), a Model Information Module (MIM), and a device resource management agent module (DRM _ a); LRx is a non-default logical router entity, and includes MIM module and DRM _ a module.
The system initial state DRM module informs a DRM _ A agent module of LR0 through single board port information and physical connection information of resource management through multicast or other message mechanisms, further synchronizes the DRM _ A agent module to the MIM module, and finally presents port resources to a user through a command line or other interactive interfaces, namely, a shared port belongs to LR0 by default when port sharing configuration is not performed;
if the user performs attribution configuration on the port sharing to other LRx through a command line, a CLI module in LR0 synchronizes the port sharing information to DRM in SC through MIM and DRM _ A modules in a message mode, and simultaneously performs local port attribution information writing library; then DRM synchronizes the relative information of the shared port to each LRx through multicast or other message mechanisms, after each LRx receives the information, judges if the information belongs to the message according to the LR identification ID carried by the message, and performs the relative processing of the shared port resource writing base, the synchronization MIM module, and the like, and performs the subsequent management including creation, maintenance, and the like, and finally presents the shared port information to the user under the LRx.
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The example of the invention defines a port sharing method in a virtual network, and the main interactive process comprises the following steps: the method comprises a system port resource management process, a shared port verification process, a shared port allocation process and a shared port reallocation process.
Optionally, an embodiment of the present invention provides a shared port management process, including the following steps:
as shown in fig. 5, the embodiment provides a shared port management mechanism, and the specific steps are as follows:
s501: in a virtual network router environment, DRM acquires the current physical port resource information and physical connection information of a system through resource reporting or other modes, wherein the default of the system is that all ports belong to LR0, the resource attribution information is written into a library and single-board physical location information of LR operation of LR0 is collected through a Logic Router Module (LRM), and then the port resource information is synchronized to DRM _ A in LR0 through multicast or other message mechanisms;
wherein the port resource information of the DRM synchronized DRM _ a includes: physical slot position information and related attributes of the port;
the DRM system runs on a system master control management single board and manages all resource information of the system;
the DRM _ A is used as a DRM agent module to run on a line card to which each LR comprises LR0 and LRx, and performs port resource information interaction with the DRM;
after receiving port resource information of the DRM, the DRM _ a under LR0 writes the port information in a resource library, further synchronizes to the interface management module through the MIM, and finally presents the port information to the user through a command line or other means;
s502: LR0 manages the shared or non-shared information of all ports, and maintains the new sub-interface or virtual sub-interface;
wherein, the sharing port can be shared to a plurality of LRs, including LR0 or LRx;
all the shared ports, the new subinterfaces or virtual subinterfaces under the current LR0, or other types of subinterfaces can be seen by the LR 0;
LR0 may manage information for maintaining all ports, including but not limited to: whether shared or exclusive, sharing LRs list information, and other related information.
S503: LRx manages and maintains the new sub-interface or virtual sub-interface;
wherein, LRx can see the shared port shared to itself;
wherein LRx can manage and maintain the shared port and the newly created sub-interface or virtual sub-interface.
Optionally, an embodiment of the present invention provides a shared port verification process, including the following steps:
when allocating a shared port, firstly, checking and verifying the port, and after the port meets the condition, performing a port sharing allocation process, as shown in fig. 6, this embodiment provides a shared port filtering and checking mechanism, which specifically includes the following steps:
s601: checking whether the port and the single board to which the port belongs are exclusively occupied by other LRs, if so, not sharing;
wherein the port check is performed in a DRM module;
the port or the board to which the port belongs is monopolized by other boards, and the port or the board to which the port belongs needs to be recovered, and after the port or the board to which the port belongs is recovered, the port sharing can be allocated;
s602: checking the number of the LRs distributed by the sharing port, and if the number exceeds the limit of the maximum LR sharing the same port, the sharing can not be carried out;
wherein, the maximum LR sharing the same port limit is comprehensively set according to system performance, user usage amount and other factors;
s603: and the port passes the verification and the allocation processing of port sharing is carried out.
Optionally, an embodiment of the present invention provides a shared port allocation and recovery process, including the following steps:
the port allocation process needs LR0 to perform write library management, and then performs unified management of port resources for other LRs, LR0 in synchronization, as shown in fig. 7, the specific steps are as follows:
s701: after the port sharing distribution instruction is issued, the DRM _ A in the LP0 writes a configuration library according to the command and simultaneously informs the DRM to further process;
s702: the DRM firstly checks the shared port, and the DRM firstly writes LR to which the shared port belongs and other related information into a port resource allocation library and simultaneously informs the port attribution related information to other LRs through multicast or other message mechanisms;
s703: after receiving the updated port attribution information sent by the DRM, the DRM _ A in the LR0 updates the port attribution information base and records the LR and other information related to port sharing;
s704: after receiving the updated port attribution information sent by DRM, DRM _ A in LRx judges that if the updated port attribution information is the information of the LR, updates a port attribution information base, simultaneously informs the MIM through multicast or other information, and finally presents the port attribution information to a user through command prompt or other modes, so that the user can see the port information under the current LR;
the shared port recycling process is similar to the distributing process, and after the LR0 or LRx receives the port attribution information of the DRM, the corresponding port information attribution library is updated, wherein the LRx also notifies the MIM and presents the port attribution library to the user through a command line or other means.
Optionally, an embodiment of the present invention provides a shared port reallocation process, as shown in fig. 8, which mainly includes the following steps:
after the port is shared, the port and the board to which the port belongs cannot be reallocated to other LRs for exclusive resource consumption, and if the port needs to be allocated or the board to which the port belongs needs to be allocated to other LRs for exclusive resource consumption, the shared port needs to be recovered, as shown in fig. 8, the specific steps are as follows:
s801: if a port or a board where the port is located needs to be assigned to other LRs for monopolizing, firstly checking which LRs the port has been shared to, and if sharing is assigned, firstly recovering the port;
s802: after the shared port is recovered, the port or the board to which the port belongs can be allocated to other LRs for exclusive use;
after the shared port is recycled, specifically, after a port shared recycling instruction is issued, the DRM _ a in LP0 writes a configuration library according to a command, updates a port attribution information library, and synchronizes to DRM; further, the DRM notifies the LRx to delete the port information distribution library through synchronization or other message mechanisms, and the recovery of the shared port is completed.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, creating a sharing sub-port corresponding to the sharing port of the physical router and a virtual sub-port corresponding to the sharing sub-port;
s2, based on the sub-port and the virtual sub-port, performing port sharing for a plurality of logical routers of the physical router.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, creating a sharing sub-port corresponding to the sharing port of the physical router and a virtual sub-port corresponding to the sharing sub-port;
s2, based on the sub-port and the virtual sub-port, performing port sharing for a plurality of logical routers of the physical router.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented in a general purpose computing device, they may be centralized on a single computing device or distributed across a neural network model comprised of multiple computing devices, and alternatively, they may be implemented in program code executable by a computing device, such that they may be stored in a memory device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for port sharing, comprising:
creating a shared sub-port corresponding to a shared port of a physical router and a virtual sub-port corresponding to the shared sub-port;
port sharing is performed for a plurality of logical routers of the physical router based on the sub-ports and the virtual sub-ports.
2. The method of claim 1, wherein after establishing a shared sub-port corresponding to a shared port of a physical router and a virtual sub-port corresponding to the shared sub-port, the method further comprises:
acquiring and storing, by a designated logical router of the plurality of logical routers, shared information of the shared sub-port and the virtual sub-port, wherein the shared information is used to indicate at least one of: all the sub-ports that have been shared; and all the sub-ports which are shared respectively correspond to the logic routers, wherein all the sub-ports comprise at least one of the following: the shared sub-port, the virtual sub-port.
3. The method of claim 1, wherein prior to port sharing for multiple logical routers of the physical router based on the sub-port and the virtual sub-port, the method further comprises:
determining whether a sub-port to be shared and a board where the sub-port to be shared is located are exclusively owned by a logical router, wherein the sub-port to be shared includes: the shared sub-port and the virtual sub-port;
if yes, the sub-port to be shared forbids to continue sharing;
and if not, allocating the sub-ports to be shared.
4. The method of claim 3, wherein prior to allocating the sub-port to be shared, the method further comprises:
detecting whether the number of the logic routers distributed to the sub-ports to be shared exceeds a set threshold value;
if yes, the sub-port to be shared forbids to continue sharing;
and if not, allocating the sub-ports to be shared.
5. The method of claim 1, wherein after establishing a shared sub-port corresponding to a shared port of a physical router and a virtual sub-port corresponding to the shared sub-port, the method further comprises:
under the condition that it is detected that a sub-port to be shared needs to be exclusively shared by a logic router, determining whether the sub-port to be shared is shared by the logic router, wherein the sub-port to be shared comprises: the shared sub-port and the virtual sub-port;
if so, sending an instruction to a first logic router to instruct the first logic router to recycle the sub-port to be shared, wherein the first logic router shares the sub-port to be shared.
6. The method of claim 5, wherein after sending an instruction to the first logical router to instruct the first logical router to reclaim the sub-ports to be shared, the method further comprises:
and allocating the recovered sub-port to be shared to a second logic router for exclusive use.
7. A port sharing device, comprising:
the system comprises a creating module and a processing module, wherein the creating module is used for creating a shared sub-port corresponding to a shared port of a physical router and a virtual sub-port corresponding to the shared sub-port;
a sharing module, configured to perform port sharing for multiple logical routers of the physical router based on the sub-port and the virtual sub-port.
8. The apparatus of claim 7, wherein the sharing module is further configured to obtain and save, by a designated logical router of the plurality of logical routers, shared information of the shared sub-port and the virtual sub-port, wherein the shared information is used to indicate at least one of: all the sub-ports that have been shared; and all the sub-ports which are shared respectively correspond to the logic routers, wherein all the sub-ports comprise at least one of the following: the shared sub-port, the virtual sub-port.
9. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method of any one of claims 1 to 6 when executed.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 6.
CN201910937025.7A 2019-09-29 2019-09-29 Port sharing method and device, storage medium and electronic device Pending CN111654385A (en)

Priority Applications (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
PCT/CN2020/099025 WO2021057150A1 (en) 2019-09-29 2020-06-29 Port sharing method and apparatus, storage medium and electronic apparatus

Applications Claiming Priority (1)

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

Publications (1)

Publication Number Publication Date
CN111654385A true CN111654385A (en) 2020-09-11

Family

ID=72346242

Family Applications (1)

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

Country Status (2)

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

Families Citing this family (1)

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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1474564A (en) * 2002-08-05 2004-02-11 ��Ϊ�������޹�˾ Communication method between virtual local area webs
CN102843286A (en) * 2011-06-24 2012-12-26 中兴通讯股份有限公司 Implementation method, device and system of virtual routers
US20130301652A1 (en) * 2012-05-09 2013-11-14 Cisco Technology, Inc., A Corporation Of California Sharing Excess Committed Network Appliance Resources
CN105681191A (en) * 2016-02-25 2016-06-15 武汉烽火网络有限责任公司 SDN (Software Defined Network) platform based on router virtualization and implementation method

Family Cites Families (4)

* 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
EP3120511B1 (en) * 2014-03-21 2019-11-06 Nicira Inc. Dynamic routing for logical routers

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1474564A (en) * 2002-08-05 2004-02-11 ��Ϊ�������޹�˾ Communication method between virtual local area webs
CN102843286A (en) * 2011-06-24 2012-12-26 中兴通讯股份有限公司 Implementation method, device and system of virtual routers
US20130301652A1 (en) * 2012-05-09 2013-11-14 Cisco Technology, Inc., A Corporation Of California Sharing Excess Committed Network Appliance Resources
CN105681191A (en) * 2016-02-25 2016-06-15 武汉烽火网络有限责任公司 SDN (Software Defined Network) platform based on router virtualization and implementation method

Also Published As

Publication number Publication date
WO2021057150A1 (en) 2021-04-01

Similar Documents

Publication Publication Date Title
US11714671B2 (en) Creating virtual machine groups based on request
EP2879060B1 (en) Cloud application disaster recovery method, system and device
CN103703724A (en) Resource payment method
CN110224917B (en) Data transmission method, device and system and server
CN110661824B (en) Flow control method of server in distributed cluster and storage medium
CN104216835A (en) Method and device for implementing memory fusion
CN103078965A (en) IP (Internet Protocol) address management method of virtual machines
US20230176929A1 (en) Resource allocation method and apparatus based on edge computing
CN114650223B (en) Network configuration method and device of Kubernetes cluster and electronic equipment
EP3358795B1 (en) Method and apparatus for allocating a virtual resource in network functions virtualization (nfv) network
CN105786732A (en) Data access method and apparatus
CN111654385A (en) Port sharing method and device, storage medium and electronic device
CN106302075B (en) A kind of method and device creating logical volume
CN115866059A (en) Block chain link point scheduling method and device
CN103929378A (en) Method and system for allocating communication link for transmitting cross-domain data and method and system for transmitting cross-domain data
CN107454021B (en) Communication method and device
CN113504878A (en) File writing method and device, storage medium and electronic device
CN113452729A (en) Serial number determination method, equipment and storage medium
CN112100283B (en) Linux platform based time-sharing multiplexing method for android virtual machine
CN111885140B (en) Cloud application mixing method and device based on Flannel network
CN108733693A (en) Data managing method, device, storage medium and processor
CN112559185B (en) Chip resource allocation method, device, network equipment and computer storage medium
CN103118141B (en) A kind of cloud dispositions method towards multinode
CN113900807A (en) Port allocation method, device and system
CN110045930B (en) Method, device, equipment and medium for virtual platform to manage storage equipment volume

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20210202

Address after: 518057 No. 55 South Science and technology road, Shenzhen, Guangdong, Nanshan District

Applicant after: ZTE Corp.

Address before: 210012 No. 68, Bauhinia Road, Ningnan street, Yuhuatai District, Nanjing, Jiangsu

Applicant before: Nanjing Zhongxing Software Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20200911

RJ01 Rejection of invention patent application after publication