CN109672618A - Redundant interface processing method, device, server and storage medium - Google Patents
Redundant interface processing method, device, server and storage medium Download PDFInfo
- Publication number
- CN109672618A CN109672618A CN201910049233.3A CN201910049233A CN109672618A CN 109672618 A CN109672618 A CN 109672618A CN 201910049233 A CN201910049233 A CN 201910049233A CN 109672618 A CN109672618 A CN 109672618A
- Authority
- CN
- China
- Prior art keywords
- interface
- virtual
- mac address
- driving
- redundant
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/58—Association of routers
- H04L45/586—Association of routers of virtual routers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45504—Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/22—Alternate routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/58—Association of routers
- H04L45/583—Stackable routers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/618—Details of network addresses
- H04L2101/622—Layer-2 addresses, e.g. medium access control [MAC] addresses
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present invention relates to field of communication technology, a kind of redundant interface processing method, device, server and storage medium are provided, which comprises the member interface that the driving that the driving of virtual interface receives redundant interface is sent adds order;The driving of virtual interface determines whether virtual interface is active, if virtual interface is active, virtual mac address is sent to the physical network card of server, and the corresponding relationship between virtual mac address and virtual interface is added to mac address table.The present invention is when virtual interface is state of activation, just there is corresponding virtual mac address in the mac address table of its corresponding server, when virtual interface is unactivated state, corresponding virtual mac address is not present in the mac address table of its corresponding server, to solve the problems, such as that two stacking routers can not carry out normal communication by redundant interface in specific networking.
Description
Technical field
The present invention relates to fields of communication technology, in particular to a kind of redundant interface processing method, device, server
And storage medium.
Background technique
In order to improve the reliability of router, usually more routers are stacked, to logically create one
The unified externally offer routing function of router is provided, it can be by match to the interface for stacking member's router in router
It sets, so that being mutually redundant between the interface of member's router, when the interface of member's router breaks down, each other with it
The interface of another member's router of redundancy can take over the business of the malfunctioning interface, to guarantee outward service not by
It is disconnected, promote the reliability of router.
When the router of stacking is virtual router, in specific networking, two stacking routers can not pass through
Redundant interface carries out normal communication, please refers to Fig. 1, Fig. 1 show a kind of two stacking routers can not by redundant interface into
The schematic diagram of a scenario of row normal communication.The second object on the first physical interface and second server in Fig. 1 in first server
It manages interface to communicate to connect by physical router, operation has the first virtual router and the second virtual flow-line in first server
Device has the first virtual interface on the first virtual router, there is the second virtual interface on the second virtual router, on second server
Operation has third virtual router and the 4th virtual router, there is third virtual interface on third virtual router, and the 4th is virtual
There is the 4th virtual interface on router.
First virtual router and third virtual router, which stack, forms the first stacking router, the first virtual interface
Matched with third virtual interface by the first intelligent elastic framework (Intelligent Resilient Framework, IRF) link
It is set to the first redundant interface, after the completion of configuration, media access control (Media in the first physical interface and the second physical interface
Access Control Address, MAC) the first virtual interface is just saved in address table and third virtual interface is jointly external
The first virtual mac address;Second virtual router and the 4th virtual router stack and form the second stacking router,
Second virtual interface and the 4th virtual interface are configured to the second redundant interface by the 2nd IRF link, after the completion of configuration, first
The second virtual interface is just saved in mac address table in physical interface and the second physical interface and the 4th virtual interface is jointly external
The second virtual mac address, only one member interface in redundant interface is active under normal circumstances, carry out message
Transmitting-receiving, another member interface are in unactivated state, only when the member interface of state of activation breaks down, inactive shape
The member interface of state just will become state of activation, the business of taking over fault member interface.When the first virtual interface and the 4th virtual
Interface is state of activation, the second virtual interface and third virtual interface when being unactivated state, and message is sent out from the first virtual interface
It send to the first physical interface, the first physical interface finds that there are the second virtual mac address in the mac address table of oneself, will just report
Text is forwarded to third virtual interface, but at this point, third virtual interface is unactivated state, cannot receive and dispatch message, which will
It is dropped, at this point, just will appear the first stacking router and the second stacking router can not normally be transmited and receive telegrams by redundant interface
The situation of text leads to the communication disruption between the first stacking router and the second stacking router.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of redundant interface processing method, device, server and storage medium,
When virtual interface is state of activation, just there is corresponding virtual mac address in the mac address table of corresponding server, it is empty
When quasi- interface is unactivated state, corresponding virtual mac address is not present in the mac address table of corresponding server, with solution
The problem of two stacking routers can not carry out normal communication by redundant interface certainly in specific networking.
To achieve the goals above, technical solution used in the embodiment of the present invention is as follows:
In a first aspect, the embodiment of the invention provides a kind of redundant interface processing method, applied to running on server
Virtual router, virtual router includes virtual interface, and server is previously stored with mac address table, which comprises empty
The member interface that the driving that the driving of quasi- interface receives redundant interface is sent adds order, includes void in member interface addition order
Quasi- MAC Address, the virtual mac address is the MAC Address of redundant interface;The driving of virtual interface determines whether virtual interface is located
In state of activation, if virtual interface is active, virtual mac address is sent to the physical network card of server, it will
Corresponding relationship between virtual mac address and virtual interface is added to mac address table.
Second aspect, the embodiment of the invention also provides a kind of redundant interface processing unit, described device includes receiving mould
Block and determining module.Wherein, the member interface addition order that the driving that receiving module is used to receive redundant interface is sent, Cheng Yuanjie
It include virtual mac address in mouth addition order, virtual mac address is the MAC Address of redundant interface;;Determining module is for determining
Whether virtual interface is active, if virtual interface is active, virtual mac address is sent to server
Corresponding relationship between virtual mac address and virtual interface is added to mac address table by physical network card.
The third aspect, the embodiment of the invention also provides a kind of server, the server includes: one or more processing
Device;Memory, for storing one or more programs, when one or more of programs are held by one or more of processors
When row, so that one or more of processors realize above-mentioned redundant interface processing method.
Fourth aspect, the embodiment of the present invention also provide a kind of computer readable storage medium, are stored thereon with computer journey
Sequence, the computer program realize above-mentioned redundant interface processing method when being executed by processor.
Compared with the prior art, a kind of redundant interface processing method, device, server and storage provided in an embodiment of the present invention
Medium, firstly, issuing member interface addition on virtual router when user needs virtual interface being added to redundant interface and asking
It asks, the driving of redundant interface is based on member interface addition request, obtains virtual mac address, generates according to the virtual mac address
Member interface addition order is sent to the driving of virtual interface after member interface addition order;Then, the drive of virtual interface
Dynamic to judge whether virtual interface is currently active, when virtual interface is active, the driving of virtual interface will
Virtual mac address is sent to the physical network card of server, and the corresponding relationship between virtual mac address and virtual interface is added
To mac address table.Compared with prior art, the embodiment of the present invention is when virtual interface is state of activation, just by virtual mac address
Be added in the mac address table of corresponding server, thus solve in specific networking two stacking routers without
The problem of method carries out normal communication by redundant interface.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, special embodiment below, and appended by cooperation
Attached drawing is described in detail below.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached
Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair
The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this
A little attached drawings obtain other relevant attached drawings.
Fig. 1 shows two stacking routers of one kind can not carry out the schematic diagram of a scenario of normal communication by redundant interface.
Fig. 2 shows the block diagrams of server provided in an embodiment of the present invention.
Fig. 3 shows the redundant interface processing method flow chart of additions and deletions member interface provided in an embodiment of the present invention.
Fig. 4 shows the redundant interface processing method flow chart of state change provided in an embodiment of the present invention.
Fig. 5 shows the box signal of the redundant interface processing unit of the driving of virtual interface provided in an embodiment of the present invention
Figure.
Fig. 6 shows the box signal of the redundant interface processing unit of the driving of redundant interface provided in an embodiment of the present invention
Figure.
Icon: 100- server;101- memory;102- physical network card;103- processor;104- system bus;200-
The redundant interface processing unit of the driving of virtual interface;201- receiving module;202- determining module;203- preserving module;400-
The redundant interface processing unit of the driving of redundant interface;401- detection module.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete
Ground description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Usually exist
The component of the embodiment of the present invention described and illustrated in attached drawing can be arranged and be designed with a variety of different configurations herein.Cause
This, is not intended to limit claimed invention to the detailed description of the embodiment of the present invention provided in the accompanying drawings below
Range, but it is merely representative of selected embodiment of the invention.Based on the embodiment of the present invention, those skilled in the art are not doing
Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present invention.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.Meanwhile of the invention
In description, term " first ", " second " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.
Referring to figure 2., Fig. 2 shows the block diagrams of server 100 provided in an embodiment of the present invention.Server 100
It may be, but not limited to, host, property server etc., which can be provided, has the entity device of identical function with the server.At this
In inventive embodiments, server 100 can be the first server in Fig. 1, or the second server in Fig. 1, service
The operating system of device 100 may be, but not limited to, Windows system, linux system etc..The server 100 includes storage
Device 101, physical network card 102, processor 103 and system bus 104, the memory 101, physical network card 102 and processor 103
It is connected by system bus 104, processor 103 is for executing the machine-executable instruction stored in memory 101 in memory
When the machine-executable instruction stored in 101 is called or executed by processor 103, which promotes processor
103 execute the redundant interface processing method in following embodiments.
Wherein, memory 101 may include high-speed random access memory (RAM:Random Access Memory),
It may further include non-labile memory (non-volatile memory), for example, at least a magnetic disk storage.In one kind
In optional embodiment, redundant interface Reth1 and virtual interface Interface1 shown in table 1 in the following embodiments of the present invention
It can store in memory 101 with the corresponding relationship of interface2.
Physical network card 102 can be Ethernet physical network card, and there are physical interfaces on physical network card 102, pass through processor
The driving of the virtual interface run in 103 and the driving of redundant interface, the physical interface can invent multiple virtual interfaces, object
It manages interface and safeguards a mac address table, the corresponding pass between virtual mac address and virtual interface is stored in the mac address table
System, specifically, processor 103 can be according to the processing order of different member interfaces (such as member interface addition order, member
Interface delete command) or the variation of state of virtual interface (become unactivated state from state of activation or from inactive shape
State becomes state of activation) corresponding relationship in mac address table between virtual mac address and virtual interface is updated (for example,
Corresponding relationship between virtual mac address and virtual interface is added in mac address table, or by virtual mac address and empty
Corresponding relationship between quasi- interface is removed from mac address table), the final redundant interface realizing the above embodiment of the present invention and disclosing
Processing method.
It is stacked in the scene that router can not carry out normal communication by redundant interface at a kind of two shown in fig. 1, the
Two member interfaces of one redundant interface are belonging respectively to the virtual router run on two different servers, i.e., first is virtual
Interface belongs to the first virtual router run in first server, third virtual interface belongs to run on second server
Two member interfaces of three virtual routers, the second redundant interface are belonging respectively to the virtual road run on two different servers
By device, i.e. the second virtual interface belongs to the second virtual router run in first server, the 4th virtual interface belongs to second
The 4th virtual router run on server swashs when respectively there is a virtual network port to be in first server and second server
When the state of living, another virtual network port are in unactivated state, it may appear that nothing between the first redundant interface and the second redundant interface
The problem of method normal communication, can not pass through first so as to cause between corresponding first stacking router and the second stacking router
Redundant interface and the second redundant interface are communicated, and in order to solve the above problem under Fig. 1 scene, present invention offer is implemented as follows
Example is realized can be superfluous by the first redundant interface and second between the first stacking router and the second stacking router under Fig. 1 scene
Remaining interface is communicated.
First embodiment
Referring to figure 3., Fig. 3 shows the redundant interface processing method stream of additions and deletions member interface provided in an embodiment of the present invention
Cheng Tu, the executing subject of this method are server 100, are in the present embodiment in Fig. 1 with server 100 for ease of description
First server for be described, method includes the following steps:
Step S101, the member interface that the driving that the driving of virtual interface receives redundant interface is sent add order, member
It include virtual mac address in interface addition order, virtual mac address is the MAC Address of redundant interface.
Redundant interface is the one kind with the logic interface of active and standby function, is a kind of L 3 virtual interface.Implement in the present invention
In example, redundant interface can be virtual by this by executing the order of creation redundant interface on the virtual interface of the virtual router
Interface is configured to redundant interface, and multiple virtual interfaces are added to redundant interface, form the member interface of redundant interface.
It is mutually redundant between the member interface of redundant interface, the same moment, only one in multiple member interfaces is in
State of activation, can externally provide packet sending and receiving function, and other member interfaces are in unactivated state.
Wherein it is possible to which the priority according to each member interface determines the member interface of state of activation, for example, most by priority
The state of high member interface is set as state of activation, sets unactivated state for the state of remaining member interface, works as place
The state of the one of them when member interface of state of activation occurs abnormal, in other member interfaces in unactivated state
It is changed into state of activation from unactivated state, to take over the packet sending and receiving function of abnormal member interface, for example, shown in table 1
The corresponding relationship of redundant interface Reth1 and virtual interface InterfaceA1 and interfaceB1.
Table 1
Redundant interface | Virtual interface |
Reth1 | InterfaceA1、interfaceB1 |
Redundant interface Reth1 is corresponding, and there are two member interfaces: Interface A1 and Interface B1.Wherein,
Interface A1 is main member interface, and is active, and Interface B1 is standby member interface, and in inactive
State;When Interface A1 is abnormal, Interface B1 is changed into state of activation from unactivated state, adapter tube
The packet sending and receiving business of Interface A1, the active and standby identity of member interface changes at this time, based on Interface B1 at
Member's interface, Interface A1 are standby member interface.
In embodiments of the present invention, the corresponding all member interfaces of redundant interface share the same virtual mac address, creation
When redundant interface, the driver of corresponding redundant interface can generate a virtual mac address according to preset rules, which connects
The corresponding all member interfaces of mouth share the virtual mac address.Wherein, preset rules be with being randomly generated Virtual MAC
Location is also possible to specify virtual mac address in configuration file in advance.
Member interface addition order is that the member that adds into redundant interface executed on virtual router based on user is connect
What the order of mouth generated, which can be sent to the driver of redundant interface first, and the driver of redundant interface receives
After the order, virtual mac address is obtained, then generates member interface addition order according to the virtual mac address, and be sent to void
The driving of quasi- interface.
Step S102, the driving of virtual interface determine whether virtual interface is active.
In embodiments of the present invention, when the driver of virtual interface receives member interface addition order, from this
Virtual mac address is obtained in member interface addition order, then, judges whether the state of virtual interface is active, if
The state of virtual interface is active, and thens follow the steps S103, if the state of virtual interface is in unactivated state, is held
Row step S104.
Virtual mac address is sent to the physical network card of server by step S103, by virtual mac address with virtually connect
Corresponding relationship between mouthful is added to mac address table.
In embodiments of the present invention, the physical network card 102 of server 100 safeguards that a mac address table, mac address table are used
In saving the corresponding relationship between virtual mac address and virtual interface, when the lower electricity of server 100, mac address table can store to
Carrying out persistence preservation in the memory 101 of server 100 can be extensive by MAC Address when so that server 100 powering on again
Again to physical network card 102.If virtual interface is active, virtual mac address is sent to clothes by the driving of virtual interface
The physical network card 102 of business device 100, is added to mac address table for the corresponding relationship between virtual mac address and virtual interface.
In embodiments of the present invention, the message of the virtual interface of virtual router eventually passes through the physics of server 100
PF mouthfuls of the physical interface (Physical Function, PF) of network interface card 102 is sent, and physical interface, which can be, supports single I/O
The PF mouth of the physical network card 102 of virtualization SR-IOV (Single-root I/O virtualization) function, one PF mouthfuls
VF mouthfuls multiple, i.e. virtual interface can be fictionalized, which can be multiple virtual for what is run on the same physical equipment
Router uses, a series of shared one or more physical resources of multiple VF mouthfuls of same PF mouthfuls, by using hardware mailbox
The communication channel of each VF mouthfuls He PF mouthfuls are realized with doorbell register.
In embodiments of the present invention, PF mouthfuls receive message after, first in mac address table search target MAC (Media Access Control) address pair
Then message is sent corresponding virtual interface by the virtual interface answered, therefore, virtual interface by PF mouthfuls in order to can be transmited and receive telegrams
Text, the driving of virtual interface need virtual mac address to be written in mac address table.As an implementation, virtual interface
Driving can by calling the first preset function realize, the first preset function can be PF mouthful to VF mouthfuls of offers to MAC
The interface function of the corresponding relationship between virtual mac address and virtual interface is added in the table of location.
Step S104, the driving of virtual interface are not responding to member interface addition order.
In embodiments of the present invention, in order to realize when the state of virtual interface changes, timely update MAC Address
Table, the embodiment of the invention also includes step S105.
The driving of step S105, virtual interface store virtual mac address to the memory of server, so that virtual interface
Virtual mac address when network state changes according to the memory storage of server updates mac address table.
In embodiments of the present invention, when the driver of virtual interface receives member interface addition order, from this
Virtual mac address is obtained in member interface addition order, and the virtual mac address is stored into the memory of server 100, i.e.,
No matter the state of current virtual interface is state of activation or unactivated state, and the driving of virtual interface all can be by the Virtual MAC
Address is stored into the memory of server 100, when the state of virtual interface becomes unactivated state from state of activation, according to clothes
The virtual mac address stored in memory of business device 100 is deleted the virtual mac address and from mac address table, and virtual interface is worked as
State when becoming state of activation from unactivated state, the virtual mac address stored in memory according to server 100 is by the void
Quasi- MAC Address is added to mac address table.
In embodiments of the present invention, when user does not need interface redundancy function, removing members interface command can be executed
Specified member interface is deleted from redundant interface, therefore, the embodiment of the invention also includes step S106-S107.
Step S106, the driving of virtual interface receive the member interface delete command that redundant interface is sent, work as virtual interface
When being active, virtual mac address is sent to the physical network card of server by the driving of virtual interface, by Virtual MAC
Corresponding relationship between address and virtual interface is removed from mac address table.
In embodiments of the present invention, the member interface that the driving that the driving of virtual interface receives redundant interface is sent is deleted
When order, whether the driving of virtual interface first determines whether the state of current virtual interface for state of activation;Wherein, if in swashing
State living, then call the second preset function to remove virtual mac address from mac address table, wherein the second preset function can be with
It is the interface that the corresponding relationship between virtual mac address and virtual interface is provided in the PF mouthfuls of slave mac address tables provided to VF mouthfuls
Function;
Mac address table is not processed if in unactivated state.
The virtual mac address stored in memory of server is removed in the driving of step S107, virtual interface.
In embodiments of the present invention, become unactivated state from state of activation when virtual interface or become from unactivated state
It when for state of activation, needs to be updated mac address table according to virtual mac address, to guarantee virtual before and after state change hand over
Changing planes still can externally provide packet sending and receiving business, and therefore, the embodiment of the invention also includes step S201-S202, please refer to
Fig. 4, Fig. 4 show the redundant interface processing method flow chart of state change provided in an embodiment of the present invention, this method include with
Lower step:
Step S201, it is superfluous when the driving of redundant interface detects that virtual interface becomes unactivated state from state of activation
The driving of remaining interface sends to virtual interface and deletes message, so that the driving of virtual interface is based on deleting message by Virtual MAC
Corresponding relationship between location and virtual interface is removed from mac address table.
In embodiments of the present invention, virtual interface, which is active, refers to that virtual interface can externally provide normal message
Transmission-receiving function, when virtual interface occurs abnormal, for example, software anomaly, user's manual configuration void occurs in the driving of virtual interface
Quasi- interface does not work, abnormal virtual interface restores the switching for normally causing active and standby interface, causes to be currently at state of activation
Virtual interface needs to give back packet sending and receiving business the virtual interface etc. after restoring, at this point, the state of virtual interface will become
For unactivated state, the virtual interface in unactivated state cannot externally provide packet sending and receiving function.When the drive of redundant interface
It is dynamic when detecting that virtual interface becomes unactivated state, it will according to the virtual mac address being stored in the memory of server 100
Virtual mac address in mac address table removes.
Step S202, it is superfluous when the driving of redundant interface detects that virtual interface becomes state of activation from unactivated state
The driving of remaining interface sends addition message to virtual interface, so that the driving of virtual interface is based on addition message by Virtual MAC
Corresponding relationship between location and virtual interface is added to mac address table.
In embodiments of the present invention, when user's manual configuration virtual interface is started to work or virtual interface abnormal restoring
Afterwards, again adapter tube packet sending and receiving business when, virtual interface becomes state of activation from unactivated state, when redundant interface driving examine
When measuring virtual interface becomes state of activation, addition message can be sent to the driving of virtual interface, the driving of virtual interface receives
To after the addition message, the virtual mac address in the memory for being stored in server 100 before is added into mac address table.
It should be noted that the second server in Fig. 1 can also execute method performed by above-mentioned server 100, this
Embodiment repeats no more.
Second embodiment
In order to clearly demonstrate the embodiment of the present invention is how to solve two stacking routers in specific networking
It the problem of can not carrying out normal communication by redundant interface, is still illustrated by taking the network that Fig. 1 is provided as an example herein.Fig. 1
In, the first virtual router and third virtual router composition first stack router, create first on the first stacking router
When redundant interface, the driving of the first redundant interface can generate first virtual mac address at random.
When the first virtual interface and third virtual interface are added to the first redundant interface, the first virtual interface is arranged
For state of activation, since the first virtual interface is active, the first virtual mac address is write in the driving of the first virtual interface
Enter into the mac address table of the first physical interface, third virtual interface is unactivated state, and the driving of third virtual interface will not
First virtual mac address is written into the mac address table of the second physical interface, as a result, in the MAC Address of the first physical interface
Including content as shown in Table 2:
Table 2
First virtual interface | First virtual mac address |
Similarly, the second virtual router and the 4th virtual router composition second stack router, and second stacks routing
When creating the second redundant interface on device, the driving of the second redundant interface generates second virtual mac address at random, by the second void
When quasi- interface and the 4th virtual interface are added to the second redundant interface, the second virtual interface of setting is unactivated state, and the 4th is empty
Quasi- interface is state of activation, and similarly, the second virtual mac address is written to the second physical interface for the driving of the 4th virtual interface
Mac address table in, the driving of the second virtual interface the second virtual mac address will not be written to the MAC of the first physical interface
In address table, therefore, include content as shown in table 3 in the MAC Address of the second physical interface:
Table 3
4th virtual interface | Second virtual mac address |
When message is sent to the first physical interface from the first virtual interface, the driving of the first physical interface finds oneself
The second virtual mac address is not present in mac address table, just forwards the packet to the physics road communicated to connect with the first physical interface
By device, which is sent to the second physical interface, the MAC Address of the driving discovery oneself of the second physical interface by physical router
There are the second virtual mac address in table, which is sent to corresponding 4th virtual interface, are achieved in the routing of the first stacking
Redundant interface between device and the second stacking router can realize positive normal open by the first virtual interface and the 4th virtual interface
Letter.
It should be noted that the first virtual interface and the 4th virtual interface are state of activation, the second virtual interface and third
Virtual interface is that unactivated state can be user configuration, is also possible to one of virtual interface and exception occurs, another
Occur after the business of the abnormal virtual interface of virtual interface adapter tube.
In embodiments of the present invention, it when virtual interface is state of activation, is just deposited in the mac address table of corresponding server
In corresponding virtual mac address, when virtual interface is unactivated state, it is not present in the mac address table of corresponding server
Corresponding virtual mac address has the advantages that compared with prior art
Since corresponding virtual mac address being not present in the mac address table of the inactive corresponding server of virtual interface,
Therefore, message will not be forwarded to inactive virtual interface, solve in specific networking two stacking routers without
The problem of method carries out normal communication by redundant interface.
3rd embodiment
Referring to figure 5., Fig. 5 shows the redundant interface processing unit of the driving of virtual interface provided in an embodiment of the present invention
200 block diagram.The redundant interface processing unit 200 of the driving of virtual interface includes receiving module 201;Determining module
202;Preserving module 203.
Receiving module 201, the member interface addition order that the driving for receiving redundant interface is sent, member interface addition
It include virtual mac address in order, virtual mac address is the MAC Address of redundant interface;
And the member interface delete command that redundant interface is sent is received, when virtual interface is active, virtually
Virtual mac address is sent to the physical network card of server by the driving of interface, will be between virtual mac address and virtual interface
Corresponding relationship is removed from mac address table;
And the virtual mac address stored in memory of server is removed.
In embodiments of the present invention, receiving module 201 is for executing step S101, step S106 and step S107.
Determining module 202, for determining whether virtual interface is active, if virtual interface is active,
Virtual mac address is then sent to the physical network card of server, by the corresponding relationship between virtual mac address and virtual interface
It is added to mac address table;
And when determining that virtual interface is in unactivated state, it is not responding to member interface addition order.
In embodiments of the present invention, determining module 202 is for executing step S102, S103 and S104.
Preserving module 203, for storing virtual mac address to the memory of server, so that virtual interface is network-like
Virtual mac address when state changes according to the memory storage of server updates mac address table.
In embodiments of the present invention, preserving module 203 is for executing step S105.
Fig. 6 is please referred to, Fig. 6 shows the redundant interface processing unit of the driving of redundant interface provided in an embodiment of the present invention
400 block diagram.The redundant interface processing unit 400 of the driving of redundant interface is applied to server 100 comprising detection
Module 401.
Detection module 401, for when detecting that virtual interface becomes unactivated state from state of activation, redundant interface
It drives the driving to virtual interface to send and deletes message, so that the driving of virtual interface is based on deleting message for virtual mac address
Corresponding relationship between virtual interface is removed from mac address table;
And when detecting that virtual interface becomes state of activation from unactivated state, the driving of redundant interface is to virtually connecing
Mouthful driving send addition message so that the driving of virtual interface be based on addition message by virtual mac address and virtual interface it
Between corresponding relationship be added to mac address table.
In embodiments of the present invention, detection module 401 is for executing step S201 and step S202.
In conclusion a kind of interface redundancy interface processing method, apparatus, server and storage medium provided by the invention,
The described method includes: the member interface that the driving that the driving of virtual interface receives redundant interface is sent adds order, member interface
It include virtual mac address in addition order, the virtual mac address is the MAC Address of redundant interface;The driving of virtual interface is true
Determine whether virtual interface is active, if virtual interface is active, virtual mac address is sent to server
Physical network card, the corresponding relationship between virtual mac address and virtual interface is added to mac address table.With the prior art
It compares, the present invention just exists corresponding virtual when virtual interface is state of activation in the mac address table of corresponding server
When virtual interface is unactivated state, corresponding Virtual MAC is not present in MAC Address in the mac address table of corresponding server
Address, asking for normal communication can not be carried out by redundant interface by solving two stacking routers in specific networking
Topic.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through
Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, flow chart and block diagram in attached drawing
Show the device of multiple embodiments according to the present invention, the architectural framework in the cards of method and computer program product,
Function and operation.In this regard, each box in flowchart or block diagram can represent the one of a module, section or code
Part, a part of the module, section or code, which includes that one or more is for implementing the specified logical function, to be held
Row instruction.It should also be noted that function marked in the box can also be to be different from some implementations as replacement
The sequence marked in attached drawing occurs.For example, two continuous boxes can actually be basically executed in parallel, they are sometimes
It can execute in the opposite order, this depends on the function involved.It is also noted that every in block diagram and or flow chart
The combination of box in a box and block diagram and or flow chart can use the dedicated base for executing defined function or movement
It realizes, or can realize using a combination of dedicated hardware and computer instructions in the system of hardware.
In addition, each functional module in each embodiment of the present invention can integrate one independent portion of formation together
Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function module
It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.It needs
Illustrate, herein, relational terms such as first and second and the like be used merely to by an entity or operation with
Another entity or operation distinguish, and without necessarily requiring or implying between these entities or operation, there are any this realities
The relationship or sequence on border.Moreover, the terms "include", "comprise" or its any other variant are intended to the packet of nonexcludability
Contain, so that the process, method, article or equipment for including a series of elements not only includes those elements, but also including
Other elements that are not explicitly listed, or further include for elements inherent to such a process, method, article, or device.
In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including the element
Process, method, article or equipment in there is also other identical elements.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.It should also be noted that similar label and letter exist
Similar terms are indicated in following attached drawing, therefore, once being defined in a certain Xiang Yi attached drawing, are then not required in subsequent attached drawing
It is further defined and explained.
Claims (10)
1. a kind of redundant interface processing method, which is characterized in that applied to the virtual router run on server, the void
Quasi- router includes virtual interface, and the server is previously stored with mac address table, which comprises
The member interface that the driving that the driving of the virtual interface receives redundant interface is sent adds order, and the member interface adds
Adding in order includes virtual mac address, and the virtual mac address is the MAC Address of redundant interface;
The driving of the virtual interface determines whether the virtual interface is active, if the virtual interface is in activation
The virtual mac address is then sent to the physical network card of the server by state, by the virtual mac address with it is described
Corresponding relationship between virtual interface is added to mac address table.
2. redundant interface processing method as described in claim 1, which is characterized in that the method also includes:
When the driving of the virtual interface determines that the virtual interface is in unactivated state, the driving of the virtual interface is not rung
Answer the member interface addition order.
3. redundant interface processing method as described in claim 1, which is characterized in that the method also includes:
The driving of the virtual interface stores the virtual mac address to the memory of server, so that the virtual interface
The mac address table is updated according to the virtual mac address of the memory storage of the server when network state changes.
4. redundant interface processing method as claimed in claim 3, which is characterized in that the method also includes:
The driving of the virtual interface receives the member interface delete command that the redundant interface is sent, at the virtual interface
When state of activation, the virtual mac address is sent to the physical network card of the server by the driving of the virtual interface, with
Corresponding relationship between the virtual mac address and the virtual interface is removed from the mac address table;
The virtual mac address stored in memory of server is removed in the driving of the virtual interface.
5. redundant interface processing method as described in claim 1, which is characterized in that the method also includes:
When the driving of the redundant interface detects that the virtual interface becomes unactivated state from state of activation, the redundancy
The driving of interface sends to the driving of the virtual interface and deletes message, so that the driving of the virtual interface is based on the deletion
Message removes the corresponding relationship between the virtual mac address and the virtual interface from the mac address table.
6. redundant interface processing method as described in claim 1, which is characterized in that the method also includes:
When the driving of the redundant interface detects that the virtual interface becomes state of activation from unactivated state, the redundancy
The driving of interface sends addition message to the virtual interface, so that the driving of the virtual interface will based on the addition message
Corresponding relationship between the virtual mac address and the virtual interface is added to the mac address table.
7. a kind of redundant interface processing unit, which is characterized in that applied to the virtual router run on server, the dress
Set the driving including virtual interface and the driving of redundant interface, wherein the driving of the virtual interface includes:
Receiving module, the member interface addition order that the driving for receiving redundant interface is sent, the member interface addition life
It include virtual mac address in order, the virtual mac address is the MAC Address of redundant interface;
Determining module, for determining whether the virtual interface is active, if the virtual interface is active,
The virtual mac address is then sent to the physical network card of the server, the virtual mac address is virtually connect with described
Corresponding relationship between mouthful is added to mac address table.
8. redundant interface processing unit as claimed in claim 7, which is characterized in that the driving of the virtual interface further include:
Preserving module, for storing the virtual mac address to the memory of server, so that the virtual interface is network-like
The mac address table is updated according to the virtual mac address of the memory storage of the server when state changes.
9. a kind of server, which is characterized in that the server includes:
One or more processors;
Memory, for storing one or more programs, when one or more of programs are by one or more of processors
When execution, so that one or more of processors realize such as method of any of claims 1-6.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt
Such as method of any of claims 1-6 is realized when processor executes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910049233.3A CN109672618B (en) | 2019-01-18 | 2019-01-18 | Redundant interface processing method, device, server and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910049233.3A CN109672618B (en) | 2019-01-18 | 2019-01-18 | Redundant interface processing method, device, server and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109672618A true CN109672618A (en) | 2019-04-23 |
CN109672618B CN109672618B (en) | 2021-07-06 |
Family
ID=66150209
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910049233.3A Active CN109672618B (en) | 2019-01-18 | 2019-01-18 | Redundant interface processing method, device, server and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109672618B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111131026A (en) * | 2019-12-26 | 2020-05-08 | 深信服科技股份有限公司 | Communication method, device, equipment and storage medium |
CN113794631A (en) * | 2021-08-20 | 2021-12-14 | 新华三信息安全技术有限公司 | Port redundancy processing method, device, equipment and machine-readable storage medium |
CN114826972A (en) * | 2022-03-24 | 2022-07-29 | 新华三技术有限公司合肥分公司 | Stacking equipment and stacking releasing method thereof |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102307140A (en) * | 2011-08-17 | 2012-01-04 | 杭州华三通信技术有限公司 | Port-trunking-based message processing method and device |
US20120020373A1 (en) * | 2010-03-16 | 2012-01-26 | Force10 Networks, Inc. | Packet forwarding using multiple stacked chassis |
CN103532863A (en) * | 2013-10-21 | 2014-01-22 | 杭州华三通信技术有限公司 | Method and device for realizing software stacking |
CN103621026A (en) * | 2013-04-01 | 2014-03-05 | 华为技术有限公司 | Virtual machine data exchange method, apparatus and system |
CN103684857A (en) * | 2013-12-02 | 2014-03-26 | 杭州华三通信技术有限公司 | Method and device for setting working modes of member ports of stacking ports of switchboards |
CN105812292A (en) * | 2014-12-29 | 2016-07-27 | 中兴通讯股份有限公司 | Switching equipment stacking method and device |
CN109067673A (en) * | 2018-08-10 | 2018-12-21 | 盛科网络(苏州)有限公司 | The method and system of MAC address learning in stacking system |
-
2019
- 2019-01-18 CN CN201910049233.3A patent/CN109672618B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120020373A1 (en) * | 2010-03-16 | 2012-01-26 | Force10 Networks, Inc. | Packet forwarding using multiple stacked chassis |
CN102307140A (en) * | 2011-08-17 | 2012-01-04 | 杭州华三通信技术有限公司 | Port-trunking-based message processing method and device |
CN103621026A (en) * | 2013-04-01 | 2014-03-05 | 华为技术有限公司 | Virtual machine data exchange method, apparatus and system |
CN103532863A (en) * | 2013-10-21 | 2014-01-22 | 杭州华三通信技术有限公司 | Method and device for realizing software stacking |
CN103684857A (en) * | 2013-12-02 | 2014-03-26 | 杭州华三通信技术有限公司 | Method and device for setting working modes of member ports of stacking ports of switchboards |
CN105812292A (en) * | 2014-12-29 | 2016-07-27 | 中兴通讯股份有限公司 | Switching equipment stacking method and device |
CN109067673A (en) * | 2018-08-10 | 2018-12-21 | 盛科网络(苏州)有限公司 | The method and system of MAC address learning in stacking system |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111131026A (en) * | 2019-12-26 | 2020-05-08 | 深信服科技股份有限公司 | Communication method, device, equipment and storage medium |
CN113794631A (en) * | 2021-08-20 | 2021-12-14 | 新华三信息安全技术有限公司 | Port redundancy processing method, device, equipment and machine-readable storage medium |
CN114826972A (en) * | 2022-03-24 | 2022-07-29 | 新华三技术有限公司合肥分公司 | Stacking equipment and stacking releasing method thereof |
CN114826972B (en) * | 2022-03-24 | 2023-12-26 | 新华三技术有限公司合肥分公司 | Stacking equipment and stacking releasing method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN109672618B (en) | 2021-07-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11070520B2 (en) | Hierarchical network managers | |
CN107104824B (en) | Network topology determination method and device | |
CN109672618A (en) | Redundant interface processing method, device, server and storage medium | |
CN102870377A (en) | Monitoring method and device for virtual port | |
CN106059791B (en) | Link switching method of service in storage system and storage device | |
CN105791175A (en) | Method and equipment for controlling transmission resources in software defined network SDN | |
CN101924699B (en) | Message forwarding method, system and provider edge equipment | |
CN104937892A (en) | Multi-node virtual switching system (MVSS) | |
CN108011958B (en) | Network device and MAC address table synchronization method | |
CN102185706A (en) | Method for generating IEEE1394 (Institute of Electrical and Electronics Engineers 1394) network topological graph | |
CN108540408A (en) | A kind of management method and system of the distributed virtual switch based on Openstack | |
CN104518995B (en) | Interchanger virtualization system based on distributed structure/architecture | |
CN111092828A (en) | Network operation method, device, equipment and storage medium | |
CN108512779A (en) | Control information transmitting methods, server and system | |
CN103810038A (en) | Method and device for transferring virtual machine storage files in HA cluster | |
CN101534218B (en) | A management method, device and system for open application architecture | |
CN111327509B (en) | Information updating method and device | |
CN103457777B (en) | Power distribution unit disaster recovery method, manager and system | |
CN106502841B (en) | Data back up method and device | |
CN104579809B (en) | The detection method and equipment of a kind of stacking splitting | |
CN108089968A (en) | A kind of method of host's machine monitoring virtual-machine data storehouse state | |
CN102868616A (en) | Method for establishing virtual MAC (Media Access Control) address table item in network as well as router and system | |
CN110851186A (en) | Network equipment restarting method and device, electronic equipment and readable storage medium | |
CN107547308A (en) | A kind of controller in message mirror-image method, device, software defined network SDN | |
CN104104594A (en) | Methods of transmitting and receiving protocol message of VSU, devices and system |
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 |