Communication method, device and system, electronic equipment and storage medium

By using IPv6 message headers to encapsulate Ethernet data frames in multi-site virtual Ethernet private networks, the problems of large communication overhead and limited application range in the prior art are solved, efficient and secure data transmission is achieved, and the application scope of virtual Ethernet private networks is expanded.

CN119728637APending Publication Date: 2025-03-28CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1

Patent Information

Application Number
CN202311279104.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In the prior art, the communication method of multi-site virtual Ethernet private network has problems such as large overhead and limited application scope.

Method used

By receiving Ethernet data frames, the virtual Ethernet identity and destination site mapping prefix are determined according to the preset address mapping relationship, the IPv6 message header is generated and the Ethernet data frame is encapsulated, and the IPv6 message is formed, and the IPv6 message is sent to the second network device to realize data transmission.

Benefits of technology

It realizes efficient transmission of Ethernet data frames in IPv6 networks, reduces encapsulation overhead, avoids the risk of DDoS attacks caused by static IP addresses, and expands the application scope of virtual Ethernet private networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728637A_ABST
    Figure CN119728637A_ABST
Patent Text Reader

Abstract

The invention provides a communication method, device and system, electronic equipment and a storage medium, and relates to the technical field of communication. The method comprises the following steps: receiving an Ethernet data frame sent by a first host connected with a first network device, wherein the Ethernet data frame comprises a source MAC address and a destination MAC address; determining a virtual Ethernet identifier and a target site mapping prefix corresponding to the target MAC address according to a preset address mapping relationship; generating an IPv6 message header according to the virtual Ethernet identifier, the target site mapping prefix and the target MAC address, and packaging the Ethernet data frame according to the IPv6 message header to obtain an IPv6 message; and sending the IPv6 message to a second network device, decapsulating the IPv6 message by the second network device to obtain an Ethernet data frame, and sending the Ethernet data frame to a second host connected to the second network device. The present disclosure can reduce overhead and improve system security.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Multi-site virtual Ethernet private network is a commonly used network form for enterprise networking or data center interconnection.

[0003] In the related technologies, network virtualization technology (Virtual Extensible Local Area Network, VXLAN) technology, Layer 2 virtual private network (VPN) technology based on segment routing IPv6 (SRv6) of IPv6 forwarding plane, and virtual private LAN service (VPLS) technology can be used for implementation. However, VXLAN technology has high overhead, SRv6 technology has limited application scope and security risks, and the application scope of VPLS depends on the deployment scope of Multi-Protocol Label Switching (MPLS), which limits the actual coverage of VPLS. Therefore, it is urgent to design a communication method with low overhead and wide application scope.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The present disclosure provides a communication method, device, system, electronic device and storage medium, which at least to a certain extent overcome the problems of high overhead and limited application scope in related technologies.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0007] According to one aspect of the present disclosure, a communication method is provided, which is applied to a first network device, comprising: receiving an Ethernet data frame sent by a first host connected to the first network device, wherein the Ethernet data frame includes a source media access control MAC address and a destination MAC address; determining a virtual Ethernet identifier and a destination site mapping prefix corresponding to the destination MAC address according to a preset address mapping relationship, wherein the address mapping relationship is used to characterize the correspondence between a MAC address and a site mapping prefix in a virtual Ethernet private network; generating a sixth version of the Internet Protocol IPv6 message header according to the virtual Ethernet identifier, the destination site mapping prefix and the destination MAC address, encapsulating the Ethernet data frame according to the IPv6 message header to obtain an IPv6 message; sending the IPv6 message to a second network device so that the second network device decapsulates the IPv6 message to obtain the Ethernet data frame, and sending the Ethernet data frame to a second host connected to the second network device.

[0008] In some embodiments, the sixth version of the Internet Protocol IPv6 message header is generated according to the virtual Ethernet identifier, the destination site mapping prefix and the destination MAC address, and the Ethernet data frame is encapsulated according to the IPv6 message header to obtain the IPv6 message, including: mapping the destination site mapping prefix, the destination MAC address and at least part of the virtual Ethernet identifier to the destination address of the IPv6 message header; configuring the next header Nextheader field value of the IPv6 message header to a preset type identifier; and encapsulating the Ethernet data frame in the payload of the IPv6 message to obtain the IPv6 message.

[0009] In some embodiments, the virtual Ethernet identifier includes first identification information and second identification information; wherein the method further includes: mapping the source site mapping prefix of the first network device, the first identification information and the source MAC address of the first host to the source address of the IPv6 message header; mapping the destination site mapping prefix, the second identification information and the destination MAC address to the destination address of the IPv6 message header.

[0010] In some embodiments, the source site mapping prefix and the destination site mapping prefix are 64 bits, the source site mapping prefix is ​​mapped to the first 64 bits of the source address of the IPv6 message header, and the destination site mapping prefix is ​​mapped to the first 64 bits of the destination address of the IPv6 message header; the first identification information and the second identification information are 12 bits, the first identification information is mapped to the first 12 bits of the interface identifier IID of the source address of the IPv6 message header, and the second identification information is mapped to the first 12 bits of the IID of the destination address of the IPv6 message header; the source MAC address and the destination MAC address are 48 bits, the source MAC address is mapped to the last 48 bits of the IID of the source address of the IPv6 message header, and the destination MAC address is mapped to the last 48 bits of the IID of the destination address of the IPv6 message header; the IID of the source address and the IID of the destination address are also configured with a reserved field for configuring the extension bit of the virtual Ethernet identifier.

[0011] In some embodiments, sending the IPv6 message to the second network device includes: sending the IPv6 message to the second network device according to a destination site mapping prefix in a destination address of an IPv6 message header in the IPv6 message.

[0012] In some embodiments, before receiving the Ethernet data frame sent by the first host connected to the first network device, the method further includes: configuring the virtual Ethernet identifier and site mapping prefix of each network device in the virtual Ethernet private network.

[0013] In some embodiments, the address mapping relationship of each host is stored in a MAC virtual routing forwarding table MAC-VRF of a network device.

[0014] In some embodiments, the method further includes: obtaining the virtual Ethernet identifier of each network device in the virtual Ethernet private network, the site mapping prefix, and the MAC address of the host connected to each network device to obtain the address mapping relationship of each host.

[0015] In some embodiments, the method further includes: if the virtual Ethernet identifier and / or the destination site mapping prefix corresponding to the destination MAC address is not found, then the Ethernet data frame is not encapsulated and forwarded.

[0016] According to another aspect of the present disclosure, a communication method is also provided, which is applied to a second network device, including: receiving an IPv6 message sent by a first network device, wherein the IPv6 message is obtained by generating an IPv6 message header by the first network device according to a virtual Ethernet identifier, a destination site mapping prefix and a destination MAC, and encapsulating an Ethernet data frame according to the IPv6 message header, wherein the Ethernet data frame is sent to the first network device by a first host connected to the first network device, and the Ethernet data frame includes a source MAC address and a destination MAC address, and according to a preset address mapping relationship, determining a virtual Ethernet identifier and a destination site mapping prefix corresponding to the destination MAC address, wherein the address mapping relationship is used to characterize the correspondence between a MAC address and a site mapping prefix in a virtual Ethernet private network; decapsulating the IPv6 message to obtain an Ethernet data frame; and sending the Ethernet data frame to a second host connected to the second network device.

[0017] In some embodiments, decapsulating the IPv6 message to obtain an Ethernet data frame includes: checking the virtual Ethernet identifier, the destination site mapping prefix, the next header field value and the destination MAC address in the IPv6 message header; when the destination site mapping prefix of the IPv6 message header matches the site mapping prefix of the second network device, the virtual Ethernet identifier of the IPv6 message header is consistent with a preset virtual Ethernet identifier, and the next header field value is a preset type identifier, extracting the Ethernet data frame from the payload of the IPv6 message; wherein, sending the Ethernet data frame to a second host connected to the second network device includes: sending the Ethernet data frame to the second host according to the destination MAC address of the Ethernet data frame.

[0018] In some embodiments, the method further includes: if the site mapping prefix of the destination address of the IPv6 message header does not match the site mapping prefix of the second network device, continuing to forward the IPv6 message.

[0019] In some embodiments, the method further includes: if the destination site mapping prefix matches the site mapping prefix of the second network device, the virtual Ethernet identifier is inconsistent with the preset virtual Ethernet identifier, and / or the next header field value is not the preset type identifier, then the IPv6 message is discarded.

[0020] According to another aspect of the present disclosure, a communication device is also provided, which is applied to a first network device, including: an Ethernet data frame receiving module, used to receive an Ethernet data frame sent by a first host connected to the first network device, the Ethernet data frame including a source MAC address and a destination MAC address; an address determination module, used to determine a virtual Ethernet identifier and a destination site mapping prefix corresponding to the destination MAC address according to a preset address mapping relationship, the address mapping relationship being used to characterize the correspondence between a MAC address and a site mapping prefix in a virtual Ethernet private network; a message encapsulation module, used to generate an IPv6 message header according to the virtual Ethernet identifier, the destination site mapping prefix and the destination MAC address, and encapsulate the Ethernet data frame according to the IPv6 message header to obtain an IPv6 message; a message sending module, used to send the IPv6 message to a second network device, so that the second network device decapsulates the IPv6 message to obtain the Ethernet data frame, and sends the Ethernet data frame to a second host connected to the second network device.

[0021] According to another aspect of the present disclosure, a communication device is also provided, which is applied to a second network device, including: an IPv6 message receiving module, used to receive an IPv6 message sent by a first network device, wherein the IPv6 message is obtained by the first network device generating an IPv6 message header according to a virtual Ethernet identifier, a destination site mapping prefix and a destination MAC address, and encapsulating the Ethernet data frame according to the IPv6 message header, the Ethernet data frame is sent by a first host connected to the first network device to the first network device, the Ethernet data frame includes a source MAC address and a destination MAC address, and the virtual Ethernet identifier and the destination site mapping prefix corresponding to the destination MAC address are determined according to a preset address mapping relationship, and the address mapping relationship is used to characterize the correspondence between the MAC address and the site mapping prefix in the virtual Ethernet private network; a message decapsulation module, used to decapsulate the IPv6 message to obtain an Ethernet data frame; and a data sending module, used to send the Ethernet data frame to a second host connected to the second network device.

[0022] According to another aspect of the present disclosure, a communication system is also provided, including a first network device and a second network device, wherein the first network device is used to receive an Ethernet data frame sent by a first host connected to the first network device, wherein the Ethernet data frame includes a source media access control MAC address and a destination MAC address; according to a preset address mapping relationship, a virtual Ethernet identifier and a destination site mapping prefix corresponding to the destination MAC address are determined, and the address mapping relationship is used to characterize the correspondence between the MAC address and the site mapping prefix in the virtual Ethernet private network; according to the virtual Ethernet identifier, the destination site mapping prefix and the destination MAC address, a sixth version of the Internet Protocol IPv6 message header is generated, and the Ethernet data frame is encapsulated according to the IPv6 message header to obtain an IPv6 message; the IPv6 message is sent to the second network device so that the second network device decapsulates the IPv6 message to obtain the Ethernet data frame, and the Ethernet data frame is sent to the second host connected to the second network device; the second network device is used to receive the IPv6 message sent by the first network device; decapsulate the IPv6 message to obtain the Ethernet data frame; and send the Ethernet data frame to the second host connected to the second network device.

[0023] According to another aspect of the present disclosure, an electronic device is also provided, which includes: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the communication methods described above by executing the executable instructions.

[0024] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the communication method described in any one of the above is implemented.

[0025] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the above communication methods.

[0026] The communication method, apparatus, system, electronic device and storage medium provided in the embodiments of the present invention receive an Ethernet data frame sent by a first host connected to a first network device, the Ethernet data frame including a source MAC address and a destination MAC address; determine a virtual Ethernet identifier and a destination site mapping prefix corresponding to the destination MAC address according to a preset address mapping relationship, the address mapping relationship being used to characterize the correspondence between the MAC address and the site mapping prefix in a virtual Ethernet private network; generate an IPv6 message header according to the virtual Ethernet identifier, the destination site mapping prefix and the destination MAC address, encapsulate the Ethernet data frame according to the IPv6 message header to obtain an IPv6 message; send an IPv6 message to a second network device so that the second network device decapsulates the IPv6 message to obtain an Ethernet data frame, and send the Ethernet data frame to a second host connected to the second network device, thereby utilizing the ubiquitous coverage and huge address space of IPv6 to improve Ethernet The invention improves the efficiency of network data transmission and the security of the system. On the one hand, the Ethernet data frame is directly encapsulated in the IPv6 data packet. Under the premise of ensuring the representation and routing capabilities, the multi-layer encapsulation of the VXLAN technology is cancelled, which significantly reduces the encapsulation overhead and the cost of multi-protocol layer data processing. On the other hand, the site IPv6 address mapping prefix and MAC address of the virtual Ethernet private network are encapsulated in the IPv6 message header. For the host communication between the two sites, the outer IPv6 address is dynamically generated according to the MAC address, avoiding the configuration of a static IP address specifically used as a tunnel endpoint for each site, reducing the risk of DDoS attacks caused by static addresses. Finally, the present invention can cross the IPv6 three-layer network to perform inter-site two-layer Ethernet communication only when the IPv6 path is reachable, overcomes the coverage of Ethernet service capabilities affected by insufficient MPLS deployment, and improves the application scope of virtual Ethernet private networks based on IPv6.

[0027] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0029] Figure 1 A schematic diagram showing a communication system structure in an embodiment of the present disclosure;

[0030] Figure 2 A flow chart of a communication method in an embodiment of the present disclosure is shown;

[0031] Figure 3 A flow chart of an IPv6 message encapsulation method in an embodiment of the present disclosure is shown;

[0032] Figure 4 A schematic diagram of an IPv6 message header encapsulation method in an embodiment of the present disclosure is shown;

[0033] Figure 5 A flow chart of a method for generating a preset address mapping relationship in an embodiment of the present disclosure is shown;

[0034] Figure 6 Another communication method flow chart in the embodiment of the present disclosure is shown;

[0035] Figure 7 A flow chart of another communication method in an embodiment of the present disclosure is shown;

[0036] Figure 8 A structural schematic diagram showing a specific example of a communication method provided by an embodiment of the present disclosure;

[0037] Fig. 9 A schematic diagram of a communication device in an embodiment of the present disclosure is shown;

[0038] Fig.10 A schematic diagram of another communication device in an embodiment of the present disclosure is shown;

[0039] Fig.11 A schematic diagram showing a communication system in an embodiment of the present disclosure is shown;

[0040] Fig.12 A structural block diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0041] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0042] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0043] For ease of understanding, before introducing the embodiments of the present disclosure, several terms involved in the embodiments of the present disclosure are first explained as follows:

[0044] VEN6, IPv6-based Virtual Ethernet Network, is a virtual Ethernet network based on the sixth version of the Internet Protocol (Internet Protocol Version 6, IPv6). It is a multi-site virtual Ethernet network built on an IPv6 network.

[0045] VEI, Virtual Ethernet Identification, is used to identify and distinguish different virtual Ethernet private network instances in the entire network. The maximum length of VEI is 32 bits.

[0046] PE, Provider Edge, service provider network edge router.

[0047] The specific implementation of the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.

[0048] Figure 1 FIG. 1 shows an exemplary application system architecture diagram to which the communication method in the embodiment of the present disclosure can be applied. Figure 1 As shown, the system architecture may include a first network device 101, a second network device 102, and an IPv6 network 105, wherein the IPv6 network 105 is used to provide a medium for a communication link between the first network device 101 and the second network device 102. The first network device 101 and the second network device 102 are network devices in a virtual Ethernet private network. The first network device 101 may be Figure 1 The first service provider network edge router PE1 in the embodiment, the second network device 102 may be Figure 1 The first network device 101 may also be a switch with the same function as PE1, and the second network device 102 may also be a switch with the same function as PE2.

[0049] In one embodiment, a virtual Ethernet private network may include at least two network devices, each of which may be connected to at least one host: a first network device 101 may be connected to at least one first host 102 , and a second network device 102 may be connected to at least one second host 102 .

[0050] A virtual Ethernet private network may be identified by a virtual Ethernet identifier. For example, the virtual Ethernet identifier VEI value of a virtual Ethernet private network is configured as N1.

[0051] Each network device is characterized by a site mapping prefix Pref6, and the host connected to each network device can be distinguished by a Media Access Control (MAC) address.

[0052] In the embodiment of the present disclosure, an EVN6 subsystem is added to the network device, such as Figure 1 As shown in the figure, the EVN6 subsystem includes control plane, configuration, encapsulation, sending data packets, receiving data packets and decapsulation. The above functions do not involve the work of the router forwarding plane and have no specific requirements for the forwarding performance of the device. The basic functions of the EVN6 subsystem are as follows:

[0053] The control plane implements the host MAC / Pref6 mapping information announcement (MAC / Pref6 MappingAdvertisement) function between sites by extending the next-generation virtual private network (Ethernet Virtual Private Network, EVPN) and other protocols. After receiving the above information, the network device stores it in the corresponding MAC virtual routing forwarding table (MAC-Virtual Routing Forwarding, MAC-VRF) according to the virtual Ethernet identifier VEI.

[0054] Configuration: The network administrator manually or through the network management system creates a virtual Ethernet private network instance on the network device and enters the parameters related to the instance creation.

[0055] Encapsulation: After receiving a message (or Ethernet data frame) sent by a host, the network device uses the destination MAC address as an index to search the local MAC-VRF. If a corresponding entry is found, the site mapping prefix Pref6 and VEI corresponding to the host corresponding to the destination MAC address are extracted, and then the Ethernet data frame is encapsulated in an IPv6 data packet.

[0056] Sending data packets: The IPv6 data packets (or messages) generated by the encapsulation process are transmitted to the IPv6 network layer protocol stack and then enter the IPv6 network.

[0057] Receiving data packets: After the network device receives the IPv6 data packet transmitted by the IPv6 network, the receiving data packet module checks whether the destination site mapping prefix of the IPv6 data packet matches the site mapping prefix of the network device. If so, the virtual Ethernet identifier is extracted and synthesized from the IID of the source address and destination address of the IPv6 data packet, and the synthesized virtual Ethernet identifier is compared with the VEI value stored in the MAC-VRF for consistency. If they are consistent, check whether the Next header value of the IPv6 message header is the preset type identifier. If so, it means that the payload is an Ethernet data frame, and send the IPv6 data packet to the decapsulation module.

[0058] Decapsulation: discard the IPv6 message header, take out the Ethernet data frame in the IPv6 data packet, and send it to the destination host in the network of the destination network device according to the destination MAC address.

[0059] The first host 103 and the second host 104 can be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, wearable devices, augmented reality devices, virtual reality devices, etc.

[0060] Optionally, the client of the application installed in different hosts is the same, or the client of the same type of application based on different operating systems. Based on the different terminal platforms, the specific form of the client of the application can also be different, for example, the application client can be a mobile client, a PC client, etc.

[0061] Those skilled in the art will know that Figure 1 The number of hosts, network devices and IPv6 networks in the example is only illustrative, and any number of hosts, network devices and IPv6 networks may be provided according to actual needs. The embodiments of the present disclosure do not limit this.

[0062] In the related technologies, VXLAN technology, SRv6-based Layer 2 VPN technology, and VPLS technology can be used to support multi-site virtual Ethernet.

[0063] As for VXLAN technology, it is one of the NVO3 (Network Virtualization Overlay, a network virtualization technology) standard technologies defined by the Internet Engineering Task Force (IETF), and is an extension of the traditional Virtual Local Area Network (VLAN) protocol. The characteristic of VXLAN is that the L2 Ethernet data frame is encapsulated into the User Datagram Protocol (UDP) message (i.e. L2 over L4) and transmitted in the L3 network. VXLAN is essentially a tunnel technology. On the IP network between the source network device and the destination network device, a logical tunnel is established, and the user-side message is forwarded through the above tunnel after specific encapsulation. From the user's side, the server accessing the network is like being connected to different ports of a virtual Layer 2 switch, which can support L2 layer networking communication. However, VXLAN encapsulates L2 Ethernet data frames into UDP packets. Transmitting VXLAN in the L3 network uses multi-level encapsulation including a dedicated VXLAN packet header and a UDP packet header, which adds 16 bytes of overhead and two protocol function layers. The overhead is too large, especially for small data packets.

[0064] The Layer 2 VPN technology based on SRv6 is segment routing based on the IPv6 forwarding plane. It uses the existing IPv6 forwarding technology and implements network programmability through flexible IPv6 extension headers. It can use SRv6 to implement a variety of business capabilities including L2 VPN. However, the Layer 2 VPN technology based on SRv6 has application scope limitations and security risks. SRv6 is an extension technology based on the IPv6 routing extension header. The IPv6 extension header will bring security risks. Therefore, many network operators will discard or not process IPv6 packets with extension headers such as the Segment Routing Header (SRH), which affects the application scope of SRv6 capabilities. Therefore, SRv6 technology can only be used in a limited domain.

[0065] VPLS is a point-to-multipoint L2 VPN service provided in the public network, which enables geographically isolated user sites to be connected through the Metropolitan Area Network (MAN) / Wide Area Network (WAN), and makes the connection between each site the same as in a Local Area Network (LAN). It is a Layer 2 VPN technology based on MPLS and Ethernet. VPLS operates by creating virtual "switches" at the customer edge and provider edge of each network. However, its application scope depends on the deployment scope of MPLS. Since MPLS cannot be fully deployed like IPv6, the actual coverage of VPLS is limited.

[0066] Under the above system architecture, a communication method is provided in an embodiment of the present disclosure, which provides a method for carrying a multi-site Ethernet virtual private network in an IPv6 network. The Ethernet data frame to be transmitted can be directly encapsulated in an IPv6 data packet, and a unique IPv6 source and destination address is generated using information such as a host MAC address and a virtual Ethernet identifier, supporting the transmission of the Ethernet data frame to the destination host. This solution can be applied to multiple scenarios such as enterprise site interconnection and data centers. The method can be executed by any electronic device with computing and processing capabilities.

[0067] In some embodiments, the communication method provided in the embodiments of the present disclosure may be executed by the first network device in the above-mentioned system architecture; in other embodiments, the communication method provided in the embodiments of the present disclosure may be executed by the second network device in the above-mentioned system architecture; in other embodiments, the communication method provided in the embodiments of the present disclosure may be implemented by the first network device and the second network device in the above-mentioned system architecture through interaction.

[0068] Figure 2 A flow chart of a communication method in an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the communication method provided in the embodiment of the present disclosure is applied to a first network device, and includes the following steps:

[0069] S202: Receive an Ethernet data frame sent by a first host connected to the first network device, where the Ethernet data frame includes a source MAC address and a destination MAC address.

[0070] In one embodiment, the first network device mentioned above can be called a source network device, the first host is a host that sends Ethernet data frames, and the first host interacts with the first network device.

[0071] It should be noted that the Ethernet data frame is also called an Ethernet frame, and the Ethernet data frame belongs to the second layer L2.

[0072] The source MAC address is the MAC address corresponding to the first host, and the destination MAC address is the MAC address corresponding to the destination host.

[0073] S204. Determine the virtual Ethernet identifier and the destination site mapping prefix corresponding to the destination MAC address according to a preset address mapping relationship, where the address mapping relationship is used to represent the correspondence between the MAC address and the site mapping prefix in the virtual Ethernet private network.

[0074] In this embodiment, the first network device can be Figure 1 PE1 in. PE1 can receive the Ethernet data frame sent from host 1, and after receiving the Ethernet data frame, obtain the virtual Ethernet identifier and destination site mapping prefix corresponding to the Ethernet data frame according to the Ethernet data frame. Specifically, after receiving the Ethernet data frame, the first network device extracts the destination MAC address in the Ethernet data frame, and determines the virtual Ethernet identifier and destination site mapping prefix corresponding to the destination MAC address by searching the preset address mapping relationship.

[0075] The preset address mapping relationship can be stored in the form of an address mapping relationship table, a virtual Ethernet identifier can correspond to site mapping prefixes of multiple network devices, and a site mapping prefix of a network device can correspond to at least one MAC address. It should be noted that a network device can belong to different virtual Ethernet private networks.

[0076] For ease of management, the address mapping relationship table may be managed according to the virtual Ethernet identifier. For example, one virtual Ethernet identifier corresponds to one address mapping relationship table. In this case, the address mapping relationship table may include a destination MAC address and a destination site mapping prefix.

[0077] Exemplarily, the address mapping relationship table may also include mapping relationships of multiple virtual Ethernet private networks at the same time. In this case, the address mapping relationship table includes at least a virtual Ethernet identifier, a destination MAC address, and a destination site mapping prefix.

[0078] In one embodiment, the address mapping relationship is stored in the MAC virtual routing forwarding table MAC-VRF to facilitate searching by various network devices.

[0079] In addition, the address mapping relationship may also be stored in a tree diagram, a picture, or the like, which is not specifically limited in the present disclosure.

[0080] The destination MAC address is a MAC address corresponding to a destination host of the Ethernet data frame, and the destination site mapping prefix is ​​a site mapping prefix corresponding to the second network device or the destination network device.

[0081] In one embodiment, if the virtual Ethernet identifier and / or the destination site mapping prefix corresponding to the destination MAC address is not found, the Ethernet data frame is not encapsulated and forwarded.

[0082] It should be noted that when the first network device searches for the preset address mapping relationship based on the destination MAC address and fails to find the corresponding virtual Ethernet identifier and destination site mapping prefix, it indicates that the Ethernet data frame is not a message in the virtual Ethernet private network, or the Ethernet data frame is not a message sent to the host corresponding to the above-mentioned destination MAC address. The Ethernet data frame can be discarded and the Ethernet data frame will not be encapsulated or forwarded.

[0083] S206: Generate an IPv6 message header according to the virtual Ethernet identifier, the destination site mapping prefix and the destination MAC address, and encapsulate the Ethernet data frame according to the IPv6 message header to obtain an IPv6 message.

[0084] The IPv6 message header includes an IPv6 basic header and an IPv6 extension header. In the present disclosure, when the first network device encapsulates the Ethernet data frame, the MAC address, the site mapping prefix, and the virtual Ethernet identifier can be encapsulated in the IPv6 basic header of the Ethernet data frame.

[0085] Exemplarily, the destination MAC address, the destination site mapping prefix and part of the virtual Ethernet identifier are encapsulated in the destination address of the IPv6 basic header, and the source MAC address, the source site mapping prefix and the remaining part of the virtual Ethernet identifier are encapsulated in the source address of the IPv6 basic header.

[0086] Typically, the length of the destination address field in the IPv6 basic header is 128 bits, which is used to carry the address of the destination network device, such as Figure 1 The source address field in the IPv6 basic header is 128 bits long and is used to carry the address of the source network device, for example Figure 1 The address of the first network device in.

[0087] The IPv6 packet header includes the Preamble field, the source MAC address field, the destination MAC address field, the Type field, the payload data field, and the frame check sequence FCS field. Among them, the source MAC address field and the destination MAC address field occupy 128 bits respectively. The source MAC address field carries the source address, and the destination MAC address field carries the destination MAC address.

[0088] In one embodiment, the Ethernet data frame is encapsulated into the payload of the IPv6 message according to the IPv6 message header.

[0089] S208: Send the IPv6 message to the second network device, so that the second network device decapsulates the IPv6 message to obtain an Ethernet data frame, and sends the Ethernet data frame to a second host connected to the second network device.

[0090] In one embodiment, after the first network device encapsulates the Ethernet data frame through the IPv6 message header to obtain the IPv6 message, the first network device sends the IPv6 message to the IPv6 network, and then sends the IPv6 message to the second network device via the IPv6 network. For example, the second network device can be a destination node in a virtual Ethernet private network, for example, the second network device can be Figure 1 PE2 in.

[0091] In S208, the IPv6 packet is sent to the second network device according to the destination site mapping prefix in the destination address of the IPv6 packet header. For example, the destination address of the IPv6 packet header of the IPv6 packet includes the site mapping prefix of PE2.

[0092] Furthermore, after receiving the IPv6 message, the second network device checks the virtual Ethernet identifier and the destination site mapping prefix in the IPv6 message header, and determines the validity of the IPv6 message by comparing the extracted virtual Ethernet identifier, destination site mapping prefix and other information with the virtual Ethernet identifier, site mapping prefix and other information in the preset address mapping relationship.

[0093] When the destination address of the IPv6 message is determined to be a second host connected to the second network device, an Ethernet data frame is extracted from the IPv6 message, and the Ethernet data frame is sent to the second host according to the destination MAC address.

[0094] In the disclosed embodiment, an Ethernet data frame sent by a first host connected to a first network device is received, the Ethernet data frame including a source MAC address and a destination MAC address; a virtual Ethernet identifier and a destination site mapping prefix corresponding to the destination MAC address are determined according to a preset address mapping relationship, the address mapping relationship being used to characterize the correspondence between the MAC address and the site mapping prefix in the virtual Ethernet private network; an IPv6 message header is generated according to the virtual Ethernet identifier, the destination site mapping prefix and the destination MAC address, and an Ethernet data frame is encapsulated according to the IPv6 message header to obtain an IPv6 message; an IPv6 message is sent to a second network device, so that the second network device decapsulates the IPv6 message to obtain an Ethernet data frame, and the Ethernet data frame is sent to a second host connected to the second network device, thereby utilizing the ubiquitous coverage and huge address space of IPv6 to improve the efficiency of Ethernet data transmission and increase The security of the system is improved. On the one hand, the Ethernet data frame is directly encapsulated in the IPv6 data packet. Under the premise of ensuring the representation and routing capabilities, the multi-layer encapsulation of the VXLAN technology is cancelled, which significantly reduces the encapsulation overhead and the cost of multi-protocol layer data processing. On the other hand, the site IPv6 address mapping prefix and MAC address of the virtual Ethernet private network are encapsulated in the IPv6 message header. For the host communication between the two sites, the outer IPv6 address is dynamically generated according to the MAC address, avoiding the configuration of a static IP address specifically used as a tunnel endpoint for each site, reducing the risk of DDoS attacks caused by static addresses. Finally, the present invention can cross the IPv6 three-layer network to perform inter-site two-layer Ethernet communication only when the IPv6 path is reachable, overcomes the coverage of Ethernet service capabilities affected by insufficient MPLS deployment, and improves the application scope of virtual Ethernet private networks based on IPv6.

[0095] Figure 3 FIG. 2 is a flow chart of an Ethernet data frame encapsulation method according to an embodiment of the present disclosure. Figure 3 As shown, in one embodiment, the above S206 generates an IPv6 message header according to the virtual Ethernet identifier, the destination site mapping prefix and the destination MAC address, and encapsulates the Ethernet data frame according to the IPv6 message header to obtain an IPv6 message, including:

[0096] S302, mapping the destination site mapping prefix, the destination MAC address, and at least part of the virtual Ethernet identifier into the destination address of the IPv6 message header;

[0097] S304, configuring the Next header field value of the IPv6 message header to be a preset type identifier;

[0098] S306: Encapsulate the Ethernet data frame into the payload of the IPv6 message to obtain the IPv6 message.

[0099] In one embodiment, the length of the destination MAC address is generally 48 bits, the length of the virtual Ethernet identifier is 24 bits, and can also be expanded to 32 bits. The length of the destination site mapping prefix can be flexibly selected. For example, the length of the destination site mapping prefix can be configured to be 64 bits, or it can be determined according to actual conditions. This disclosure does not make specific limitations.

[0100] In the process of mapping the virtual Ethernet identifier to the destination address of the IPv6 message header, at least part of the virtual Ethernet identifier can be mapped to the destination address of the IPv6 message header, and the remaining part of the virtual Ethernet identifier can be mapped to the source address of the IPv6 message header, thereby improving the security of the virtual Ethernet identifier during data transmission.

[0101] Exemplarily, after the destination MAC address and the destination site mapping prefix are encapsulated into the destination address of the IPv6 message header, the length of the virtual Ethernet identifier encapsulated in the destination address is determined according to the remaining length of the destination address to ensure that there is no reserved field in the destination address. For example, if the destination MAC address is 48 bits long and the destination site mapping prefix is ​​64 bits long, and the remaining length of the destination field is 16 bits, the first 16 bits of the virtual Ethernet identifier are intercepted and encapsulated into the destination address, and the last 8 bits of the virtual Ethernet identifier are encapsulated into the source address of the IPv6 message header. It should be noted that at this time, there is a reserved field in the source address of the IPv6 message header.

[0102] Exemplarily, the virtual Ethernet identifier can also be intercepted and encapsulated in a way that there is no reserved field in the source address of the IPv6 message header, and the remaining characters of the virtual Ethernet identifier can be encapsulated in the destination address of the IPv6 message header. At this time, there is a reserved field in the destination address of the IPv6 message header.

[0103] Exemplarily, in one embodiment, the virtual Ethernet identifier includes first identification information and second identification information; the above method further includes: mapping the source site mapping prefix of the first network device, the first identification information and the source MAC address of the first host to the source address of the IPv6 message header; mapping the destination site mapping prefix, the second identification information and the destination MAC address to the destination address of the IPv6 message header. It should be noted that the lengths of the first identification information and the second identification information can be the same or different, and this disclosure does not make specific limitations.

[0104] By dividing the virtual Ethernet identifier into first identification information and second identification information, the first identification information and the second identification information are respectively encapsulated into the source address and destination address of the IPv6 message header. At this time, there are reserved fields in both the destination address and the source address of the IPv6 message header.

[0105] It should be noted that the length of the virtual Ethernet identifier may be stored in a preset address mapping relationship.

[0106] The above-mentioned preset type identifier is used to indicate that the data type of the payload part is an Ethernet data frame, and can be configured as numbers, letters, special symbols, etc. For example, the preset type identifier is configured as 143. During the decapsulation process of the second network device, if the next header field value obtained by decapsulation is 143, it indicates that the payload part is an Ethernet data frame; if the next header field value obtained by decapsulation is not 143, it indicates that the payload part is not an Ethernet data frame, and no processing is performed.

[0107] In the present invention, the destination site mapping prefix, the destination MAC address and at least part of the virtual Ethernet identifier are mapped to the destination address of the IPv6 message header, the Next header field value of the IPv6 message header is configured as a preset type identifier, and the Ethernet data frame is encapsulated in the payload of the IPv6 message to obtain the IPv6 message. The outer IPv6 address (including source and destination) is generated by mapping Pref6, the multi-site Ethernet identifier VEI, and the MAC address information to the IPv6 address. The IPv6 address generated by each MAC address is also different. Such an IPv6 address is dynamic, and there is no explicit static IPv6 address, which eliminates the risk of DDoS attacks caused by static IPv6 address settings. At the same time, the L2 Ethernet data frame is directly encapsulated into the IPv6 message and transmitted in the IPv6 network, thereby greatly reducing the transmission overhead.

[0108] Figure 4 A flowchart of an IPv6 message header encapsulation method in an embodiment of the present disclosure is shown. Figure 4 As shown, the source site mapping prefix and the destination site mapping prefix are 64 bits, the source site mapping prefix is ​​mapped to the first 64 bits of the source address of the IPv6 message header, and the destination site mapping prefix is ​​mapped to the first 64 bits of the destination address of the IPv6 message header;

[0109] The first identification information and the second identification information are 12 bits, the first identification information is mapped to the first 12 bits of the interface identifier IID of the source address of the IPv6 message header, and the second identification information is mapped to the first 12 bits of the IID of the destination address of the IPv6 message header;

[0110] The source MAC address and the destination MAC address are 48 bits. The source MAC address is mapped to the last 48 bits of the IID of the source address in the IPv6 message header, and the destination MAC address is mapped to the last 48 bits of the IID of the destination address in the IPv6 message header.

[0111] The IID of the source address and the IID of the destination address are also configured with a reserved field for configuring an extension bit of the virtual Ethernet identifier.

[0112] like Figure 4 As shown in FIG. 1 , an Ethernet data frame carries source MAC address and destination MAC address, type, payload data, Preamble, and FCS fields, among which the source MAC address is the MAC address of the source host, for example Figure 1 The MAC address of host 1 in the destination address is the MAC address of the destination host, for example Figure 1 The MAC address of host 2 is in the packet, and the payload data is the Ethernet data frame or Ethernet data frame sent by the source host.

[0113] The first network device searches the preset address mapping relationship according to the destination MAC address and can determine the virtual Ethernet identifier VEI and the destination site mapping prefix Pref6 corresponding to the destination MAC address. According to the length of the virtual Ethernet identifier in the preset address mapping relationship, for example Figure 4 The 24 bits in VEI are used to divide VEI into 12-bit first identification information VEI-s1 and 12-bit second identification information VEI-s2.

[0114] The first network device maps the source site mapping prefix Pref6 to the first 64 bits of the source address of the IPv6 message header, and maps the destination site mapping prefix Pref6 to the first 64 bits of the destination address of the IPv6 message header.

[0115] The last 64 bits of the source address of the IPv6 message header are the interface identifier (Interface ID, IID) of the source address, and the last 64 bits of the destination address of the IPv6 message header are the IID of the destination address. The first network device maps the source MAC address to the last 48 bits of the IID of the source address of the IPv6 message header, and maps the destination MAC address to the last 48 bits of the IID of the destination address of the IPv6 message header.

[0116] For the virtual Ethernet identifier, the first network device maps VEI-s1 to the first 12 bits of the IID of the source address of the IPv6 message header, and maps VEI-s2 to the first 12 bits of the IID of the destination address of the IPv6 message header. At this time, a 4-bit reserved field RSV is set between VEI-s1 and the source MAC address, and a 4-bit reserved field RSV is set between VEI-s2 and the destination MAC address. The RSV field can be encapsulated in binary "0000".

[0117] The first network device maps the Ethernet data frame to the payload portion of the Ethernet data frame, and obtains Figure 4 The IPv6 data packet in is the IPv6 message.

[0118] It should be noted that the reserved field RSV can be used to configure the extension bit of the virtual Ethernet identifier, and can also be used for other purposes, which is not specifically limited in the present disclosure.

[0119] In addition, the positions of the reserved fields RSV, MAC address and the first identification information or the second identification information in the IID or the order of the three can be determined according to actual conditions.

[0120] In the embodiment of the present disclosure, the first network device encapsulates the first identification information, the source site mapping prefix and the source MAC address in the source address of the IPv6 message header, and encapsulates the second identification information, the destination site mapping prefix and the destination MAC address in the destination address of the IPv6 message header. The outer IPv6 address (including the source and the destination) is generated by mapping Pref6, the multi-site Ethernet identifier VEI, and the MAC address information to the IPv6 address. The IPv6 address generated by each MAC address is also different. Such an IPv6 address is dynamic, and there is no explicit static IPv6 address, which eliminates the risk of DDoS attacks caused by static IPv6 address settings. At the same time, the L2 Ethernet data frame is directly encapsulated into the IPv6 message and transmitted in the IPv6 network, thereby greatly reducing the transmission overhead.

[0121] Figure 5 A flow chart of a method for generating a preset address mapping relationship in an embodiment of the present disclosure is shown. Figure 5 As shown, in one embodiment, before receiving the Ethernet data frame sent by the first host connected to the first network device in S202, the communication method provided by the embodiment of the present disclosure further includes:

[0122] S502, configuring the virtual Ethernet identifier and site mapping of each network device in the virtual Ethernet private network. Among them, one virtual Ethernet private network corresponds to one virtual Ethernet identifier, one virtual Ethernet identifier corresponds to multiple network devices, and one network device is connected to at least one host.

[0123] In one embodiment, after each network device starts the EVN6 function, the virtual Ethernet identifier and site mapping prefix of each network device are configured. The configuration process can be manually configured or automatically configured using a network management system, etc., which is not specifically limited in this disclosure.

[0124] Exemplarily, the same virtual network identifier is configured for each network device in the same virtual Ethernet private network. For example, the virtual Ethernet identifier of the network devices belonging to the same virtual Ethernet private network is configured as N1. When the network devices belong to different virtual Ethernet private networks, the virtual Ethernet identifier can be used to distinguish them.

[0125] During the configuration process, the site mapping prefix of the network device is configured. The site mapping prefix can include numbers, symbols, letters, text, etc., which are used to distinguish sites and URLs with different functions.

[0126] Continue to refer Figure 5 In one embodiment, the communication method provided by the embodiment of the present disclosure further includes:

[0127] S504, obtaining a virtual Ethernet identifier of each network device in the virtual Ethernet private network, a site mapping prefix, and a MAC address of a host connected to each network device, and obtaining an address mapping relationship of each host;

[0128] S506: Store the address mapping relationship of each host in the MAC-VRF of the network device.

[0129] In one embodiment, each network device receives the MAC address information of the host connected to the corresponding network device. In order to support the transmission of Layer 2 Ethernet data frames, the sites need to exchange the mapping relationship between their respective site mapping prefixes Pref6 and the MAC addresses of the downstream hosts (Pref6: Mac1, ...) through the network devices in advance.

[0130] The host's MAC address is used to distinguish different hosts. It is also called a LAN address, MAC address, Ethernet address or physical address. It is an address used to identify the location of a network device.

[0131] After receiving the host mapping relationship data sent by other network devices, PE stores it in the local MAC-VRF. The record format in MAC-VRF is shown in Table 1. Each record reflects the site mapping prefix Pref6 and virtual Ethernet identifier VEI corresponding to the host's MAC address. This exchange process can be implemented by extending the EVPN protocol.

[0132] Table 1 Address mapping relationship table

[0133]

[0134] As shown in Table 1, the host of MAC1 and the host of MAC2 belong to the N1 virtual Ethernet private network, and the host of MAC3 belongs to the N2 virtual Ethernet private network.

[0135] In the disclosed embodiment, the address mapping relationship between each network device and the host in the virtual Ethernet private network is constructed by configuring the site mapping prefix of each network device in the virtual Ethernet private network and the MAC address of each host. In other words, the address mapping relationship of each host is used as the above-mentioned preset address mapping relationship, and the above-mentioned address mapping relationship is stored in the MAC-VRF of the network device. After receiving the Ethernet data frame sent by the host, the network device uses the destination MAC address as an index to search the local MAC-VRF. If the corresponding entry is found, its site mapping prefix and virtual Ethernet identifier are extracted, and the Ethernet data frame is encapsulated in an IPv6 data packet, thereby avoiding the broadcast risk caused by querying the MAC address or site mapping prefix Pref6 in each site in the virtual Ethernet private network.

[0136] Figure 6 FIG. 2 shows another flow chart of a communication method in an embodiment of the present disclosure. Figure 6 As shown, the communication method provided in the embodiment of the present disclosure is applied to the second network device, and includes the following steps:

[0137] S602, receiving an IPv6 message sent by a first network device, wherein the IPv6 message is obtained by the first network device generating an IPv6 message header according to a virtual Ethernet identifier, a destination site mapping prefix, and a destination MAC address, and encapsulating an Ethernet data frame according to the IPv6 message header, the Ethernet data frame is sent to the first network device by a first host connected to the first network device, the Ethernet data frame includes a source MAC address and a destination MAC address, and according to a preset address mapping relationship, determining a virtual Ethernet identifier and a destination site mapping prefix corresponding to the destination MAC address, and the address mapping relationship is used to characterize a correspondence between a MAC address and a site mapping prefix in a virtual Ethernet private network;

[0138] S604, decapsulate the IPv6 message to obtain an Ethernet data frame;

[0139] S606: Send the Ethernet data frame to the second host connected to the second network device.

[0140] In the disclosed embodiment, the second network device receives the IPv6 message sent by the first network device, decapsulates the IPv6 message to obtain an Ethernet data frame, and sends the Ethernet data frame to a second host connected to the second network device. The second network device can determine the second network device and the second host to which the Ethernet data frame belongs based on the address information of the IPv6 message, thereby improving the efficiency of the second network device.

[0141] Figure 7 FIG. 2 shows another flow chart of a communication method in an embodiment of the present disclosure. Figure 7As shown, in one embodiment, the above S604 decapsulates the IPv6 message to obtain an Ethernet data frame, including:

[0142] S702, check the virtual Ethernet identifier, destination site mapping prefix, and next header field value in the IPv6 message header;

[0143] S704, when the destination site mapping prefix of the IPv6 message header matches the site mapping prefix of the second network device, the virtual Ethernet identifier of the IPv6 message header is consistent with the preset virtual Ethernet identifier, and the next header field value is the preset type identifier, extracting the Ethernet data frame from the payload of the IPv6 message;

[0144] The above-mentioned S606 sends the Ethernet data frame to the second host connected to the second network device, including:

[0145] S706: Send the Ethernet data frame to the second host according to the destination MAC address of the Ethernet data frame.

[0146] In one embodiment, the destination site mapping prefix is ​​extracted from the first 64 bits of the destination address of the IPv6 message header in the IPv6 message, the destination MAC address is extracted from the last 48 bits of the IID of the destination address, the second identification information is extracted from the first 12 bits of the IID of the destination address, and the first identification information is extracted from the first 12 bits of the IID of the source address, and the first identification information and the second identification information are spliced ​​to obtain a virtual Ethernet identification.

[0147] Extract the next header field value from the IPv6 header in the IPv6 packet.

[0148] The site mapping prefix and the preset virtual Ethernet identifier of the second network device can be obtained by the second network device searching MAC-VRN.

[0149] It should be noted that the IPv6 message header decapsulation process is the reverse process of the IPv6 message header encapsulation process. For other encapsulation methods, the values ​​of the corresponding fields can be extracted to obtain the destination site mapping prefix, virtual Ethernet identifier, destination MAC address and other information, which will not be repeated here.

[0150] When the destination site mapping prefix of the IPv6 message does not match the site mapping prefix of the second network device, the virtual Ethernet identifier of the IPv6 message header is inconsistent with the preset virtual Ethernet identifier, and the next header field value does not satisfy at least one of the preset type identifiers, the IPv6 message is not an Ethernet data frame.

[0151] In one embodiment, the method further includes: if the site mapping prefix of the destination address of the IPv6 message header does not match the site mapping prefix of the second network device, then the IPv6 message continues to be forwarded, thereby avoiding misreceiving or missending of the message.

[0152] In one embodiment, the method further includes discarding the IPv6 packet if the destination site mapping prefix matches the site mapping prefix of the second network device, the virtual Ethernet identifier is inconsistent with the preset virtual Ethernet identifier, and / or the next header field value is not a preset type identifier.

[0153] In order to deepen the understanding of the communication method provided by the embodiment of the present disclosure, Figure 8 Provide explanation.

[0154] like Figure 8 As shown in the figure, a virtual Ethernet private network instance is created on the IPv6 network: the VEI value is N1. The virtual Ethernet private network instance N1 has three branch sites connected to PE1, PE2 and PE3 respectively, and the site mapping prefixes are Pref6-1, Pref6-2 and Pref6-3 respectively. Hosts H1, H2, H3 and H4 are located in sites 1, 2 and 3 respectively.

[0155] The operation process is divided into five steps, among which steps 1 and 2 are used to create EVN6, and steps 3 to 5 are used to send data. The specific steps are as follows:

[0156] Step 1: Create an EVN6 instance on each PE device

[0157] Enable the EVN6 function on PE1, PE2, and PE3, configure the relevant information of the virtual Ethernet private network on this site, configure the virtual network identifier VEI to N1, and set the site mapping prefix Pref6 on the interface of each PE accessing the site, indicating that the VEI of the virtual network to which the site belongs is N1, and its site mapping prefix on the PE is Pref6. This process can be configured manually or by using a dedicated system, such as a network management system.

[0158] Step 2: The correspondence between the PE switching site Pref6 and the host MAC address within it

[0159] Each PE will receive the MAC address information of the host in the site. In order to support the transmission of Layer 2 Ethernet data frames, the sites need to exchange their respective Pref6 and MAC address mapping relationships (Pref6: Mac1, ...) through PE in advance. After receiving the host mapping relationship data sent by other PEs, PE stores it in the local MAC-VRF. Each record in MAC-VRF reflects the site mapping prefix Pref6 and its VEI corresponding to the host MAC address, as shown in Table 1. This exchange process can be achieved by extending the EVPN protocol.

[0160] Step 3: Data sending process

[0161] Host H2 in site 2 sends an Ethernet data frame destined for host H1. After PE2 receives the Ethernet data frame in site 2, it uses the destination MAC address as an index to search the local MAC-VRF. If the corresponding entry is found, the destination site mapping prefix Pref6 (i.e. Pref6-1) and VEI information are extracted, and then the Ethernet data frame is encapsulated in an IPv6 data packet (or IPv6 message) using the following process; if not found, it is not encapsulated and forwarded.

[0162] The process of PE2 encapsulating Ethernet data frames in IPv6 data packets is as follows: Figure 4 As shown in the figure, it maps Pref6, the source (and destination) MAC address of the Ethernet data frame, and the Ethernet virtual private network identifier VEI information to the last 48 bits of the interface identifier IID of the IPv6 source (and destination) address, and sets the value of the "Next header" field of the message header to 143, indicating that the payload of the IPv6 data packet is an Ethernet data frame. Among them, the source Pref6 is the IPv6 mapping prefix configured for this site in the PE, and the destination Pref6 is obtained by querying the MAC-VRF using the destination MAC address. In addition, the VEI will be divided into two 12-bit segments: VEI-s1 and VEI-s2, which are placed in the first 12 bits of the interface identifier IID of the IPv6 source and destination addresses respectively. The 48-bit MAC address and the 12-bit half VEI occupy a total of 60 bits of the IID. The remaining 4 bits are the reserved field RSV, which can be set to binary "0000" and reserved for other future uses (such as when the VEI is extended to 32 bits, it can continue to be used to store the VEI). In the generated IPv6 data packet, the prefix Pref6 of the destination IPv6 address identifies the egress PE of the data packet, so the IPv6 data packet can eventually be forwarded to the destination site, and the Ethernet data frame is restored and then sent to the destination host (H1).

[0163] Step 4: The IPv6 network forwards the IPv6 packet carrying the Ethernet frame

[0164] After receiving the IPv6 data packet, the router in the IPv6 network uses the destination address in the data packet to look up the routing table and forward it. Since the IPv6 destination address contains the prefix Pref6 of the destination site, which gives the egress PE of the data packet, the router can forward the IPv6 data packet to PE1 based on this information. It should be noted that this process has no additional functional requirements for non-PE routers in the network, and does not require additional IPv6 routing information to be added in the IPv6 network.

[0165] Step 5: PE1 at the receiving end decapsulates the IPv6 packet and restores the Ethernet data frame

[0166] When receiving an IPv6 data packet, the receiving end PE1 checks whether its destination address prefix matches the site mapping prefix Pref6-1 on PE1. If it matches, VEI-s1 and VEI-s2 are extracted from the IIDs of the source and destination IPv6 addresses, and spliced ​​into a VEI value. Is the VEI value equal to N1? If so, check whether the value of "Next header" in the IPv6 header is 143? If so, it means that the payload is an Ethernet data frame, so the IPv6 header is discarded, the Ethernet data frame is taken out, and then the Ethernet data frame is sent to H1 in site 1 according to its destination MAC address. Otherwise, no processing is performed.

[0167] Compared with the traditional VXLAN technology, the implementation of the disclosed technical solution directly encapsulates the L2 Ethernet frame into the IPv6 message (i.e. L2 over IPv6) when carrying the Ethernet virtual private network, and transmits it in the IPv6 network. Since the header encapsulation of VXLAN and UDP is removed, the transmission overhead is reduced by 16 / 56=28.5% in the IPv6 network environment.

[0168] In the traditional VXLAN solution, the outer IPv6 address (including source and destination) is the VTEP address pre-configured on the PE, where the destination VTEP address is the transmission exit of the encapsulated IPv6 data packet in the IPv6 network, but the VTEP is a statically configured explicit address, which is easy to become the target of DDoS attacks, bringing security risks. The technical solution disclosed in the present invention improves the security of the network. The outer IPv6 address (including source and destination) is generated by mapping Pref6, multi-site Ethernet identifier VEI, and MAC address information to the IPv6 address. The IPv6 address generated by each MAC address is also different. Such an IPv6 address is dynamic, and there is no explicit static IPv6 address, eliminating the risk of DDoS attacks caused by static IPv6 address settings.

[0169] The present disclosure introduces site identification prefix Pref6 information into the address, which represents the location of each website of the customer's virtual Ethernet private network in the IPv6 network. The address is part of the existing address space, so the addition of each site prefix Pref6 will not bring about an increase in IPv6 network routing entries, and the network can transmit Ethernet data frames to the correct egress PE based on the existing IPv6 routing table.

[0170] Based on the same inventive concept, the present disclosure also provides a communication device in the following embodiments. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0171] Fig. 9 A schematic diagram of a communication device in an embodiment of the present disclosure is shown. Fig. 9 As shown, the device is applied to a first network device, comprising:

[0172] The Ethernet data frame receiving module 901 is used to receive an Ethernet data frame sent by a first host connected to the first network device, wherein the Ethernet data frame includes a source MAC address and a destination MAC address; the address determination module 902 is used to determine a virtual Ethernet identifier and a destination site mapping prefix corresponding to the destination MAC address according to a preset address mapping relationship, wherein the address mapping relationship is used to characterize the correspondence between a MAC address and a site mapping prefix in a virtual Ethernet private network; the message encapsulation module 903 is used to generate an IPv6 message header according to the virtual Ethernet identifier, the destination site mapping prefix and the destination MAC address, and encapsulate the Ethernet data frame according to the IPv6 message header to obtain an IPv6 message; the message sending module 904 is used to send the IPv6 message to a second network device, so that the second network device decapsulates the IPv6 message to obtain the Ethernet data frame, and sends the Ethernet data frame to a second host connected to the second network device.

[0173] It should be noted that the Ethernet data frame receiving module 901, the address determination module 902, the message encapsulation module 903 and the message sending module 904 correspond to S202 to S208 in the method embodiment, and the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above method embodiment. It should be noted that the above modules as part of the device can be executed in a computer system such as a set of computer executable instructions.

[0174] In one embodiment, the message encapsulation module 903 is used to map the destination site mapping prefix, the destination MAC address and at least part of the virtual Ethernet identifier into the destination address of the IPv6 message header; configure the next header Nextheader field value of the IPv6 message header to a preset type identifier; and encapsulate the Ethernet data frame into the payload of the IPv6 message to obtain an IPv6 message.

[0175] It should be noted that the virtual Ethernet identifier includes first identification information and second identification information; wherein, the message encapsulation module 903 is also used to map the source site mapping prefix of the first network device, the first identification information and the source MAC address of the first host into the source address of the IPv6 message header; and to map the destination site mapping prefix, the second identification information and the destination MAC address into the destination address of the IPv6 message header.

[0176] It should be noted that the source site mapping prefix and the destination site mapping prefix are 64 bits, the source site mapping prefix is ​​mapped to the first 64 bits of the source address of the IPv6 message header, and the destination site mapping prefix is ​​mapped to the first 64 bits of the destination address of the IPv6 message header; the first identification information and the second identification information are 12 bits, the first identification information is mapped to the first 12 bits of the interface identifier IID of the source address of the IPv6 message header, and the second identification information is mapped to the first 12 bits of the IID of the destination address of the IPv6 message header; the source MAC address and the destination MAC address are 48 bits, the source MAC address is mapped to the last 48 bits of the IID of the source address of the IPv6 message header, and the destination MAC address is mapped to the last 48 bits of the IID of the destination address of the IPv6 message header; the IID of the source address and the IID of the destination address are also configured with a reserved field for configuring the extension bit of the virtual Ethernet identifier.

[0177] In one embodiment, the message sending module 904 is used to send the IPv6 message to the second network device according to the destination site mapping prefix in the destination address of the IPv6 message header.

[0178] In one embodiment, the device also includes a configuration module not shown in the accompanying drawings, which is used to configure the virtual Ethernet identifier and site mapping prefix of each network device in the virtual Ethernet private network before receiving the Ethernet data frame sent by the first host connected to the first network device.

[0179] In one embodiment, the address mapping relationship of each host is stored in a MAC virtual routing forwarding table MAC-VRF of the network device.

[0180] In one embodiment, the device also includes a storage module not shown in the accompanying drawings, which is used to obtain the virtual Ethernet identifier, site mapping prefix, and MAC address of the host connected to each network device in the virtual Ethernet private network to obtain the address mapping relationship of each host.

[0181] In one embodiment, the message sending module 904 is further configured not to encapsulate and forward the Ethernet data frame if the virtual Ethernet identifier and / or the destination site mapping prefix corresponding to the destination MAC address is not found.

[0182] Fig.10 A schematic diagram of another communication device in an embodiment of the present disclosure is shown. Fig.10 As shown, the device is applied to a second network device, comprising:

[0183] The IPv6 message receiving module 1001 is used to receive an IPv6 message sent by a first network device, wherein the IPv6 message is obtained by encapsulating an Ethernet data frame according to the IPv6 message header, generating an IPv6 message header by the first network device according to a virtual Ethernet identifier, a destination site mapping prefix and a destination MAC address, and the Ethernet data frame is sent from a first host connected to the first network device to the first network device, the Ethernet data frame includes a source MAC address and a destination MAC address, and the virtual Ethernet identifier and the destination site mapping prefix corresponding to the destination MAC address are determined according to a preset address mapping relationship, and the address mapping relationship is used to characterize the correspondence between the MAC address and the site mapping prefix in the virtual Ethernet private network; the message decapsulation module 1002 is used to decapsulate the IPv6 message to obtain an Ethernet data frame; the data sending module 1003 is used to send the Ethernet data frame to a second host connected to the second network device.

[0184] It should be noted that the above IPv6 message receiving module 1001, message decapsulation module 1002 and data sending module 1003 correspond to S602 to S606 in the method embodiment, and the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above method embodiment. It should be noted that the above modules as part of the device can be executed in a computer system such as a set of computer executable instructions.

[0185] In one embodiment, the message decapsulation module 1002 is used to check the virtual Ethernet identifier, the destination site mapping prefix, the preset type identifier and the destination MAC address in the IPv6 message header; when the destination site mapping prefix of the IPv6 message header matches the site mapping prefix of the second network device, the virtual Ethernet identifier of the IPv6 message header is consistent with the preset virtual Ethernet identifier, and the next header field value is the preset type identifier, the Ethernet data frame is extracted from the payload of the IPv6 message; the data sending module 1003 is used to send the Ethernet data frame to the second host according to the destination MAC address.

[0186] In one embodiment, the data sending module 1003 is further configured to continue forwarding the IPv6 message if the site mapping prefix of the destination address in the IPv6 message header does not match the site mapping prefix of the second network device.

[0187] In one embodiment, the data sending module 1003 is also used to discard the IPv6 message if the destination site mapping prefix matches the site mapping prefix of the second network device, the virtual Ethernet identifier is inconsistent with the preset virtual Ethernet identifier, and / or the next header field value is not the preset type identifier.

[0188] Fig.11 A schematic diagram of a communication system in an embodiment of the present disclosure is shown. Fig.11 As shown, the present disclosure also provides a communication system, including a first network device 101 and a second network device 102, the first network device, used to receive an Ethernet data frame sent by a first host connected to the first network device, the Ethernet data frame including a source MAC address and a destination media access control MAC address; according to a preset address mapping relationship, a virtual Ethernet identifier and a destination site mapping prefix corresponding to the destination MAC address are determined, the address mapping relationship is used to characterize the correspondence between the MAC address and the site mapping prefix in the virtual Ethernet private network; according to the virtual Ethernet identifier, the destination site mapping prefix and the destination MAC address, an IPv6 message header is generated, and the Ethernet data frame is encapsulated according to the IPv6 message header to obtain an IPv6 message; the IPv6 message is sent to the second network device; the second network device is used to receive the IPv6 message sent by the first network device; the IPv6 message is decapsulated to obtain an Ethernet data frame; and the Ethernet data frame is sent to the second host connected to the second network device.

[0189] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0190] Refer to the following Fig.12 1200 according to this embodiment of the present disclosure is described. Fig.12 The electronic device 1200 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0191] like Fig.12 As shown, the electronic device 1200 is in the form of a general computing device. The components of the electronic device 1200 may include but are not limited to: at least one processing unit 1210, at least one storage unit 1220, and a bus 1230 connecting different system components (including the storage unit 1220 and the processing unit 1210).

[0192] The storage unit stores a program code, and the program code can be executed by the processing unit 1210, so that the processing unit 1210 executes the steps described in the above "Exemplary Method" section of this specification according to various exemplary embodiments of the present disclosure. For example, the processing unit 1210 can execute the following steps of the above method embodiment: receiving an Ethernet data frame sent by a first host connected to a first network device, the Ethernet data frame including a source media access control MAC address and a destination MAC address; determining a virtual Ethernet identifier and a destination site mapping prefix corresponding to the destination MAC address according to a preset address mapping relationship, the address mapping relationship being used to characterize the correspondence between the MAC address and the site mapping prefix in a virtual Ethernet private network; generating a sixth version of the Internet Protocol IPv6 message header according to the virtual Ethernet identifier, the destination site mapping prefix and the destination MAC address, encapsulating the Ethernet data frame according to the IPv6 message header to obtain an IPv6 message; sending an IPv6 message to a second network device so that the second network device decapsulates the IPv6 message to obtain an Ethernet data frame, and sending the Ethernet data frame to a second host connected to the second network device.

[0193] For example, the processing unit 1210 can execute the following steps of the above-mentioned method embodiment: receiving an IPv6 message sent by the first network device, wherein the IPv6 message is obtained by generating a sixth version of the Internet Protocol IPv6 message header according to the virtual Ethernet identifier, the destination site mapping prefix and the destination MAC address by the first network device, and encapsulating an Ethernet data frame according to the IPv6 message header, the Ethernet data frame is sent by the first host connected to the first network device to the first network device, the Ethernet data frame includes a source MAC address and a destination MAC address, and according to a preset address mapping relationship, determining the virtual Ethernet identifier and the destination site mapping prefix corresponding to the destination MAC address, the address mapping relationship is used to characterize the correspondence between the MAC address and the site mapping prefix in the virtual Ethernet private network; decapsulating the IPv6 message to obtain an Ethernet data frame; and sending the Ethernet data frame to the second host connected to the second network device.

[0194] The storage unit 1220 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 12201 and / or a cache storage unit 12202 , and may further include a read-only storage unit (ROM) 12203 .

[0195] The storage unit 1220 may also include a program / utility 12204 having a set (at least one) of program modules 12205, such program modules 12205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0196] Bus 1230 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0197] The electronic device 1200 may also communicate with one or more external devices 1240 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1200, and / or communicate with any device that enables the electronic device 1200 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1250. Furthermore, the electronic device 1200 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1260. As shown, the network adapter 1260 communicates with other modules of the electronic device 1200 via a bus 1230. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0198] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0199] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer program product, which includes: a computer program, which implements the above communication method when executed by a processor.

[0200] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above “Exemplary Method” section of this specification.

[0201] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0202] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0203] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0204] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0205] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0206] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0207] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0208] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

Claims

1. A communication method, applied to a first network device, characterized in that: include: Receiving an Ethernet data frame sent by a first host connected to the first network device, wherein the Ethernet data frame includes a source media access control MAC address and a destination MAC address; Determine a virtual Ethernet identifier and a destination site mapping prefix corresponding to the destination MAC address according to a preset address mapping relationship, wherein the address mapping relationship is used to characterize a correspondence between a MAC address and a site mapping prefix in a virtual Ethernet private network; Generate an Internet Protocol version 6 (IPv6) message header according to the virtual Ethernet identifier, the destination site mapping prefix and the destination MAC address, and encapsulate the Ethernet data frame according to the IPv6 message header to obtain an IPv6 message; The IPv6 message is sent to the second network device so that the second network device decapsulates the IPv6 message to obtain the Ethernet data frame, and the Ethernet data frame is sent to a second host connected to the second network device.

2. The communication method according to claim 1, characterized in that: The step of generating a sixth version of the Internet Protocol IPv6 message header according to the virtual Ethernet identifier, the destination site mapping prefix and the destination MAC address, and encapsulating the Ethernet data frame according to the IPv6 message header to obtain an IPv6 message includes: Mapping the destination site mapping prefix, the destination MAC address, and at least part of the virtual Ethernet identifier into the IPv6 message header destination address; Configuring the Next Header field value of the IPv6 packet header to be a preset type identifier; The Ethernet data frame is encapsulated in the payload of the IPv6 message to obtain the IPv6 message.

3. The communication method according to claim 1 or 2, characterized in that: The virtual Ethernet identifier includes first identification information and second identification information; Wherein, the method further comprises: Mapping the source site mapping prefix of the first network device, the first identification information, and the source MAC address of the first host into the IPv6 message header source address; The destination site mapping prefix, the second identification information and the destination MAC address are mapped into the destination address of the IPv6 message header.

4. The communication method according to claim 3, characterized in that: The source site mapping prefix and the destination site mapping prefix are 64 bits, the source site mapping prefix is ​​mapped to the first 64 bits of the source address of the IPv6 message header, and the destination site mapping prefix is ​​mapped to the first 64 bits of the destination address of the IPv6 message header; The first identification information and the second identification information are 12 bits, the first identification information is mapped to the first 12 bits of the interface identifier IID of the source address of the IPv6 message header, and the second identification information is mapped to the first 12 bits of the IID of the destination address of the IPv6 message header; The source MAC address and the destination MAC address are 48 bits, the source MAC address is mapped to the last 48 bits of the IID of the source address of the IPv6 message header, and the destination MAC address is mapped to the last 48 bits of the IID of the destination address of the IPv6 message header; The IID of the source address and the IID of the destination address are also configured with a reserved field for configuring an extension bit of a virtual Ethernet identifier.

5. The communication method according to claim 2, characterized in that: The sending the IPv6 message to the second network device includes: The IPv6 message is sent to the second network device according to the destination site mapping prefix in the destination address of the IPv6 message header.

6. The communication method according to claim 1, characterized in that: Before receiving the Ethernet data frame sent by the first host connected to the first network device, the method further includes: Configure the virtual Ethernet identifier and site mapping prefix of each network device in the virtual Ethernet private network.

7. The communication method according to claim 1, characterized in that: The method further comprises: The address mapping relationship of each host is stored in the MAC virtual routing forwarding table MACVRF of the corresponding network device.

8. The communication method according to claim 6, characterized in that: The method further comprises: The virtual Ethernet identifier of each network device in the virtual Ethernet private network, the site mapping prefix, and the MAC address of the host connected to each network device are obtained to obtain the address mapping relationship of each host.

9. The communication method according to any one of claims 1 to 8, characterized in that: The method further comprises: If the virtual Ethernet identifier and / or the destination site mapping prefix corresponding to the destination MAC address is not found, the Ethernet data frame is not encapsulated and forwarded.

10. A communication method, applied to a second network device, characterized in that: include: Receive an IPv6 message sent by a first network device, wherein the IPv6 message is obtained by the first network device generating an IPv6 message header according to a virtual Ethernet identifier, a destination site mapping prefix, and a destination MAC address, and encapsulating an Ethernet data frame according to the IPv6 message header, the Ethernet data frame is sent to the first network device by a first host connected to the first network device, the Ethernet data frame includes a source MAC address and a destination MAC address, and according to a preset address mapping relationship, determining a virtual Ethernet identifier and a destination site mapping prefix corresponding to the destination MAC address, wherein the address mapping relationship is used to characterize a correspondence between a MAC address and a site mapping prefix in a virtual Ethernet private network; Decapsulating the IPv6 message to obtain an Ethernet data frame; The Ethernet data frame is sent to a second host connected to the second network device.

11. The communication method according to claim 10, characterized in that: Decapsulating the IPv6 message to obtain an Ethernet data frame includes: Check the virtual Ethernet identifier, the destination site mapping prefix, and the next header field value in the IPv6 message header; When the destination site mapping prefix of the IPv6 message header matches the site mapping prefix of the second network device, the virtual Ethernet identifier of the IPv6 message header is consistent with the preset virtual Ethernet identifier, and the next header field value is a preset type identifier, extracting the Ethernet data frame from the payload of the IPv6 message; The step of sending the Ethernet data frame to a second host connected to the second network device includes: The Ethernet data frame is sent to the second host according to the destination MAC address of the Ethernet data frame.

12. The communication method according to claim 11, characterized in that: The method further comprises: If the site mapping prefix of the destination address in the IPv6 message header does not match the site mapping prefix of the second network device, the IPv6 message continues to be forwarded.

13. The communication method according to claim 11, characterized in that: The method further comprises: If the destination site mapping prefix matches the site mapping prefix of the second network device, the virtual Ethernet identifier is inconsistent with the preset virtual Ethernet identifier, and / or the next header field value is not the preset type identifier, the IPv6 message is discarded.

14. A communication device, characterized in that: Applied to a first network device, comprising: An Ethernet data frame receiving module, used to receive an Ethernet data frame sent by a first host connected to the first network device, wherein the Ethernet data frame includes a source MAC address and a destination MAC address; An address determination module, used to determine a virtual Ethernet identifier and a destination site mapping prefix corresponding to the destination MAC address according to a preset address mapping relationship, wherein the address mapping relationship is used to characterize a correspondence between a MAC address and a site mapping prefix in a virtual Ethernet private network; A message encapsulation module, used to generate an IPv6 message header according to the virtual Ethernet identifier, the destination site mapping prefix and the destination MAC address, and encapsulate the Ethernet data frame according to the IPv6 message header to obtain an IPv6 message; The message sending module is used to send the IPv6 message to the second network device, so that the second network device decapsulates the IPv6 message to obtain the Ethernet data frame, and sends the Ethernet data frame to the second host connected to the second network device.

15. A communication device, applied to a second network device, characterized in that: include: An IPv6 message receiving module is used to receive an IPv6 message sent by a first network device, wherein the IPv6 message is obtained by the first network device generating an IPv6 message header according to a virtual Ethernet identifier, a destination site mapping prefix and a destination MAC address, and encapsulating an Ethernet data frame according to the IPv6 message header, the Ethernet data frame is sent to the first network device by a first host connected to the first network device, the Ethernet data frame includes a source MAC address and a destination MAC address, and according to a preset address mapping relationship, a virtual Ethernet identifier and a destination site mapping prefix corresponding to the destination MAC address are determined, and the address mapping relationship is used to characterize the correspondence between the MAC address and the site mapping prefix in the virtual Ethernet private network; A message decapsulation module, used for decapsulating the IPv6 message to obtain an Ethernet data frame; A data sending module is used to send the Ethernet data frame to a second host connected to the second network device.

16. A communication system, comprising a first network device and a second network device, characterized in that: The first network device is used to receive an Ethernet data frame sent by a first host connected to the first network device, wherein the Ethernet data frame includes a source media access control MAC address and a destination MAC address; determine a virtual Ethernet identifier and a destination site mapping prefix corresponding to the destination MAC address according to a preset address mapping relationship, wherein the address mapping relationship is used to characterize the correspondence between a MAC address and a site mapping prefix in a virtual Ethernet private network; generate a sixth edition Internet Protocol IPv6 message header according to the virtual Ethernet identifier, the destination site mapping prefix and the destination MAC address, and encapsulate the Ethernet data frame according to the IPv6 message header to obtain an IPv6 message; send the IPv6 message to a second network device, so that the second network device decapsulates the IPv6 message to obtain the Ethernet data frame, and sends the Ethernet data frame to a second host connected to the second network device; The second network device is used to receive the IPv6 message sent by the first network device; decapsulate the IPv6 message to obtain an Ethernet data frame; and send the Ethernet data frame to a second host connected to the second network device.

17. An electronic device, characterized in that: include: processor; and a memory for storing executable instructions for the processor; The processor is configured to execute the communication method described in any one of claims 1 to 9, or execute the communication method described in any one of claims 10 to 13 by executing the executable instructions.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the communication method described in any one of claims 1 to 9, or implements the communication method described in any one of claims 10 to 13.

Citation Information

Patent Citations

  • Ethernet virtual private network, operator equipment and user side equipment

    CN112866076A

  • Data transmission method and device, network equipment, system and storage medium

    CN116389340A

  • Communication processing system, communication processing method, communication terminal device, and program

    US20020126642A1

Cited By

  • Industrial message sending method and receiving method of C2F application transmission system and related equipment

    CN120075311A

  • C2F application transmission system industrial message sending method, receiving method and related equipment

    CN120075311B

  • Communication method, device and system, computer equipment and readable storage medium

    CN120582929A

  • Data transmission method and device, computer equipment and storage medium

    CN121239756A