Method, system and storage medium for interworking ipv4 network and ipv6 network
By inserting IPv6 packet-specific processing logic into the IPv4 packet processing flow of embedded devices, the resource consumption and portability issues of IPv4 and IPv6 network interoperability are resolved, achieving lightweight IPv4 and IPv6 interoperability, which is suitable for resource-constrained embedded devices.
Patent Information
- Application Number
- CN202511438096.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-10-10
AI Technical Summary
Existing technologies consume a lot of resources and are difficult to port when enabling interoperability between IPv4 and IPv6 networks, especially in embedded devices.
By inserting specific processing logic for IPv6 packets into the IPv4 packet processing flow of embedded devices, interoperability between IPv4 and IPv6 can be achieved through lightweight modifications, leveraging the hardware characteristics of PowerPC processors and avoiding major adjustments to the system architecture.
It enables interoperability between IPv4 and IPv6, reduces resource consumption, is suitable for resource-constrained embedded devices, has strong adaptability, and does not require modification of the original business logic.
Smart Images

Figure CN120915759B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer network communication, in particular to an IPV4 network and IPV6 network intercommunication method, system and storage medium. BACKGROUND
[0002] With the rapid development of the Internet and the depletion of IPv4 address resources, the proportion of IPv6 traffic is rapidly increasing. In order to realize the coexistence and intercommunication of IPv4 and IPv6, the following two technical solutions are currently mainly adopted:
[0003] 1. Introducing NAT64: realizing the bidirectional conversion of IPv6 and IPv4 addresses through NAT64 protocol stack or special gateway. This scheme is comprehensive in function, but requires higher device resources and is complex to deploy.
[0004] 2. Operating system upgrade: realizing the compatibility of IPv4 and IPv6 by upgrading the operating system to support dual stack protocol (such as Linux). This method requires the device to support the updated operating system version, which is suitable for systems with sufficient resources.
[0005] The above two existing technologies have the following problems:
[0006] Large resource consumption: the NAT64 scheme requires a complete protocol stack or a special gateway, which increases the additional hardware and storage costs, making it difficult to implement in embedded systems.
[0007] High porting difficulty: the operating system upgrade scheme requires higher device resources, especially in embedded devices with limited storage space and existing large software, such as vxWorks systems based on PowerPC processors. SUMMARY
[0008] In view of the deficiencies of the prior art, the purpose of the present application is to provide an IPV4 network and IPV6 network intercommunication method.
[0009] In order to achieve the above purpose, the present application provides the following technical scheme:
[0010] The IPV4 network and IPV6 network intercommunication method comprises the steps of:
[0011] receiving a message and determining the type of the message;
[0012] when the message is an IPv4 message, processing it according to the original IPv4 message processing flow;
[0013] when the message is an IPv6 message, processing it according to the inserted IPv6 message processing flow, converting the IPv6 message into a virtual IPv4 message, and processing it by the original IPv4 message processing flow;
[0014] The processed IPv4 message is judged whether there is a mapping item in a static mapping table,
[0015] When there is not, the IPv4 message is directly sent;
[0016] When there is, the IPv4 message is processed by the processing flow of the inserted IPv6 message, and the IPv4 message is converted into an IPv6 message and then sent;
[0017] The specific processing of the IPv6 message includes IPv6 message receiving, IPv6 multicast and IPv6 message sending.
[0018] In the application, preferably, the IPv6 message receiving includes:
[0019] The source IPv6 address and the destination IPv6 address of the message are extracted;
[0020] The source IPv6 address and the destination IPv6 address are respectively matched with corresponding IPv4 addresses,
[0021] When the matching is successful, the IPv6 address is converted, the IPv6 address in the message header is replaced with the corresponding IPv4 address, and the checksum and the message length are recalculated.
[0022] In the application, preferably, the IPv6 message sending includes:
[0023] The source IPv4 address and the destination IPv4 address are extracted, and corresponding IPv6 addresses are searched;
[0024] When the searching is successful, the matched IPv4 address is converted, the IPv4 address in the message header is replaced with the corresponding IPv6 address, and the checksum and the message length are recalculated.
[0025] In the application, preferably, the IPv6 multicast includes:
[0026] The unicast / multicast / broadcast message is filtered through an I / G bit;
[0027] The TADDR_L, TADDR_M and TADDR_H registers are configured, and the IPv6 multicast address is added into a hash table to realize message receiving.
[0028] In the application, preferably, when the ICMPv6 message is received, the processing logic of echo request and response messages is consistent with that of TCP / UDP, and the conversion of a code field is increased.
[0029] In the application, preferably, the IPv6 message receiving further includes:
[0030] The NS message is converted into an ARP request message, and is handed over to subsequent processing;
[0031] The NA message is converted into an ARP response message, and is handed over to subsequent processing.
[0032] In the application, preferably, in IPv6 message sending, when the message type is an ICMP message, the processing logic of echo request and response messages is consistent with that of TCP / UDP, and the conversion of the code field is increased.
[0033] In the application, preferably, the IPv6 message sending further comprises:
[0034] The ARP response message is converted into an NA message, and is handed over to the sending module for processing;
[0035] The ARP request message is converted into an NS message, and is handed over to the sending module for processing.
[0036] The IPV4 network and IPV6 network intercommunication method system comprises:
[0037] A receiving module is configured to receive a message, determine the message type, and send the message to an IPv4 message processing module or an IPV6 message processing module according to the message type,
[0038] The IPv4 message processing module is configured to process IPv4 messages;
[0039] The IPV6 message processing module is in communication connection with the IPv4 message processing module, and is configured to realize the mutual conversion between IPV6 messages and IPv4 messages;
[0040] A sending module is configured to send the message to a router.
[0041] Compared with the prior art, the application has the following beneficial effects:
[0042] The method of the application does not need to additionally introduce a NAT64 module or upgrade an operating system, and can realize the intercommunication of IPv4 and IPv6 only through light-weight modification, has low resource occupation, and is suitable for resource-limited embedded devices;
[0043] The hardware characteristics of the PowerPC processor are fully utilized, major adjustment of the system architecture is avoided, and the adaptability is strong;
[0044] The original IPv4 message processing flow and application logic are retained, and the original business logic does not need to be modified to support the IPv6 network;
[0045] The application is simple and modular, and is easy to transplant to other embedded platforms. BRIEF DESCRIPTION OF DRAWINGS
[0046] Figure 1 The flowchart of the IPV4 network and IPV6 network intercommunication method of the present application. DETAILED DESCRIPTION
[0047] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description herein is for describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0049] The following terms are explained in the present application:
[0050] TCP: is a connection-oriented, reliable, byte stream-based transport layer protocol, used to ensure the reliability and order of data transmission.
[0051] UDP: provides a protocol for application programs to send messages to other programs with the least protocol mechanism. Its main feature is connectionless, and does not guarantee reliable transmission.
[0052] ICMP: is a connectionless-oriented protocol, used to transmit error report control information.
[0053] ICMPv6: Internet Control Message Protocol version 6, developed for use with IPv6.
[0054] ARP: Address Resolution Protocol, ARP (Address Resolution Protocol), is a TCP / IP protocol for obtaining physical addresses according to IP addresses.
[0055] IPV4: is a connectionless-oriented, unreliable, datagram-based network layer protocol, used to transmit datagrams from source host to destination host.
[0056] IPv6 is an abbreviation for "Internet Protocol Version 6," which is the next-generation IP protocol designed by the Internet Engineering Task Force (IETF) to replace IPv4.
[0057] TCP / IPv4: A combination of the transport protocol TCP and the network protocol IPv4.
[0058] TCP / IPv6: A combination of the transport protocol TCP and the network protocol IPv6.
[0059] UDP / IPv4: A combination of the transport protocol UDP and the network protocol IPv4.
[0060] UDP / IPv6: A combination of the transport protocol UDP and the network protocol IPv6.
[0061] NS: Neighbor Solicitation message for ICMPv6.
[0062] NA: Neighbor Advertisement message for ICMPv6.
[0063] Please see Figure 1 This invention provides a preferred embodiment of a method for interoperability between IPv4 and IPv6 networks, applicable to resource-constrained embedded devices, such as those based on the VxWorks operating system. By inserting IPv6 packet processing logic into the intermediate nodes of the network driver layer and transport layer in the original IPv4 packet processing flow of the VxWorks operating system, specific processing of IPv6 packets is achieved, thus realizing lightweight interoperability between IPv4 and IPv6 networks and solving the problem of coexistence of IPv4 and IPv6 dual protocol stacks. The processing of each IPv4 packet remains unchanged. For each IPv6 packet, a specific processing flow for IPv6 packets is inserted into the original IPv4 packet processing flow.
[0064] The specific methods include the following steps:
[0065] Receive a message and determine its type;
[0066] When the message is an IPv4 message, it is processed according to the original IPv4 message processing procedure;
[0067] When the message is an IPv6 message, it is processed according to the processing flow of the inserted IPv6 message, converting the IPv6 message into a virtual IPv4 message, and then processed by the original IPv4 message processing flow.
[0068] After processing, the IPv4 packet is checked to see if a mapping entry exists in the static mapping table.
[0069] If it does not exist, send the IPv4 packet directly;
[0070] When present, the IPv4 packet is processed by the same process as the inserted IPv6 packet, and the IPv4 packet is converted into an IPv6 packet before being sent.
[0071] The specific processing of IPv6 packets includes IPv6 packet reception, IPv6 multicast, and IPv6 packet transmission.
[0072] Specifically, utilizing the Ethernet controller integrated into the PowerPC processor, packet header type field filtering is enabled. After an Ethernet frame enters the FEC module, the controller automatically parses the Ethernet frame's type field to determine the packet type. Ethernet frames with a type field of 0800 or 0806 are identified as IPv4 packets, while those with a type field of 86dd are identified as IPv6 packets. By configuring the FEC's filtering register, VER_FILTER, IPv4 or IPv6 packets are input into different processing modules respectively, avoiding the CPU overhead of software-level traversal and judgment.
[0073] When the message is an IPv4 message, it is handled by the existing IPv4 processing chain of the vxWorks system. This includes message decapsulation, IP header verification, route lookup, transport layer distribution, and application layer delivery. There are no modifications to the original processing procedures, ensuring the continuity of the original IPv4 services and avoiding compatibility risks.
[0074] When the packet is an IPv6 packet, the specific processing flow for the inserted IPv6 packet handles IPv6 packet reception, IPv6 multicast, and IPv6 packet transmission. First, the IPv6 packet is converted to an IPv4 packet, then processed by the original IPv4 packet processing flow, and finally converted back to an IPv6 packet before being sent back to the link. This method does not require implementing a complete IPv6 protocol stack, has a small memory footprint, and is suitable for low-configuration embedded devices. Upper-layer applications still use IPv4 packets as the interaction object, requiring no modification to the original IPv4 packet processing, thus reducing the cost of upgrading and modifying the existing system.
[0075] In this embodiment, IPv6 packet reception includes:
[0076] Extract the source IPv6 address and destination IPv6 address of the packet;
[0077] Match the source IPv6 address and the destination IPv6 address with their corresponding IPv4 addresses.
[0078] When the matching is successful, the IPv6 address is converted, the IPv6 address in the message header is replaced by the corresponding IPv4 address, and the checksum and message length are recalculated.
[0079] Specifically, when it is judged that the IPv6 message, the IPv6 message is unpacked, the Ethernet header is removed, the IPv6 fixed header and the extension header are parsed, only the source IPv6 IP address, the destination IPv6 IP address, and the transport layer protocol type are reserved, then the source IPv6 address and the destination IPv6 address are extracted, the source IPv6 address and the destination IPv6 address are looked up from the IPv6-IPv4 static mapping table according to the source IPv6 address and the destination IPv6 address, the corresponding IPv4 address is acquired, when there is no corresponding IPv4 address, the corresponding IPv6 message is discarded, and a record log is made. For the TCP / UDP message, a virtual IPv4 header is constructed, the mapped IPv4 address is filled in the source IP or destination IP field, the transport layer header is unchanged, and the IPv4 header checksum is recalculated. When the ICMPv6 message is received, the processing logic of the echo request and response message is consistent with that of the TCP / UDP, and the conversion of the code field is increased. For the ICMPv6 message, when it is NS, the target IPv6 address is extracted to find the corresponding IPv4 address, an ARP request message is constructed, and is handed over to subsequent processing. When it is NA, the target IPv6 address is extracted to find the corresponding IPv4 address, an ARP response message is constructed, and is handed over to subsequent processing. When it is an echo request or response, it is converted into an ICMPv4 echo message, the code field is synchronized, and the ICMP checksum is recalculated. The converted virtual IPv4 message is processed by the original IPv4 message processing flow.
[0080] In the embodiment, the IPv6 message sending includes:
[0081] The source IP address and the destination IP address are extracted, and the corresponding IPv6 address is looked up.
[0082] When the lookup is successful, the IPv4 address matched by the lookup is converted, the IPv4 address in the message header is replaced by the corresponding IPv6 address, and the checksum and message length are recalculated.
[0083] Specifically, before sending the IPv4 message in the vxWorks system, it is judged whether the destination IPv4 address in the IPv4 message exists in the IPv4-IPv6 mapping table item, when existing, the conversion of the IPv4 address and the Ipv6 address is carried out, when not existing, the original IPv4 message flow is directly sent. When being the TCP or UDP message, the source IP address and the destination IP address, TTL, protocol type of the IPv4 are extracted, the IPv6 header is constructed, the transport layer is directly multiplexed, and the check sum message length is recalculated. When being the ICMPv6 message, the processing logic of the echo request and the reply message is consistent with the TCP or UDP, and the conversion of the code field is increased.
[0084] In the embodiment, the IPv6 multicast comprises:
[0085] The unicast, multicast and broadcast messages are filtered through the I / G bit, that is, only the Ethernet frame with the multicast flag bit I / G=1 is received, and the unicast and broadcast frames are automatically discarded, so as to reduce the software filtering pressure.
[0086] The TADDR_L, TADDR_M and TADDR_H registers are configured, and the IPv6 multicast address is added to the hash table to realize the message receiving, that is, the IPv6 multicast address to be listened to is converted into a 32-bit value through the hash algorithm and written into the register.
[0087] In the embodiment, the IPv6 message receiving further comprises:
[0088] The NS message is converted into the ARP request message and handed over to the subsequent processing.
[0089] The NA message is converted into the ARP reply message and handed over to the subsequent processing.
[0090] Specifically, for the NA message, first, the core fields of the IPv6 NA message are extracted, including the source IPv6 address, the target IPv6 address and the target link layer address option, the target IPv6 address is converted into the corresponding IPv4 address through a preset IPv6-IPv4 mapping table, the source IPv6 address is recorded after the mapping of the IPv4 address, a response message is generated according to the IPv4 ARP protocol specification, the message includes the hardware type, the protocol type, the operation code, the sending end MAC address, the sending end IP address, the target end MAC address and the target end IP address. Finally, the ARP message checksum is calculated, the constructed ARP response message is injected into the ARP processing flow of the IPv4 protocol stack, the arpInput() function is used in the vxWorks system, so that the address resolution response is completed. For the NS message, the core fields of the IPv6 NS message are extracted, including the source IPv6 address, the target IPv6 address and the target link layer address option, the source IPv6 address is converted into the corresponding IPv4 address through a preset IPv6-IPv4 mapping table, then a request message is generated according to the IPv4 ARP protocol specification, the request message includes the hardware type, the protocol type, the operation code, the sending end MAC address, the sending end IP address, the target end MAC address and the target end IP address. Finally, the ARP message checksum is calculated, the constructed ARP request message is injected into the ARP processing flow of the IPv4 protocol stack, triggering the MAC query of the target IPv4 address. The method does not need to implement a complete NDP protocol stack, converts the NS into an ARP request and converts the NA into an ARP response, avoids the complete implementation of the IPv6 neighbor discovery protocol in the embedded device, and reduces the memory consumption.
[0091] Another preferred embodiment of the application provides an IPV4 network and IPV6 network interworking method system, mainly for resource-limited embedded design of the vxWorks real-time operating system, realizing IPv4 / IPv6 interworking through light conversion, the system mainly includes:
[0092] The receiving module is used for receiving a packet, determining a packet type, and sending the packet to an IPv4 packet processing module or an IPV6 packet processing module according to the packet type. The receiving module mainly includes a PowerPC Ethernet controller, a preprocessing unit and a checking unit. The preprocessing unit analyzes an IP packet header, and guides IPv4 packets to a hardware receiving queue Q1 and IPv6 packets to a queue Q2, so as to avoid CPU overhead of software layer traversal judgment. The preprocessing unit also includes I / G bit detection, and only the packet with a target MAC being a unicast address or a preset IPv6 multicast address is put into the queue, and invalid broadcast frames are discarded automatically. The software checking unit checks CRC and a length field of the Ethernet frame, and discards the packet with CRC error or abnormal frame length, so as to reduce error processing pressure of the software layer. The checking unit reads the packet from the queue, checks an IP version field, determines the packet type, directly forwards the IPv4 packet to the IPv4 packet processing module, triggers an original vxWorks IPv4 processing flow, forwards the IPV6 packet to the IPV6 packet processing module, and carries a packet type identifier, so as to facilitate subsequent differentiated conversion.
[0093] The IPv4 packet processing module directly calls an original IPv4 packet processing flow of the vxWorks operating system to process the IPv4 packet, including removing an Ethernet header, checking a checksum, TTL and a protocol type of the IPv4 header, discarding the packet with checking failure or TTL=0; querying a kernel routing table based on an IPv4 destination address to determine a packet forwarding path; distributing the packet to a TCP processing unit, a UDP processing unit or an ICMP processing unit according to the protocol type, completing core operations such as port mapping, sequence number confirmation and ICMP echo; and delivering the processed TCP / UDP data segment to a corresponding application program, so as to ensure that original IPv4 service logic is uninterrupted.
[0094] The IPV6 message processing module is in communication connection with the IPv4 message processing module, and the communication can be realized through a kernel shared buffer area, and the mutual conversion between the IPV6 message and the IPv4 message is realized, that is, the IPV6 message is converted into a virtual IPv4 message, and the IPv4 message is converted into an IPV6 message, and the protocol adaptation of NDP and ARP is also included. An IPv6-IPv4 static mapping table is arranged in the IPV6 message processing module, the IPv6-IPv4 static mapping table is preset through a bootline parameter or a configuration file of the vxWorks, and the IPv6-IPv4 static mapping table is automatically updated when the NS, NA or ARP message is received. The IPv6-IPv4 static mapping table adopts a hash table structure, and the time consumption for the query is short. The IPV6 message is converted according to the type, wherein for the TCP and UDP messages, the IPv6 fixed header and the transport layer header are parsed, the corresponding IPv4 address is obtained by searching the mapping table, the virtual IPv4 header is constructed, the original transport layer header is multiplexed, the IPv4 header checksum is recalculated, the virtual IPv4 message is written into the shared buffer area, and the IPv4 message processing module is processed. For the ICMPv6 message conversion, when the NA is extracted, the target IPV6 message is mapped into the IPv4 message based on the IPv6-IPv4 static mapping table, the ARP response message is constructed, and is forwarded to the ARP processing unit of the IPv4 message processing module; when the NS is extracted, the target IPV6 message is mapped into the IPv4 message based on the IPv6-IPv4 static mapping table, the ARP request message is constructed, and is forwarded to the ARP processing unit of the IPv4 message processing module. When the echo request or response type is extracted, the ICMPv4 echo message is converted, the code field is synchronized, the ICMP checksum is calculated, and is forwarded to the IPv4 message processing module for subsequent processing.
[0095] The IPV6 message processing module also converts the IPv4 message into the IPV6 message, the IPV6 message processing module receives the IPv4 message sent by the IPv4 message processing module, and performs the reverse conversion. For the TCP or UDP message, a hook is inserted in front of the ipOutput() function of the IPv4 message processing module, it is judged whether the destination IPv4 exists in the mapping table of the IPv6-IPv4 static mapping table, when the mapping table exists, the corresponding IPV6 address is searched in the IPv6-IPv4 static mapping table, the IPV6 fixed header is constructed, the IPv6 transport layer checksum is calculated, and the IPV6 message is sent to the sending buffer area. For the ICMP or ARP message, when the ARP request is converted into the NS message, and when the ARP response is converted into the NA message.
[0096] The IPV6 message processing module also realizes IPv6 message multicast receiving based on the PowerPC hardware characteristics, configures the multicast address hash table register of the FEC, writes the listened IPv6 multicast address into the register through a hash algorithm, converts the IPv6 message into a virtual IPv4 message after receiving the multicast message, and sends the multicast flow to the IPv4 message processing module, thereby adapting to the industrial multicast service.
[0097] The sending module is used for sending the message to the router. The sending module is linked with the PowerPC FEC module in the original system, is responsible for encapsulating the IPv4 original message or the converted IPv6 message into an Ethernet frame and sending the Ethernet frame to the router. Specifically, when the message is an IPv4 message, the Ethernet frame is encapsulated, the type field is 0x0800, and the source MAC and the destination MAC are filled; when the message is an IPv6 message, the Ethernet frame is encapsulated, the type field is 0x86DD, and the source MAC and the destination MAC are filled. The encapsulated Ethernet frame is written into the FEC sending queue, the sending interrupt threshold of the FEC is configured, for example, the sending interrupt is triggered once every 4 frames, and the number of CPU interrupts is reduced. The sending state register of the FEC is read in real time, and if the sending fails, the retransmission mechanism is triggered, thereby ensuring the reliability of message sending.
[0098] The system of the application inserts the special processing logic of the IPv6 message into the existing IPv4 message processing flow of vxWorks, avoids the overall upgrade of the operating system, converts the IPv6 message into a virtual IPv4 message in the kernel layer, and the application layer program still processes the IPv4 message, without any modification of the original application program. The NS and NA protocols used by the IPv6 are converted into the ARP request and response used by the IPv4, thereby avoiding the independent support of the NDP and further simplifying the implementation.
[0099] In some other preferred embodiments of the application, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to make the processor execute the steps of the method described in the above embodiments.
[0100] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts of the present application that essentially contribute to the prior art or the parts of the technical solutions can be embodied in the form of software products. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in various embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0101] The above description is a detailed description of the preferred embodiments of the present application, but the embodiments are not intended to limit the scope of the patent application of the present application. Any equivalent changes or modifications made under the technical spirit of the present application should be included in the scope of the patent.
Claims
1. A method for interworking IPV4 network with IPV6 network, characterized in that, The method comprises the steps of: receiving a packet, judging the type of the packet; when the packet is an IPv4 packet, processing the packet according to the original processing flow of the IPv4 packet; when the packet is an IPv6 packet, processing the packet according to the processing flow of the inserted IPv6 packet, converting the IPv6 packet into a virtual IPv4 packet, and processing the IPv4 packet according to the original processing flow of the IPv4 packet; judging whether a mapping item exists in a static mapping table after processing the IPv4 packet, when the mapping item does not exist, directly sending the IPv4 packet; when the mapping item exists, processing the IPv4 packet according to the processing flow of the inserted IPv6 packet, converting the IPv4 packet into an IPv6 packet, and then sending the IPv6 packet; wherein the specific processing of the IPv6 packet comprises IPv6 packet receiving, IPv6 multicast, and IPv6 packet sending; the IPv6 multicast comprises: filtering unicast / multicast / broadcast packets through I / G bits; configuring TADDR_L, TADDR_M, and TADDR_H registers, and adding an IPv6 multicast address into a hash table to realize packet receiving; when receiving an ICMPv6 packet, the processing logic of echo request and echo reply packets is consistent with that of TCP / UDP, and the conversion of a code field is increased; in the IPv6 packet sending, when the type of the packet is an ICMP packet, the processing logic of echo request and echo reply packets is consistent with that of TCP / UDP, and the conversion of the code field is increased.
2. The IPV4 network and IPV6 network interworking method according to claim 1, characterized in that, the IPv6 packet receiving comprises: extracting a source IP address and a destination IP address of the packet; matching the source IP address and the destination IP address with corresponding IPv4 addresses respectively, when the matching is successful, converting the IPv6 addresses, replacing the IPv6 addresses in the packet header with the corresponding IPv4 addresses, and recalculating the checksum and the packet length.
3. The method for intercommunication between IPV4 network and IPV6 network according to claim 2, characterized in that, the IPv6 packet sending comprises: extracting a source IP address and a destination IP address, and searching for corresponding IPv6 addresses; when the searching is successful, converting the matched IPv4 addresses, replacing the IPv4 addresses in the packet header with the corresponding IPv6 addresses, and recalculating the checksum and the packet length.
4. The method of claim 1, wherein, the IPv6 packet receiving further comprises: converting an NS packet into an ARP request packet, and handing over the ARP request packet to subsequent processing; converting an NA packet into an ARP reply packet, and handing over the ARP reply packet to subsequent processing.
5. The method for interworking of IPV4 network with IPV6 network as claimed in claim 1, wherein, the IPv6 packet sending further comprises: converting an ARP reply packet into an NA packet, and handing over the NA packet to a sending module for processing; converting an ARP request packet into an NS packet, and handing over the NS packet to the sending module for processing.
6. The method and system for intercommunication between IPV4 network and IPV6 network, for realizing the method for intercommunication between IPV4 network and IPV6 network as claimed in any one of claims 1-5, characterized in that, the method comprises: a receiving module, which is configured to receive a packet, determine the type of the packet, and send the packet to an IPv4 packet processing module or an IPV6 packet processing module according to the type of the packet, an IPv4 packet processing module, which is configured to process an IPv4 packet; an IPV6 packet processing module, which is in communication connection with the IPv4 packet processing module, and is configured to realize mutual conversion between an IPV6 packet and an IPv4 packet; a sending module, which is configured to send a packet to a router.
7. A storage medium, characterized by A computer program is stored, and when executed by a processor, causes the processor to perform the steps of the method for intercommunication between an IPV4 network and an IPV6 network according to any one of claims 1-5.
Citation Information
Patent Citations
Method, system and equipment for transforming multicast packet
CN101374069A
Intelligent network card and method for supporting IPv6 through intelligent network card
CN115499408A