Communication method and related equipment
The first communication device determines the value of the IPv6 address based on the IPv4 address, and solves the problem that the mapping relationship between IPv4 and IPv6 address needs to be manually configured in the prior art, and achieves the effect of simplifying operation and maintenance and improving transmission efficiency.
Patent Information
- Application Number
- CN202311734208.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-15
- Publication Date
- 2025-06-17
AI Technical Summary
In the prior art, the mapping relationship between IPv4 addresses and IPv6 addresses needs to be manually configured by network operation and maintenance personnel, resulting in large labor and material consumption and low processing efficiency.
The IPv4 message is received through the first communication device and the IPv6 address value is determined based on the IPv4 address, without manually configuring the mapping relationship. The IPv6 address includes a field that is the same as the IPv4 address, and other fields can be preconfigured or obtained through other device requests.
Save manpower and material resources, simplify network operation and maintenance, improve message processing efficiency, and realize transparent transmission of IPv4 messages in IPv6 network.
Smart Images

Figure CN120166093A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technologies, and in particular, to a communication method and related devices. Background Art
[0002] With the continuous development of Internet services, the Internet Protocol Version 4 (IPv4) addresses may be exhausted. Therefore, the evolution from IPv4 to Internet Protocol Version 6 (IPv6) is an inevitable development trend. However, due to business deployment and continuity issues, it is difficult to immediately cancel IPv4 addresses for existing services. Therefore, IPv4 addresses may coexist with IPv6 addresses in the communication network for a long time.
[0003] Currently, in a communication network, service packets between different communication nodes can be forwarded through one or more network devices to achieve the transmission of the service packets. Taking the transmission of an IPv4 packet through an IPv6 network as an example, after receiving the IPv4 packet, the network device will obtain the IPv6 address corresponding to the IPv4 address in the IPv4 packet through a mapping relationship table of IPv4 addresses and IPv6 addresses manually configured by network operation and maintenance personnel. Subsequently, the packet can be transmitted in the IPv6 network based on this IPv6 address. Among them, in this mapping relationship table, there are one or more IPv4 addresses and one or more IPv6 addresses, as well as the mapping relationship between each IPv4 address and the IPv6 address.
[0004] However, in the above implementation process, the mapping relationship between IPv4 addresses and IPv6 addresses needs to be determined by the way of manual configuration by network operation and maintenance personnel. This implementation will not only consume a large amount of manpower and material resources, but also result in low processing efficiency. Summary of the Invention
[0005] This application provides a communication method and related devices, which are used to enable a first communication device to determine the value of an IPv6 address based on the value of an IPv4 address. Without manually configuring the mapping relationship between the IPv4 address and the IPv6 address by network operation and maintenance personnel, it can save manpower and material resources to simplify network operation and maintenance, and at the same time, it can also improve the packet processing efficiency.
[0006] In a first aspect of the present application, a communication method is provided. This method is executed by a first communication device, or by some components (such as a processor, a chip, or a chip system, etc.) in the first communication device, or this method can also be implemented by a logic module or software that can implement all or part of the functions of the first communication device. In the first aspect and its possible implementation manners, taking the case where this method is executed by the first communication device as an example for description, the first communication device can be a communication device such as a router, a switch, a virtual switch, a virtual router, or a smart network card. In this method, the first communication device receives a first packet, and the packet address of the first packet includes an IPv4 address; the first communication device determines an IPv6 address based on the IPv4 address, the IPv6 address includes a first field, and the value of the first field is the same as the value of the IPv4 address; the first communication device processes the first packet based on the IPv6 address.
[0007] Based on the above technical solution, the packet address of the first packet received by the first communication device includes an IPv4 address, and after the first communication device can determine the IPv6 address based on the IPv4 address, the first communication device can process the first packet based on the IPv6 address. Among them, the IPv6 address includes a first field, and the value of the first field is the same as the value of the IPv4 address. In other words, after the first communication device receives an IPv4 packet, the first communication device can determine the value of the IPv4 address included in the IPv4 packet as the value of a partial field of the IPv6 address. Since the address length of the IPv6 address (such as 128 bits or 16 bytes) is greater than the address length of the IPv4 address (such as 32 bits or 4 bytes), through the above method, the first communication device can determine the value of the IPv6 address based on the value of the IPv4 address, without the need for network operation and maintenance personnel to manually configure the mapping relationship between the IPv4 address and the IPv6 address, which can save manpower and material resources to simplify network operation and maintenance, and at the same time, can also improve the packet processing efficiency.
[0008] It should be understood that the packet address of the first packet can include a source address and a destination address, and both the source address and the destination address can be IPv4 addresses. Or, the IPv4 address in the packet address of the first packet can include a source IPv4 address and a destination IPv4 address.
[0009] In a possible implementation manner of the first aspect, the first communication device processes the first packet based on the IPv6 address, including: the first communication device generates a second packet based on the first packet, and the packet address of the second packet includes the IPv6 address; the first communication device sends the second packet.
[0010] It should be understood that the message address of the second message may include a source address and a destination address, both of which may be IPv6 addresses. Alternatively, the IPv6 addresses in the message address of the second message may include a source IPv6 address and a destination IPv6 address.
[0011] Based on the above technical solution, after the first communication device determines the IPv6 address based on the IPv4 address, the first communication device may generate a second message including the IPv6 address based on the first message and send the second message. In this way, the first communication device can process the IPv4 message to obtain an IPv6 message, and the subsequent recipient of the second message can forward based on the IPv6 address in the IPv6 message, realizing the transmission of the IPv4 message in the IPv6 network.
[0012] In a possible implementation manner of the first aspect, the first communication device processes the first message based on the IPv6 address, including: the first communication device determines the next-hop address of the IPv6 address through an IPv6 forwarding information based (FIB) table; the first communication device sends the first message to the next-hop address.
[0013] Based on the above technical solution, after the first communication device determines the IPv6 address based on the IPv4 address, the first communication device can determine the next-hop address of the IPv6 address through the IPv6 FIB table and send the first message to the next-hop address. In this way, different devices in the IPv6 network (such as the first communication device, the device corresponding to the next-hop address, etc.) can determine the IPv6 address based on the above method and realize the transmission of the IPv4 message in the IPv6 network based on the IPv6 FIB table.
[0014] It should be noted that the FIB table may include at least one of a destination address and a next-hop address. Among them, in the IPv6 FIB table, these two addresses may be IPv6 addresses, and in the IPv4 FIB table, these two addresses may be IPv4 addresses.
[0015] Optionally, the FIB table may further include information such as flags and timestamps, which are not limited here.
[0016] In a possible implementation of the first aspect, the IPv4 address is the address of an IPv4 device, and the method further includes: the first communication device obtains an IPv4 address segment corresponding to the IPv4 device; the first communication device determines an IPv6 route based on the IPv4 address segment, and a routing prefix of the IPv6 route includes a fifth field, and a value of the fifth field is the same as a value of the IPv4 address segment; the first communication device advertises the IPv6 route, and the IPv6 route is used to send a message to the IPv4 device.
[0017] Based on the above technical solution, the IPv4 address included in the first message received by the first communication device may be the address of an IPv4 device. Correspondingly, the first communication device may further obtain an IPv4 address segment corresponding to the IPv4 device, and advertise the IPv6 route determined based on the IPv4 address segment. Wherein, the routing prefix of the IPv6 route includes a fifth field, and a value of the fifth field is the same as a value of the IPv4 address segment. In other words, the values of some fields of the IPv6 route advertised by the first communication device are the same as the values of the IPv4 address segment. In this way, the first communication device can determine the value of the IPv6 route based on the value of the IPv4 address segment and publish the IPv6 route, without manually configuring the mapping relationship between the IPv4 address and the IPv6 address by network operation and maintenance personnel, which can save manpower and material resources to simplify network operation and maintenance, and can also improve the message processing efficiency.
[0018] Optionally, the IPv4 device may be a terminal device, a server, a virtual machine, etc.
[0019] Optionally, the first communication device determines the IPv6 route based on the IPv4 address segment, including: the first communication device adds the IPv6 route to a border gateway protocol (BGP) routing table. In other words, the first communication device can advertise the IPv6 route by adding the IPv6 route to the BGP routing table.
[0020] Optionally, the above BGP routing table may be implemented by other protocols, such as the open shortest path first version 3 (OSPFv3) protocol, the intermediate system to intermediate system (IS-IS) protocol, or other protocols, which are not limited herein.
[0021] It should be noted that the IPv6 route may be a route in IPv6 form. For example, the IPv6 route may indicate the addresses / identifications of each node on the routing path.
[0022] Optionally, the IPv6 routing may further include other routing information, such as priority, bandwidth, latency, etc., which are not limited herein.
[0023] In a second aspect of the present application, a communication method is provided. This method is executed by a second communication device, or by some components (such as a processor, a chip, or a chip system, etc.) in the second communication device, or this method can also be implemented by a logic module or software that can implement all or part of the functions of the second communication device. In the second aspect and its possible implementation manners, taking the case where this method is executed by the second communication device as an example for description, the second communication device may be a communication device such as a router, a switch, a virtual switch, a virtual router, or a smart network card. In this method, the second communication device receives a second packet, and the packet address of the second packet includes an IPv6 address; the IPv6 address includes a first field, and the value of the first field is the same as the value of an IPv4 address; the second communication device processes the second packet based on the IPv4 address.
[0024] Based on the above technical solution, the packet address of the second packet received by the second communication device includes an IPv6 address, and the IPv6 address includes a first field with the same value as the IPv4 address. After that, the second communication device can process the second packet based on the IPv4 address. In this way, after receiving the IPv6 packet, the second communication device can determine the value of the IPv4 address based on the values of some fields in the IPv6 packet. Since the address length of the IPv6 address (e.g., 128 bits or 16 bytes) is greater than the address length of the IPv4 address (e.g., 32 bits or 4 bytes), through the above method, the second communication device can determine the value of the IPv4 address based on the value of the IPv6 address, without the need for network operation and maintenance personnel to manually configure the mapping relationship between the IPv4 address and the IPv6 address, which can save manpower and material resources to simplify network operation and maintenance, and at the same time can also improve the packet processing efficiency.
[0025] In a possible implementation manner of the second aspect, the second communication device processes the second packet based on the IPv4 address, including: the second communication device generates a third packet based on the second packet, and the packet address of the third packet includes the IPv4 address; the second communication device sends the third packet.
[0026] Based on the above technical solution, the second communication device can generate and send a third packet based on the second packet, where the packet address of the third packet includes the IPv4 address. In this way, the recipient of the third packet can forward or receive the IPv4 packet based on the IPv4 address.
[0027] In a possible implementation of the second aspect, the second communication device sends the third message, including: the second communication device determines the next-hop address of the IPv4 address through the IPv4 FIB table; the second communication device sends the third message to the next-hop address.
[0028] Based on the above technical solution, after the second communication device determines the IPv4 address based on the IPv6 address, the second communication device can determine the next-hop address of the IPv4 address through the IPv4 FIB table, and send the third message to the next-hop address. In this way, an egress device (such as the second communication device, etc.) in the IPv6 network can determine the IPv4 address based on the above method, and implement the transmission of IPv6 messages in the IPv6 network based on the IPv4 FIB table.
[0029] A third aspect of the present application provides a communication method, which is executed by a third communication device, or, which is executed by some components (such as a processor, a chip, or a chip system, etc.) in the third communication device, or the method can also be implemented by a logic module or software that can implement all or part of the functions of the third communication device. In the third aspect and its possible implementations, taking the method being executed by the third communication device as an example for description, the third communication device can be a communication device such as a router, a switch, a virtual switch, a virtual router, or a smart network card. In this method, the third communication device obtains an IPv4 address segment corresponding to an IPv4 device; the third communication device determines an IPv6 route based on the IPv4 address segment, and a routing prefix of the IPv6 route includes a fifth field, and a value of the fifth field is the same as a value of the IPv4 address segment; the third communication device advertises the IPv6 route, and the IPv6 route is used to send a message to the IPv4 device.
[0030] Based on the above technical solution, after the third communication device obtains the IPv4 address segment corresponding to the IPv4 device, the third communication device can send the IPv6 route determined based on the IPv4 address segment. Wherein, the routing prefix of the IPv6 route includes a fifth field, and a value of the fifth field is the same as a value of the IPv4 address segment. In other words, the values of some fields of the IPv6 route advertised by the third communication device are the same as the values of the IPv4 address segment. In this way, the third communication device can determine the value of the IPv6 route based on the value of the IPv4 address segment, and advertise the IPv6 route, without manually configuring the mapping relationship between the IPv4 address and the IPv6 address by network operation and maintenance personnel, which can save manpower and material resources to simplify network operation and maintenance, and can also improve the message processing efficiency.
[0031] Optionally, the third communication device determines the IPv6 route based on the IPv4 address segment, including: the third communication device adds the IPv6 route to the Border Gateway Protocol (BGP) routing table. In other words, the third communication device can announce the IPv6 route by adding the IPv6 route to the BGP routing table.
[0032] In a possible implementation manner of any one of the first aspect to the third aspect, the IPv6 address further includes other fields, and the values of the other fields are pre-configured. In this way, the implementation can be simplified to quickly determine the IPv6 address.
[0033] Optionally, the other field can be any one of the following second field, third field, and fourth field.
[0034] In a possible implementation manner of any one of the first aspect to the third aspect, the IPv6 address further includes a second field, and the value of the second field is 0.
[0035] Based on the above technical solution, in the IPv6 address, in addition to including the first field with the same value as the IPv4 address, it can also include a second field with a value of 0. In this way, the implementation can be simplified to quickly determine the IPv6 address.
[0036] Optionally, in addition to the first field and the second field, the IPv6 address can include other fields (that is, the length occupied by the second field is less than 96 bits or 12 bytes), or can not include other fields (that is, the IPv6 address is composed of the first field and the second field, and the second field occupies 96 bits or 12 bytes), which is not limited here.
[0037] Optionally, the position of the second field in the IPv6 address is before the first field, that is, the value of the first field can be used to determine the interface information corresponding to the IPv6 address (for example, the first field is used as the suffix of the IPv6 address).
[0038] Optionally, the position of the second field in the IPv6 address is in other positions, such as after the first field.
[0039] In a possible implementation manner of any one of the first aspect to the third aspect, the IPv6 address further includes a third field, and the third field is a preamble prefix.
[0040] Optionally, the preamble prefix can be replaced with other descriptions, such as a preamble address.
[0041] Based on the above technical solution, in an IPv6 address, in addition to including a first field with the same value as an IPv4 address, it may also include a third field as a leading prefix. In this way, it can be applied to scenarios where a leading prefix is specified, and the determination of the IPv6 address can be achieved in such scenarios.
[0042] Optionally, the position of the third field in the IPv6 address is before the first field. In this way, while the value of the first field can be used to determine the interface information corresponding to the IPv6 address (for example, the first field is used as the suffix of the IPv6 address), the specification of the leading prefix can also be achieved.
[0043] Optionally, the position of the third field in the IPv6 address is at other positions, such as after the first field.
[0044] In a possible implementation manner of any one of the first to third aspects, the IPv6 address further includes a fourth field, and the fourth field includes a leading prefix and a mask.
[0045] Based on the above technical solution, in an IPv6 address, in addition to including a first field with the same value as an IPv4 address, it may also include a third field as a leading prefix and a mask. In this way, it can be applied to scenarios where a leading prefix is specified, and while the determination of the IPv6 address is achieved in such scenarios, the space occupied by the table entry can be reduced by the mask included in the fourth field, and the network segments to which different devices in the network belong can be planned through the mask.
[0046] Optionally, the position of the first field in the IPv6 address is between the leading prefix and the mask. In this way, while the value of the first field can be used to determine the interface information corresponding to the IPv6 address (for example, the first field is used as the suffix of the IPv6 address), the specification of the leading prefix can also be achieved. Moreover, the network bit and / or host bit of the IPv6 address can be specified through the mask.
[0047] Optionally, the position of the fourth field in the IPv6 address is at other positions, such as after the first field.
[0048] In the fourth aspect of the present application, a communication device is provided. The device can implement the method in the first aspect or any possible implementation manner of the first aspect. The device includes corresponding units or modules for executing the above method. The units or modules included in the device can be implemented in software and / or hardware manners. For example, the device can be a first communication device, or the device can be a component in the first communication device (such as a processor, a chip, or a chip system, etc.), or the device can also be a logical module or software that can implement all or part of the functions of the first communication device.
[0049] The device includes a transceiver unit and a processing unit; the transceiver unit is used to receive a first message, and the message address of the first message includes an Internet Protocol version 4 (IPv4) address; the processing unit is used to determine an Internet Protocol version 6 (IPv6) address based on the IPv4 address, the IPv6 address includes a first field, and the value of the first field is the same as the value of the IPv4 address; the processing unit is used to process the first message based on the IPv6 address.
[0050] In a possible implementation manner of the fourth aspect, the processing unit is used to process the first message based on the IPv6 address, including: the processing unit generates a second message based on the first message, and the message address of the second message includes the IPv6 address; the first communication device sends the second message.
[0051] In a possible implementation manner of the fourth aspect, the processing unit is used to process the first message based on the IPv6 address, including: the processing unit determines the next-hop address of the IPv6 address through an IPv6 Forwarding Information Base (FIB) table; the processing unit controls the transceiver unit to send the first message to the next-hop address.
[0052] In a possible implementation manner of the fourth aspect, the IPv6 address further includes a second field, and the value of the second field is 0.
[0053] In a possible implementation manner of the fourth aspect, the position of the second field in the IPv6 address is before the first field.
[0054] In a possible implementation manner of the fourth aspect, the IPv6 address further includes a third field, and the third field is a leading prefix.
[0055] In a possible implementation manner of the fourth aspect, the position of the third field in the IPv6 address is before the first field.
[0056] In a possible implementation manner of the fourth aspect, the IPv6 address further includes a fourth field, and the fourth field includes a leading prefix and a mask.
[0057] In a possible implementation manner of the fourth aspect, the position of the first field in the IPv6 address is between the leading prefix and the mask.
[0058] In a possible implementation of the fourth aspect, the IPv4 address is the address of an IPv4 device, and the processing unit is further configured to obtain the IPv4 address segment corresponding to the IPv4 device; the first communication device determines an IPv6 route based on the IPv4 address segment, and the route prefix of the IPv6 route includes a fifth field, and the value of the fifth field is the same as the value of the IPv4 address segment; the transceiver unit is further configured to advertise the IPv6 route, and the IPv6 route is used to send a message to the IPv4 device.
[0059] In a possible implementation of the fourth aspect, the processing unit determining the IPv6 route based on the IPv4 address segment includes: the processing unit adding the IPv6 route to the BGP routing table.
[0060] A fifth aspect of the present application provides a communication device, which can implement the method in the second aspect or any possible implementation of the second aspect. The device includes corresponding units or modules for executing the above method. The units or modules included in the device can be implemented in software and / or hardware. For example, the device can be a second communication device, or the device can be a component in the second communication device (such as a processor, a chip, or a chip system, etc.), or the device can also be a logical module or software that can implement all or part of the functions of the second communication device.
[0061] The device includes a transceiver unit and a processing unit; the transceiver unit is configured to receive a second message, and the message address of the second message includes an IPv6 address; the IPv6 address includes a first field, and the value of the first field is the same as the value of the IPv4 address; the processing unit is configured to process the second message based on the IPv4 address.
[0062] In a possible implementation of the fifth aspect, the processing unit processing the second message based on the IPv4 address includes: the processing unit generating a third message based on the second message, and the message address of the third message includes the IPv4 address; the processing unit controlling the transceiver unit to send the third message.
[0063] In a possible implementation of the fifth aspect, the processing unit controlling the transceiver unit to send the third message includes: the processing unit determining the next-hop address of the IPv4 address through the IPv4 FIB table; the processing unit controlling the transceiver unit to send the third message to the next-hop address.
[0064] In a possible implementation of the fifth aspect, the IPv6 address further includes a second field, and the value of the second field is 0.
[0065] In a possible implementation of the fifth aspect, the position of the second field in the IPv6 address is before the first field.
[0066] In a possible implementation of the fifth aspect, the IPv6 address further includes a third field, and the third field is a leading prefix.
[0067] In a possible implementation of the fifth aspect, the position of the third field in the IPv6 address is before the first field.
[0068] In a possible implementation of the fifth aspect, the IPv6 address further includes a fourth field, and the fourth field includes a leading prefix and a mask.
[0069] In a possible implementation of the fifth aspect, the position of the first field in the IPv6 address is between the leading prefix and the mask.
[0070] The sixth aspect of the present application provides a communication device, and the device can implement the method in the above-mentioned third aspect or any possible implementation of the third aspect. The device includes corresponding units or modules for executing the above method. The units or modules included in the device can be implemented in software and / or hardware. For example, the device can be a third communication device, or the device can be a component in the third communication device (such as a processor, a chip, or a chip system, etc.), or the device can also be a logical module or software capable of implementing all or part of the functions of the third communication device.
[0071] The device includes a transceiver unit and a processing unit; the processing unit is used to obtain the IPv4 address segment corresponding to the IPv4 device; the processing unit is further used to determine an IPv6 route based on the IPv4 address segment, and the routing prefix of the IPv6 route includes a fifth field, and the value of the fifth field is the same as the value of the IPv4 address segment; the transceiver unit is used to announce the IPv6 route, and the IPv6 route is used to send a message to the IPv4 device.
[0072] In a possible implementation of the sixth aspect, the processing unit is used to determine an IPv6 route based on the IPv4 address segment, including: the processing unit is used to add the IPv6 route to the BGP routing table.
[0073] In a possible implementation of the sixth aspect, the routing prefix further includes a second field, and the value of the second field is 0.
[0074] In a possible implementation of the sixth aspect, the position of the second field in the routing prefix is before the first field.
[0075] In a possible implementation of the sixth aspect, the routing prefix further includes a third field, and the third field is a leading prefix.
[0076] In a possible implementation of the sixth aspect, the position of the third field in the routing prefix is before the first field.
[0077] In a possible implementation of the sixth aspect, the routing prefix further includes a fourth field, and the fourth field includes a leading prefix and a mask.
[0078] In a possible implementation of the sixth aspect, the position of the first field in the routing prefix is between the leading prefix and the mask.
[0079] The seventh aspect of the present application provides a communication device. The communication device includes at least one processor, and the at least one processor is configured to execute a program or instructions stored in a memory, so that the device implements the method described in any one of the foregoing first aspect to the third aspect and any of its possible implementations.
[0080] The eighth aspect of the present application provides a communication device, including at least one logic circuit and an input-output interface; the logic circuit is configured to execute the method described in any one of the foregoing first aspect to the third aspect and any of its possible implementations.
[0081] The ninth aspect of the present application provides a computer-readable storage medium for storing computer instructions; when the computer instructions are executed by a processor, the processor executes the method described in any one of the foregoing first aspect to the third aspect and any of its possible implementations.
[0082] The tenth aspect of the present application provides a computer program product (or computer program), and the computer program product includes instructions. When the instructions in the computer program product are executed by a processor, the processor executes the method described in any one of the foregoing first aspect to the third aspect and any of its possible implementations.
[0083] The eleventh aspect of the present application provides a chip system, and the chip system includes a communication interface and a processor. The communication interface and the processor are coupled to support the communication device to implement the method described in any one of the foregoing first aspect to the third aspect and any of its possible implementations.
[0084] In a possible design, the chip system may further include a memory for storing necessary program instructions and data of the communication device. The chip system may be composed of chips or may include chips and other discrete devices. Optionally, the chip system further includes an interface circuit, and the interface circuit provides program instructions and / or data for the at least one processor.
[0085] The twelfth aspect of the present application provides a communication system, which includes the above-mentioned first communication device.
[0086] Optionally, the communication system includes the above-mentioned first communication device and the second communication device.
[0087] Optionally, the communication system includes the above-mentioned first communication device, the second communication device and the third communication device.
[0088] Optionally, the communication system includes the above-mentioned third communication device.
[0089] Optionally, the communication system further includes other devices in the above implementation manners, such as IPv4 devices.
[0090] Among them, for the technical effects brought by any one of the design manners in the fourth aspect to the twelfth aspect, reference can be made to the technical effects brought by different implementation manners in the first aspect to the third aspect above, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] Figure 1 is a schematic diagram of the communication system provided by the present application;
[0092] Figure 2 is a schematic diagram of communication based on IPv4 routing and IPv6 routing involved in the present application;
[0093] Figure 3 is a schematic diagram of an implementation of the communication method provided by the present application;
[0094] Figure 4 is another schematic diagram of an implementation of the communication method provided by the present application;
[0095] Figure 5 is another schematic diagram of an implementation of the communication method provided by the present application;
[0096] Figure 6 is another schematic diagram of an implementation of the communication method provided by the present application;
[0097] Figure 7a is an application schematic diagram of the communication method provided by the present application;
[0098] Figure 7b is another application schematic diagram of the communication method provided by the present application;
[0099] Figure 8 is a schematic diagram of the communication device provided by the present application;
[0100] Figure 9 is another schematic diagram of the communication device provided by the present application. Detailed implementation manners
[0101] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
[0102] In the embodiments of the present application, the terms "system" and "network" can be used interchangeably. "At least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one of the following (items)" or similar expressions refer to any combination of these items, including any combination of single items (pieces) or plural items (pieces). For example, "at least one of A, B, and C" includes A, B, C, AB, AC, BC, or ABC. Also, unless otherwise specified, the ordinal numbers such as "first" and "second" mentioned in the embodiments of the present application are used to distinguish multiple objects and are not used to limit the order, time sequence, priority, or importance of multiple objects.
[0103] It should be noted that in the present application, words such as "exemplary" or "for example" are used to give examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, using words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.
[0104] It should be understood that in the present application, "when...", "if", and "in case" all refer to that the device will perform corresponding processing under a certain objective situation, which does not limit the time, and it is not required that the device must have a judgment action when implemented, nor does it mean that there are other limitations.
[0105] In the present application, unless otherwise specified, the same or similar parts between various embodiments or implementation manners can be referred to each other. In each embodiment of the present application, as well as in each implementation manner / implementation method / realization method in each embodiment, if there is no special description and logical conflict, the terms and / or descriptions between different embodiments, as well as between each implementation manner / implementation method / realization method in each embodiment, are consistent and can be referenced to each other. The technical features in different embodiments, as well as in each implementation manner / implementation method / realization method in each embodiment, can be combined to form new embodiments, implementation manners, implementation methods, or realization methods according to their inherent logical relationships. The implementation manners of the present application described below do not constitute a limitation on the protection scope of the present application.
[0106] To facilitate the understanding of the method provided in the embodiments of the present application, the system architecture of the method provided in the embodiments of the present application will be described below. It is understandable that the system architecture described in the embodiments of the present application is to more clearly illustrate the technical solutions of the embodiments of the present application, and does not constitute a limitation on the technical solutions provided in the embodiments of the present application.
[0107] See Figure 1 , which is a schematic diagram of the architecture of the communication system provided in the embodiments of the present application. As Figure 1 shown, the system includes multiple IPv4 devices, such as IPv4 device 101 and IPv4 device 102, and other possible IPv4 devices; the system also includes multiple network devices, such as network device 103, network device 104, network device 105, and network device 106, and other possible network devices.
[0108] In Figure 1 , the IPv4 device can be used as the sending end of the message flow, that is, the device indicated by the source address information of the message flow; correspondingly, this IPv4 device can be called the source device, source node, etc. Alternatively, the IPv4 device can be used as the receiving end of the message flow, that is, the device indicated by the destination address information of the message flow; correspondingly, this IPv4 device can be called the destination device, destination node, etc. Among them, the sending end or the receiving end of the message flow can be a device with data sending and receiving requirements, such as a terminal device, a server, a virtual machine, etc.
[0109] Optionally, in Figure 1 , the network device can be a router, switch, firewall, virtual switch, virtual router, smart network card and other devices.
[0110] With the continuous development of Internet services, the Internet Protocol Version 4 (IPv4) addresses may be exhausted. For this reason, the evolution from IPv4 to Internet Protocol Version 6 (IPv6) is an inevitable development trend. However, due to business deployment and continuity issues, it is difficult to immediately cancel IPv4 addresses for existing services. Therefore, IPv4 addresses will likely coexist with IPv6 addresses in the communication network for a long time. In the communication network, service messages between different communication nodes can be forwarded through one or more network devices to achieve the transmission of the service message.
[0111] Taking the transmission of IPv4 packets through the IPv6 network as an example, in Figure 1In the scenario shown, network devices 103, 104, 105, and 106 can communicate with each other via IPv6, and the network composed of these network devices can be understood as an IPv6 network. Correspondingly, how IPv4 devices 101 and 102 communicate via the IPv6 network is a widely discussed issue in the industry currently.
[0112] As an example, as Figure 2 shown, a network device can maintain two sets of routing systems, IPv4 and IPv6, to support the transmission of IPv4 packets in the IPv6 network. In Figure 2 , taking each host device including H1, H2...H8 as an example, these eight host devices can be IPv4 devices, and between the leaf nodes (such as Figure 2 Leaf 1 to Leaf 4 in Figure 2 ) and the spine nodes (such as
[0113] Spine 1 and Spine 2 in Figure 2 ), communication can be carried out via the IPv6 network. Figure 2 In
[0114] , between the Leaf nodes (such as Leaf 1 to Leaf 4) and the H nodes (such as H1 to H8), the Leaf nodes can allocate both IPv4 and IPv6 addresses for the connected H nodes simultaneously. And, in
[0115] , between the Spine nodes (such as Spine 1 and Spine 2) and the Leaf nodes, the Leaf nodes can publish the IPv4 addresses allocated for the H nodes to the Spine nodes via IPv4 routing, and the Leaf nodes can publish the IPv6 addresses allocated for the H nodes to the Spine nodes via IPv6 routing. Through the processes of address allocation and routing publication, each Leaf node and Spine node can learn the IPv4 and IPv6 addresses of each H node.
[0114] Generally, the Leaf nodes can implement the above processes of address allocation and routing publication by manually configuring the mapping relationship table of IPv4 addresses and IPv6 addresses by network operation and maintenance personnel. Among them, in this mapping relationship table, it includes one or more IPv4 addresses and one or more IPv6 addresses, as well as the mapping relationship between each IPv4 address and IPv6 address.
[0115] However, in the above implementation process, the mapping relationship between IPv4 addresses and IPv6 addresses needs to be determined by manual configuration by network operation and maintenance personnel. This implementation will consume a large amount of manpower and material resources and also result in low processing efficiency. Moreover, in the above implementation process, from the perspective of operation and maintenance use, it is still necessary to operate and maintain two sets of routing systems for IPv4 and IPv6 at the same time, which is not convenient for operation and maintenance use.
[0116] In addition to the above implementation process, IPv4 packets can also be transmitted through an IPv6 network in other ways, which will be introduced through some implementation examples below.
[0117] Example 1: Use the network address translation (NAT) function to implement the transmission of IPv4 packets through an IPv6 network. Among them, the NAT function can include the network address translation from IPv4 to IPv6 (NAT IPv4 to IPv6, NAT46) function and the network address translation from IPv6 to IPv4 (NAT IPv6 to IPv4, NAT64) function.
[0118] Taking Figure 2 the scenario shown as an example, Example 1 will be exemplarily described. Among them, when the transmission network between the Leaf 1 node and the Spine node is an IPv6 network, if the H1 node sends an IPv4 packet to the Leaf 1 node, the Leaf 1 node can request the IPv6 address corresponding to the IPv4 packet from a server (such as a domain name system (DNS) server) deployed with the NAT46 function. The server will determine and feedback the IPv6 address to the Leaf 1 node based on this request through the mapping relationship table. Subsequently, the Leaf 1 node can convert the IPv4 address of the IPv4 packet into this IPv6 address to obtain an IPv6 packet, and send the IPv6 packet to the Spine node. The destination address of the IPv6 packet is the IPv6 address of the H8 node.
[0119] Example 2: Use the tunnel encapsulation technology to implement the transmission of IPv4 packets through an IPv6 network.
[0120] Still taking Figure 2Taking the scenario shown as an example, Example 2 is exemplified. In which, when the transmission network between Leaf 1 node and Spine node is an IPv6 network, if H1 node sends an IPv4 message to Leaf 1 node, Leaf 1 node can encapsulate the IPv4 message through tunnel encapsulation technology, such as based on virtual extensible local area network (Vxlan) header, generation routing encapsulation (GRE) header and other encapsulation methods, to obtain a message that can be recognized by IPv6 network, so as to realize the transmission of IPv4 message in IPv6 network.
[0121] However, there are still some problems in the above examples 1 and 2 in implementing the transmission scheme of IPv4 packets in IPv6 networks. For example, in the above example 1, NAT technology still requires users to specify the mapping relationship between IPv6 addresses and IPv4 addresses, which requires a more complex deployment (such as DNS server). In the above example 2, when traversing the IPv6 network, an additional tunnel needs to be encapsulated for forwarding data packets, which adds additional overhead.
[0122] Therefore, how to improve the operation and maintenance simplification of IPv4 packets in IPv6 networks is a technical problem that needs to be solved urgently.
[0123] In order to solve the above problems, the present application provides a communication method and related equipment, which are used to enable a first communication device to determine the value of an IPv6 address based on the value of an IPv4 address, without the need for network operation and maintenance personnel to manually configure the mapping relationship between the IPv4 address and the IPv6 address. This can save manpower and material resources to simplify network operation and maintenance, and can also improve message processing efficiency.
[0124] See also Figure 3 , which is a schematic diagram of the communication method provided in this application.
[0125] It should be noted that in the following method, the communication device (for example, the first communication device, Figures 4 to 6 The second communication device, the third communication device, etc. that may be involved may be a network device, or the communication device may be a partial component of the network device (such as a processor, a chip or a chip system, etc.), or the communication device may be a logical module or software of the network device. Among them, the network device may be a router, a switch, a virtual switch, a virtual router, a smart network card, etc.
[0126] S301. A first communication device receives a first message, wherein the message address of the first message includes an IPv4 address.
[0127] It should be understood that the message address of the first message may include a source address and a destination address, both of which may be IPv4 addresses. Alternatively, the IPv4 addresses in the message address of the first message may include a source IPv4 address and a destination IPv4 address.
[0128] S302. The first communication device determines an IPv6 address based on the IPv4 address. The IPv6 address includes a first field, and the value of the first field is the same as the value of the IPv4 address.
[0129] S303. The first communication device processes the first message based on the IPv6 address.
[0130] It should be understood that since the address length of the IPv6 address (e.g., 128 bits or 16 bytes) is greater than the address length of the IPv4 address (e.g., 32 bits or 4 bytes), therefore, in the IPv6 address, in addition to including the first field with the same value as the IPv4 address, the IPv6 address may further include other fields (e.g., 96 bits or 8 bytes).
[0131] Among them, the value of the other field may be pre-configured or obtained by the first communication device based on the IPv4 address from other devices (such as a network management device / controller, etc.). In other words, in step S302, the first communication device may determine the value of the other field through a pre-configured method or through the indication of other devices.
[0132] In a possible implementation, the IPv6 address further includes other fields, and the values of the other fields are pre-configured. In this way, the implementation can be simplified to quickly determine the IPv6 address.
[0133] Optionally, the other field may be any one of the following second field, third field, and fourth field.
[0134] For ease of understanding, the implementation examples of the other fields in the IPv6 address except the first field will be given below through Method A to Method C.
[0135] Method A: The IPv6 address further includes a second field, and the value of the second field is 0.
[0136] In Method A, in the IPv6 address, in addition to including the first field with the same value as the IPv4 address, it may further include a second field with a value of 0. In this way, the implementation can be simplified to quickly determine the IPv6 address.
[0137] Optionally, in addition to the first field and the second field, the IPv6 address may include other fields (i.e., the length occupied by the second field is less than 96 bits or 12 bytes), or may not include other fields (i.e., the IPv6 address consists of the first field and the second field, and the second field occupies 96 bits or 12 bytes), which is not limited here.
[0138] Optionally, the position of the second field in the IPv6 address is before the first field, that is, the value of the first field can be used to determine the interface information corresponding to the IPv6 address (for example, the first field is used as the suffix of the IPv6 address).
[0139] Optionally, the position of the second field in the IPv6 address is in other positions, such as after the first field.
[0140] Exemplarily, in Mode A, taking the IPv4 address "10.1.1.1" as an example, the IPv6 address determined based on this address can be expressed as "::10.1.1.1".
[0141] In Mode B, the IPv6 address further includes a third field, and the third field is a leading prefix.
[0142] In Mode B, in the IPv6 address, in addition to including the first field with the same value as the IPv4 address, it may also include a third field as the leading prefix. In this way, it can be applied to the scenario of specifying the leading prefix and realize the determination of the IPv6 address in this scenario.
[0143] Optionally, the position of the third field in the IPv6 address is before the first field. In this way, while the value of the first field can be used to determine the interface information corresponding to the IPv6 address (for example, the first field is used as the suffix of the IPv6 address), the specification of the leading prefix can also be realized.
[0144] Optionally, the position of the third field in the IPv6 address is in other positions, such as after the first field.
[0145] Exemplarily, in Mode B, taking the IPv4 address "10.1.1.1" as an example, assuming the leading prefix is 2001:0101:: / 96, the IPv6 address determined based on this address can be expressed as "2001:0101::10.1.1".
[0146] In Mode C, the IPv6 address further includes a fourth field, and the fourth field includes a leading prefix and a mask.
[0147] In mode C, in an IPv6 address, in addition to including a first field with the same value range as an IPv4 address, it may also include a third field as a leading prefix and a mask. In this way, it can be applied to scenarios where a leading prefix is specified. While determining the IPv6 address in this scenario, the space occupied by entries can be reduced through the mask included in the fourth field, and the network segments to which different devices in the network belong can be planned through this mask.
[0148] Optionally, the position of the first field in the IPv6 address is between the leading prefix and the mask. In this way, while the value of the first field can be used to determine the interface information corresponding to the IPv6 address (for example, the first field is used as the suffix of the IPv6 address), the specification of the leading prefix can also be achieved. Moreover, the network bits and / or host bits of the IPv6 address can be specified through the mask.
[0149] Optionally, the position of the fourth field in the IPv6 address is in other positions, such as after the first field.
[0150] Exemplarily, in mode C, taking the IPv4 address "10.1.1.1" as an example, assuming that the / 48 space is divided as the mask, then the specified prefix leading can be 2001:0000:0101:: / 48, and the IPv6 address determined based on this address can be expressed as "2001:0000:0101:10.1.1.1: / 48".
[0151] It should be noted that in step S302, the first communication device can determine the IPv6 address based on the indication of other devices (such as a network management device / controller, etc.) in the above-mentioned mode A or mode B or mode C. In other words, before step S302, the first communication device can receive indication information from the other device, and the indication information can indicate mode A or mode B or mode C.
[0152] Based on Figure 3In the technical solution shown, the packet address of the first packet received by the first communication device in step S301 includes an IPv4 address. Moreover, after the first communication device determines the IPv6 address based on the IPv4 address in step S302, the first communication device can process the first packet based on the IPv6 address in step S303. Among them, the IPv6 address includes a first field, and the value of the first field is the same as the value of the IPv4 address. In other words, after the first communication device receives an IPv4 packet, the first communication device can determine the value of the IPv4 address included in the IPv4 packet as the value of a partial field of the IPv6 address. Since the address length of the IPv6 address (for example, 128 bits or 16 bytes) is greater than the address length of the IPv4 address (for example, 32 bits or 4 bytes), through the above method, the first communication device can determine the value of the IPv6 address based on the value of the IPv4 address, without the need for network operation and maintenance personnel to manually configure the mapping relationship between the IPv4 address and the IPv6 address. This can save manpower and material resources to simplify network operation and maintenance, and at the same time, it can also improve the packet processing efficiency.
[0153] As an application example, in the scenario described above Figure 2 shown, Figure 3 in the method shown, the IPv4 device can be Figure 2 any H node among H1 to H8 in Figure 2 , and correspondingly, the first communication device can be Figure 3 the Leaf node connected to the H node in
[0154] Based on the Figure 3 technical solution shown, the Leaf node can make the IPv4 packet from the H node be transmitted in the IPv6 network between the Leaf node and the Spine node without the need for network operation and maintenance personnel to manually configure the mapping relationship between the IPv4 address and the IPv6 address, that is, the Leaf node does not need to allocate an IPv4 address and an IPv6 address for the H node, which can simplify network operation and maintenance. Figure 4 and Figure 5 shown examples for description.
[0155] As Figure 4 shown, in step S303, the first communication device processes the first packet based on the IPv6 address, including:
[0156] Step A. The first communication device generates a second packet based on the first packet, and the packet address of the second packet includes the IPv6 address.
[0157] Step B. The first communication device sends the second packet.
[0158] It should be understood that the message address of the second message may include a source address and a destination address, both of which may be IPv6 addresses. Alternatively, the IPv6 addresses in the message address of the second message may include a source IPv6 address and a destination IPv6 address.
[0159] Based on the implementation processes of step A and step B, after the first communication device determines the IPv6 address based on the IPv4 address, the first communication device may generate a second message including the IPv6 address based on the first message and send the second message. In this way, the first communication device can process the IPv4 message to obtain an IPv6 message, and the subsequent recipient of the second message can forward based on the IPv6 address in the IPv6 message, realizing the transmission of the IPv4 message in the IPv6 network.
[0160] In addition, for the second communication device, after receiving the second message in step B, the second communication device may further process the received second message.
[0161] As an implementation example, after receiving the second message in step B, the second communication device may generate a third message based on the second message, and the message address of the third message includes the IPv4 address; the second communication device sends the third message. In this way, the recipient of the third message can forward or receive the IPv4 message based on the IPv4 address.
[0162] As an implementation example, after receiving the second message in step B, the second communication device may determine the next-hop address of the IPv4 address through the IPv4 FIB table; the second communication device sends the third message to the next-hop address. In this way, the egress device (such as the second communication device, etc.) in the IPv6 network can determine the IPv4 address based on the above method and realize the transmission of the IPv6 message in the IPv6 network based on the IPv4 FIB table.
[0163] As an application example, in the foregoing Figure 2 scenario shown, Figure 3 the IPv4 device in the method shown may be Figure 2 any one of the H nodes from H1 to H8 in Figure 2 and correspondingly, the first communication device may be Figure 4In the technical solution shown, the Leaf node can avoid manually configuring the mapping relationship between the IPv4 address and the IPv6 address by network operation and maintenance personnel. Moreover, since the second message sent by the Leaf in step B can be an IPv6 message, the Leaf node also does not need to publish the IPv4 route, and it can also enable the IPv4 message from the H node to be transmitted in the IPv6 network between the Leaf node and the Spine node, which can simplify network operation and maintenance.
[0164] As Figure 5 shown, in step S303, the first communication device processes the first message based on the IPv6 address, including:
[0165] Step C. The first communication device determines the next-hop address of the IPv6 address through the IPv6 Forwarding Information Base (FIB) table.
[0166] Step D. The first communication device sends the first message to the next-hop address (in this example, taking the next-hop address as the address of the second communication device).
[0167] Based on the implementation processes of step C and step D, after the first communication device determines the IPv6 address based on the IPv4 address, the first communication device can determine the next-hop address of the IPv6 address through the IPv6 FIB table and send the first message to the next-hop address. In this way, different devices in the IPv6 network (such as the first communication device, the device corresponding to the next-hop address, etc.) can determine the IPv6 address based on the above method and realize the transmission of the IPv4 message in the IPv6 network based on the IPv6 FIB table.
[0168] As an application example, in the scenario shown above Figure 2 the IPv4 device in the method shown Figure 3 can be any one of H1 to H8 among Figure 2 the H nodes, and correspondingly, the first communication device can be Figure 2 any Leaf node or any Spine node in the IPv6 network among Figure 5 Based on the technical solution shown, the Leaf node and the Spine node can avoid manually configuring the mapping relationship between the IPv4 address and the IPv6 address by network operation and maintenance personnel. Moreover, since each network device in the IPv6 network can determine the next-hop address by looking up the table through the IPv6 FIB table for the IPv6 address corresponding to the received IPv4 message, the Leaf node does not need to publish the IPv4 route, and it can also enable the IPv4 message from the H node to be transmitted in the IPv6 network between the Leaf node and the Spine node, which can simplify network operation and maintenance.
[0169] In Figure 3 In a possible implementation of the technical solution shown, the IPv4 address is the address of an IPv4 device, and the method further includes: the first communication device obtains the IPv4 address segment corresponding to the IPv4 device; the first communication device determines an IPv6 route based on the IPv4 address segment, and the route prefix of the IPv6 route includes a fifth field, and the value of the fifth field is the same as the value of the IPv4 address segment; the first communication device advertises the IPv6 route, and the IPv6 route is used to send a message to the IPv4 device.
[0170] Specifically, the IPv4 address included in the first message received by the first communication device may be the address of the IPv4 device. Correspondingly, the first communication device may also obtain the IPv4 address segment corresponding to the IPv4 device and advertise the IPv6 route determined based on the IPv4 address segment. Among them, the route prefix of the IPv6 route includes a fifth field, and the value of the fifth field is the same as the value of the IPv4 address segment. In other words, the values of some fields of the IPv6 route advertised by the first communication device are the same as the values of the IPv4 address segment. In this way, the first communication device can determine the value of the IPv6 route based on the value of the IPv4 address segment and advertise the IPv6 route, without the need for network operation and maintenance personnel to manually configure the mapping relationship between the IPv4 address and the IPv6 address, which can save manpower and material resources to simplify network operation and maintenance, and can also improve the message processing efficiency.
[0171] Optionally, the IPv4 device may be a terminal device, a server, a virtual machine, etc.
[0172] Optionally, the first communication device determines the IPv6 route based on the IPv4 address segment, including: the first communication device adds the IPv6 route to the border gateway protocol (BGP) routing table. In other words, the first communication device can advertise the IPv6 route by adding the IPv6 route to the BGP routing table.
[0173] In a possible implementation, in addition to the above implementation of publishing the IPv6 route through the first communication device, the IPv6 route can also be published through other communication devices, and more implementation examples will be described below.
[0174] As Figure 6 shown, before step S302, the method further includes:
[0175] Step E. The third communication device determines an IPv6 route based on the IPv4 address segment.
[0176] Step F. The third communication device announces (or sends, publishes) an IPv6 route. Correspondingly, the first communication device and the second communication device can receive the IPv6 route.
[0177] Based on Figure 6 the technical solution, after the third communication device obtains the IPv4 address segment corresponding to the IPv4 device, the third communication device can send an IPv6 route determined based on the IPv4 address segment in Step F. Wherein, the route prefix of the IPv6 route includes a fifth field, and the value of the fifth field is the same as the value of the IPv4 address segment. In other words, the values of some fields of the IPv6 route announced by the third communication device are the same as the values of the IPv4 address segment. In this way, the third communication device can determine the value of the IPv6 route based on the value of the IPv4 address segment and announce the IPv6 route, without manually configuring the mapping relationship between the IPv4 address and the IPv6 address by network operation and maintenance personnel, which can save manpower and material resources to simplify network operation and maintenance, and can also improve the packet processing efficiency.
[0178] Similarly, the third communication device determining the IPv6 route based on the IPv4 address segment includes: the third communication device adding the IPv6 route to the border gateway protocol (BGP) routing table. In other words, the third communication device can realize the publication of the IPv6 route by adding the IPv6 route to the BGP routing table.
[0179] Optionally, the third communication device can be a device reachable by routing from the IPv4 device in the IPv6 network. For example, the third communication device can be a network management device, a controller, etc. of the first communication device, or the third communication device can be a network device having a communication connection with the third communication device in the IPv6 network.
[0180] To facilitate the understanding of the above technical solution, the following will be through Figures 7a to 7b the application scenario shown, for exemplary description.
[0181] As Figure 7a shown, the three nodes leaf 1, Spine 1, and leaf 2 can be different nodes in the IPv6 network, and the address of the H1 node connected to the leaf1 node is "10.1.1.2", and the address of the H1 node connected to the leaf 1 node is "10.1.2.2". In this example, the process of the H1 node sending an IPv4 packet to the H 2 node is taken as an example for description. It should be understood that the Leaf 1 node can be the first communication device mentioned above, and the Leaf 2 node or the Spine 1 node can be the second communication device mentioned above.
[0182] InFigure 7a In the IPv4 packet sent by the H1 node (i.e., the first packet described above), the source internet protocol address (SIP) is the address of the H1 node, i.e., "10.1.1.2", and the destination internet protocol address (DIP) is the address of the H2 node, i.e., "10.1.2.2". Based on the foregoing Figure 4 According to the technical solution shown above, the Leaf 1 node, as the first communication device, can, after receiving the first packet from the H1 node, determine the IPv6 address corresponding to the IPv4 address in the first packet in step A. Taking the foregoing method A as an example, the value of the SIP in the first packet can be modified to "::10.1.1.2" in the second packet, and the value of the DIP in the first packet can be modified to "::10.1.2.2" in the second packet. In this way, the subsequent Spine 1 node and Leaf 2 node can receive the second packet containing the IPv6 address to achieve the transmission of the IPv4 packet in the IPv6 network.
[0183] Correspondingly, the Leaf 2 node can be used as the second communication device and adopt the reverse processing method of the foregoing method A to modify the value of the SIP in the second packet to "10.1.1.2" in the third packet and modify the value of the DIP in the second packet to "10.1.2.2" in the third packet, so that the H2 node can receive the IPv4 packet and realize the packet transmission between the H1 node and the H2 node.
[0184] As Figure 7b shown, the roles of each node can refer to the Figure 7a process shown above.
[0185] In Figure 7b the IPv4 packet sent by the H1 node (i.e., the first packet described above), the SIP is the address of the H1 node, i.e., "10.1.1.2", and the DIP is the address of the H2 node, i.e., "10.1.2.2". Based on the foregoing Figure 5In the technical solution shown, the Leaf1 node, as the first communication device, can determine the IPv6 address corresponding to the IPv4 address in the first message in step A after receiving the first message from the H1 node. Thereafter, the Leaf1 node can determine the next hop address of the IPv6 address based on the IPv6 FIB table and send the first message to the next hop address. Similarly, other nodes in the subsequent IPv6 network (if any) can also implement message forwarding through the IPv6 FIB table to achieve the transmission of IPv4 messages in the IPv6 network.
[0186] It should be noted that in Figure 7a and Figure 7b In the example, Leaf 1 and Leaf 2 nodes are connected to the same Spine node (such as the Spine 1 node shown in the figure). In actual applications, Leaf 1 and Leaf 2 nodes can be directly connected, or connected to different Spine nodes, or connected to different data center gateways (DC-GW), or connected to different data center gateways (DC-GW), or connected to tree networking or mesh networking, which is not limited here.
[0187] See also Figure 8 An embodiment of the present application provides a communication device, which can implement the functions of the communication device (i.e., the first communication device, the second communication device, or the third communication device) in the above method embodiment, and thus can also achieve the beneficial effects of the above method embodiment.
[0188] When the communication device 800 is used to implement the function of the aforementioned first communication device, the communication device includes a transceiver unit 801 and a processing unit 802; the transceiver unit 801 is used to receive a first message, and the message address of the first message includes an Internet Protocol version 4 IPv4 address; the processing unit 802 is used to determine an Internet Protocol version 6 IPv6 address based on the IPv4 address, and the IPv6 address includes a first field, and the value of the first field is the same as the value of the IPv4 address; the processing unit is used to process the first message based on the IPv6 address.
[0189] When the communication device 800 is used to implement the functions of the aforementioned second communication device, the communication device includes a transceiver unit 801 and a processing unit 802; the transceiver unit 801 is used to receive a second message, and the message address of the second message includes an IPv6 address; the IPv6 address includes a first field, and the value of the first field is the same as the value of the IPv4 address; the processing unit 802 is used to process the second message based on the IPv4 address.
[0190] When the communication device 800 is used to implement the functions of the aforementioned third communication device, the communication device includes a transceiver unit 801 and a processing unit 802; the processing unit 802 is used to obtain an IPv4 address segment corresponding to an IPv4 device; the processing unit 802 is further used to determine an IPv6 route based on the IPv4 address segment, and the route prefix of the IPv6 route includes a fifth field, and the value of the fifth field is the same as the value of the IPv4 address segment; the transceiver unit 801 is used to announce the IPv6 route, and the IPv6 route is used to send a message to the IPv4 device.
[0191] It should be noted that for the information execution process and other contents of each unit of the above communication device 800, please refer to the description in the method embodiments shown in the foregoing of this application for details, and will not be elaborated here.
[0192] Please refer to Figure 9 , an embodiment of the present application provides a communication device. The communication device 900 can implement the functions of the communication device (i.e., the first communication device, the second communication device, or the third communication device) in the above method embodiment, and thus can also achieve the beneficial effects of the above method embodiment.
[0193] Appendix Figure 9 The shown communication device 900 includes a memory 902 and at least one processor 901.
[0194] Optionally, the processor 901 implements the method in the above embodiment by reading the instructions stored in the memory 902, or the processor 901 can also implement the method in the above embodiment by the instructions stored internally. In the case where the processor 901 implements the method in the above embodiment by reading the instructions stored in the memory 902, the memory 902 stores the instructions for implementing the method provided in the above embodiment of the present application.
[0195] Optionally, at least one processor 901 is one or more CPUs, or a single-core CPU, or can also be a multi-core CPU.
[0196] Further optionally, at least one processor 901 can also be used to execute the implementation process corresponding to the processing unit 802 in the foregoing Figure 8 shown embodiment and achieve the corresponding beneficial effects, which will not be elaborated here.
[0197] The memory 902 includes, but is not limited to, RAM, ROM, EPROM, flash memory, or optical memory, etc. Instructions of the operating system are stored in the memory 902.
[0198] After the program instructions stored in the memory 902 are read by the at least one processor 901, the communication device performs the corresponding operations in the foregoing embodiments.
[0199] Optionally, Figure 9 The illustrated communication device further includes a network interface 903. The network interface 903 can be a wired interface, such as an FDDI or GE interface; the network interface 903 can also be a wireless interface. The network interface 903 is used to Figure 3 transmit and receive data in the attached
[0200] Further optionally, the network interface 903 can also be used to execute the implementation process corresponding to the transceiver unit 801 in the foregoing Figure 8 illustrated embodiments and achieve the corresponding beneficial effects, which will not be elaborated here.
[0201] It should be understood that the network interface 903 has the functions of receiving data and sending data. The function of "receiving data" and the function of "sending data" can be implemented in the same transceiver interface, or the function of "receiving data" and the function of "sending data" can be implemented in different interfaces respectively, which is not limited here. In other words, the network interface 903 can include one or more interfaces for implementing the functions of "receiving data" and "sending data".
[0202] For other functions that the communication device 900 can perform after the processor 901 reads the program instructions in the memory 902, please refer to the descriptions in the foregoing method embodiments.
[0203] Optionally, the communication device 900 further includes a bus 904. The foregoing processor 901 and memory 902 are usually connected to each other through the bus 904, or can also be connected to each other in other ways.
[0204] Optionally, the communication device 900 further includes an input / output interface 905. The input / output interface 905 is used to connect to an input device to receive relevant configuration information input by a user or other devices that can be linked with the communication device 900 through the input device. The input device includes, but is not limited to, a keyboard, a touch screen, a microphone, etc.
[0205] The communication device 900 provided in the embodiments of the present application is used to execute the methods performed by the communication devices (the first communication device or the second communication device) provided in the foregoing method embodiments and achieve the corresponding beneficial effects.
[0206] As an implementation example, the communication device 900 performs the functions of the first communication device in the foregoing embodiments; among them, the communication device 1000 performs the functions of other devices (such as IPv4 devices). The communication device 900 is used to receive a first message from the communication device 1000, and the message address of the first message includes an IPv4 address; the communication device 900 is further used to determine an IPv6 address based on the IPv4 address, and the IPv6 address includes a first field, and the value of the first field is the same as the value of the IPv4 address; the first communication device is further used to process the first message based on the IPv6 address.
[0207] As another implementation example, the communication device 900 performs the functions of the second communication device in the foregoing embodiments; among them, the communication device 1000 performs the functions of other devices (such as the first communication device). The communication device 900 is used to receive a second message from the communication device 1000, and the message address of the second message includes an IPv6 address; the IPv6 address includes a first field, and the value of the first field is the same as the value of the IPv4 address; the communication device 900 processes the second message based on the IPv4 address.
[0208] As another implementation example, the communication device 900 performs the functions of the third communication device in the foregoing embodiments; among them, the communication device 1000 performs the functions of other devices (such as the first communication device or the second communication device). The communication device 900 is used to obtain an IPv4 address segment corresponding to an IPv4 device; the communication device 900 determines an IPv6 route based on the IPv4 address segment, and the route prefix of the IPv6 route includes a fifth field, and the value of the fifth field is the same as the value of the IPv4 address segment; the communication device 900 is further used to announce the IPv6 route to the communication device 1000, and the IPv6 route is used to send a message to the IPv4 device.
[0209] Figure 9 For the specific implementation manners of the shown communication devices, reference may be made to the descriptions in the foregoing method embodiments, and details are not described herein one by one.
[0210] The embodiment of the present application further provides a communication system, which at least includes a first communication device for executing the foregoing method embodiments, or the communication system includes a first communication device and a second communication device for executing the foregoing method embodiments.
[0211] It should be understood that in this communication system, each network device may also apply other methods involved in the foregoing embodiments and achieve corresponding technical effects, which are not described herein.
[0212] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0213] As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments or perform equivalent replacements for some of the technical features. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the various embodiments of the present application.
Claims
1. A communication method, characterized in that, including: Receiving a first message, where the message address of the first message includes an Internet Protocol version 4 (IPv4) address; Determining an Internet Protocol version 6 (IPv6) address based on the IPv4 address, where the IPv6 address includes a first field, and the value of the first field is the same as the value of the IPv4 address; Processing the first message based on the IPv6 address.
2. The method according to claim 1, characterized in that, The processing the first message based on the IPv6 address includes: Generating a second message based on the first message, where the message address of the second message includes the IPv6 address; Sending the second message.
3. The method according to claim 1, characterized in that, The processing the first message based on the IPv6 address includes: Determining the next-hop address of the IPv6 address through the IPv6 Forwarding Information Base (FIB) table; Sending the first message to the next-hop address.
4. The method according to any one of claims 1 to 3, characterized in that, The IPv6 address further includes a second field, and the value of the second field is 0.
5. The method according to claim 4, characterized in that, The position of the second field in the IPv6 address is before the first field.
6. The method according to any one of claims 1 to 3, characterized in that, The IPv6 address further includes a third field, and the third field is a leading prefix.
7. The method according to claim 6, characterized in that, The position of the third field in the IPv6 address is before the first field.
8. The method according to any one of claims 1 to 3, characterized in that, The IPv6 address further includes a fourth field, and the fourth field includes a leading prefix and a mask.
9. The method according to claim 8, characterized in that, The position of the first field in the IPv6 address is between the leading prefix and the mask.
10. The method according to any one of claims 1 to 9, characterized in that, The IPv6 address further includes other fields, and the values of the other fields are pre-configured.
11. The method according to any one of claims 1 to 10, characterized in that, The IPv4 address is the address of an IPv4 device, and the method further includes: Obtaining the IPv4 address segment corresponding to the IPv4 device; Determining an IPv6 route based on the IPv4 address segment, where the route prefix of the IPv6 route includes a fifth field, and the value of the fifth field is the same as the value of the IPv4 address segment; Advertising the IPv6 route, where the IPv6 route is used to send messages to the IPv4 device.
12. The method according to claim 11, characterized in that, The determining the IPv6 route based on the IPv4 address segment includes: Adding the IPv6 route to the BGP routing table.
13. A communication method, characterized in that, including: Receiving a second message, where the message address of the second message includes an IPv6 address; The IPv6 address includes a first field, and the value of the first field is the same as the value of an IPv4 address; Processing the second message based on the IPv4 address.
14. The method according to claim 13, wherein The processing the second message based on the IPv4 address includes: Generating a third message based on the second message, where the message address of the third message includes the IPv4 address; Sending the third message.
15. The method according to claim 14, wherein The sending the third message includes: Determining the next-hop address of the IPv4 address through the IPv4 FIB table; Sending the third message to the next-hop address.
16. The method according to any one of claims 13 to 15, wherein The IPv6 address further includes a second field, and the value of the second field is 0.
17. The method according to claim 16, wherein The position of the second field in the IPv6 address is before the first field.
18. The method according to any one of claims 13 to 15, wherein The IPv6 address further includes a third field, and the third field is a leading prefix.
19. The method according to claim 18, wherein The position of the third field in the IPv6 address is before the first field.
20. The method according to any one of claims 13 to 15, wherein The IPv6 address further includes a fourth field, and the fourth field includes a leading prefix and a mask.
21. The method according to claim 20, wherein The position of the first field in the IPv6 address is between the leading prefix and the mask.
22. The method according to any one of claims 13 to 21, wherein The IPv6 address further includes other fields, and the values of the other fields are pre-configured.
23. A communication method, wherein Comprising: Obtaining an IPv4 address segment corresponding to an IPv4 device; Determining an IPv6 route based on the IPv4 address segment, where a route prefix of the IPv6 route includes a fifth field, and the value of the fifth field is the same as the value of the IPv4 address segment; Advertising the IPv6 route, where the IPv6 route is used to send a message to the IPv4 device.
24. The method according to claim 23, wherein The determining the IPv6 route based on the IPv4 address segment includes: Adding the IPv6 route to a BGP routing table.
25. The method according to claim 23 or 24, wherein The route prefix further includes a second field, and the value of the second field is 0.
26. The method according to claim 25, wherein The position of the second field in the route prefix is before the first field.
27. The method according to claim 23 or 24, wherein The route prefix further includes a third field, and the third field is a leading prefix.
28. The method according to claim 27, wherein The position of the third field in the route prefix is before the first field.
29. The method according to claim 23 or 24, whereinThe route prefix further includes a fourth field, and the fourth field includes a leading prefix and a mask.
30. The method according to claim 29, wherein, The position of the first field in the route prefix is between the leading prefix and the mask.
31. The method according to any one of claims 23 to 30, wherein, The IPv6 address further includes other fields, and the values of the other fields are pre-configured.
32. A communication device, wherein, Comprising a module for executing the method according to any one of claims 1 to 31.
33. A communication device, wherein, Comprising at least one processor and a memory coupled to the at least one processor; The memory is used for storing programs or instructions; The at least one processor is used for executing the programs or instructions to enable the communication device to implement the method according to any one of claims 1 to 31.
34. A computer-readable storage medium, wherein, Comprising programs or instructions, when the programs or instructions are run on a computer, enabling the method according to any one of claims 1 to 31 to be executed.