CN109428821B - Server, method for managing routing of mutual backup device and storage medium - Google Patents

Server, method for managing routing of mutual backup device and storage medium Download PDF

Info

Publication number
CN109428821B
CN109428821B CN201710771330.4A CN201710771330A CN109428821B CN 109428821 B CN109428821 B CN 109428821B CN 201710771330 A CN201710771330 A CN 201710771330A CN 109428821 B CN109428821 B CN 109428821B
Authority
CN
China
Prior art keywords
route
management agent
link
agent module
routing
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
CN201710771330.4A
Other languages
Chinese (zh)
Other versions
CN109428821A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710771330.4A priority Critical patent/CN109428821B/en
Publication of CN109428821A publication Critical patent/CN109428821A/en
Application granted granted Critical
Publication of CN109428821B publication Critical patent/CN109428821B/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/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks

Landscapes

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

Abstract

The invention discloses a server, a method for managing a route of mutual backup equipment and a storage medium. The server includes: the device comprises a kernel detection module and a route management agent module, wherein the kernel detection module is used for being connected with mutual backup equipment, and the route management agent module is connected with the kernel detection module, wherein: the inner core detection module is used for sending a detection message to the mutual backup device, receiving a link layer discovery protocol LLDP message fed back by the mutual backup device according to the detection message, and outputting the LLDP message to the routing management agent module; the route management agent module comprises a route configuration unit and a route configuration unit, wherein the route configuration unit is used for analyzing the LLDP message, acquiring the ECMP state of the equivalent multipath route of the mutual backup equipment, and configuring a route table of the mutual backup equipment based on the ECMP state. Therefore, the embodiment of the invention can control the data flow direction on the basis of removing the network stack, realize data drainage and further realize disaster recovery dual-active and uninterrupted service upgrade.

Description

Server, method for managing routing of mutual backup device and storage medium
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a server, a method for managing a route of a mutual backup device, and a storage medium.
Background
With the rapid development of network technology, the scale of the network is continuously expanded, and the problem of insufficient number of ports (such as switch ports) often occurs. To expand the port count, stacking technology is now commonly used to stack the mutually standby devices (e.g., two switches) to solve this problem. Stacking is a non-standardized technique. Hybrid stacking is generally not supported between devices of various vendors, stacking patterns are established by various vendors, and topology is not supported. The stacking technique may virtualize two switches connected to a server (e.g., a physical server) into one switch, or virtualize two network cards into one network card.
The applicant finds out through research that: although stacking techniques solve the problem of port expansion, stacking multiple inter-backup devices increases the complexity of the network. In addition, the stacking feature is relatively complex, which presents challenges to the stability of the software of the mutual backup device itself.
In addition, because a plurality of inter-backup devices are virtualized into one device after being stacked, this may cause problems such as unreliable and incompatible Upgrade of the stacked devices (e.g., stack switches) during an uninterrupted Service Upgrade (ISSU). In addition, the large-span version cannot support ISSU upgrade, thereby causing the stacked network to be unusable.
How to simplify the complexity of the network, reduce the difficulty of upgrading the ISSU, and improve the reliability of the network becomes a technical problem to be solved urgently in the industry.
Disclosure of Invention
In order to solve the problems of high complexity of a network, high difficulty of ISSU upgrading, poor reliability of the network and the like, the embodiment of the invention provides a server, a method for managing a route of mutual backup equipment and a storage medium.
In a first aspect, a server for managing a route of a mutual standby device is provided. The server includes: the device comprises a kernel detection module and a route management agent module, wherein the kernel detection module is used for being connected with mutual backup equipment, and the route management agent module is connected with the kernel detection module, wherein:
the inner core detection module is used for sending a detection message to the mutual standby equipment, receiving a Link Layer Discovery Protocol (LLDP) message fed back by the mutual standby equipment according to the detection message, and outputting the LLDP message to the routing management agent module;
the route management agent module includes a route configuration unit,
and the route configuration unit is used for analyzing the LLDP message, acquiring an Equal-cost multi-path (ECMP) state of the mutually backup equipment, and configuring a route table of the mutually backup equipment based on the ECMP state.
In a second aspect, a method for a server to manage a route of a mutual standby device is provided. The server includes: the routing management system comprises a kernel detection module and a routing management agent module, wherein the kernel detection module is used for being connected with mutual backup equipment, and the routing management agent module is connected with the kernel detection module, and the routing management agent module comprises the following steps:
the kernel detection module sends a detection message to the mutual standby equipment, receives a link layer discovery protocol LLDP message fed back by the mutual standby equipment according to the detection message, and outputs the LLDP message to the routing management agent module;
and the route management agent module analyzes the LLDP message, acquires the ECMP state of the equivalent multi-path route of the mutual backup equipment, and configures a route table of the mutual backup equipment based on the ECMP state.
In a third aspect, a server for managing a route of a mutual backup device is provided. The server includes:
a memory for storing a program;
a processor for executing a program stored in the memory, the program causing the processor to perform the method of the second aspect.
In a fourth aspect, a computer-readable storage medium is provided. The computer readable storage medium has stored therein instructions which, when run on a computer, cause the computer to perform the method of the second aspect described above.
In a fifth aspect, a computer program product containing instructions is provided. When the product is run on a computer, it causes the computer to perform the method of the second aspect described above.
In a sixth aspect, a computer program is provided. When the computer program is run on a computer, it causes the computer to perform the method of the second aspect described above.
Therefore, the embodiment of the invention can send the detection message to the mutual backup device by arranging the kernel detection module and the route management agent module in the server, receive the LLDP fed back by the mutual backup device according to the detection message, and output the LLDP to the route management agent module; and analyzing the LLDP message by using the routing management agent module, acquiring an equal-cost multi-path routing (ECMP) state of the mutual backup device, and configuring a routing table of the mutual backup device based on the ECMP state, so that network communication can rely on the ECMP state routing to control the data flow direction, and data flow guiding is realized.
On one hand, the embodiment of the invention can remove network stacking and simplify the network structure.
On the other hand, the embodiment of the invention can realize disaster recovery dual-active and uninterrupted service upgrade through data drainage, thereby improving the reliability of the network. Because the inter-backup devices (e.g., switches) remove the stack, the switches may be independent of each other, and once a problem or outage occurs in one switch, traffic may be directed to the other switch through routing convergence. In addition, when the switch is upgraded, the flow can be switched to another switch first and then the upgrade is started, the problems of compatibility and version are not needed to be considered, and reliable uninterrupted service upgrade can be realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a system architecture for managing inter-backup device routing according to an embodiment of the present invention;
FIG. 2 is a signaling diagram of a physical server management switch routing according to an embodiment of the present invention;
fig. 3 is a schematic diagram of signal transmission of a server management inter-backup device route according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server for managing the routing of the inter-backup device according to an embodiment of the present invention;
FIG. 5 is a logic flow diagram illustrating the processing of a kernel detection module according to an embodiment of the present invention;
FIG. 6 is a logic flow diagram illustrating processing of a routing management agent module according to an embodiment of the present invention;
fig. 7 is a flowchart illustrating a method for a server to manage a route of an inter-backup device according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a framework of a server for managing a route of an inter-backup device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a schematic diagram of a system architecture for managing the routing of the interworking device according to an embodiment of the present invention.
As shown in fig. 1, the system architecture may include: a server 100 and an interworking apparatus 200. The server 100 may include a plurality of network cards, such as a network card (NIC) 101 (e.g., NIC0) and a network card 102 (e.g., NIC 1). The models, parameters, and the like of the network card 101 and the network card 102 may be the same or different. The interworking apparatus 200 may include: an exchanger group 201 and an exchanger group 202. The switch group 201 and the switch group 202 may have the same or different models, parameters, and the like.
In this embodiment, the network card 101 is connected to the switch unit 201 to form a first link. The network card 102 is connected to the switch group 202 to form a second link.
In this embodiment, the server 100 may be a physical server (e.g., an x86 server), a virtual cloud server, or the like. The server 100 may include a memory and a processor. The memory may be used to store programs; the processor may be configured to execute a memory-stored program that causes the processor to perform a predetermined operation, such as a volume traffic switching link. In addition, the server 100 may further include an interface of a network card, a loopback interface, and the like. Various messaging client applications, such as instant messaging tools, mailbox clients, social platform software, audio video software, etc., may be installed within the server 100. Generally, the hardware and software of the server 100 are configured highly, and the computing capability is also strong, but the hardware and software of the server 100 can be configured selectively according to actual requirements. When the actual demand is low, the server 100 may be replaced by an electronic product such as a desktop, a notebook, or even a mobile phone.
The system architecture may also include network, router, and other auxiliary devices. Where a network may be the medium used to provide communication links between various communication devices, such as server 100 and inter-backup device 200. In particular, the network may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
For simplicity and simplicity of description, the following embodiments are only described in a scenario of 2 network cards and 2 switches, but the number of the servers 100, the network cards 101, 102, and the switches 201, 202 in the system architecture may be flexibly set according to actual requirements. For example, in order to ensure a one-to-one communication link between the network card and the switch, the number of the network card and the switch is set to 4.
In the following embodiments, the system architecture may be used as a scenario to perform operations such as routing management. The various embodiments may be referred to and cited with respect to each other.
Fig. 2 is a signal transmission diagram of a physical server management switch route according to an embodiment of the present invention.
As shown in fig. 2, the physical server is provided with 3 addresses, including 2 NIC addresses and 1 loopback port address (e.g., named lo: nc). The NIC address and the switch address may be on a segment, primarily for routing. The lo: nc address may be primarily used for traffic communication. The address of NIC0 may be: 192.168.1.2/26. The address of NIC1 may be: 192.168.2.2/26. Nc addresses may be: 10.10.10.1/32. The address of switch 1 may be: 192.168.1.1/26. The address of switch 2 may be: 192.168.2.1/26.
The way in which data for switch 1 is routed to switch 2 will be described in more detail below in and out directions (relative to the physical servers).
For the incoming direction, the routing method may include the following steps:
s11, switch 1 announces the route 10.10.10.1/32 address of lo: nc into the network, directing the data traffic to switch 1.
S12, the switch 1 configures the route of the static route lo: nc, such as static route:10.10.10.1/32 >192.168.1.2 to direct the data traffic to the physical server. The configuration can realize that the data traffic can reach the physical server through the static route after reaching the switch 1.
For the outgoing direction, the routing manner may include the following steps:
s21, configuring static ECMP route of the specified source ip on the physical server, such as static route: src 10.10.10.10.0.0.0/0 ═ 192.168.1.1(NIC0) and 0.0.0.0/0 ═ 192.168.2.1(NIC1) in fig. 2. The purpose of designating the source ip route may be that the source address of the message flowing out of the physical machine is ip of lo: nc, so as to ensure that the backflow data packet can correctly flow back to the physical machine type.
Therefore, the embodiment of the present invention can realize that when the first link where the switch 1 and the NIC0 are located fails, the data traffic is switched from the first link to the second link where the switch 2 and the NIC1 are located, thereby realizing the requirement of disaster recovery dual activities. Additionally, once a switch in a first link goes down or has failed, traffic may be directed to a switch in a second link through route convergence. When the switch is upgraded, the flow can be switched to another switch first and then the upgrade is started, the problems of compatibility and version do not need to be considered, and reliable uninterrupted service upgrade can be realized.
Fig. 3 is a schematic diagram of signal transmission of a server managing a mutual backup device route according to an embodiment of the present invention.
As shown in fig. 3, the server may include: a kernel-probe module (LLDP-DETECT)120 in kernel mode and a route-agent module (route-agent)110 in user mode. The kernel probing module 120 may create a proc file. The proc file may be used as an interface for kernel-mode and user-mode routing agent interactions.
The kernel detection module 120 may be configured to send a detection packet to the inter-backup device, receive an LLDP packet fed back by the inter-backup device according to the detection packet, and output the LLDP packet to the routing management agent module 110. The routing management agent module 110 may be configured to parse the LLDP packet, obtain an ECMP state of the mutual backup device, and configure a routing table of the mutual backup device based on the ECMP state.
The specific implementation manner of the information interaction between the kernel probing module 120 and the route management agent module 110 may include the following steps (this part of contents will be further described below):
s31, the kernel detection module 120 receives the LLDP message sent by the switch.
The LLDP packet may include field value information such as sessions ID, Port ID, Time TO Live, Port description, and System name.
S32, the kernel detection module 120 transmits the LLDP message to the proc file for the route-agent module 110(route-agent) to read the file.
The content output by the file proc may be as follows:
Figure BDA0001395092260000061
Figure BDA0001395092260000071
s33, the routing management agent module 110 parses the LLDP packet, obtains the ECMP status of the mutual backup device, and configures the routing table of the mutual backup device based on the ECMP status. The route may be used to indicate the flow of data. E.g., to which switch the data flows, etc.
S34, the kernel probing module 120 sends an LLDP message to the switch, and performs link interaction with the switch.
In this embodiment, configuring the routing table of the interworking device based on the ECMP state may include the following 4 cases:
case 1: when the first link and the second link are both normal, if no route exists or only one-hop route exists at present, the route management agent module adds the route after the preset time (such as 120s) and recovers the two-hop route;
case 2: when only the first link is normal, the route management agent module switches the route to the first network card;
case 3: when only the second link is normal, the route management agent module switches the route to the second network card;
case 4: and when the first link and the second link are abnormal, the route management agent module does not switch the route.
Whether the first link is normal or not can be represented by whether the first network card, the cable and the interface component in the first link are normal or not, and can also be represented by whether the first network card is normal or not. For example, when the first network card is normal, it can be represented by up; when the first network card is abnormal, the first network card can be represented by down, and the like. Similarly, whether the second link is normal or not may be represented by whether the second network card, the cable, and the interface component in the second link are normal or not.
On one hand, the embodiment of the invention can remove network stacking and simplify the network structure.
On the other hand, the embodiment of the invention can realize disaster recovery dual-active and uninterrupted service upgrade through data drainage, thereby improving the reliability of the network. Because the inter-backup devices (e.g., switches) remove the stack, the switches may be independent of each other, and once a problem or outage occurs in one switch, traffic may be directed to the other switch through routing convergence. In addition, when the switch is upgraded, the flow can be switched to another switch first and then the upgrade is started, the problems of compatibility and version are not needed to be considered, and reliable uninterrupted service upgrade can be realized.
Fig. 4 is a schematic structural diagram of a server for managing a route of an inter-backup device according to an embodiment of the present invention.
As shown in fig. 4, the server 100 may include: a route-agent module (route-agent)110 and a kernel-probe module (LLDP-DETECT) 120. The kernel probing module 120 can be used to connect with an inter-backup device (e.g., 2 switches for backing up with each other). The route management agent module 110 is connected to the kernel probing module 120.
In this embodiment, the route-agent module 110(route-agent) may mainly implement the following functions (this part will be further described below): analyzing the information in the proc file and managing ECMP state routing; monitoring the state of the link and managing ECMP state routing.
In the present embodiment, the function of the route management agent module 110 may be implemented by a plurality of units. The route management agent module 110 may include: a route configuration unit 111, a data routing unit 112, a status listening unit 113, a route reconfiguration unit 114 and a route direct configuration unit 115. The data routing unit 112 may be connected with the route configuration unit 111, the route reconfiguration unit 114, the route direct configuration unit 115, and the route management agent module 110, respectively. The status listening unit 113 may be connected to the route reallocation unit 114.
In this embodiment, the data routing unit 111 may be configured to parse the LLDP packet, obtain an equal-cost multipath routing ECMP state of the mutual standby device, and configure a routing table of the mutual standby device based on the ECMP state.
In this embodiment, the data routing unit 112 may be configured to route the traffic data to some or all of the inter-backup devices (e.g., 1 switch or 2 switches) according to the routing table. Therefore, the embodiment of the invention can realize data drainage and ensure the reliability of network downtime and software upgrading.
In this embodiment, the status monitoring unit 113 may be configured to monitor a link status of the inter-backup device (e.g., an up status or a down status of the NIC0 and the NIC 1); the route reconfiguring unit 114 may be configured to reconfigure a routing table of the inter-standby device when it is monitored that some ports in the inter-standby device are abnormal (for example, the NIC0 and the NIC1 are in a down state), and keep a one-hop route (there may be one-hop route or there may be multiple-hop route) in the routing table. Therefore, the embodiment of the invention can ensure that one-hop routing exists and the reliability of the network is ensured.
In this embodiment, the routing directly configuring unit 115 may be configured to directly configure the routing table of the mutual backup device when the LLDP packet is not received within the preset time. Therefore, the embodiment of the invention can prevent the routing table from being configured to indicate the data flow under the abnormal conditions of data packet loss and the like.
On the basis of the embodiment shown in fig. 4, some functional modules may be selected for flexible combination, and the specific combination may include:
in some embodiments, the route management agent module 110 may include: a route configuration unit 111. The route configuration unit 111 may be connected with the route management agent module 110.
In some embodiments, the route management agent module 110 may include: a status listening unit 113 and a route reallocation unit 114. The status listening unit 113 may be connected to the route reallocation unit 114. The route reallocation unit 114 may be coupled to the route management agent module 110.
In some embodiments, the route management agent module 110 may include: a status listening unit 113 and a route reallocation unit 114. The status listening unit 113 may be connected to the route reallocation unit 114. The route reallocation unit 114 may be coupled to the route management agent module 110. In some embodiments, the route management agent module 110 may include: the route direct configuration unit 115. The route direct configuration unit 115 may be connected with the route management agent module 110.
In some embodiments, on the basis of the above embodiments, the route management agent module 110 may further include: a data routing unit 112. The data routing unit 112 may be coupled to the route management agent module 110.
In some embodiments, the server 100 may further include: and (5) network card. Inside the server 100, a network card may be connected to the kernel probing module 120. Outside the server 100, the network card may be used to connect with the mutual standby device and perform information interaction with the mutual standby device.
In some embodiments, the number of the network cards may be multiple, and the multiple network cards are arranged independently; the number of the mutual backup devices can be multiple, and the multiple mutual backup devices are arranged independently. Therefore, the network card or the switch is arranged independently, so that network stacking is eliminated, the network structure is simplified, and the problems of difficulty in upgrading, unreliability, incompatibility and the like caused by network stacking are solved.
In some embodiments, the network card may include: a first network card (NIC1) and a second network card (NIC 2); the mutual standby device may include: a first switch and a second switch; the first switch is connected with the first network card to form a first link; the second switch is connected with the second network card to form a second link. Therefore, the embodiment of the invention can realize data drainage by establishing two independent links.
In some embodiments, the route management agent module 110 may further include: and a software upgrading unit. The software upgrading unit can be used for receiving a request for upgrading the mutual backup equipment; responding to the request, firstly switching the flow data to the first link, and then upgrading the second switch; and after the second switch is upgraded, switching the flow data to the second link, and then upgrading the first switch. Therefore, when the switch is upgraded, the embodiment of the invention can firstly switch the flow to another switch and then start upgrading without considering the problems of compatibility and version, and can realize reliable uninterrupted service upgrading.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. For example, a plurality of units are integrated into one unit. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions which, when run on a computer, cause the computer to perform the method described in the various embodiments above. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
FIG. 5 is a logic flow diagram of a core detection module according to an embodiment of the invention.
As shown in FIG. 5, the core probe module processing logic flow may include the following steps:
s510, the kernel detection module initializes the LLDP detection packet.
The LLDP probe packet in the LLDP probe packet may include field value information such as sessions ID, Port ID, Time TO Live, Port description, and System name.
S520, the kernel detection module initializes the timer and sends a detection message.
S530, the kernel detection module registers the two-layer LLDP packet receiving.
The kernel detection module may register a packet reception processing function, such as a proc processing function, and then output the received LLDP message information. The LLDP message information may include field value information such as sessions ID, Port ID, Time TO Live, Port description, Management Address, and System name.
And S540, the kernel detection module analyzes the LLDP message and outputs the LLDP message to a file proc.
The proc output format may be as follows:
Figure BDA0001395092260000111
fig. 6 is a logic flow diagram of a processing of a routing management agent module according to an embodiment of the present invention.
As shown in fig. 6, the processing logic of the route management agent module may include:
s600, starting.
S611, the routing management agent module starts thread 1.
Firstly, the routing management agent module monitors the link state, and if the link state is found to be changed (for example, link down), the routing management agent module performs routing management: the ECMP can be replaced by a single route through an ip route replace command. When the route is switched, the system is always kept to have one-hop route (except for the exception of two ports).
Specifically, S611 may include the following sub-steps:
s6111, the routing management agent module listens for the link event, and when it is monitored that the NIC0 is in down state, checks the status of the NIC1 (check NIC status); when the NIC1 is snooped as being in the down state, the state of the NIC0 is checked (check NIC0 status).
S6112, when the status of the NIC0 only is up (the status of the NIC1 is down), the route management agent module switches the route to the NIC 0.
When the status of the NIC1 only is up (the status of the NIC0 is down), the route management agent module switches the route to the NIC 1;
when the states of only the NIC0 and the NIC1 are both down, the route management agent module does not switch the route (down nothing).
S612, the routing management agent module judges whether to continue monitoring the link event, and when not, the routing management agent module turns to S700; when the snooping is continued, the flow goes to S6111 to execute the next loop processing.
S621, the routing management agent module starts thread 2.
And the route management agent module analyzes the proc file, acquires the watchdog _ count counter, manages the route if the exchanger LLDP message is not received for a long time (such as 2 minutes) (namely the watchdog _ count exceeds a set threshold), and switches the ECMP route into a single route.
Specifically, S621 may include the following sub-steps:
s6211, the routing management agent module reads the watchdog _ count _0, and checks (or determines) whether the NIC0 link is normal.
S6212, the routing management agent module reads the watchdog _ count _1 and determines whether the NIC1 link is normal.
S6213, when both NIC0 and NIC1 are normal, if there is a route missing currently, the route management agent module adds the route after a preset time (such as 120S) to recover two hops.
When only NIC0 is normal, the route management agent module switches the route to NIC 0;
when only NIC1 is normal, the route management agent module switches the route to NIC 1;
when neither NIC0 nor NIC1 is normal, the route management agent module does not switch routes (do nothing).
S622, the route management agent module judges whether to continue checking, and when the checking is not continued, the process goes to S700; when the check is continued, the flow goes to S6211 to execute the next loop.
And S700, ending.
Thread 1 and thread 2 described above may be in parallel.
Fig. 7 is a flowchart illustrating a method for a server to manage a route of an inter-backup device according to an embodiment of the present invention.
In the embodiment of the present invention, the server may include: the routing management system comprises a kernel detection module and a routing management agent module, wherein the kernel detection module is used for being connected with the mutual standby equipment, and the routing management agent module is connected with the kernel detection module.
As shown in fig. 7, the method comprises the steps of:
s710, the kernel detection module sends a detection message to the mutual backup device, receives a link layer discovery protocol LLDP message fed back by the mutual backup device according to the detection message, and outputs the LLDP message to the routing management agent module;
s720, the route management agent module analyzes the LLDP message, acquires the ECMP state of the equivalent multi-path route of the mutual backup device, and configures a route table of the mutual backup device based on the ECMP state.
In some embodiments, after configuring the routing table of the mutual standby device based on the ECMP status, the method may further include: and the routing management agent module routes the flow data to partial equipment or all equipment in the mutual backup equipment according to the routing table.
In some embodiments, after receiving the link layer discovery protocol LLDP packet fed back by the inter-backup device according to the probe packet, the method may further include: the route management agent module monitors the link state of the mutual backup equipment, and when some ports in the mutual backup equipment are abnormal, a route table of the mutual backup equipment is configured and a one-hop route is kept.
In some embodiments, the method may further comprise: and when the routing management agent module does not receive the LLDP message within the preset time, directly configuring a routing table of the mutual backup device.
In some embodiments, the method may further comprise: the kernel detection module carries out information interaction with the mutual standby equipment through a network card, wherein the network card is respectively connected with the mutual standby equipment and the kernel detection module.
In some embodiments, the number of the network cards is multiple, and the multiple network cards are arranged independently; the number of the mutual backup devices is multiple, and the multiple mutual backup devices are arranged independently.
In some embodiments, the network card comprises: a first network card and a second network card; the mutual backup device includes: the system comprises a first switch and a second switch, wherein the first switch is connected with a first network card to form a first link; the second switch is connected with the second network card to form a second link.
In some embodiments, the method for managing the mutual backup device route by the server may further include: the routing management agent module receives a request for upgrading the mutual backup equipment; the routing management agent module responds to the request, firstly switches the flow data to the first link, and then upgrades the second switch; and after the second switch is upgraded, the routing management agent module switches the flow data to the second link and then upgrades the first switch.
In this embodiment, configuring the routing table of the interworking device based on the ECMP state may include the following 4 cases:
case 1: when the first link and the second link are both normal, if no route exists or only one-hop route exists at present, the route management agent module adds the route after the preset time (such as 120s) and recovers the two-hop route;
case 2: when only the first link is normal, the route management agent module switches the route to the first network card;
case 3: when only the second link is normal, the route management agent module switches the route to the second network card;
case 4: and when the first link and the second link are abnormal, the route management agent module does not switch the route.
Whether the first link is normal or not can be represented by whether the first network card, the cable and the interface component in the first link are normal or not, and can also be represented by whether the first network card is normal or not. For example, when the first network card is normal, it can be represented by up; when the first network card is abnormal, the first network card can be represented by down, and the like. Similarly, whether the second link is normal or not may be represented by whether the second network card, the cable, and the interface component in the second link are normal or not.
In addition, in the case of no conflict, those skilled in the art can flexibly adjust the order of the above operation steps or flexibly combine the above steps according to actual needs. Various implementations are not described again for the sake of brevity.
In addition, the method may perform various operations performed by the server, and may achieve technical effects that the server can achieve, and the specific details may refer to contents in the reference server, and the details of this part are not described again.
Fig. 8 is a schematic diagram of a framework of a server for managing a route of an inter-backup device according to an embodiment of the present invention.
As shown in fig. 8, the framework may include a Central Processing Unit (CPU)801 that can perform respective operations by the above-described respective embodiments according to a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM803, various programs and data necessary for the operation of the system architecture are also stored. The CPU 801, ROM 802, and RAM803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811.
It should be noted that the apparatus (server) in each of the above embodiments may be used as an execution main body in the method in each of the above embodiments, and may implement corresponding processes in each method to achieve the same technical effect, and for brevity, the content in this aspect is not described again.
In some embodiments, a server for managing mutually-provisioned device routes may include: a memory and a processor. Wherein the memory may be used to store programs; the processor may be configured to execute a program stored in the memory, the program causing the processor to perform the method illustrated in the embodiment of fig. 7.
In some embodiments, the above-described methods may be programmed as instructions forming a computer-readable storage medium. The computer-readable storage medium may include: instructions which, when executed on a computer, cause the computer to perform the method described in the embodiment of fig. 7.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (20)

1. A server for managing routing of inter-backup devices, comprising: the device comprises a kernel detection module and a route management agent module, wherein the kernel detection module is used for being connected with the mutual backup device, and the route management agent module is connected with the kernel detection module, wherein:
the kernel detection module is configured to send a detection packet to the inter-backup device, receive a link layer discovery protocol packet fed back by the inter-backup device according to the detection packet, and output the link layer discovery protocol packet to the route management agent module;
the route management agent module includes a route configuration unit,
the route configuration unit is configured to analyze the link layer discovery protocol packet, obtain an equivalent multipath routing state of the inter-backup device, and configure a routing table of the inter-backup device based on the equivalent multipath routing state;
the number of the mutual backup devices is multiple, and the multiple mutual backup devices are arranged independently.
2. The server of claim 1, wherein the route management agent module further comprises:
and the data routing unit is used for routing the flow data to part of or all of the devices in the mutual backup device according to the routing table.
3. The server of claim 1, wherein the route management agent module further comprises:
the state monitoring unit is used for monitoring the link state of the mutual standby equipment;
and the route reconfiguration unit is used for reconfiguring a routing table of the mutual backup device when monitoring that part of ports in the mutual backup device are abnormal, and keeping a one-hop route in the routing table.
4. The server of claim 1, wherein the route management agent module further comprises:
and the routing direct configuration unit is used for directly configuring a routing table of the mutual backup device when the link layer discovery protocol message is not received within the preset time.
5. The server according to any one of claims 1-4, further comprising:
and the network card is connected with the kernel detection module and is used for being connected with the mutual standby equipment and carrying out information interaction with the mutual standby equipment.
6. The server of claim 5, wherein:
the number of the network cards is multiple, and the network cards are arranged independently.
7. The server of claim 6, wherein:
the network card includes: a first network card and a second network card;
the mutual backup device comprises: a first switch and a second switch;
the first switch is connected with the first network card to form a first link; and the second switch is connected with the second network card to form a second link.
8. The server of claim 7, wherein the route management agent module further comprises:
the software upgrading unit is used for receiving a request for upgrading the mutual backup equipment; responding to the request, firstly switching flow data to the first link, and then upgrading the second switch; and after the second switch is upgraded, switching the flow data to the second link, and then upgrading the first switch.
9. The server according to claim 7, wherein the configuring the routing table of the interworking apparatus based on the equal cost multipath routing state comprises:
when the first link and the second link are both normal, if no route or only one-hop route exists currently, the route management agent module adds the route after the preset time, and recovers the two-hop route;
or,
when only the first link is normal, the route management agent module switches the route to the first network card;
or,
when only the second link is normal, the route management agent module switches the route to the second network card;
or,
and when the first link and the second link are abnormal, the route management agent module does not switch the route.
10. A method for a server to manage a route of a mutual backup device, the server comprising: the method comprises a kernel detection module and a route management agent module, wherein the kernel detection module is used for being connected with the mutual backup equipment, and the route management agent module is connected with the kernel detection module, and the method comprises the following steps:
the kernel detection module sends a detection message to the mutual standby equipment, receives a link layer discovery protocol message fed back by the mutual standby equipment according to the detection message, and outputs the link layer discovery protocol message to the routing management agent module;
the route management agent module analyzes the link layer discovery protocol message, acquires an equivalent multi-path route state of the mutual backup equipment, and configures a route table of the mutual backup equipment based on the equivalent multi-path route state;
the number of the mutual backup devices is multiple, and the multiple mutual backup devices are arranged independently.
11. The method of claim 10, wherein after configuring the routing table of the interworking apparatus based on the equal cost multipath routing state, further comprising:
and the routing management agent module routes the flow data to part of or all of the devices in the mutual backup device according to the routing table.
12. The method according to claim 10, wherein after receiving the link layer discovery protocol packet fed back by the inter-backup device according to the probe packet, the method further comprises:
the route management agent module monitors the link state of the mutual backup equipment, and when part of ports in the mutual backup equipment are abnormal, a route table of the mutual backup equipment is configured and one-hop route is kept.
13. The method of claim 10, further comprising:
and when the routing management agent module does not receive the link layer discovery protocol message within the preset time, directly configuring a routing table of the mutual backup equipment.
14. The method according to any one of claims 10-13, further comprising:
the kernel detection module performs information interaction with the mutual standby equipment through a network card, wherein the network card is respectively connected with the mutual standby equipment and the kernel detection module.
15. The method as recited in claim 14, wherein:
the number of the network cards is multiple, and the network cards are arranged independently.
16. The method of any one of claims 15, wherein:
the network card includes: a first network card and a second network card;
the mutual backup device comprises: the first switch is connected with the first network card to form a first link; and the second switch is connected with the second network card to form a second link.
17. The method of claim 16, further comprising:
the routing management agent module receives a request for upgrading the mutual standby equipment;
the routing management agent module responds to the request, firstly switches the flow data to the first link, and then upgrades the second switch;
after the second switch is upgraded, the routing management agent module switches the flow data to the second link, and then upgrades the first switch.
18. The method of claim 16, wherein configuring the routing table of the interworking apparatus based on the equal cost multipath routing state comprises:
when the first link and the second link are both normal, if no route or only one-hop route exists currently, the route management agent module adds the route after the preset time, and recovers the two-hop route;
or,
when only the first link is normal, the route management agent module switches the route to the first network card;
or,
when only the second link is normal, the route management agent module switches the route to the second network card;
or,
and when the first link and the second link are abnormal, the route management agent module does not switch the route.
19. A server for managing routing of inter-backup devices, comprising:
a memory for storing a program;
a processor for executing a program stored by the memory, the program causing the processor to perform the method of any of claims 10-18.
20. A computer-readable storage medium, comprising: the instructions that, when executed, cause the apparatus to,
when run on a computer, cause the computer to perform the method of any one of claims 10-18.
CN201710771330.4A 2017-08-31 2017-08-31 Server, method for managing routing of mutual backup device and storage medium Active CN109428821B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710771330.4A CN109428821B (en) 2017-08-31 2017-08-31 Server, method for managing routing of mutual backup device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710771330.4A CN109428821B (en) 2017-08-31 2017-08-31 Server, method for managing routing of mutual backup device and storage medium

Publications (2)

Publication Number Publication Date
CN109428821A CN109428821A (en) 2019-03-05
CN109428821B true CN109428821B (en) 2021-06-11

Family

ID=65505285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710771330.4A Active CN109428821B (en) 2017-08-31 2017-08-31 Server, method for managing routing of mutual backup device and storage medium

Country Status (1)

Country Link
CN (1) CN109428821B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200310784A1 (en) * 2019-03-28 2020-10-01 Juniper Networks, Inc. Software upgrade deployment in mixed network of in-service software upgrade (issu)-capable and issu-incapable devices
CN110365577B (en) * 2019-07-24 2021-10-15 绿盟科技集团股份有限公司 Drainage system of safety resource pool and safety inspection method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102055673A (en) * 2010-12-30 2011-05-11 上海顶竹通讯技术有限公司 Multi-route network and route switching method
CN102404234A (en) * 2011-12-26 2012-04-04 杭州华三通信技术有限公司 Flow transfer method and equipment
CN104394016A (en) * 2014-11-25 2015-03-04 杭州华三通信技术有限公司 ISSU (In-Service Software Upgrade) method and system
CN104394075A (en) * 2014-10-27 2015-03-04 杭州华三通信技术有限公司 Message transmission method and equipment
CN105207995A (en) * 2015-08-18 2015-12-30 上海斐讯数据通信技术有限公司 SDN-based VLAN dynamic registering method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8718060B2 (en) * 2006-07-31 2014-05-06 Cisco Technology, Inc. Technique for multiple path forwarding of label-switched data traffic

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102055673A (en) * 2010-12-30 2011-05-11 上海顶竹通讯技术有限公司 Multi-route network and route switching method
CN102404234A (en) * 2011-12-26 2012-04-04 杭州华三通信技术有限公司 Flow transfer method and equipment
CN104394075A (en) * 2014-10-27 2015-03-04 杭州华三通信技术有限公司 Message transmission method and equipment
CN104394016A (en) * 2014-11-25 2015-03-04 杭州华三通信技术有限公司 ISSU (In-Service Software Upgrade) method and system
CN105207995A (en) * 2015-08-18 2015-12-30 上海斐讯数据通信技术有限公司 SDN-based VLAN dynamic registering method

Also Published As

Publication number Publication date
CN109428821A (en) 2019-03-05

Similar Documents

Publication Publication Date Title
US11323307B2 (en) Method and system of a dynamic high-availability mode based on current wide area network connectivity
US10715411B1 (en) Altering networking switch priority responsive to compute node fitness
US10693813B1 (en) Enabling and disabling links of a networking switch responsive to compute node fitness
CN103621027B (en) Communication route control system and communication route control method
CN101917337B (en) Device and method for interconnecting router cluster middle plates
CN110750393B (en) Method, device, medium and equipment for avoiding network service double-machine hot standby brain cracking
CN103188173B (en) A kind of switch device
EP3316555B1 (en) Mac address synchronization method, device and system
GB2407887A (en) Automatically modifying fail-over configuration of back-up devices
CN110166355B (en) Message forwarding method and device
EP3866393A1 (en) Data center traffic exchange method and apparatus, device and storage medium
CN110868278B (en) Method for dual-computer redundancy of communication front-end processor of rail transit comprehensive monitoring system
US11095510B2 (en) Aggregated networking device maintenance system
CN109428821B (en) Server, method for managing routing of mutual backup device and storage medium
US11258666B2 (en) Method, device, and system for implementing MUX machine
JP6383232B2 (en) Relay system and switch device
CN105763442A (en) PON system and method avoiding interruption of LACP aggregation link in main-standby switching process
US10855518B2 (en) Computer having an embedded switch
CN106657355B (en) Cluster management method and device
WO2021244500A1 (en) Backup state determination method, apparatus and system
CN110719205B (en) Access switch, online recovery method, system and computer storage medium
CN114124803A (en) Device management method, device, electronic device and storage medium
EP3627766B1 (en) Method and system for switching between active bng and standby bng
JP6601198B2 (en) Relay device, setting method, setting program, and information processing system
CN117596284B (en) Method, device, computer equipment and storage medium for data transmission

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