Specific embodiment
As shown in Figure 1, being a kind of configuration diagram of VXLAN network provided by the embodiments of the present application.VXLAN network includes
Multiple VTEP, such as VTEP1, VTEP2, VTEP3 and VTEP4.
VTEP refers to for establishing the endpoint device in the tunnel VXLAN in VXLAN network, for sending in VXLAN network
With reception VXLAN message.One VTEP can access multiple VXLAN networks, also can connect more in similar and different
The server of VXLAN network.It should be noted that in the case where VTEP accesses multiple VXLAN networks, the distinct interface of VTEP
Different VXLAN networks can be corresponded to, identical VXLAN network can also be corresponded to.
Above-mentioned server refers to physical server or virtual machine (Virtual Machine, abbreviation VM).VM refers to by soft
Part simulation with complete hardware system function, operate in complete computer in a completely isolated environment.One
Physical server uses virtualization technology, can fictionalize multiple VM.
Establishing between the VTEP of same VXLAN network has the tunnel VXLAN.It can be passed by the tunnel VXLAN between VTEP
Defeated VXLAN message.For example, VTEP1 establishes the tunnel VXLAN with VTEP2, VTEP3 and VTEP4 respectively in Fig. 1.Although in Fig. 1
It is not shown, in fact, can also establish the tunnel VXLAN between VTEP2, VTEP3 and VTEP4 three mutually.
Below with reference to the VXLAN network architecture shown in FIG. 1, technical solution provided by the embodiments of the present application is introduced.
As shown in Fig. 2, be a kind of method of multicasting provided by the embodiments of the present application, method includes the following steps:
S101, local terminal VTEP receive the first VXLAN message that distal end VTEP is sent.
Wherein, shown first VXLAN message includes: the address of the distal end VTEP, target VNI, target VLAN mark with
And multicast joins message.The multicast joins message for requesting that target multicast group is added.The multicast, which joins message, carries mesh
Mark multicast group address.
The address of distal end VTEP is address iso-ip Internetworking protocol ISO-IP (Internet Protocol, abbreviation IP) of distal end VTEP.
Target VNI is the corresponding VNI of interface for receiving the distal end VTEP that multicast joins message.Target VLAN is identified as multicast and report is added
The VLAN mark that text carries.The multicast joins message as Internet Group Management Protocol (Internet Group
ManagementProtocol, abbreviation IGMP) message.
In a kind of optional implementation, distal end VTEP receives the multicast that server connected to it is sent and joins message.
Later, which is joined message and is encapsulated as the first VXLAN message by distal end VTEP.Finally, the side that distal end VTEP is replicated with head end
First VXLAN message is sent respectively to all VTEP in the corresponding BUM duplication table of target VNI by formula.The target VNI is corresponding
BUM duplication table in all VTEP include local terminal VTEP.
It should be noted that the corresponding BUM duplication table of target VNI is every in the corresponding VXLAN network of target VNI for recording
The address of one VTEP.The corresponding BUM duplication table of target VNI is generated by static configuration or dynamic learning generates.
In the embodiment of the present application, distal end VTEP can run igmp proxy, in order to control the forwarding of IGMP message, from
And reduce the quantity to other VTEP IGMP message sent.
S102, local terminal VTEP create target multicast forward table according to the first VXLAN message, and by the distal end
The address of VTEP is added in the duplication table of the target multicast forward table.
Wherein, the corresponding keyword of the target multicast forward table includes: target VNI, target VLAN mark and target
Multicast group address.The target multicast forward table is for making local terminal VTEP that the multicast message of the target multicast group is forwarded to institute
State distal end VTEP.
In the embodiment of the present application, the duplication table in multicast forward table can be using building skill identical with BUM duplication table
Art.So, it is right in the prior art to refer to operations such as addition, deletion, the modifications of duplication table in multicast forward table
The same operation of BUM duplication.Also, local terminal VTEP can be managed collectively the duplication table in BUM duplication table and multicast forward table.
Optionally, if multiple multicast forward tables duplication table for including is identical, multiple multicast forward tables can be multiplexed same
Replicate table.Namely local terminal VTEP is not necessarily multiple multicast forward tables, and multiple corresponding duplication tables are respectively created.
A kind of optional implementation, after receiving the first VXLAN message, local terminal VTEP is by the first VXLAN message
Decapsulation is joined message with obtaining address, target VNI, target VLAN mark and the multicast of the distal end VTEP.Local terminal VTEP
In internet group management protocol snooping (Internet Group Management Protocol Snooping, referred to as
IGMPsnooping) module creates target multicast forwarding according to target VNI, target VLAN mark and target multicast group address
Table;Also, the address of the distal end VTEP is also added in the duplication table of target multicast forward table by local terminal VTEP.
It is understood that local terminal VTEP can be under target multicast forward table and the duplication already present situation of table
Directly the address of the distal end VTEP is added in the duplication table of target multicast forward table.
Optionally, after receiving the first VXLAN message, local terminal VTEP first stores the first VXLAN message;Later, exist
After the multicast message for receiving target multicast group, local terminal VTEP creates target multicast forwarding further according to the first VXLAN message
Table.So, it can solve target multicast forward table to be idle after creation, the memory source quilt of caused local terminal VTEP
The problem of waste.
Based on the above-mentioned technical proposal, the first VXLAN message that local terminal VTEP is sent according to distal end VTEP generates target multicast
Forwarding table, and the address of distal end VTEP is added in the duplication table of target multicast forward table.Wherein, target multicast forward table is used
In making the local terminal VTEP that the multicast message of the target multicast group is forwarded to the distal end VTEP.So, local terminal
The multicast message of target multicast group will not be sent to other unrelated VTEP (namely duplication table of target multicast forward table by VTEP
In Unrecorded VTEP), so that flux of multicast be avoided to flood in VXLAN network, and then network bandwidth is avoided to be wasted.
On the basis of scheme shown in Fig. 2, as shown in figure 3, also providing another multicast side for the embodiment of the present application
Method, method includes the following steps:
S201, local terminal VTEP receive multicast message.
A kind of optional implementation, local terminal VTEP receive the multicast message that server connected to it issues.
Whether the corresponding keyword of S202, local terminal VTEP detection multicast message matches the corresponding keyword of multicast forward table.
Wherein, the corresponding keyword of multicast message includes VNI, VLAN mark and multicast group address.It should be noted that
The corresponding VNI of multicast message is the corresponding VNI of interface for receiving the local terminal VTEP of the multicast message.Multicast message is corresponding
VLAN mark is the VLAN mark that the multicast message carries.The corresponding multicast group address of multicast message is that the multicast message is taken
The multicast group address of band.
In the embodiment of the present application, the corresponding keyword of the corresponding keyword match multicast forward table of multicast message refers to,
The corresponding VNI of multicast message target VNI corresponding with multicast forward table is identical, and the corresponding VLAN mark of multicast message turns with multicast
It delivers corresponding target VLAN and identifies the corresponding multicast group address of identical and multicast message target corresponding with multicast forward table
Multicast group address is identical.
It is understood that if the corresponding VNI of multicast message target VN I corresponding with multicast forward table be not identical, or
It is corresponding that the corresponding VLAN of multicast message identifies the not identical or multicast message of target VLAN mark corresponding with multicast forward table
Multicast group address target multicast group address corresponding with multicast forward table is not identical, then the corresponding keyword of multicast message mismatches
The corresponding keyword of multicast forward table.
In the embodiment of the present application, if the corresponding key of the corresponding keyword match target multicast forward table of multicast message
Word, then local terminal VTEP executes following step S203.If the corresponding keyword of multicast message and local terminal VTEP are pre-stored any
The corresponding keyword of multicast forward table mismatches, then local terminal VTEP executes following step S204 or S205.
If the corresponding keyword of the corresponding keyword match target multicast forward table of S203, multicast message, local terminal VTEP
According to the duplication table of target multicast forward table, the multicast message is transmitted to the distal end VTEP.
The multicast message is encapsulated as the 3rd VXLAN message by a kind of optional implementation, local terminal VTEP;Later, originally
It holds VTEP according to the address of the distal end VTEP recorded in the duplication table of target multicast forward table, the 3rd VXLAN is reported
Text is sent to the distal end VTEP.
If the corresponding pass of the pre-stored any multicast forward table of the corresponding keyword of S204, multicast message and local terminal VTEP
Key word mismatches, then the multicast message is transmitted to all VTEP in target BUM duplication table by local terminal VTEP.
Wherein, the target BUM duplication table is that the corresponding BUM of the corresponding VNI of the multicast message replicates table.
In a kind of optional implementation, the multicast message is encapsulated as the 3rd VXLAN message by local terminal VTEP;Later,
Local terminal VTEP replicates table according to target BUM, and the 3rd VXLAN message is sent respectively to target in a manner of head end duplication
BUM replicates each of table VTEP.
If the corresponding pass of the pre-stored any multicast forward table of the corresponding keyword of S205, multicast message and local terminal VTEP
Key word mismatches, then local terminal VTEP abandons the multicast message.
A kind of optional implementation, if the corresponding keyword of the multicast message and local terminal VTEP are pre-stored any
The corresponding keyword of multicast forward table mismatches, then local terminal VTEP is with the corresponding keyword of the multicast message, described in generation
The corresponding multicast forward table of multicast message, the corresponding multicast forward table of the multicast message do not include duplication table.In this way, by institute
The corresponding multicast forward table of multicast message is stated not comprising duplication table, local terminal VTEP abandons the multicast message.
Based on the above-mentioned technical proposal, local terminal VTEP is searched after receiving multicast message according to the keyword of multicast message
Matched multicast forward table.If local terminal VTEP can find matched multicast forward table, according to matched multicast forward table
The multicast replication table for including, the problem of forwarding the multicast message, flood in VXLAN network to avoid multicast message.It is no
Then, local terminal VTEP then replicates table according to BUM, forwards the multicast message;Alternatively, local terminal VTEP abandons the multicast message.
On the basis of scheme shown in Fig. 2, as shown in figure 4, for another multicast side provided by the embodiments of the present application
Method, method includes the following steps:
S301, local terminal VTEP receive the 2nd VXLAN message that distal end VTEP is sent.
Wherein, the 2nd VXLAN message includes that multicast exits message, the multicast exit message for request exit mesh
Mark multicast group.It is IGMP message that the multicast, which exits message,.
A kind of optional implementation, the distal end VXLAN message receive the multicast that the server being attached thereto is sent
Exit message;Later, the multicast is exited message and is encapsulated as the 2nd VXLAN message by the distal end VTEP;Finally, the distal end
2nd VXLAN message is sent to each of the corresponding BUM duplication table of target VNI VTEP in such a way that head end replicates by VTEP
(namely local terminal VTEP).
S302, local terminal VTEP delete the address of the distal end VTEP from the duplication table of target multicast forward table.
Optionally, if the duplication table of target multicast forward table does not include the address of any VTEP, local terminal VTEP deletes mesh
Mark the duplication table of multicast forward table;Further, local terminal VTEP deletes the target multicast forward table.
Based on the above-mentioned technical proposal, local terminal VTEP is after the 2nd VXLAN message for receiving distal end VTEP transmission, by institute
It is deleted from the duplication table of target multicast forward table the address for stating distal end VTEP.In this way, local terminal VTEP will not be by target multicast group
Multicast message be transmitted to the distal end VTEP for exiting target multicast group.
Come below with reference to VXLAN network shown in FIG. 1 and concrete scene to Fig. 2, Fig. 3 and multicast side shown in Fig. 4
Method is introduced.
Assuming that the address of VTEP1 is (1.1.1.1) in current VXLAN network, the address of VTEP2 is (2.2.2.2),
The address of VTEP3 is (3.3.3.3), and the address of VTEP4 is (4.4.4.4).VTEP1 establishes with other VTEP static respectively
The tunnel VXALN, VNI 100, the static tunnel VXLAN between VTEP1 and VTEP2 are tunnel2 (2.2.2.2), VTEP1 with
The static tunnel VXLAN between VTEP3 is tunnel3 (3.3.3.3), and the static tunnel VXLAN between VTEP1 and VTEP4 is
tunnel4(4.4.4.4).VTEP1 is based on the static state tunnel VXLAN and establishes BUM duplication table 1, and BUM tunnel type is head end duplication,
Outlet is (2.2.2.2,3.3.3.3,4.4.4.4).Similar, other VTEP can also establish the static tunnel VXLAN, and establish phase
The BUM duplication table answered, details are not described herein again.
When the user-side port of VTEP1 receives IGMP message 1, which is added target multicast group for requesting,
The address of the target multicast group is (224.1.1.1), then the IGMP message 1 is encapsulated as VXLAN message 1 by VTEP1, and according to
BUM replicates table 1, which is sent to VTEP2, VTEP3, VTEP4.
VXLAN message 1 of the VXLAN module parsing of VTEP2 from VTEP1.Getting IGMP message 1 and VXLAN
After information (VNI 100, VLAN 1000, VTEP IP 1.1.1.1), the VXLAN module of VTEP2 is by 1 He of IGMP message
VXLAN information is transmitted to the IGMP snooping module of VTEP2.IGMP snooping module is with keyword (VNI100, VLAN
1000, VTEP IP 1.1.1.1), create multicast forward table 1.Also, IGMP snooping module manages mould to BUM duplication table
The outlet of the duplication table 1 of block application multicast forward table 1, the duplication table 1 of the multicast forward table 1 is (1.1.1.1).
VTEP3 and VTEP4, which receives the operation after VXLAN message 1, can refer to the operation of above-mentioned VTEP2, herein no longer
It repeats.
If VTEP2 receives the multicast message that multicast group address is (224.1.1.1), VTEP2 is according to the multicast message pair
The keyword answered searches multicast forward table, hits multicast forward table 1, therefore, VTEP2 according to the duplication table 1 of multicast forward table 1,
The multicast message is sent to VTEP1.
If the user-side port of VTEP1 receives IGMP message 2, which exits target multicast group for requesting,
Then IGMP message 2 and VXLAN information (VNI 100, VLAN 1000, VTEP IP 1.1.1.1) are encapsulated as VXLAN report by VTEP1
Text 2;Then, VTEP1 replicates table 1 according to BUM, and VXLAN message 2 is sent to VTEP2, VTEP3 and VTEP4.
After the VXLAN module of VTEP2 receives VXLAN message 2, VXLAN message 2 is decapsulated, obtains IGMP
Message 2 and VXLAN information.Later, IGMP2 and VXLAN information is sent to the IGMP of VTEP2 by the VXLAN module of VTEP2
Snooping module.IGMP snooping module deletes (1.1.1.1) from the duplication table 1 of multicast forward table 1.Assuming that group
The duplication table 1 of forwarding table 1 is broadcast after deleting outlet (1.1.1.1), the duplication table 1 of multicast forward table 1 is not comprising other outlets.
In this case, IGMP snooping module deletes the duplication table 1 of multicast forward table 1, and deletes multicast forward table 1.
VTEP3 and VTEP4, which receives the operation after VXLAN message 2, can refer to the operation of above-mentioned VTEP2, herein no longer
It repeats.
The embodiment of the present application can carry out functional module or functional unit to VTEP equipment according to above method example
It divides, for example, each functional module of each function division or functional unit can be corresponded to, it can also be by two or more
Function be integrated in a processing module.Above-mentioned integrated module both can take the form of hardware realization, can also use
The form of software function module or functional unit is realized.Wherein, it is to the division of module or unit in the embodiment of the present application
Schematically, only a kind of logical function partition, there may be another division manner in actual implementation.
As shown in figure 5, being a kind of VTEP equipment provided by the embodiments of the present application, comprising: receiving module 401, processing module
402 and sending module 403.
Receiving module 401, for receiving the first virtual expansible local area network VXLAN message of distal end VTEP transmission;Wherein,
The first VXLAN message includes: the address of the distal end VTEP, and it is empty that destination virtual extends local net network mark VNI, target
Quasi- local area network VLAN mark and multicast join message;The multicast joins message the address comprising target multicast group.
Processing module 402, for according to the first VXLAN message, creating target multicast forward table, and by the distal end VTEP
Address be added in the duplication table of the target multicast forward table;Wherein, the corresponding keyword of the target multicast forward table
It include: target VNI, target VLAN mark and target multicast group address;The target multicast forward table is for making the local terminal
The multicast message of the target multicast group is forwarded to the distal end VTEP by VTEP.
In a kind of possible design, the receiving module 401 is also used to receive multicast message.The sending module 403,
If for the corresponding keyword of target multicast forward table described in the corresponding keyword match of multicast message, according to the target multicast
The multicast message is transmitted to the distal end VTEP by the duplication table of forwarding table.
In a kind of possible design, the receiving module 401 is also used to receive multicast message.The sending module 403,
If not for the corresponding keyword of the pre-stored any multicast forward table of the corresponding keyword of multicast message and local terminal VTEP
The multicast message is transmitted to all in preconfigured target broadcast, unknown unicast and multicast BUM duplication table by matching
VTEP, the target BUM duplication table are that the corresponding BUM of the corresponding VNI of the multicast message replicates table.
In a kind of possible design, the receiving module 401 is also used to receive multicast message.The sending module 403,
If not for the corresponding keyword of multicast message keyword corresponding with any multicast forward table in local terminal VTEP
Match, abandons the multicast message.
In a kind of possible design, the receiving module 401 is also used to receive the distal end VTEP is sent second
VXLAN message, the 2nd VXLAN message include that multicast exits message, the multicast exit message for request exit target
Multicast group.The processing module 402 is also used to the duplication table by the address of the distal end VTEP from the target multicast forward table
Middle deletion.
Using integrated unit, Fig. 6 shows the one kind of computer equipment involved in above-described embodiment
Possible structural schematic diagram.The computer equipment includes: processing unit 501 and communication interface 502.The processing unit 501
For executing the step of above-mentioned processing module 402 executes, and/or other processes for executing techniques described herein.Institute
The step of communication interface 502 is for executing above-mentioned receiving module 301 and the execution of sending module 303 is stated, and/or for executing this paper
Other processes of described technology.The communication interface 502 is also used to support the communication of computer equipment and other equipment.Institute
Stating computer equipment can also include storage unit 503 and bus 504.Wherein, storage unit 503 is for storing computer equipment
Program code and data.
Wherein, above-mentioned processing unit 501 can be processor or controller in computer equipment, the processor or control
Device, which may be implemented or execute, combines various illustrative logic blocks, module and circuit described in present disclosure.It should
Processor or controller can be central processing unit, and general processor, digital signal processor, specific integrated circuit, scene can
Program gate array or other programmable logic device, transistor logic, hardware component or any combination thereof.It can be with
It realizes or executes and combine various illustrative logic blocks, module and circuit described in present disclosure.The processing
Device is also possible to realize the combination of computing function, such as includes one or more microprocessors combination etc..
Communication interface 502 can be transceiver, transmission circuit or system interface in computer equipment etc..
Storage unit 503 can be memory in computer equipment etc., which may include volatile memory,
Such as random access memory;The memory also may include nonvolatile memory, such as read-only memory, flash
Device, hard disk or solid state hard disk;The memory can also include the combination of the memory of mentioned kind.
Bus 504 can be expanding the industrial standard structure (Extended Industry Standard
Architecture, EISA) bus etc..Bus 504 can be divided into address bus, data/address bus, control bus etc..For convenient for table
Show, only indicated with a thick line in Fig. 6, it is not intended that an only bus or a type of bus.
The same or similar parts between the embodiments can be referred to each other in this specification, and each embodiment emphasis is said
Bright is the difference from other embodiments.For Installation practice, since it is substantially similar to method reality
Example is applied, so describing fairly simple, the relevent part can refer to the partial explaination of embodiments of method.
The embodiment of the present application provides a kind of computer readable storage medium, is stored thereon with computer program, the calculating
Machine program is loaded into when being computer-executed on computer, and computer is made to execute above-mentioned method of multicasting.
Wherein, computer readable storage medium, such as electricity, magnetic, optical, electromagnetic, infrared ray can be but not limited to or partly led
System, device or the device of body, or any above combination.The more specific example of computer readable storage medium is (non-poor
The list of act) it include: the electrical connection with one or more conducting wires, portable computer diskette, hard disk, random access memory
(Random Access Memory, RAM), read-only memory (Read-Only Memory, ROM), erasable type may be programmed read-only
Memory (Erasable Programmable Read Only Memory, EPROM), optical fiber, portable compact disc are read-only
Memory (Compact Disc Read-Only Memory, CD-ROM), light storage device, magnetic memory device or above-mentioned
Any appropriate combination.In the embodiment of the present application, computer readable storage medium can be it is any include or storage program
Tangible medium, the program can be commanded execution system, device or device use or in connection.
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is any
Change or replacement within the technical scope of the present application should all be covered within the scope of protection of this application.Therefore, this Shen
Protection scope please should be subject to the protection scope in claims.