CN112615777B - Link switching method, device and equipment and machine readable storage medium - Google Patents

Link switching method, device and equipment and machine readable storage medium Download PDF

Info

Publication number
CN112615777B
CN112615777B CN202011532578.3A CN202011532578A CN112615777B CN 112615777 B CN112615777 B CN 112615777B CN 202011532578 A CN202011532578 A CN 202011532578A CN 112615777 B CN112615777 B CN 112615777B
Authority
CN
China
Prior art keywords
virtual
virtual link
uplink
link
ports
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
CN202011532578.3A
Other languages
Chinese (zh)
Other versions
CN112615777A (en
Inventor
王然
陈琦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Cloud Technologies Co Ltd
Original Assignee
New H3C Cloud Technologies 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 New H3C Cloud Technologies Co Ltd filed Critical New H3C Cloud Technologies Co Ltd
Priority to CN202011532578.3A priority Critical patent/CN112615777B/en
Publication of CN112615777A publication Critical patent/CN112615777A/en
Application granted granted Critical
Publication of CN112615777B publication Critical patent/CN112615777B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath

Abstract

The present disclosure provides a link switching method, apparatus, device and machine-readable storage medium, the method comprising: acquiring the state of each uplink port of an uplink port group of a virtual link; if the states of the uplink ports are off-line, marking the uplink port group of the virtual link as an off-line state; and if the state of the uplink port group of the virtual link is offline, marking all the virtual links which are the same as the downlink ports of the virtual link as offline states. According to the technical scheme, when all physical uplink ports associated with a certain virtual link are offline, it is indicated that the virtual link cannot work normally, other virtual links identical to the virtual downlink port of the virtual link belong to a service, and the service has function loss on the physical link, so that all virtual links of the service are marked as offline states for switching, and other virtual links not affected by the service are not affected.

Description

Link switching method, device, equipment and machine readable storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a link switching method, apparatus, device, and machine-readable storage medium.
Background
The knife box and the blade server refer to a rack type chassis with standard height, a plurality of card type server units can be inserted in the rack type chassis, the blade server is a low-cost server platform for realizing HAHD (High Availability High Density), and the blade server is specially designed for special application industries and High-Density computing environments. Blade servers are like "blades," and each "blade" is actually a system motherboard.
With the enhancement of the performance of the equipment and the continuous expansion of the business scale, the reliability, cost control and resource utilization rate of the equipment are very important. In order to improve the resource utilization rate and reduce the user cost, the MEZZ card used by the knife box computing node already supports the virtualization function, that is, one physical port can virtualize a plurality of virtual ports, and the service traffic of a user can be directly bound to the virtual ports. In a practical production environment, different levels of redundancy schemes are also typically deployed to ensure that the industry operates properly and reliably.
After the network card starts the virtualization function, because the services are directly deployed on the virtual ports, the virtual links used by a plurality of services commonly carry the same physical link, when a certain virtual link fails, the whole physical link needs to be switched, and the virtual link which does not fail but uses the same physical link needs to be switched.
Disclosure of Invention
In view of the above, the present disclosure provides a link switching method and apparatus, an electronic device, and a machine-readable storage medium, so as to solve the problem of switching links by multiple services when a link of one service fails.
The specific technical scheme is as follows:
the disclosure provides a link switching method applied to a management unit of a knife box device, the method comprising: acquiring the state of each uplink port of an uplink port group of a virtual link; if the states of the uplink ports are off-line, marking the uplink port group of the virtual link as an off-line state; and if the state of the uplink port group of the virtual link is offline, marking all the virtual links which are the same as the downlink ports of the virtual link as offline states.
As a technical solution, the uplink port group includes a plurality of uplink ports, and the uplink ports are physical ports.
As a technical solution, the virtual links with the same downlink port are included in the same virtual link set, and the virtual link set is associated with one service.
As a technical solution, if a virtual link of a virtual link set is marked as down status, switching and only switching the link of the service associated with the virtual link set.
The present disclosure simultaneously provides a link switching device, is applied to the administrative unit of knife box equipment, the device includes: the state module is used for acquiring the state of each uplink port of the uplink port group of the virtual link; the uplink module is used for marking the uplink port group of the virtual link as an offline state when the states of all the uplink ports are offline; and the downlink module is used for marking all the virtual links which are the same as the downlink ports of the virtual link as the offline state when the state of the uplink port group of the virtual link is the offline state.
As a technical solution, the uplink port group includes a plurality of uplink ports, and the uplink ports are physical ports.
As a technical solution, the virtual links with the same downlink port are included in the same virtual link set, and the virtual link set is associated with one service.
As a technical solution, if a virtual link of a virtual link set is marked as down status, switching and only switching the link of the service associated with the virtual link set.
The present disclosure also provides an electronic device, which includes a processor and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions capable of being executed by the processor, and the processor executes the machine-executable instructions to implement the foregoing link switching method.
The present disclosure also provides a machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the aforementioned link switching method.
The technical scheme provided by the disclosure at least brings the following beneficial effects:
when all physical uplink ports associated with a certain virtual link are offline, it is indicated that the virtual link cannot work normally, and other virtual links identical to the virtual downlink ports of the virtual link belong to a service, and at this time, the service has function loss on the physical link, so all virtual links of the service are marked as offline for switching, and at this time, other virtual links not in the service are not affected.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present disclosure or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present disclosure.
Fig. 1 is a flow chart of a link switching method in one embodiment of the present disclosure;
fig. 2 is a block diagram of a link switching apparatus according to an embodiment of the present disclosure;
fig. 3 is a hardware configuration diagram of an electronic device in an embodiment of the present disclosure.
Detailed Description
The terminology used in the embodiments of the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information in the embodiments of the present disclosure, such information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. Depending on the context, moreover, the word "if" may be used to be interpreted as "at 8230; \8230when" or "when 8230; \8230when" or "in response to a determination".
In a blade box networking environment, a MonitorLink function is usually configured on an interconnection module, so that when an uplink fails, the flow is quickly switched to a standby link.
When a certain uplink fails, the uplink1 state changes, and when the exchange module monitors that the uplink1 state is down through the MonitorLink, the exchange module sets the downlink port down in a linkage manner, and a first MEZZ card port directly connected with the downlink port is also down, so that the operating system is started to switch the service on the first MEZZ card port to a second MEZZ card port. At this time, the traffic running on the other virtual port on the physical port is also affected and switched accordingly.
Link switching imposes normal traffic flow. Since the link switching is a whole physical line, the failed service may only be an uplink on one virtual port, and other uplinks through the virtual port of the physical line are not failed, so that the traffic flows running on other virtual ports on other physical ports are also switched.
In view of the above, the present disclosure provides a link switching method, a link switching apparatus, an electronic device, and a machine-readable storage medium to solve the problem of switching links between multiple services when a link of one service fails.
The specific technical scheme is as follows.
In one embodiment, the present disclosure provides a link switching method applied to a management unit of a knife box device, including: acquiring the state of each uplink port of an uplink port group of a virtual link; if the states of the uplink ports are off-line, marking the uplink port group of the virtual link as an off-line state; and if the state of the uplink port group of the virtual link is offline, marking all the virtual links which are the same as the downlink ports of the virtual link as offline states.
Specifically, as shown in fig. 1, the method comprises the following steps:
step S11, the state of each uplink port of the uplink port group of the virtual link is obtained.
And step S12, if the states of the uplink ports are all offline, marking the uplink port group of the virtual link as an offline state.
Step S13, if the state of the uplink port group of the virtual link is off-line, all the virtual links same as the downlink ports of the virtual link are marked as off-line states.
When all physical uplink ports associated with a certain virtual link are offline, it is indicated that the virtual link cannot work normally, and other virtual links identical to the virtual downlink ports of the virtual link belong to a service, and at this time, the service has function loss on the physical link, so all virtual links of the service are marked as offline for switching, and at this time, other virtual links not in the service are not affected.
In one embodiment, the upstream port group includes a plurality of upstream ports, and the upstream ports are physical ports.
In one embodiment, the virtual links of the same downstream port are included in the same virtual link set, and the virtual link set is associated with one service.
In one embodiment, if a virtual link of a virtual link set is marked as down, then the link of the traffic associated with the virtual link set is switched and only switched.
And performing linkage between the MEZZ card virtual port on the computing node and the uplink port of the interconnection module. When the uplink fails, all affected virtual links (computing nodes, MEZZ cards, physical ports and virtual ports) can be quickly positioned, so that the failed virtual links can be quickly and accurately switched under the condition that other normal virtual links of the same physical link are not affected.
The management unit of the knife box can sense the configuration and the state of all nodes and interconnection modules of the knife box.
A plurality of virtual links are constructed through the configuration of nodes and interconnection modules, each virtual link is marked by 1 uplink port group and 1 virtual downlink port, and the virtual downlink ports can be determined by node IDs, mezz card IDs, physical port IDs and partition IDs. That is, 1 virtual link can be uniquely determined by 5 elements of an uplink port group, node ID, mezz card ID, physical port ID, and partition ID.
All virtual links with the same virtual downlink port are defined as a virtual link set. That is, all the virtual links in a virtual link set are different in uplink port group, and the virtual downlink ports are the same.
In the uplink port group, if any uplink port is in an on-line up state or no uplink port exists, the marking state is up, otherwise, the marking state is down.
When the uplink port group state of a certain virtual link is up, marking the virtual link state as up, otherwise, marking the virtual link state as down.
When at least one virtual link in a certain virtual link set corresponding to one service is down, all other virtual links in the virtual link set are marked as down.
And controlling the state switching of the whole virtual link by changing the state of the uplink port group and using the instruction of the Mezz card to control the state of the virtual port.
That is, the management unit scans the states of all the upstream ports and the virtual links at a certain period, and updates the states of the upstream ports and the virtual links according to the above rules. When all the virtual links of the virtual link set corresponding to a certain service are marked as down, the link of the service is switched, and the links of other services are not switched, so that the problem that a plurality of services switch the links when one service link fails is solved.
In an embodiment, the present disclosure also provides a link switching apparatus, as shown in fig. 2, applied to a management unit of a knife box device, where the apparatus includes: a state module 21, configured to obtain a state of each uplink port of the uplink port group of the virtual link; the uplink module 22 is configured to mark the uplink port group of the virtual link as an offline state when the states of the uplink ports are all offline; the downlink module 23 is configured to mark all virtual links that are the same as the downlink port of the virtual link as an offline state when the state of the uplink port group of the virtual link is offline.
In one embodiment, the upstream port group includes a plurality of upstream ports, and the upstream ports are physical ports.
In one embodiment, the virtual links of the same downstream port are included in the same virtual link set, and the virtual link set is associated with one service.
In one embodiment, if a virtual link of a virtual link set is marked as down, then the link of the traffic associated with the virtual link set is switched and only switched.
The device embodiments are the same or similar to the corresponding method embodiments and are not described herein again.
In one embodiment, the present disclosure provides an electronic device, which includes a processor and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions executable by the processor, and the processor executes the machine-executable instructions to implement the foregoing link switching method, and from a hardware level, a schematic diagram of a hardware architecture may be as shown in fig. 3.
In one embodiment, the present disclosure provides a machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the aforementioned link switching method.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units described in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, respectively. Of course, the functionality of the various elements may be implemented in the same one or more software and/or hardware implementations in practicing the disclosure.
As will be appreciated by one of skill in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the disclosed embodiments 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 so forth) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. 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, special 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.
Furthermore, 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.
As will be appreciated by one of skill in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media (which may include, but is not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only an embodiment of the present disclosure, and is not intended to limit the present disclosure. Various modifications and variations of this disclosure will occur to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present disclosure should be included in the scope of the claims of the present disclosure.

Claims (10)

1. A link switching method is characterized by being applied to a management unit of a knife box device, and the method comprises the following steps:
acquiring the state of each uplink port of an uplink port group of a virtual link;
if the states of the uplink ports are all offline, marking the uplink port group of the virtual link as an offline state;
and if the state of the uplink port group of the virtual link is offline, marking all the virtual links which are the same as the downlink ports of the virtual link as offline states.
2. The method of claim 1,
the uplink port group comprises a plurality of uplink ports, and the uplink ports are physical ports.
3. The method of claim 1,
the virtual links with the same downlink port are included in the same virtual link set, and the virtual link set is associated with one service.
4. The method of claim 3,
and if the virtual link of the virtual link set is marked as the offline state, switching and only switching the link of the service associated with the virtual link set.
5. A link switching device, applied to a management unit of a knife box device, the device comprising:
the state module is used for acquiring the state of each uplink port of the uplink port group of the virtual link;
an uplink module, configured to mark the uplink port group of the virtual link as an offline state when the states of the uplink ports are offline;
and the downlink module is used for marking all the virtual links which are the same as the downlink ports of the virtual link as the offline state when the state of the uplink port group of the virtual link is the offline state.
6. The apparatus of claim 5,
the uplink port group comprises a plurality of uplink ports, and the uplink ports are physical ports.
7. The apparatus of claim 5,
the virtual links with the same downlink port are included in the same virtual link set, and the virtual link set is associated with one service.
8. The apparatus of claim 7,
and if the virtual link of the virtual link set is marked as the offline state, switching and only switching the link of the service associated with the virtual link set.
9. An electronic device, comprising: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor to perform the method of any one of claims 1 to 4.
10. A machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to implement the method of any of claims 1-4.
CN202011532578.3A 2020-12-23 2020-12-23 Link switching method, device and equipment and machine readable storage medium Active CN112615777B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011532578.3A CN112615777B (en) 2020-12-23 2020-12-23 Link switching method, device and equipment and machine readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011532578.3A CN112615777B (en) 2020-12-23 2020-12-23 Link switching method, device and equipment and machine readable storage medium

Publications (2)

Publication Number Publication Date
CN112615777A CN112615777A (en) 2021-04-06
CN112615777B true CN112615777B (en) 2022-10-11

Family

ID=75244235

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011532578.3A Active CN112615777B (en) 2020-12-23 2020-12-23 Link switching method, device and equipment and machine readable storage medium

Country Status (1)

Country Link
CN (1) CN112615777B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103401797A (en) * 2013-07-24 2013-11-20 杭州华三通信技术有限公司 Message processing method and equipment
CN106230753A (en) * 2016-07-14 2016-12-14 杭州华三通信技术有限公司 port expander PE downlink port control method and device
CN108063761A (en) * 2017-12-11 2018-05-22 新华三云计算技术有限公司 Network processing method, cloud platform and software defined network SDN controllers
CN109757128A (en) * 2016-07-13 2019-05-14 泽达网络有限公司 Virtual equipment
CN111698028A (en) * 2020-04-30 2020-09-22 新华三信息技术有限公司 FC link detection method, device, equipment and machine readable storage medium
CN112104478A (en) * 2020-07-30 2020-12-18 新华三信息安全技术有限公司 Link switching method, device, equipment and machine readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014166065A1 (en) * 2013-04-09 2014-10-16 华为技术有限公司 Method and device for protecting service reliability, and network virtualization system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103401797A (en) * 2013-07-24 2013-11-20 杭州华三通信技术有限公司 Message processing method and equipment
CN109757128A (en) * 2016-07-13 2019-05-14 泽达网络有限公司 Virtual equipment
CN106230753A (en) * 2016-07-14 2016-12-14 杭州华三通信技术有限公司 port expander PE downlink port control method and device
CN108063761A (en) * 2017-12-11 2018-05-22 新华三云计算技术有限公司 Network processing method, cloud platform and software defined network SDN controllers
CN111698028A (en) * 2020-04-30 2020-09-22 新华三信息技术有限公司 FC link detection method, device, equipment and machine readable storage medium
CN112104478A (en) * 2020-07-30 2020-12-18 新华三信息安全技术有限公司 Link switching method, device, equipment and machine readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于LACP多激活检测方法和处理机制的研究;王培英等;《电信科学》;20130520(第05期);全文 *
面向差异化业务请求的虚拟网络映射算法;曲桦等;《电信科学》;20141220(第12期);全文 *

Also Published As

Publication number Publication date
CN112615777A (en) 2021-04-06

Similar Documents

Publication Publication Date Title
US8543871B2 (en) Correlating hardware devices between local operating system and global management entity
CN110784345B (en) Network traffic processing method and device, electronic equipment and machine-readable storage medium
CN105306507A (en) Disaster tolerance processing method and disaster tolerance processing device in distributed architecture
CN108462756B (en) Data writing method and device
CN113703912A (en) Virtual machine management method and device
CN110515728B (en) Server scheduling method and device, electronic equipment and machine-readable storage medium
CN104267985A (en) Software loading method and device
CN110569124A (en) Task allocation method and device
CN112615777B (en) Link switching method, device and equipment and machine readable storage medium
CN108008969A (en) A kind of method for upgrading software version, device and the network equipment
CN109587218B (en) Cluster election method and device
CN111131048A (en) Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
CN103442033A (en) Running state information synchronizing method and device
CN113381940B (en) Design method and device of two-dimensional fat tree network topology
WO2016090485A1 (en) System and method for routing computing workloads based on proximity
CN112383471A (en) Method, device and equipment for managing knife box link and machine readable storage medium
CN114826962A (en) Link fault detection method, device, equipment and machine readable storage medium
CN114785662A (en) Storage management method, device, equipment and machine readable storage medium
CN108471364B (en) Exception handling method and device
CN112162909A (en) Hard disk fault processing method, device, equipment and machine readable storage medium
CN102769538B (en) Port changing method, related device and system
CN113794631B (en) Port redundancy processing method, device, equipment and machine-readable storage medium
CN108809866B (en) Power supply control method and device
CN109491838A (en) A kind of method and device handling virtual-machine data
CN113037654B (en) Distributed switch service board virtualization method and device and electronic equipment

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
GR01 Patent grant
GR01 Patent grant