CN107147555B - VXLAN network switching method and device and storage medium - Google Patents

VXLAN network switching method and device and storage medium Download PDF

Info

Publication number
CN107147555B
CN107147555B CN201710520390.9A CN201710520390A CN107147555B CN 107147555 B CN107147555 B CN 107147555B CN 201710520390 A CN201710520390 A CN 201710520390A CN 107147555 B CN107147555 B CN 107147555B
Authority
CN
China
Prior art keywords
terminal
switched
address
vxlan
message
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
CN201710520390.9A
Other languages
Chinese (zh)
Other versions
CN107147555A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201710520390.9A priority Critical patent/CN107147555B/en
Publication of CN107147555A publication Critical patent/CN107147555A/en
Application granted granted Critical
Publication of CN107147555B publication Critical patent/CN107147555B/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
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • H04L12/4675Dynamic sharing of VLAN information amongst network nodes
    • H04L12/4679Arrangements for the registration or de-registration of VLAN attribute values, e.g. VLAN identifiers, port VLAN membership
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • 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

Landscapes

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

Abstract

The embodiment of the invention discloses a switching method, equipment and a storage medium of a VXLAN (virtual extensible local area network), wherein the method comprises the following steps: the terminal to be switched determines the IP address of a target terminal to be switched; the terminal to be switched modifies the IP address in the forwarding table entry maintained by the terminal to be switched into the IP address of the target terminal; the terminal to be switched carries the IP address of the target terminal in a VXLAN message; and the terminal to be switched sends the VXLAN message to other terminals.

Description

VXLAN network switching method and device and storage medium
Technical Field
The present invention relates to electronic technologies, and in particular, to a method and an apparatus for switching a VXLAN network, and a storage medium.
Background
A Virtual Extensible LAN (VXLAN) is an overlay technology for encapsulating a two-layer message on an IP message, and a VXLAN tunnel endpoint (VXLAN Tunneling endpoint, VTEP) maintains a VXLAN forwarding table entry, which is mainly used for encapsulation/decapsulation of a message. In the existing mechanism, once a VXLAN tunnel is established, it cannot be changed, otherwise, a large amount of messages are lost, however, in practical applications, it may be necessary to adjust the VXLAN tunnel, for example, for the purpose of re-planning of a management platform, load balancing, or service change of a VTEP host entity, etc., there is a need to switch a service processed by a certain VTEP to another VTEP, and it is necessary to ensure continuity of the VXLAN service.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for switching a VXLAN network, and a storage medium, to solve at least one problem in the prior art.
The technical scheme of the embodiment of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a method for switching a VXLAN network, where the method includes:
the terminal to be switched determines the IP address of a target terminal to be switched;
the terminal to be switched modifies the IP address in the forwarding table entry maintained by the terminal to be switched into the IP address of the target terminal;
the terminal to be switched carries the IP address of the target terminal in a VXLAN message;
and the terminal to be switched sends the VXLAN message to other terminals.
In other embodiments, the step of carrying the IP address of the target terminal in the VXLAN multicast packet by the terminal to be switched includes:
the terminal to be switched expands the reserved field in the message header of the VXLAN multicast message into the IP address field of the target terminal;
and the terminal to be switched carries the IP address of the target terminal in a message header of the VXLAN multicast message.
In other embodiments, the method further comprises:
the method comprises the steps that a terminal to be switched expands a first bit of a first line in a message header of a VXLAN multicast message into an identification bit, and the identification bit is used for identifying the VXLAN multicast message to be used for service switching;
and the terminal to be switched modifies the identification bit into a preset identifier, and the identifier is used for identifying the VXLAN multicast message as a service switching message.
In other embodiments, the method further comprises:
the other terminals receive the VXLAN multicast message;
the other terminals determine that the VXLAN multicast message is a service switching message according to the identification bits in the VXLAN multicast message;
and the other terminals modify the IP address in the self-maintained forwarding table entry into the IP address of the target terminal according to the IP address of the target terminal in the VXLAN multicast message.
In other embodiments, the other terminals include a target terminal, and the method further includes:
and the target terminal modifies the IP address in the self-maintained forwarding table item into a local IP address according to the IP address of the target terminal in the VXLAN multicast message.
In other embodiments, the method further comprises:
after the terminal to be switched sends the VXLAN multicast message to other terminals, a timer is started to time;
if the service messages sent by the other terminals are not received within the timing time, closing the service per se;
and if the service messages sent by other terminals are received within the timing time, sending the VXLAN multicast message to the terminal sending the service messages.
In other embodiments, the determining, by the terminal to be switched, a target terminal to be switched includes:
and the terminal to be switched receives a service switching request, wherein the service switching request carries the IP address of the target terminal.
In other embodiments, the determining, by the terminal to be switched, a target terminal to be switched includes:
receiving switching operation by a terminal to be switched;
the terminal to be switched acquires the identifier of the target terminal based on the switching operation;
and the terminal to be switched determines the IP address of the target terminal according to the identifier of the target terminal.
In a second aspect, an embodiment of the present invention provides a switching terminal of a VXLAN network, where the terminal includes an external interface, a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the program to implement the following steps:
determining the IP address of a switched target terminal;
modifying the IP address in the maintained forwarding table entry into the IP address of the target terminal;
carrying the IP address of the target terminal in a VXLAN message;
and sending the VXLAN message to other terminals through the external interface.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the foregoing steps of a method for switching a VXLAN network.
In the embodiment of the invention, the terminal to be switched determines the IP address of the target terminal to be switched; the terminal to be switched modifies the IP address in the forwarding table entry maintained by the terminal to be switched into the IP address of the target terminal; the terminal to be switched carries the IP address of the target terminal in a VXLAN message; the terminal to be switched sends the VXLAN message to other terminals; in this way, smooth switching of VXLAN tunnel terminations from one VTEP to another VTEP can be achieved, and service continuity is maintained.
Drawings
Fig. 1 is a schematic flow chart illustrating an implementation of a switching method of a VXLAN network according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an expanded VXLAN multicast message according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating an implementation flow of a switching method of a VXLAN network according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a related art scenario;
FIG. 5 is a diagram illustrating a scenario of an embodiment of the present invention;
fig. 6 is a schematic diagram of a flow for implementing a terminal for VXLAN network according to an embodiment of the present invention.
Detailed Description
The technical solution of the present invention is further elaborated below with reference to the drawings and the specific embodiments.
The embodiment provides a switching method of a VXLAN network, which is applied to a terminal to be switched, where the function implemented by the information processing method can be implemented by a processor in an electronic device calling a program code, and the program code can be stored in a computer storage medium, and thus, the electronic device at least includes a processor and a storage medium.
Fig. 1 is a schematic diagram of an implementation flow of a switching method of a VXLAN network according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step S101, a terminal to be switched determines the IP address of a target terminal to be switched;
here, the terminal to be switched is a VTEP terminal.
Here, the determining, by the terminal to be switched, a target terminal to be switched includes: and the terminal to be switched receives a service switching request, wherein the service switching request carries the IP address of the target terminal.
Step S102, the terminal to be switched modifies the IP address in the forwarding table entry maintained by the terminal to be switched into the IP address of the target terminal;
step S103, the terminal to be switched carries the IP address of the target terminal in a VXLAN message;
and step S104, the terminal to be switched sends the VXLAN message to other terminals.
Here, the terminal to be switched, the target terminal and other terminals generally belong to a group, and when one member in the VTEP group is taken as the terminal to be switched, one of the other terminals in the group is taken as the target terminal, and the other terminals in the group except the terminal to be switched are taken as the other terminals in step S104. As shown in fig. 4, a VTEP packet includes VTEPs a to D, VTEP B as the destination terminal and VTEP B, VTEP C and VTEP D as the other terminals when VTEPA is the terminal to be switched.
In other embodiments, the determining, by the terminal to be switched, a target terminal to be switched includes: the terminal to be switched receives switching operation of a user (administrator); the terminal to be switched acquires the identifier of the target terminal based on the switching operation; and the terminal to be switched determines the IP address of the target terminal according to the identifier of the target terminal.
In the embodiment of the invention, the terminal to be switched determines the IP address of the target terminal to be switched; the terminal to be switched modifies the IP address in the forwarding table entry maintained by the terminal to be switched into the IP address of the target terminal; the terminal to be switched carries the IP address of the target terminal in a VXLAN message; the terminal to be switched sends the VXLAN message to other terminals; in this way, smooth switching of VXLAN tunnel terminations from one VTEP to another VTEP can be achieved, and service continuity is maintained.
The embodiment provides a method for switching a VXLAN network, which comprises the following steps:
step S201, the terminal to be switched determines the IP address of the target terminal to be switched;
here, the terminal to be switched is a VTEP terminal.
Step S202, the terminal to be switched modifies the IP address in the forwarding table entry maintained by the terminal to be switched into the IP address of the target terminal;
step S203, the terminal to be switched expands the reserved field in the message header of the VXLAN multicast message into the IP address field of the target terminal;
here, the expanding, by the terminal to be switched, the reserved field in the header of the VXLAN multicast packet to the IP address field of the target terminal includes: the terminal to be switched expands the reserved rear 24 bits of the first line of the message header into the front 24 bits or the rear 24 bits of the IP address of the target terminal; and the terminal to be switched expands the last 8 bits reserved in the second row of the message header into the last 8 bits or the first 8 bits of the IP address of the target terminal.
Here, a Header (VXLAN Header) of the VXLAN multicast packet is as shown in a diagram of fig. 2, where the diagram a includes reserved fields at 3, where the reserved field at the first position is the first 8 bits of the first row, the second position is the last 24 bits of the first row as the reserved field 12, and the third position is the last 8 bits of the second row as the reserved field 13. In this embodiment, 12 and 13 of the reserved field are extended to the IP address field. Referring to the B diagram of fig. 2, 12 and 13 of the reserved fields serve as the IP address fields 22 and 23 of the extended destination terminal. In one embodiment, 12 bits in the reserved field are the first 24 bits of the destination IP address, and 13 bits in the reserved field are the last 8 bits of the destination IP address. In other embodiments, 12 of the reserved field is the last 24 bits of the destination IP address and 13 of the reserved field is the first 8 bits of the destination IP address.
And step S204, the terminal to be switched carries the IP address of the target terminal in the message header of the VXLAN multicast message.
Here, step S203 and step S204 actually provide a method for implementing step S103 "the terminal to be switched carries the IP address of the target terminal in the VXLAN message".
And step S205, the terminal to be switched sends the VXLAN message to other terminals.
Generally, the terminal to be switched, the target terminal and other terminals all belong to a group, and when one member in the VTEP group is used as the terminal to be switched, one of the other terminals in the group is used as the target terminal, and the other terminals in the group except the terminal to be switched are used as the other terminals in step S104. As shown in fig. 4, a VTEP packet includes VTEP a to D, VTEP B as the destination terminal and VTEP B, VTEP C and VTEP D as the other terminals when VTEP a is the terminal to be switched.
In other embodiments, the determining, by the terminal to be switched, a target terminal to be switched includes: the terminal to be switched receives switching operation of a user (administrator); the terminal to be switched acquires the identifier of the target terminal based on the switching operation; and the terminal to be switched determines the IP address of the target terminal according to the identifier of the target terminal.
Based on the foregoing embodiments, this embodiment provides a method for switching a VXLAN network, including:
step S301, the terminal to be switched determines the IP address of the target terminal to be switched;
here, the terminal to be switched is a VTEP terminal.
Step S302, the terminal to be switched modifies the IP address in the forwarding table entry maintained by the terminal to be switched into the IP address of the target terminal;
step S303, the terminal to be switched expands the reserved field in the message header of the VXLAN multicast message into the IP address field of the target terminal;
and step S304, the terminal to be switched carries the IP address of the target terminal in the message header of the VXLAN multicast message.
Here, steps S303 and S304 actually provide a method for implementing step S103 "the terminal to be switched carries the IP address of the target terminal in the VXLAN message".
Step S305, the terminal to be switched expands the first bit of the first line in the message header of the VXLAN multicast message into an identification bit, and the identification bit is used for identifying the function of the VXLAN multicast message as service switching;
and S306, the terminal to be switched modifies the identification bit into a preset identifier, and the identifier is used for identifying the VXLAN multicast message as a service switching message.
And step S307, the terminal to be switched sends the VXLAN message to other terminals.
In other embodiments, the determining, by the terminal to be switched, a target terminal to be switched includes: the terminal to be switched receives switching operation of a user (administrator); the terminal to be switched acquires the identifier of the target terminal based on the switching operation; and the terminal to be switched determines the IP address of the target terminal according to the identifier of the target terminal.
In order to distinguish whether the VXLAN multicast packet is a normal packet or a service switching packet in this embodiment, as shown in a diagram a of fig. 2, a first bit 11 of the first 8 bits in the first row is used as an identification bit, and when the flag bit 11 is set to a preset identifier, the VXLAN multicast packet is identified as the service switching packet in this embodiment, and when the flag bit 11 is not set to the preset identifier, the VXLAN multicast packet is identified as the normal packet. In the implementation process, when the flag bit is set to the preset identifier 1, the service switching message may be represented, and when the flag bit is set to 0, the normal message may be represented.
Based on the foregoing embodiment, fig. 3 is a schematic diagram illustrating an implementation flow of a method for switching a VXLAN network according to an embodiment of the present invention, and as shown in fig. 3, this embodiment provides a method for switching a VXLAN network, where the method includes:
step S401, the terminal to be switched determines the IP address of the target terminal to be switched;
here, the terminal to be switched is a VTEP terminal.
S402, the terminal to be switched modifies the IP address in the maintained forwarding table item into the IP address of the target terminal;
step S403, the terminal to be switched expands the reserved field in the message header of the VXLAN multicast message into the IP address field of the target terminal;
and S404, the terminal to be switched carries the IP address of the target terminal in the message header of the VXLAN multicast message.
Here, steps S403 and S404 actually provide a method for implementing step S103 "the terminal to be switched carries the IP address of the target terminal in the VXLAN message".
Step S405, the terminal to be switched expands the first bit of the first line in the message header of the VXLAN multicast message into an identification bit;
here, the identification bit is used for identifying that the VXLAN multicast message is used for service switching;
step S406, the terminal to be switched modifies the identification bit into a preset identifier, and the identifier is used for identifying that the VXLAN multicast message is a service switching message;
and step S407, the terminal to be switched sends the VXLAN message to other terminals.
Here, the terminal to be switched, the target terminal and other terminals all belong to a group, and when one member in the VTEP group is taken as the terminal to be switched, one of the other terminals in the group is taken as the target terminal, and the other terminals in the group except the terminal to be switched are taken as the other terminals in step S104. As shown in fig. 4, a VTEP packet includes VTEP a to D, VTEP B as the destination terminal and VTEP B, VTEP C and VTEP D as the other terminals when VTEP a is the terminal to be switched.
Step S408, the other terminals receive the VXLAN multicast message;
here, the other terminals are other terminals in the group except the terminal to be switched, that is, the other terminals include the target terminal.
Step S409, the other terminals determine that the VXLAN multicast message is a service switching message according to the identification bits in the VXLAN multicast message;
and step S410, the other terminals modify the IP address in the self-maintained forwarding table entry into the IP address of the target terminal according to the IP address of the target terminal in the VXLAN multicast message.
And step S411, the target terminal modifies the IP address in the forwarding table entry maintained by the target terminal into local according to the IP address of the target terminal in the VXLAN multicast message.
Based on the foregoing embodiments, this embodiment provides a method for switching a VXLAN network, including:
step S501, the terminal to be switched determines the IP address of the target terminal to be switched;
here, the terminal to be switched is a VTEP terminal.
Step S502, the terminal to be switched modifies the IP address in the forwarding table entry maintained by the terminal to be switched into the IP address of the target terminal;
step S503, the terminal to be switched expands the reserved field in the message header of the VXLAN multicast message into the IP address field of the target terminal;
and step S504, the terminal to be switched carries the IP address of the target terminal in the message header of the VXLAN multicast message.
And step S505, the terminal to be switched sends the VXLAN message to other terminals.
Step S506, the terminal to be switched expands the first bit of the first line in the message header of the VXLAN multicast message into an identification bit, and the identification bit is used for identifying the function of the VXLAN multicast message as service switching;
and step S507, the terminal to be switched modifies the identification bit into a preset identifier, and the identifier is used for identifying the VXLAN multicast message as a service switching message.
Step S508, the other terminals receive the VXLAN multicast message;
step S509, the other terminal determines that the VXLAN multicast packet is a service switching packet according to the identification bit in the VXLAN multicast packet;
and step S510, the other terminals modify the IP address in the self-maintained forwarding table entry into the IP address of the target terminal according to the IP address of the target terminal in the VXLAN multicast message.
And step S511, the target terminal modifies the IP address in the forwarding table entry maintained by the target terminal into a local IP address according to the IP address of the target terminal in the VXLAN multicast message.
Step S512, after the terminal to be switched sends the VXLAN multicast message to other terminals, a timer is started to time;
step S513, if the service message sent by the other terminal is not received within the timing time, closing the service of the terminal;
step S514, if the service message sent by the other terminal is received within the timing time, the VXLAN multicast message is sent to the terminal sending the service message.
In other embodiments, the determining, by the terminal to be switched, a target terminal to be switched includes: the terminal to be switched receives switching operation of a user (administrator); the terminal to be switched acquires the identifier of the target terminal based on the switching operation; and the terminal to be switched determines the IP address of the target terminal according to the identifier of the target terminal.
In order to solve the foregoing technical problem, in this embodiment, a service switching function is added to the VTEP functional entity, so that once a service switching request is received, the VTEP is triggered to notify other VTEP entities of changing the forwarding table entry through a multicast packet.
In this embodiment, the VXLAN header is extended to notify the change of other related VTEP forwarding entries, where the 1 st bit is used to identify the packet as an IP replacement notification packet/service switching request packet, and the other 32 bits are replacement target IPs. The method comprises the following steps:
in step S51, the VTEP receives a service switching request/notification, and the content of the request/notification includes the target VTEPIP to be switched.
Here, the service switching request/notification may be issued by the management platform, may be issued by the VTEP hosting entity, or may be manually triggered by an administrator and triggered by a device.
Step S52, the VTEP informs the related VTEP in the VNI group based on the VXLAN multicast message, updates the entry with the IP address of the self in the maintained forwarding entry to the switching target VTEP, starts a timer to wait for the completion of the switching, and closes the VTEP service of the local terminal;
step S52, other related VNI members VTEP receive VXLAN message and analyze VXLAN Header, if the 1 st bit is set to 1, the item whose IP address in the maintained forwarding list is consistent with the outer layer source IP of the VXLAN message is replaced by the target IP carried by the message.
With reference to fig. 5, the method for switching the VXLAN network includes:
step S61, VTEP A receives the business and switches over the request, switch over the request message to send the business to other members in the group;
here, the service switching request message is sent in a VXLAN multicast format, the inner layer source MAC of the message is the MAC address of VTEPA, the destination MAC indicates the multicast destination, the VXLAN header contains the IP address of the VTEPB, which is a functional entity for replacing VTEP a, in addition to the VNI identifying the multicast group, the outer layer source is VTEP a, and the destination is multicast. The message is broadcast by the VTEP a on all associated multicast groups.
Here, other members of the group include: VTEP B, VTEP C and VTEP D.
Step S62, after other members in the group receive the message, analyzing the first bit of VXLAN header to be set, then judging the message as a service switching request message, screening out the entry of which remote IP is IP A in a forwarding table, and replacing the entry with the replacement IP carried in the message, namely IP B;
here, VTEP C and VTEP D modify remote IP from IP a to IP B.
Step S63, the VTEP B for replacement in the group receives the message, analyzes the replacement IP as itself, screens the entry with remote IP as IP A, records the mac address corresponding to the entry as local, and then directly carries out the encapsulation, decapsulation and forwarding processing of the message;
step S64, starting a timer after the VTEP A finishes sending the service switching request message, waiting for the completion of the service switching, and if the remote message is not received any more in the timer timing period, closing the local VTEP service; if the remote message is still received in the timer period, the service switching request message is broadcasted again and the timer is reset until the remote message cannot be received, and the local VTEP service is closed.
Overlay stateless network technology is also an important component of future data centers. Overlay means that a software-defined logic network is overlaid on the existing network, the original network is not modified as much as possible, and service logic is realized by defining the logic network on the original network, so that the network problem of the original data center is solved, and the traditional user investment is greatly saved. Overlay is a network technology that transfers a (business) two-layer network architecture in a three-layer/four-layer message of a traditional network. Such a technique is actually a tunnel encapsulation technique. In fact, there are many encapsulation technologies in network technologies, such as MPLS, VPLS, GRE, and so on. The Overlay is most critical to realize a stateless network, that is, the virtual machine migration can be performed imperceptibly when the data centers are mutually accessed. There is no notification to the upper layer application services, and perhaps one service is provided by multiple data centers and multiple virtual machines at the same time, which is not normally done in an Overlay network. Overlay currently contains three major standard technologies, of which VXLAN technology is the most interesting, and VXLAN is proposed by cisco and VMware, and has attracted much attention since being proposed. From the packaging structure, VXLAN provides the capability of a two-layer network overlay on a three-layer network, VNI in VXLAN Header has 24 bits, the number of the VNI is far larger than 4096, and UDP packaging can pass through the three-layer network, and the package has better expansibility compared with VLAN. In the data center, Overlay provides a technical means for solving data plane forwarding and multi-tenant isolation, and the SDN mentioned earlier defines a network architecture for control and management. The functions of the VXLAN technology and the SDN technology are not conflicting in a future data center, the VXLAN technology is a necessary condition for the SDN deployment, the SDN can be used only when the VXLAN is deployed, and the VXLAN technology and the SDN technology can be organically combined to play roles together.
In this embodiment, the application of the scheme can realize smooth switching of the VXLAN tunnel termination from one VTEP to another VTEP, and maintain service continuity. The scheme uses at least: and the management platform replans VXLAN, balances load and tolerates disaster, and changes the VTEP host entity work abnormally or service.
Based on the foregoing embodiments, an embodiment of the present invention provides a switching terminal of a VXLAN network, fig. 6 is a schematic structural diagram of a composition of a switching terminal of a VXLAN network according to an embodiment of the present invention, as shown in fig. 6, the switching terminal 600 includes an external interface 601, a memory 602, a processor 603, and a computer program stored on the memory and capable of running on the processor, and when the processor 603 executes the program, the following steps are implemented:
determining the IP address of a switched target terminal;
modifying the IP address in the maintained forwarding table entry into the IP address of the target terminal;
carrying the IP address of the target terminal in a VXLAN message;
and sending the VXLAN message to other terminals through the external interface.
In other embodiments, the carrying the IP address of the target terminal in the VXLAN multicast packet includes: expanding a reserved field in a message header of the VXLAN multicast message into an IP address field of a target terminal; and carrying the IP address of the target terminal in a message header of the VXLAN multicast message.
In other embodiments, the processor, when executing the program, performs the steps of: expanding a first bit of a first line in a message header of the VXLAN multicast message into an identification bit, wherein the identification bit is used for identifying the function of the VXLAN multicast message as service switching; and modifying the identification bit into a preset identifier, wherein the identifier is used for identifying the VXLAN multicast message as a service switching message.
In other embodiments, the processor, when executing the program, performs the steps of:
after the terminal to be switched sends the VXLAN multicast message to other terminals, a timer is started to time;
if the service messages sent by the other terminals are not received within the timing time, closing the service per se;
and if the service messages sent by other terminals are received within the timing time, sending the VXLAN multicast message to the terminal sending the service messages.
In other embodiments, the determining, by the terminal to be switched, a target terminal to be switched includes: and the terminal to be switched receives a service switching request, wherein the service switching request carries the IP address of the target terminal.
In other embodiments, the determining, by the terminal to be switched, a target terminal to be switched includes: receiving switching operation by a terminal to be switched; the terminal to be switched acquires the identifier of the target terminal based on the switching operation; and the terminal to be switched determines the IP address of the target terminal according to the identifier of the target terminal.
Based on the foregoing embodiments, an embodiment of the present invention provides another terminal of a VXLAN network, where the another terminal includes an external interface, a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the following steps when executing the program:
receiving the VXLAN multicast message;
determining that the VXLAN multicast message is a service switching message according to the identification bit in the VXLAN multicast message;
and modifying the IP address in the self-maintained forwarding table entry into the IP address of the target terminal according to the IP address of the target terminal in the VXLAN multicast message.
In other embodiments, the other terminals include a target terminal, and the processor implements the following steps when executing the program:
and the target terminal modifies the IP address in the self-maintained forwarding table item into a local IP address according to the IP address of the target terminal in the VXLAN multicast message.
The above description of the terminal embodiment is similar to the above description of the method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the terminal embodiments of the present invention, reference is made to the description of the method embodiments of the present invention for understanding.
In the embodiment of the present invention, if the above-mentioned switching method of the VXLAN network is implemented in the form of a software function part and is sold or used as an independent product, it may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
Embodiments of the present invention provide a computer readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the aforementioned steps of a method for switching of a VXLAN network.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
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; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A method for switching a VXLAN network, the method comprising:
the terminal to be switched determines the IP address of a target terminal to be switched;
the terminal to be switched modifies the IP address in the forwarding table entry maintained by the terminal to be switched into the IP address of the target terminal;
the terminal to be switched carries the IP address of the target terminal in a VXLAN message;
the terminal to be switched expands the first bit of the first line in the message header of the VXLAN message into an identification bit, and the identification bit is used for identifying the function of the VXLAN message as service switching;
the terminal to be switched modifies the identification position into a preset identifier, and the identifier is used for identifying the VXLAN message as a service switching message;
and the terminal to be switched sends the VXLAN message to other terminals.
2. The method according to claim 1, wherein the terminal to be switched carries the IP address of the target terminal in a VXLAN message, comprising:
the terminal to be switched expands the reserved field in the message header of the VXLAN message into the IP address field of the target terminal;
and the terminal to be switched carries the IP address of the target terminal in the message header of the VXLAN message.
3. The method of claim 1, further comprising:
the other terminals receive the VXLAN messages;
the other terminals determine that the VXLAN message is a service switching message according to the identification bits in the VXLAN message;
and the other terminals modify the IP address in the self-maintained forwarding table item into the IP address of the target terminal according to the IP address of the target terminal in the VXLAN message.
4. The method of claim 3, wherein the other terminals comprise target terminals, the method further comprising:
and the target terminal modifies the IP address in the self-maintained forwarding table item into local according to the IP address of the target terminal in the VXLAN message.
5. The method of claim 1, further comprising:
after the VXLAN message is sent to other terminals by the terminal to be switched, starting a timer for timing;
if the service messages sent by the other terminals are not received within the timing time, closing the service per se;
and if the service messages sent by other terminals are received within the timing time, sending the VXLAN messages to the terminal sending the service messages.
6. The method according to any one of claims 1 to 5, wherein the determining, by the terminal to be switched, the IP address of the target terminal to be switched comprises:
and the terminal to be switched receives a service switching request, wherein the service switching request carries the IP address of the target terminal.
7. The method according to any one of claims 1 to 5, wherein the determining, by the terminal to be switched, the IP address of the target terminal to be switched comprises:
receiving switching operation by a terminal to be switched;
the terminal to be switched acquires the identifier of the target terminal based on the switching operation;
and the terminal to be switched determines the IP address of the target terminal according to the identifier of the target terminal.
8. A switching terminal for a VXLAN network, said terminal comprising an external interface, a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor when executing said program performs the steps of:
determining the IP address of a switched target terminal;
modifying the IP address in the maintained forwarding table entry into the IP address of the target terminal;
carrying the IP address of the target terminal in a VXLAN message;
expanding a first bit of a first line in a message header of the VXLAN message into an identification bit, wherein the identification bit is used for identifying the VXLAN message to be used for service switching;
modifying the identification bit into a preset identifier, wherein the identifier is used for identifying the VXLAN message as a service switching message;
and sending the VXLAN message to other terminals through the external interface.
9. The handover terminal of claim 8, wherein the carrying the IP address of the target terminal in a VXLAN message comprises:
expanding a reserved field in a message header of the VXLAN message into an IP address field of a target terminal;
and carrying the IP address of the target terminal in a message header of the VXLAN message.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN201710520390.9A 2017-06-30 2017-06-30 VXLAN network switching method and device and storage medium Active CN107147555B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710520390.9A CN107147555B (en) 2017-06-30 2017-06-30 VXLAN network switching method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710520390.9A CN107147555B (en) 2017-06-30 2017-06-30 VXLAN network switching method and device and storage medium

Publications (2)

Publication Number Publication Date
CN107147555A CN107147555A (en) 2017-09-08
CN107147555B true CN107147555B (en) 2020-06-23

Family

ID=59784969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710520390.9A Active CN107147555B (en) 2017-06-30 2017-06-30 VXLAN network switching method and device and storage medium

Country Status (1)

Country Link
CN (1) CN107147555B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111193756B (en) * 2018-11-14 2023-04-07 中移(杭州)信息技术有限公司 VXLAN tunnel load balancing method and related equipment
CN112910939B (en) * 2019-12-03 2024-06-21 华为技术有限公司 Data processing method and related device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104270298A (en) * 2014-09-30 2015-01-07 杭州华三通信技术有限公司 Method and device for forwarding message in VXLAN
CN104980916A (en) * 2015-05-07 2015-10-14 东南大学 Marked net mobile access method
CN105577417A (en) * 2014-11-06 2016-05-11 杭州华三通信技术有限公司 VXLAN (virtual extensible local area network)-based massage forwarding method and device
CN105991387A (en) * 2015-01-29 2016-10-05 杭州华三通信技术有限公司 Message transformation method and device of virtual extensible local area network (VXLAN)
CN106656532A (en) * 2015-10-28 2017-05-10 华为软件技术有限公司 Network element switching method and device
CN106899430A (en) * 2016-12-09 2017-06-27 新华三技术有限公司 A kind of flow method for processing forwarding and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9509527B2 (en) * 2014-06-30 2016-11-29 Arista Networks, Inc. Method and system for VXLAN encapsulation offload

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104270298A (en) * 2014-09-30 2015-01-07 杭州华三通信技术有限公司 Method and device for forwarding message in VXLAN
CN105577417A (en) * 2014-11-06 2016-05-11 杭州华三通信技术有限公司 VXLAN (virtual extensible local area network)-based massage forwarding method and device
CN105991387A (en) * 2015-01-29 2016-10-05 杭州华三通信技术有限公司 Message transformation method and device of virtual extensible local area network (VXLAN)
CN104980916A (en) * 2015-05-07 2015-10-14 东南大学 Marked net mobile access method
CN106656532A (en) * 2015-10-28 2017-05-10 华为软件技术有限公司 Network element switching method and device
CN106899430A (en) * 2016-12-09 2017-06-27 新华三技术有限公司 A kind of flow method for processing forwarding and device

Also Published As

Publication number Publication date
CN107147555A (en) 2017-09-08

Similar Documents

Publication Publication Date Title
US11893409B2 (en) Securing a managed forwarding element that operates within a data compute node
US10063470B2 (en) Data center network system based on software-defined network and packet forwarding method, address resolution method, routing controller thereof
CN107113322B (en) Hardware and software method for creating and managing migratable logical service chains
CN111800326B (en) Message transmission method and device, processing node and storage medium
US11483379B2 (en) Enhancing network services based on edge clouds
CN105323136A (en) Information processing method and device
CN109660442B (en) Method and device for multicast replication in Overlay network
CN108322338B (en) Broadcast suppression method and VTEP device
JP2020520612A (en) Packet transmission method, edge device, and machine-readable storage medium
US10855576B2 (en) Information transmission method and device
JP2019521619A (en) Packet forwarding
CN112566164B (en) Communication system and service quality control method
CN107147555B (en) VXLAN network switching method and device and storage medium
WO2012088901A1 (en) Method for allocating virtual local area network and associated device
US10512091B2 (en) Data communications over a distributed multi-core wireless communication network
CN111404797A (en) Control method, SDN controller, SDN access point, SDN gateway and CE
CN106209634B (en) Learning method and device of address mapping relation
CN108156066A (en) Message forwarding method and device
JP7274633B2 (en) Communication system, controller, program, and information processing method
CN104854826A (en) Methods and systems for controlling setup of calls through communication systems
CN109474527B (en) Message forwarding method and device
US11379279B2 (en) Netlink asynchronous notifications for native and third party application in distributed network systems
CN111726296B (en) Neighbor relation management method, device, equipment and storage medium
CN106878051A (en) A kind of multi-computer back-up implementation method and device
CN106789529B (en) Method and terminal for implementing OVERLAY network

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