CN110177010B - Link switching method and device - Google Patents

Link switching method and device Download PDF

Info

Publication number
CN110177010B
CN110177010B CN201910374149.9A CN201910374149A CN110177010B CN 110177010 B CN110177010 B CN 110177010B CN 201910374149 A CN201910374149 A CN 201910374149A CN 110177010 B CN110177010 B CN 110177010B
Authority
CN
China
Prior art keywords
server
link
network port
internet access
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910374149.9A
Other languages
Chinese (zh)
Other versions
CN110177010A (en
Inventor
古金峰
黄勇
夏裕坚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Comba Network Systems Co Ltd
Original Assignee
Comba Network Systems 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 Comba Network Systems Co Ltd filed Critical Comba Network Systems Co Ltd
Priority to CN201910374149.9A priority Critical patent/CN110177010B/en
Publication of CN110177010A publication Critical patent/CN110177010A/en
Application granted granted Critical
Publication of CN110177010B publication Critical patent/CN110177010B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols

Abstract

The application discloses a link switching method and device, belonging to the technical field of communication, which is applied to a server comprising at least two network ports, wherein each network port is connected with a link interface, a plurality of network elements are arranged between the network port and the link interface, and the plurality of network elements form a physical link between the network port and the link interface, and the link switching method comprises the following steps: if the physical link between the first internet access currently used by the server and the first link interface is determined to meet the preset fault condition, starting a second internet access in the server; determining the MAC address of the second network port according to the stored corresponding relation between the network port and the MAC address; and sending a message for broadcasting the MAC address of the second internet access to each client through the physical link between the second internet access and the second link interface, so that each client switches to use the physical link between the second internet access and the second link interface to carry out conversation with the server, thus the influence on the client is small, and the stability of the server is good.

Description

Link switching method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a link switching method and apparatus.
Background
With the development of information technology, more and more Client Service (CS) modes appear in communication systems, and a networking structure of 1588 servers and base stations belongs to the CS mode.
Generally, in the CS mode, a server leaves a network port, the network port is connected to a link interface, and a plurality of network elements, such as a two-layer switch, are included between the network port and the link interface, and form a plurality of physical links between the network port and the link interface, and the server communicates with each client through the plurality of physical links, where each physical link includes not only a plurality of network elements but also a plurality of network wires for connecting the network elements and a converter for continuing the network wires.
Therefore, the prior art has the problem that the stability of the server is poor due to the fact that a physical link between the server and the client is prone to damage.
Disclosure of Invention
The embodiment of the application provides a link switching method and a link switching device, which are used for solving the problem that in the prior art, the stability of a server is poor due to the fact that a physical link between the server and a client is prone to damage.
In a first aspect, a link switching method provided in an embodiment of the present application is applied to a server, where the server includes at least two ports, each port is connected to one link interface, a plurality of network elements are included between the ports and the link interfaces, and the plurality of network elements form a physical link between the port and the link interface, and the method includes:
if the physical link between the first internet access currently used by the server and the first link interface is determined to meet the preset fault condition, starting a second internet access in the server;
determining a Media Access Control (MAC) address of the second network port according to a corresponding relation between the stored network port and the MAC address;
and sending a message for broadcasting the MAC address of the second internet access to each client through a physical link between the second internet access and a second link interface, so that each client switches to use the physical link between the second internet access and the second link interface to carry out conversation with the server according to the message.
In the embodiment of the application, if the physical link between the first internet access currently used by the server and the first link interface is determined to meet the preset fault condition, the second internet access in the server is started, determining the MAC address of the second network port according to the stored corresponding relation between the network port and the MAC address, sending a message for broadcasting the MAC address of the second internet access to each client through a physical link between the second internet access and the second link interface, so that each client switches to use the physical link between the second internet access and the second link interface to carry out conversation with the server according to the message, therefore, if the physical link between the first internet access and the first link interface which is currently used by the server fails, the session with each client can be switched to the session with the physical link between the second internet access and the second link interface, so that the influence on the client is small, and the stability of the server is good.
Optionally, the preset fault condition comprises any one or more of:
currently, no client carries out conversation with the server through the first internet access;
and N clients which are successfully accessed into the server through the first internet access recently can not ping, and no client successfully accesses into the server through the first internet access within a preset time, wherein N is an integer greater than zero.
Optionally, if it is determined that a physical link between a first internet access currently used by the server and the first link interface meets a preset fault condition, the method further includes:
and closing the first network port.
By adopting the scheme, when the physical link used by the server is switched, the network Protocol (IP) address of the server is kept unchanged, only the MAC address is switched, and the cost of IP resources is relatively low.
Optionally, the method further comprises:
reading state information of PHY chips connected with the first network port and the second network port in the server, wherein the state information is used for representing the state whether the first network port and the second network port are closed or not; and
before sending a message for broadcasting the MAC address of the second network port to each client via a physical link between the second network port and the second link interface, the method further includes:
and determining that the first internet access is in a closed state and the second internet access is in an open state according to the state information of the PHY chip.
Optionally, the server is a central unit CU in a fifth generation 5G mobile communication network, and each client is a distribution unit DU in the 5G mobile communication network;
the server is a time service server, and each client is a base station; alternatively, the first and second electrodes may be,
the server is an extension unit CP and each client is a remote unit DP.
In a second aspect, a link switching apparatus provided in an embodiment of the present application is applied to a server, where the server includes at least two ports, each port is connected to one link interface, a plurality of network elements are included between the port and the link interface, and the plurality of network elements form a physical link between the port and the link interface, and the apparatus includes:
the network port management module is used for starting a second network port in the server if the fact that a physical link between a first network port currently used by the server and a first link interface meets a preset fault condition is determined;
a determining module, configured to determine, according to a correspondence between a stored network port and a media access control MAC address, an MAC address of the second network port;
and the sending module is used for sending a message for broadcasting the MAC address of the second internet access to each client through a physical link between the second internet access and the second link interface, so that each client switches to use the physical link between the second internet access and the second link interface to carry out conversation with the server according to the message.
Optionally, the preset fault condition comprises any one or more of:
currently, no client carries out conversation with the server through the first internet access;
and N clients which are successfully accessed into the server through the first internet access recently can not ping, and no client successfully accesses into the server through the first internet access within a preset time, wherein N is an integer larger than zero.
Optionally, the portal management module is further configured to:
and if the physical link between the first internet access currently used by the server and the first link interface is determined to meet the preset fault condition, closing the first internet access.
Optionally, the method further comprises:
a reading module, configured to read status information of a PHY chip in the server, where the PHY chip is connected to both the first port and the second port, and the status information is used to indicate whether the first port and the second port are closed or not;
the sending module is further configured to determine that the first network port is in a closed state and the second network port is in an open state according to the state information of the PHY chip before sending a packet for broadcasting the MAC address of the second network port to each client through a physical link between the second network port and the second link interface.
Optionally, the server is a central unit CU in a fifth generation 5G mobile communication network, and each client is a distribution unit DU in the 5G mobile communication network;
the server is a time service server, and each client is a base station; alternatively, the first and second electrodes may be,
the server is an extension unit CP and each client is a remote unit DP.
In a third aspect, an embodiment of the present application provides an electronic device, including: at least one processor, and a memory communicatively coupled to the at least one processor, wherein:
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the above-described link switching method.
In a fourth aspect, an embodiment of the present application provides a computer-readable medium, which stores computer-executable instructions for performing the above link switching method.
In addition, for technical effects brought by any one of the design manners in the second aspect to the fourth aspect, reference may be made to technical effects brought by different implementation manners in the first aspect, and details are not described here.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic diagram of a link switching system according to an embodiment of the present application;
fig. 2 is a flowchart of a link switching method according to an embodiment of the present disclosure;
fig. 3 is a schematic hardware structure diagram of an electronic device for implementing a link switching method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a link switching device according to an embodiment of the present application.
Detailed Description
In order to solve the problem that in the prior art, a physical link between a server and a client is prone to damage, which causes poor stability of the server, embodiments of the present application provide a link switching method and apparatus.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it should be understood that the preferred embodiments described herein are merely for illustrating and explaining the present application, and are not intended to limit the present application, and that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Referring to fig. 1, fig. 1 shows a schematic diagram of a link switching system provided in an embodiment of the present application, including a server, a link system, and a plurality of clients, where the server includes two network ports: a network port 1 and a network port 2; the network port 1 is connected with the interface of the link 1, a plurality of two-layer switches are arranged between the network port 1 and the interface of the link 1, and the two-layer switches form a physical link between the network port 1 and the interface of the link 1; the network port 2 is connected with the link 2 interface, a plurality of two-layer switches are arranged between the network port 2 and the link 2 interface, the two-layer switches form a physical link between the network port 2 and the link 2 interface, and the server can converse with each client through any physical link, wherein, the two-layer switches between the network port 1 and the link 1 interface and the two-layer switches between the network port 2 and the link 2 interface can be completely different or partially same, and the less the two-layer switches are, the better the link backup effect is.
In specific implementation, when the server is a Centralized Unit (CU) in a Fifth Generation (5G) mobile communication network, each client is a Distributed Unit (DU) in the 5G mobile communication network; when the server is a time service server, each client is a base station; when the server is an extended unit (CP) in the pico base station, each client is a remote unit (DP) in the pico base station.
Assuming that the current server uses the physical link between the network port 1 and the link 1 interface to perform a session with each client, in this process, if it is determined that the physical link between the network port 1 and the link 1 interface satisfies a preset fault condition, if no client performs a session with the server through the network port 1, the network port 1 may be closed through Field-Programmable Gate Array (FPGA) programming, the network port 2 may be opened, the MAC address of the network port 2 may be determined according to a stored correspondence between the physical link and the MAC address, and then a message for broadcasting the MAC address of the network port 2 may be sent to each client through the physical link between the network port 2 and the link 2 interface, so that each client may switch to use the physical link between the network port 2 and the link 2 interface to perform a session with the server according to the received message.
Therefore, if the physical link between the first internet access and the first link interface which is currently used by the server fails, the session with each client can be switched to the session with the physical link between the second internet access and the second link interface, so that the influence on the client is small, and the stability of the server is good.
In addition, in the application, each network port corresponds to a dedicated MAC address, and when a physical link is switched, the IP address of the server may be kept unchanged, and only the MAC address is switched, so that the overhead of IP resources is relatively low.
In order to ensure that only the MAC address of the server needs to be changed and the IP address of the server does not need to be changed before and after the physical link is switched, before a packet for broadcasting the MAC address of the network port 2 is sent to each client through the physical link between the network port 2 and the link 2 interface, state information of a PHY chip of a physical interface transceiver connected to both the network port 1 and the network port 2 in the server may also be read, where the state information is used to represent the state of whether the network port 1 and the network port 2 are closed or not, and the network port 1 is determined to be in a closed state and the network port 2 is determined to be in an open state according to the state information of the PHY chip.
In addition, the physical link between the network port 1 and the link 1 interface and the physical link between the network port 2 and the link 2 interface both belong to a service link, and the server may further include a control link, the control link being connected to another network port in the server (not shown in fig. 1), and in particular, the service link and the control link of the server may be separated by using a routing policy, so that service data and control data may be separated, and the security of the service data and the system may be enhanced.
As shown in fig. 2, a flowchart of a link switching method provided in the embodiment of the present application includes the following steps:
s201: and determining that a physical link between a first internet access currently used by the server and a first link interface meets a preset fault condition.
Wherein the preset fault condition comprises any one or more of the following:
currently, no client carries out conversation with the server through the first internet access;
the N clients which successfully access the server through the first internet access recently can not ping and none of the clients successfully access the server through the first internet access within a preset time length, wherein N is an integer larger than zero.
S202: and closing the first network port and opening the second network port.
Here, after the first portal is successfully closed, the physical link between the first portal and the first link interface is unavailable, and after the second portal is successfully opened, the physical link between the second portal and the second link interface is available.
S203: and reading the state information of the PHY chip connected with the first network port and the second network port in the server, wherein the state information is used for representing the state whether the first network port and the second network port are closed or not.
For example, for the first network port, if the state information corresponding to the PHY chip is TRUE, it represents that the first network port is in an open state; if the state information corresponding to the PHY chip is FALSE, the first network port is in a closed state; the second network port is similar and will not be described herein.
S204: judging whether the first internet access is in a closed state and the second internet access is in an open state according to the state information of the PHY chip, if so, entering S205; otherwise, return to S202.
S205: and sending a message for broadcasting the MAC address of the second network port to each client through a physical link between the second network port and the second link interface, so that each client switches to use the physical link between the second network port and the second link interface to carry out conversation with the server according to the message.
For example, a free Address Resolution Protocol (ARP) message may be sent to each client via a physical link between the second network port and the second link interface, so that each client may update the IP Address and the MAC Address of the server stored therein after receiving the ARP message, and subsequently perform a session with the server using the physical link between the second network port and the second link interface according to the updated IP Address and MAC Address of the server.
In the embodiment of the application, if the physical link between the first internet access currently used by the server and the first link interface is determined to meet the preset fault condition, the second internet access in the server is started, determining the MAC address of the second network port according to the stored corresponding relation between the network port and the MAC address, sending a message for broadcasting the MAC address of the second internet access to each client through a physical link between the second internet access and the second link interface, so that each client switches to use the physical link between the second internet access and the second link interface to carry out conversation with the server according to the message, therefore, if the physical link between the first internet access and the first link interface which is currently used by the server fails, the session with each client can be switched to the session with the physical link between the second internet access and the second link interface, so that the influence on the client is small, and the stability of the server is good. In addition, in the application, each network port corresponds to a MAC address dedicated to the network port, when a network port is switched, the IP address of the server remains unchanged, only the MAC address is switched, and the overhead of IP resources is also relatively small.
The above process is described below with reference to specific embodiments.
In specific implementation, after the server is started, the service link and the control link may be separated by using a routing policy, for example, the service gateway and the control gateway are respectively bound to different routing tables by using a routing table, such as the following binding commands:
ip route add 10.10.10.8/24dev eth0table 100;
ip route add default via 10.10.10.254table 100;
ip rule add from 10.10.10.18table 100pref 30000;
therefore, the service data can be separated from the control data, and the safety of the service data and the system is enhanced.
Further, the server may periodically read the value of the bottom PHY chip, if it is determined that the port 1 is in place according to the value of the PHY chip, the port 1 is opened by bottom FPGA programming, and the port 2 is closed, then a free ARP packet is sent to broadcast the IP address of the server and the dedicated MAC address corresponding to the port 1, wait for the connection of the client, if after a set time, such as 2 minutes, no client successfully connects the server through the port 1, close the port 1 by FPGA programming, open the port 2, then send a free ARP packet to broadcast the IP address of the server and the dedicated MAC address corresponding to the port 2, wait for the connection … of the client to sequentially poll the two ports, stop polling until a certain port is detected to have a relevant service data packet, and detect the relevant service data packet.
If it is assumed that the physical link between the network port 1 and the link interface 1 is detected as the network port 1, the server subsequently uses the physical link between the network port 1 and the link interface 1 to perform a session with each client, and in the process of using the physical link between the network port 1 and the link interface 1, if it is detected that no client currently performs a session with the server through the network port 1 and 5 clients which have recently successfully accessed the server through the network port 1 cannot ping and no client has successfully accessed the server through the network port 1 after waiting for 2 minutes, it is determined that the physical link between the network port 1 and the link interface 1 has failed, and at this time, the step of periodically reading the value of the underlying PHY chip can be returned again.
Therefore, the damage problem of the physical link is processed by combining the session condition of the client, the ping mechanism and the waiting time, a complex detection and test mechanism is not needed, and the processing method is simple and efficient.
Referring to fig. 3, a schematic structural diagram of an electronic device provided in this embodiment of the present disclosure includes a transceiver 301 and a processor 302, where the processor 302 may be a Central Processing Unit (CPU), a microprocessor, an application specific integrated circuit, a programmable logic circuit, a large scale integrated circuit, or a digital processing unit. The transceiver 301 is used for data transmission and reception between the electronic device and other devices.
The electronic device may further comprise a memory 303 for storing software instructions executed by the processor 302, but may also store some other data required by the electronic device, such as identification information of the electronic device, encryption information of the electronic device, user data, etc. The memory 303 may be a volatile memory (RAM), such as a random-access memory (RAM); the memory 303 may also be a non-volatile memory (non-volatile memory) such as a read-only memory (ROM), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD), or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this. The memory 303 may be a combination of the above memories.
The specific connection medium between the processor 302, the memory 303 and the transceiver 301 is not limited in the embodiment of the present application. In fig. 3, the embodiment of the present application is described by taking only the case where the memory 303, the processor 302, and the transceiver 301 are connected by the bus 304 as an example, the bus is shown by a thick line in fig. 3, and the connection manner between other components is merely illustrative and not limited. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 3, but this does not mean only one bus or one type of bus.
The processor 302 may be dedicated hardware or a processor running software, and when the processor 302 can run software, the processor 302 reads software instructions stored in the memory 303 and executes the link switching method involved in the foregoing embodiments under the drive of the software instructions.
When the method provided in the embodiments of the present application is implemented in software or hardware or a combination of software and hardware, a plurality of functional modules may be included in the electronic device, and each functional module may include software, hardware or a combination of software and hardware. Specifically, referring to fig. 4, a schematic structural diagram of a link switching device provided in the embodiment of the present application includes a network port management module 401, a determining module 402, and a sending module 403.
The network port management module 401 is configured to, if it is determined that a physical link between a first network port and a first link interface that are currently used by a server meets a preset fault condition, open a second network port in the server;
a determining module 402, configured to determine, according to a correspondence between a stored network port and a media access control MAC address, an MAC address of the second network port;
a sending module 403, configured to send, to each client, a message for broadcasting the MAC address of the second network port through the physical link between the second network port and the second link interface, so that each client switches to use the physical link between the second network port and the second link interface to perform a session with the server according to the message.
Optionally, the preset fault condition comprises any one or more of:
currently, no client carries out conversation with the server through the first internet access;
and N clients which are successfully accessed into the server through the first internet access recently can not ping, and no client successfully accesses into the server through the first internet access within a preset time, wherein N is an integer larger than zero.
Optionally, the portal management module 401 is further configured to:
and if the physical link between the first internet access currently used by the server and the first link interface is determined to meet the preset fault condition, closing the first internet access.
Optionally, the method further comprises:
a reading module 404, configured to read status information of a PHY chip in the server, where the PHY chip is connected to both the first port and the second port, where the status information is used to represent a status of whether the first port and the second port are closed;
the sending module 403 is further configured to determine that the first network port is in a closed state and the second network port is in an open state according to the state information of the PHY chip before sending, to each client, a packet for broadcasting the MAC address of the second network port through a physical link between the second network port and the second link interface.
Optionally, the server is a central unit CU in a fifth generation 5G mobile communication network, and each client is a distribution unit DU in the 5G mobile communication network;
the server is a time service server, and each client is a base station; alternatively, the first and second electrodes may be,
the server is an extension unit CP and each client is a remote unit DP.
The division of the modules in the embodiments of the present application is schematic, and only one logical function division is provided, and in actual implementation, there may be another division manner, and in addition, each functional module in each embodiment of the present application may be integrated in one processor, may also exist alone physically, or may also be integrated in one module by two or more modules. The coupling of the various modules to each other may be through interfaces that are typically electrical communication interfaces, but mechanical or other forms of interfaces are not excluded. Thus, modules described as separate components may or may not be physically separate, may be located in one place, or may be distributed in different locations on the same or different devices. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions required to be executed by the processor, and includes a program required to be executed by the processor.
In some possible embodiments, the various aspects of the link switching method provided in this application may also be implemented in the form of a program product including program code for causing an electronic device to perform the steps in the link switching method according to various exemplary embodiments of this application described above in this specification when the program product is run on the electronic device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for link switching of embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device over any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., over the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more units described above may be embodied in one unit, according to embodiments of the application. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Further, while the operations of the methods of the present application are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (12)

1. A link switching method is applied to a server, and is characterized in that the server comprises at least two network ports, each network port is connected with a link interface, a plurality of network elements are included between each network port and the link interface, and the plurality of network elements form a physical link between each network port and the link interface, and the method comprises the following steps:
if the physical link between the first internet access currently used by the server and the first link interface is determined to meet the preset fault condition, starting a second internet access in the server;
determining the special MAC address of the second network port according to the corresponding relation between the stored network port and the special media access control MAC address;
and sending a message for broadcasting the special MAC address of the second internet access to each client through a physical link between the second internet access and a second link interface, so that each client switches to use the physical link between the second internet access and the second link interface to carry out conversation with the server according to the message, and the IP address is kept unchanged when the internet access of the server is switched.
2. The method of claim 1, wherein the preset fault condition comprises any one or more of:
currently, no client carries out conversation with the server through the first internet access;
and N clients which are successfully accessed into the server through the first internet access recently can not ping, and no client successfully accesses into the server through the first internet access within a preset time, wherein N is an integer larger than zero.
3. The method of claim 1, wherein if it is determined that a physical link between a first portal currently used by the server and the first link interface satisfies a preset failure condition, further comprising:
and closing the first network port.
4. The method of claim 3, further comprising:
reading state information of a physical interface transceiver (PHY) chip connected with the first network port and the second network port in the server, wherein the state information is used for representing the state of whether the first network port and the second network port are closed or not; and
before sending, to each client, a packet for broadcasting the dedicated MAC address of the second network port through the physical link between the second network port and the second link interface, the method further includes:
and determining that the first internet access is in a closed state and the second internet access is in an open state according to the state information of the PHY chip.
5. The method of claim 1,
the server is a central unit CU in a fifth generation 5G mobile communication network, and each client is a distribution unit DU in the 5G mobile communication network;
the server is a time service server, and each client is a base station; alternatively, the first and second electrodes may be,
the server is an extension unit CP and each client is a remote unit DP.
6. A link switching device applied to a server is characterized in that the server comprises at least two network ports, each network port is connected with a link interface, a plurality of network elements are arranged between the network ports and the link interfaces, and the plurality of network elements form a physical link between the network ports and the link interfaces, and the device comprises:
the network port management module is used for starting a second network port in the server if the fact that a physical link between a first network port currently used by the server and a first link interface meets a preset fault condition is determined;
a determining module, configured to determine, according to a correspondence between stored network ports and MAC addresses dedicated to media access control, a MAC address dedicated to the second network port;
and the sending module is used for sending a message for broadcasting the special MAC address of the second internet access to each client through a physical link between the second internet access and the second link interface, so that each client switches to use the physical link between the second internet access and the second link interface to carry out conversation with the server according to the message, and the IP address is kept unchanged when the internet access of the server is switched.
7. The apparatus of claim 6, wherein the preset fault condition comprises any one or more of:
currently, no client carries out conversation with the server through the first internet access;
and N clients which are successfully accessed into the server through the first internet access recently can not ping, and no client successfully accesses into the server through the first internet access within a preset time, wherein N is an integer larger than zero.
8. The apparatus of claim 6, wherein the portal management module is further to:
and if the physical link between the first internet access currently used by the server and the first link interface is determined to meet the preset fault condition, closing the first internet access.
9. The apparatus of claim 8, further comprising:
a reading module, configured to read status information of a PHY chip of a physical interface transceiver in the server, where the PHY chip is connected to both the first port and the second port, where the status information is used to indicate whether the first port and the second port are closed or not;
the sending module is further configured to determine that the first network port is in a closed state and the second network port is in an open state according to the state information of the PHY chip before sending a packet for broadcasting a dedicated MAC address of the second network port to each client through a physical link between the second network port and the second link interface.
10. The apparatus of claim 6,
the server is a central unit CU in a fifth generation 5G mobile communication network, and each client is a distribution unit DU in the 5G mobile communication network;
the server is a time service server, and each client is a base station; alternatively, the first and second electrodes may be,
the server is an extension unit CP and each client is a remote unit DP.
11. An electronic device, comprising: at least one processor, and a memory communicatively coupled to the at least one processor, wherein:
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 5.
12. A computer-readable medium having stored thereon computer-executable instructions for performing the method of any one of claims 1 to 5.
CN201910374149.9A 2019-05-07 2019-05-07 Link switching method and device Active CN110177010B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910374149.9A CN110177010B (en) 2019-05-07 2019-05-07 Link switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910374149.9A CN110177010B (en) 2019-05-07 2019-05-07 Link switching method and device

Publications (2)

Publication Number Publication Date
CN110177010A CN110177010A (en) 2019-08-27
CN110177010B true CN110177010B (en) 2022-05-24

Family

ID=67691385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910374149.9A Active CN110177010B (en) 2019-05-07 2019-05-07 Link switching method and device

Country Status (1)

Country Link
CN (1) CN110177010B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111123299A (en) * 2019-12-13 2020-05-08 京信通信系统(中国)有限公司 GPS receiver, base station and GPS time service synchronization system
CN111314140B (en) * 2020-02-19 2021-12-17 迈普通信技术股份有限公司 Method and device for improving stability of network equipment, network equipment and storage medium
CN114039622B (en) * 2021-11-06 2023-07-28 四川恒湾科技有限公司 Method for realizing switching of synchronous surface between network ports on radio frequency unit
CN114793211B (en) * 2022-06-21 2022-11-01 新华三信息技术有限公司 Service multilink backup method and device based on blade service

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7009980B1 (en) * 2000-03-13 2006-03-07 Lucent Technologies Inc. Apparatus and method for automatic port identity discovery in hierarchical heterogenous systems
CN101047601B (en) * 2006-04-10 2010-12-01 华为技术有限公司 Implementing method and system of double-attach network based on VPLS
CN101426306B (en) * 2008-10-24 2011-06-01 中国移动通信集团山东有限公司 A disaster tolerance switching method, system and apparatus
CN102185753B (en) * 2011-01-30 2013-10-30 广东佳和通信技术有限公司 Device for realizing dual-backup switching of Ethernet link inside communication equipment
CN103546379A (en) * 2013-10-30 2014-01-29 杭州华三通信技术有限公司 Device and method for upgrading MAC address table entries in VPLS

Also Published As

Publication number Publication date
CN110177010A (en) 2019-08-27

Similar Documents

Publication Publication Date Title
CN110177010B (en) Link switching method and device
US10191758B2 (en) Directing data traffic between intra-server virtual machines
CN109302466B (en) Data processing method, related device and computer storage medium
CN109088820B (en) Cross-device link aggregation method and device, computing device and storage medium
US20140022894A1 (en) Network system, switch and connected terminal detection method
CN114025021B (en) Communication method, system, medium and electronic equipment crossing Kubernetes cluster
TW201738746A (en) Methods and systems for analyzing record and usage in post package repair
CN103209141A (en) Method for processing data messages with switching chip and switching chip
CN109474495B (en) Tunnel detection method and device
CN107645433B (en) Message forwarding method and device
CN110691110B (en) Communication method, device, system, terminal, equipment and medium
US11231983B2 (en) Fault tolerance processing method, apparatus, and server
CN111694519B (en) Method, system and server for mounting cloud hard disk on bare metal server
CN114064206A (en) Pod method, system, equipment and storage medium for accessing edge node
CN113839862B (en) Method, system, terminal and storage medium for synchronizing ARP information between MCLAG neighbors
CN104426816B (en) A kind of virtual machine communication method and device
CN107634907B (en) Data forwarding method and device for L2VPN (layer two virtual private network)
CN113765801B (en) Message processing method and device applied to data center, electronic equipment and medium
CN111511041B (en) Remote connection method and device
CN110830598B (en) Method and network equipment for establishing and transmitting interface address and alias in BGP (Border gateway protocol) session
CN105100300A (en) Method and device for network address translation
CN114679370A (en) Server hosting method, device, system and storage medium
CN105763414A (en) Method and device for learning table entry
WO2022111173A1 (en) Network slice access method, device, and system, and storage medium
CN109587027B (en) Message forwarding method and device

Legal Events

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

Effective date of registration: 20200107

Address after: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Applicant after: Jingxin Communication System (China) Co., Ltd.

Address before: 510663 Shenzhou Road, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangdong, 10

Applicant before: Jingxin Communication System (China) Co., Ltd.

Applicant before: Jingxin Communication System (Guangzhou) Co., Ltd.

Applicant before: Jingxin Communication Technology (Guangzhou) Co., Ltd.

Applicant before: TIANJIN COMBA TELECOM SYSTEMS CO., LTD.

CB02 Change of applicant information
CB02 Change of applicant information

Address after: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Applicant after: Jingxin Network System Co.,Ltd.

Address before: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Applicant before: Comba Telecom System (China) Ltd.

GR01 Patent grant
GR01 Patent grant