CN111314200B - Message forwarding method and device - Google Patents

Message forwarding method and device Download PDF

Info

Publication number
CN111314200B
CN111314200B CN202010131815.9A CN202010131815A CN111314200B CN 111314200 B CN111314200 B CN 111314200B CN 202010131815 A CN202010131815 A CN 202010131815A CN 111314200 B CN111314200 B CN 111314200B
Authority
CN
China
Prior art keywords
message
vxlan
header
vcpe
protocol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010131815.9A
Other languages
Chinese (zh)
Other versions
CN111314200A (en
Inventor
雷昭燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN202010131815.9A priority Critical patent/CN111314200B/en
Publication of CN111314200A publication Critical patent/CN111314200A/en
Application granted granted Critical
Publication of CN111314200B publication Critical patent/CN111314200B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/82Miscellaneous aspects
    • H04L47/825Involving tunnels, e.g. MPLS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Landscapes

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

Abstract

The application provides a message forwarding method and a device, the method is applied to a virtual switch in a VCPE in an NFV network, the VCPE also comprises a plurality of VMs, each VM and the virtual switch share an IP address and an MAC address, VXLAN to which different VMs belong is different, UDP port numbers corresponding to different VMs are different, each VM establishes a VXLAN tunnel with at least one VM in a CPE (customer premise equipment) or VCPE of an opposite terminal in the NFV network, the method comprises: receiving a message; when the destination MAC address of the message is the MAC address of the message, determining whether the message is a VXLAN message according to a protocol field in an IP header of the message; if yes, the message is forwarded to a destination device corresponding to the destination UDP port number in the UDP header of the message for processing. The application can save a great deal of address resources.

Description

Message forwarding method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for forwarding a message.
Background
In a network function virtualization (Network Function Virtualization, NFV) network, as shown in fig. 1, a virtualized client device (Virtual Customer Premise Equipment, VCPE) includes a plurality of Virtual Machines (VMs) and a Virtual Switch (vSwitch), such as VM1 to VMn, and a controller assigns different IP addresses and MAC addresses to VM1 to VMn and vSwitch, respectively, and VXLANs to which each VM belongs are different.
The VCPE and the customer premise equipment (Customer Premise Equipment, CPE) act as VXLAN tunnel endpoints (VXLAN Tunnel End Point, VTEP) in the networking, and each VM needs to establish an extensible virtual local area network (Virtual eXtensible LAN, VXLAN) tunnel with the CPE separately to achieve tenant isolation. When the vSwitch receives the message, the message may be sent to the CPE by the VM in the VCPE, or may be sent to the VM in the VCPE by the CPE, and the message is directly forwarded to the destination device corresponding to the destination MAC address for processing according to the destination MAC address of the message.
However, in practical applications, there may be several tens to several hundreds of VMs on a VCPE, and each VM needs to establish a VXLAN tunnel, so that the controller needs to allocate many IP addresses and MAC addresses, which consumes a lot of address resources.
Disclosure of Invention
The application provides a message forwarding method and a message forwarding device, which can save a large amount of address resources.
The technical scheme provided by the application is as follows:
the application provides a message forwarding method, which is applied to a virtual switch in a VCPE in an NFV network, wherein the VCPE also comprises a plurality of VMs, each VM shares an IP address and an MAC address with the virtual switch, VXLAN to which different VMs belong is different, UDP port numbers corresponding to different VMs are different, and each VM establishes a VXLAN tunnel with at least one VM in a CPE or VCPE at the opposite end in the NFV network, and the method comprises the following steps:
receiving a message;
when the destination MAC address of the message is the MAC address of the message, determining whether the message is a VXLAN message according to a protocol field in an IP header of the message;
if yes, the message is forwarded to a destination device corresponding to a destination UDP port number in a UDP header of the message for processing.
The application also provides a message forwarding device, the device is applied to a virtual switch in a VCPE in an NFV network, the VCPE also comprises a plurality of VMs, each VM shares an IP address and an MAC address with the virtual switch, VXLAN to which different VMs belong is different, UDP port numbers corresponding to different VMs are different, and each VM establishes a VXLAN tunnel with at least one VM in an opposite-end CPE or an opposite-end VCPE in the NFV network, the device comprises:
the receiving module is used for receiving the message;
the determining module is used for determining whether the message is a VXLAN message according to a protocol field in an IP header of the message when the destination MAC address of the message is the MAC address of the message;
and the forwarding module is used for forwarding the message to target equipment corresponding to a target UDP port number in the UDP header of the message for processing when the judging result is yes.
According to the technical scheme, in the application, the VCPE in the NFV network has the globally unique IP address and the MAC address, the virtual switch in the VCPE and a plurality of VMs share the addresses, so that a large amount of address resources are saved, the virtual switch in the subsequent VCPE distinguishes the VXLAN message through identifying the protocol field, and normal forwarding of the VXLAN message is realized according to different UDP port numbers corresponding to different VMs.
Drawings
FIG. 1 is a networking schematic diagram of a conventional NFV network;
fig. 2 is a networking schematic diagram of an NFV network according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a message forwarding method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a message forwarding device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In order to save address resources, in the embodiment of the present application, a controller in an NFV network allocates the same IP address and MAC address to a vSwitch in a VCPE and a plurality of VMs in the NFV network, that is, shares one IP address and MAC address; the controller allocates different UDP port numbers for the VM in the VCPE and issues the UDP port numbers to opposite terminal equipment of the VCPE, wherein the opposite terminal equipment can be CPE or VCPE; each VM may establish a VXLAN tunnel with at least one VM in the opposite CPE or the opposite VCPE, unlike the VXLAN to which a different VM in the VCPE belongs.
For example, as shown in FIG. 2, VM1-1 through VM1-n and vSwtch 1 in VCPE1 share IP1 and MAC1, and VM2-1 through VM2-n and vSwtch 2 in VCPE2 share IP2 and MAC2; the UDP port numbers of the VMs in VCPE1 and VCPE2 are different. For any VM in each VCPE, a VXLAN tunnel can be established with the VM in the opposite-end VCPE according to the configuration of networking requirements, and one or a plurality of VCPE can be established. Assuming that VM1-1 and VM2-1 establish a VXLAN tunnel, the MAC addresses learned from each other can be considered to be the MAC addresses of vSwitch 1.
Under the networking architecture of the NFV network, an embodiment of the present application provides a method for forwarding a message, where the method is applied to vSwitch in VCPE, as shown in fig. 3, and may include the following steps:
s31: and receiving the message.
S32: when the destination MAC address of the message is the MAC address of the message, determining whether the message is a VXLAN message according to a protocol field in an IP header of the message; when the judgment result is yes, executing a step S13; if the determination result is negative, step S14 is performed.
S33: and forwarding the message to target equipment corresponding to the target UDP port number in the UDP header of the message for processing.
S34: and processing the message according to the message type represented by the IP protocol number in the protocol field in the IP header of the message.
Preferably, in the above step S32, it may be specifically determined whether the message is a VXLAN message by:
judging whether the IP protocol number in the protocol field in the IP header of the message is an IP protocol number used for representing that the message type is a VXLAN message; for example, IP protocol number 150;
if yes, determining the message as the VXLAN message.
It should be noted that, in the above step S34, the message type may also be an internet control message protocol (Internet Control Message Protocol, ICMP) message, and the specific processing procedure is the prior art, which is not described in detail herein.
The following describes the message forwarding method in detail, taking the example that the VM1-1 and the VM2-1 shown in fig. 2 have established the VXLAN tunnel.
Case one: vSwtch 1 receives the message sent by VM1-1
When the VM1-1 needs to send the data message to the VM2-1, the VM1-1 performs VXLAN tunnel encapsulation on the data message to obtain the VXLAN message.
Namely, VM1-1 adds an outer MAC header, an outer IP header, an outer UDP header and a VXLAN header to the data message, wherein the source MAC address in the outer MAC address header is MAC1, and the destination MAC address is MAC2; the IP protocol number in the protocol field in the header of the outer layer IP header is 150, the source IP address in the outer layer IP header is IP1, and the destination IP address is IP2; the source UDP port number in the outer layer UDP header is UDP1-1, and the destination UDP port number is UDP2-1; the VXLAN ID corresponding to VM1-1 is added to the VXLAN header.
VM1-1 sends a VXLAN message to vSwtch 1, which vSwtch 1 finds that the destination MAC address (i.e., MAC 2) of the message is not itself, and sends the message directly to vSwtch 2.
After the subsequent vSwitch2 receives the message, it finds that the destination MAC address of the message is itself, and further determines whether the IP protocol number in the protocol field in the IP header of the message is 150, in this case, the determination result is yes, which means that the message is a VXLAN message, and then forwards the message to VM2-1 according to the destination UDP port number (UDP 2-1) in the UDP header.
And a second case: vSwtch 1 receives the message from VM2-1 forwarded by vSwtch 2
After the vSwitch1 receives the message sent by the vSwitch2, it finds that the destination MAC address of the message is itself, and further determines whether the IP protocol number in the protocol field in the IP header of the message is 150, in this case, the determination result is yes, which means that the message is a VXLAN message, and then, according to the destination UDP port number (UDP 1-1) in the UDP header, the message is forwarded to VM1-1, and VM1-1 confirms the VXLAN to which the message belongs by parsing the VXLAN ID of the VXLAN header, and performs subsequent processing.
According to the technical scheme, the VCPE in the NFV network has the globally unique IP address and the MAC address, the virtual switch in the VCPE and a plurality of VMs share the addresses, a large amount of address resources are saved, the virtual switch in the subsequent VCPE distinguishes the VXLAN message through identifying the protocol field, and normal forwarding of the VXLAN message is realized according to different UDP port numbers corresponding to different VMs.
Based on the same inventive concept, the application also provides a message forwarding device, the structure of which is shown in fig. 4, the device is applied to a virtual switch in a VCPE in an NFV network, the VCPE further comprises a plurality of VMs, each VM shares an IP address and a MAC address with the virtual switch, VXLANs to which different VMs belong are different, UDP port numbers corresponding to different VMs are different, and each VM establishes a VXLAN tunnel with at least one VM in an opposite-end CPE or an opposite-end VCPE in the NFV network, the device comprises:
a receiving module 41, configured to receive a packet;
a determining module 42, configured to determine, when the destination MAC address of the packet is the MAC address of the packet, whether the packet is a VXLAN packet according to a protocol field in an IP header of the packet;
and the forwarding module 43 is configured to forward the message to a destination device corresponding to a destination UDP port number in a UDP header of the message for processing when the determination result is yes.
Preferably, the determining module 42 is specifically configured to:
judging whether the IP protocol number in the protocol field in the IP header of the message is an IP protocol number used for representing that the message type is a VXLAN message;
if yes, determining the message as the VXLAN message.
Preferably, the apparatus further comprises:
and a processing module (not shown in fig. 4) configured to process the message according to a message type represented by an IP protocol number in a protocol field in an IP header of the message when the message is determined not to be a VXLAN message.
According to the technical scheme, in the application, the VCPE in the NFV network has the globally unique IP address and the MAC address, the virtual switch in the VCPE and a plurality of VMs share the addresses, so that a large amount of address resources are saved, the virtual switch in the subsequent VCPE distinguishes the VXLAN message through identifying the protocol field, and normal forwarding of the VXLAN message is realized according to different UDP port numbers corresponding to different VMs.
The foregoing description of the preferred embodiments of the application is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the application.

Claims (4)

1. The method is applied to a virtual switch in a virtual client device (VCPE) in a Network Function Virtualization (NFV) network, the VCPE further comprises a plurality of Virtual Machines (VM), each VM and the virtual switch share an IP address and a MAC address, extensible virtual local area networks (VXLAN) to which different VMs belong are different, user Data Protocol (UDP) port numbers corresponding to the different VMs are different, and each VM establishes a VXLAN tunnel with at least one VM in a peer client device (CPE) or a peer VCPE in the NFV network, and the method comprises the following steps:
receiving a message;
when the destination MAC address of the message is the MAC address of the message, determining whether the message is a VXLAN message according to a protocol field in an IP header of the message;
if yes, forwarding the message to target equipment corresponding to a target UDP port number in a UDP header of the message for processing;
wherein, according to the protocol field in the IP header of the message, confirm whether the said message is VXLAN message, include specifically:
judging whether the IP protocol number in the protocol field in the IP header of the message is an IP protocol number used for representing that the message type is a VXLAN message;
if yes, determining the message as the VXLAN message.
2. The method according to claim 1, wherein the method further comprises:
and when judging that the message is not the VXLAN message, processing the message according to the message type represented by the IP protocol number in the protocol field in the IP header of the message.
3. The utility model provides a message forwarding device, its characterized in that, the device is applied to the virtual switch in the virtualized customer premise equipment VCPE in the network function virtualization NFV network, the VCPE still includes many virtual machines VM, every VM and virtual switch sharing IP address and MAC address, the extensible virtual local area network VXLAN that different VMs belonged to is different, the user data protocol UDP port number that different VMs correspond is different, every VM has all established the VXLAN tunnel with at least one VM in the opposite terminal customer premise equipment CPE or the opposite terminal VCPE in the NFV network, the device includes:
the receiving module is used for receiving the message;
the determining module is used for determining whether the message is a VXLAN message according to a protocol field in an IP header of the message when the destination MAC address of the message is the MAC address of the message;
the forwarding module is used for forwarding the message to target equipment corresponding to a target UDP port number in a UDP header of the message for processing when the judgment result is yes;
the determining module is specifically configured to:
judging whether the IP protocol number in the protocol field in the IP header of the message is an IP protocol number used for representing that the message type is a VXLAN message;
if yes, determining the message as the VXLAN message.
4. A device according to claim 3, characterized in that the device further comprises:
and the processing module is used for processing the message according to the message type represented by the IP protocol number in the protocol field in the IP header of the message when the message is judged not to be the VXLAN message.
CN202010131815.9A 2020-02-29 2020-02-29 Message forwarding method and device Active CN111314200B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010131815.9A CN111314200B (en) 2020-02-29 2020-02-29 Message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010131815.9A CN111314200B (en) 2020-02-29 2020-02-29 Message forwarding method and device

Publications (2)

Publication Number Publication Date
CN111314200A CN111314200A (en) 2020-06-19
CN111314200B true CN111314200B (en) 2023-10-20

Family

ID=71148436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010131815.9A Active CN111314200B (en) 2020-02-29 2020-02-29 Message forwarding method and device

Country Status (1)

Country Link
CN (1) CN111314200B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447723A (en) * 2010-10-12 2012-05-09 运软网络科技(上海)有限公司 Client-side virtualization framework
CN103532672A (en) * 2013-10-22 2014-01-22 芮雄丽 Processing method of disordered fragmentation messages in SDN and application
CN105577417A (en) * 2014-11-06 2016-05-11 杭州华三通信技术有限公司 VXLAN (virtual extensible local area network)-based massage forwarding method and device
CN105978708A (en) * 2016-04-27 2016-09-28 赛特斯信息科技股份有限公司 System of realizing vCPE virtualization enterprise network based on NFV and method thereof
CN106210164A (en) * 2016-06-29 2016-12-07 杭州华三通信技术有限公司 A kind of IP address conflict processing method and processing device
CN106803812A (en) * 2015-11-26 2017-06-06 华为技术有限公司 A kind of method and apparatus for realizing load balancing
CN106878482A (en) * 2017-01-03 2017-06-20 新华三技术有限公司 Method for network address translation and device
CN107241208A (en) * 2016-03-29 2017-10-10 华为技术有限公司 A kind of message forwarding method, the first interchanger and related system
WO2017186069A1 (en) * 2016-04-29 2017-11-02 华为技术有限公司 Data transmission method and network device
CN107454011A (en) * 2016-05-31 2017-12-08 华为技术有限公司 A kind of message forwarding method, apparatus and system
WO2018019299A1 (en) * 2016-07-28 2018-02-01 中兴通讯股份有限公司 Virtual broadband access method, controller, and system
CN107835126A (en) * 2017-10-19 2018-03-23 盛科网络(苏州)有限公司 A kind of message forwarding method and system
CN108259366A (en) * 2017-07-25 2018-07-06 新华三技术有限公司 A kind of message forwarding method and device
CN109728962A (en) * 2017-10-27 2019-05-07 华为技术有限公司 A kind of method and apparatus sending message

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447723A (en) * 2010-10-12 2012-05-09 运软网络科技(上海)有限公司 Client-side virtualization framework
CN103532672A (en) * 2013-10-22 2014-01-22 芮雄丽 Processing method of disordered fragmentation messages in SDN and application
CN105577417A (en) * 2014-11-06 2016-05-11 杭州华三通信技术有限公司 VXLAN (virtual extensible local area network)-based massage forwarding method and device
CN106803812A (en) * 2015-11-26 2017-06-06 华为技术有限公司 A kind of method and apparatus for realizing load balancing
CN107241208A (en) * 2016-03-29 2017-10-10 华为技术有限公司 A kind of message forwarding method, the first interchanger and related system
CN105978708A (en) * 2016-04-27 2016-09-28 赛特斯信息科技股份有限公司 System of realizing vCPE virtualization enterprise network based on NFV and method thereof
WO2017186069A1 (en) * 2016-04-29 2017-11-02 华为技术有限公司 Data transmission method and network device
CN107454011A (en) * 2016-05-31 2017-12-08 华为技术有限公司 A kind of message forwarding method, apparatus and system
CN106210164A (en) * 2016-06-29 2016-12-07 杭州华三通信技术有限公司 A kind of IP address conflict processing method and processing device
WO2018019299A1 (en) * 2016-07-28 2018-02-01 中兴通讯股份有限公司 Virtual broadband access method, controller, and system
CN106878482A (en) * 2017-01-03 2017-06-20 新华三技术有限公司 Method for network address translation and device
CN108259366A (en) * 2017-07-25 2018-07-06 新华三技术有限公司 A kind of message forwarding method and device
CN107835126A (en) * 2017-10-19 2018-03-23 盛科网络(苏州)有限公司 A kind of message forwarding method and system
CN109728962A (en) * 2017-10-27 2019-05-07 华为技术有限公司 A kind of method and apparatus sending message

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Distributed control plane for high performance switchbased VXLAN overlays;Sunay Tripathi;《2015 ACM/IEEE Symposium on Architectures for Networking and Communications Systems (ANCS)》;20150321;全文 *
vCPE实现方式研究和发展趋势探讨;扶奉超;《移动通信》;20170228;全文 *

Also Published As

Publication number Publication date
CN111314200A (en) 2020-06-19

Similar Documents

Publication Publication Date Title
US11888899B2 (en) Flow-based forwarding element configuration
EP2853066B1 (en) Layer-3 overlay gateways
CN109937401B (en) Live migration of load-balancing virtual machines via traffic bypass
KR101840904B1 (en) Virtualization gateway between virtualized and non-virtualized networks
EP2905930B1 (en) Processing method, apparatus and system for multicast
US20090063706A1 (en) Combined Layer 2 Virtual MAC Address with Layer 3 IP Address Routing
EP2874359A1 (en) Extended ethernet fabric switches
US10693833B2 (en) Address resolution suppression in a logical network
CN109861899B (en) Virtual home gateway and implementation method, home network center and data processing method
CN106878136B (en) Message forwarding method and device
CN116319529A (en) Auxiliary replication in software defined networks
CN102355417A (en) Data center two-layer interconnection method and device
US20220006734A1 (en) Encapsulated fragmented packet handling
CN110311860B (en) Multilink load balancing method and device under VXLAN
US11632268B2 (en) Generating route target values for virtual private network routes
CN107809386B (en) IP address translation method, routing device and communication system
EP2584742A1 (en) Method and switch for sending packet
CN111756565B (en) Managing satellite devices within a branched network
US12088552B2 (en) Synchronizing dynamic host configuration protocol snoop information
US11936612B2 (en) Address resolution handling at logical distributed routers
CN112073503A (en) High-performance load balancing method based on flow control mechanism
CN110661710B (en) Message transmission method and device of virtualization system
CN111314200B (en) Message forwarding method and device
CN111294316B (en) Network isolation method and device based on user mode protocol stack virtual router
CN110753135A (en) IP address configuration method, configuration equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant