CN107995117B - Message forwarding method and board card - Google Patents

Message forwarding method and board card Download PDF

Info

Publication number
CN107995117B
CN107995117B CN201711331895.7A CN201711331895A CN107995117B CN 107995117 B CN107995117 B CN 107995117B CN 201711331895 A CN201711331895 A CN 201711331895A CN 107995117 B CN107995117 B CN 107995117B
Authority
CN
China
Prior art keywords
message
ipv6
ipv4
table entry
conversion table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711331895.7A
Other languages
Chinese (zh)
Other versions
CN107995117A (en
Inventor
罗刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201711331895.7A priority Critical patent/CN107995117B/en
Publication of CN107995117A publication Critical patent/CN107995117A/en
Application granted granted Critical
Publication of CN107995117B publication Critical patent/CN107995117B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/741Routing in networks with a plurality of addressing schemes, e.g. with both IPv4 and IPv6

Landscapes

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

Abstract

The present invention relates to data communication technology. The invention solves the problem that the large-scale deployment is influenced because the existing technology for converting an IPv6 message into an IPv4 message cannot span cards, and provides a message forwarding method and a board card, wherein the technical scheme can be summarized as follows: for the first message of the IPv6 message flow, if the first message needs to cross the card, the cross-card information is recorded in the connection tracking record, otherwise, a conversion table entry is generated through a forwarding rule and written in the tracking record of the corresponding data flow, the subsequent message is forwarded or processed according to the tracking record, for the first message of the IPv4 message flow, the conversion table entry is generated through the forwarding rule and written in the tracking record of the corresponding data flow, and the subsequent message is forwarded or processed according to the tracking record. The invention has the beneficial effects that: the forwarding efficiency is greatly improved, and the method is suitable for forwarding the message.

Description

Message forwarding method and board card
Technical Field
The invention relates to a data communication technology, in particular to a technology for quickly converting an IPv6 message into an IPv4 message.
Background
With the exhaustion of the public address of the IPv4, the operator can provide user access service in an IPv6 mode; however, at present, most of services on the Internet are pure IPv4 services, and in order to implement communication between an IPv6 host and an IPv4 server in an IPv4-IPv6 migration process, a NAT64 scheme may be adopted for deployment.
The NAT64 is deployed on a router, and needs to convert an IPv6 message into an IPv4 message according to a conversion rule, and in terms of a conversion manner, there are several schemes that have been implemented as follows:
1. NAT64 module implemented by open source kernel: the open source kernel only realizes the conversion from the IPv6 address to the IPv4 address, does not realize port multiplexing, only realizes the application of a personal computer level, and cannot meet the requirement of large-scale network deployment in an application range.
2. The NAT64 scheme implemented on the low end router of Meipu communication technology corporation: the low-end router searches the forwarding rule for the IPv6 message and generates a conversion table item at the FWD _ IN stage of the forwarding platform, and the subsequent messages of the same message flow are converted by matching the conversion table item, so that the processing can be accelerated. The problems of this solution are: 1) the conversion table item comprises two parts of data which are matched and processed, and can only be organized and used by the NAT64 module, so that the memory and the forwarding efficiency are wasted on the whole forwarding platform; 2) IN a cross-card scenario, the conversion table entry is fixedly generated on the board card where the FWD _ IN interface is located, and the conversion table entry cannot be found by the backhaul message on other board cards, which may cause a forwarding fault, that is, the scheme does not support cross-card, and has a certain influence on a large-scale deployment scenario.
Disclosure of Invention
The invention aims to solve the problem that the large-scale deployment is influenced because the existing technology for converting an IPv6 message into an IPv4 message cannot span cards, and provides a message forwarding method and a board card.
The invention solves the technical problem, adopts the technical scheme that the message forwarding method comprises the following steps:
when the board card receives the IPv6 message and the IPv6 message does not carry the NAT64 flag:
step A1, judging whether the IPv6 message is a first message of a corresponding data flow, if so, entering step A2, otherwise, entering step A3;
step A2, judging whether the IPv6 message needs to be transmitted across cards, if so, writing the information of the target board card into a connection tracking record established for the corresponding data stream, and sending the connection tracking record to the corresponding target board card, otherwise, generating a conversion table entry through a forwarding rule, writing the conversion table entry into the tracking record of the corresponding data stream, converting the IPv6 message into an IPv4 message according to the conversion table entry, marking an NAT64 message and continuing the forwarding processing of the IPv 4; the NAT64 mark is used for indicating that the IPv6 message is converted into the IPv4 message and is processed or the IPv4 message is converted into the IPv6 message and is processed;
step A3, judging whether cross-card transmission is needed according to the connection tracking record of the corresponding data flow, if so, sending the cross-card transmission to the corresponding target board card, otherwise, converting the IPv6 message into an IPv4 message according to the conversion table entry in the connection tracking record of the corresponding data flow, marking an NAT64 and continuing to forward the IPv 4;
when the board card receives the IPv4 message and the IPv4 message does not carry the NAT64 flag:
step B1, judging whether the IPv4 message is a first message of a corresponding data flow, if so, entering step B2, otherwise, entering step B3;
step B2, generating a conversion table entry through the forwarding rule, writing the conversion table entry into the connection tracking record of the corresponding data flow, converting the IPv4 message into an IPv6 message according to the conversion table entry, marking an NAT64 and continuing the IPv6 forwarding processing;
and step B3, converting the IPv4 message into an IPv6 message according to the conversion table entry in the connection tracking record corresponding to the data flow, marking the NAT64 and continuing the IPv6 forwarding processing.
Specifically, in step a2, the method for determining whether the IPv6 packet needs to be transmitted across cards is as follows: and extracting the destination address of the converted IPv4 message according to the destination address of the IPv6 message, searching a destination route according to the destination address of the converted IPv4 message, and judging whether cross-card transmission is needed or not according to the destination route.
Further, in step a2 and step B2, the forwarding rule is a NAT64 rule.
Specifically, in step a2, the generating of the conversion table entry through the forwarding rule is written into the connection trace record of the corresponding data stream, and the converting and processing of the IPv6 packet into the IPv4 packet according to the conversion table entry means: and obtaining the converted IPv4 quintuple according to NAT64 rules, writing the quintuple into a connection tracking record corresponding to the data flow, generating an IPv4 connection tracking record, converting the IPv6 message into an IPv4 message, and marking the IPv4 message with a NAT64 mark.
Still further, in step B2, the generating of the conversion table entry through the forwarding rule is written into the connection trace record of the corresponding data stream, and the converting the IPv4 packet into the IPv6 packet according to the conversion table entry and processing means: and obtaining the converted IPv6 quintuple according to NAT64 rules, writing the quintuple into a connection tracking record corresponding to the data flow, generating an IPv6 connection tracking record, converting the IPv4 message into an IPv6 message, and marking the IPv6 message with a NAT64 mark.
A board card for forwarding message is characterized in that the board card comprises a communication module, a conversion processing module and a judgment processing module,
the communication module is used for receiving the IPv4 message and the IPv6 message and forwarding the IPv4 message and the IPv6 message;
the conversion processing module is used for generating a conversion table entry according to the control of the judgment writing module and converting the required IPv6 message into the IPv4 message or converting the required IPv4 message into the IPv6 message through a forwarding rule, or acquiring the conversion table entry from the connection tracking record of the corresponding data stream according to the control of the judgment processing module and converting the required IPv6 message into the IPv4 message or converting the required IPv4 message into the IPv6 message;
the judgment processing module is configured to, when the communication module receives the IPv6 message and the IPv6 message does not carry the NAT64 flag: judging whether the IPv6 message is a first message of a corresponding data flow, when the message is a first message, continuously judging whether the message needs cross-card transmission, if so, writing the information of a target board card into a connection trace record established for the corresponding data flow, and forwarding the message to the corresponding target board card through a communication module, if not, controlling a conversion processing module to generate a conversion table entry through a forwarding rule to convert the IPv6 message into an IPv4 message, writing the conversion table entry into the connection trace record of the corresponding data flow, if not, reading the connection trace record of the corresponding data flow, judging whether the cross-card transmission is needed according to the connection trace record of the corresponding data flow, if so, forwarding the message to the corresponding target board card through the communication module, if not, controlling the conversion processing module to acquire the conversion table entry from the connection trace record of the corresponding data flow, and converting the IPv6 message into the IPv4 message, and marked with NAT 64; the NAT64 mark is used for indicating that the IPv6 message is converted into the IPv4 message and is processed or the IPv4 message is converted into the IPv6 message and is processed;
when the communication module receives the IPv4 message and the IPv4 message does not carry the NAT64 flag: judging whether the IPv4 message is a first message of a corresponding data flow, if so, controlling the conversion processing module to generate a conversion table entry through a forwarding rule to convert the IPv6 message into an IPv4 message, and writing the conversion table entry into a connection tracking record of the corresponding data flow, otherwise, controlling the conversion processing module to acquire the conversion table entry from the connection tracking record of the corresponding data flow to convert the IPv6 message into an IPv4 message, and marking the IPv4 message with an NAT64 mark.
Specifically, judging whether the IPv6 message needs to be transmitted across cards refers to: and extracting the destination address of the converted IPv4 message according to the destination address of the IPv6 message, searching a destination route according to the destination address of the converted IPv4 message, and judging whether cross-card transmission is needed or not according to the destination route.
Further, the forwarding rule is a NAT64 rule.
Specifically, the generating of the conversion table entry through the forwarding rule to convert the IPv6 message into the IPv4 message, and writing the conversion table entry into the connection trace record of the corresponding data stream means: and obtaining the converted IPv4 quintuple according to NAT64 rules, writing the quintuple into a connection tracking record corresponding to the data flow, generating an IPv4 connection tracking record, converting the IPv6 message into an IPv4 message, and marking the IPv4 message with a NAT64 mark.
Still further, the generating of the conversion table entry through the forwarding rule to convert the IPv6 message into an IPv4 message, and writing the conversion table entry into the connection trace record of the corresponding data stream means: and obtaining the converted IPv6 quintuple according to NAT64 rules, writing the quintuple into a connection tracking record corresponding to the data flow, generating an IPv6 connection tracking record, converting the IPv4 message into an IPv6 message, and marking the IPv6 message with a NAT64 mark.
The message forwarding method and the board card have the advantages that the message forwarding method and the board card generate the conversion table entry only when the first message of the data stream is received and record the conversion table entry in the connection tracking record corresponding to the data stream, the subsequent message of the message stream directly obtains the conversion table entry from the connection tracking record corresponding to the data stream, the forwarding efficiency is greatly improved, whether cross-card transmission exists or not is judged only in the first message of the data stream, the target board card information is recorded in the connection tracking record corresponding to the data stream, the subsequent message of the message stream does not need to judge again and search a target route, the time of route searching is saved, and meanwhile, the requirement of cross-card transmission is met.
Drawings
Fig. 1 is a flowchart of the IPv6 message received in the message forwarding method in the embodiment of the present invention, and when the IPv6 message does not carry the NAT64 flag.
Fig. 2 is a flowchart of the IPv4 message received in the message forwarding method in the embodiment of the present invention, and when the IPv4 message does not carry the NAT64 flag.
Fig. 3 is a system block diagram of a board for forwarding a packet in the embodiment of the present invention.
Fig. 4 is a system block diagram of a forwarding platform system in an embodiment of the present invention.
Detailed Description
The technical solution of the present invention is described in detail below with reference to the embodiments and the accompanying drawings.
According to the message forwarding method, when the board card receives the IPv6 message and the IPv6 message does not carry the NAT64 mark: firstly, judging whether the IPv6 message is a first message of a corresponding data stream, if so, judging whether the IPv6 message needs cross-card transmission, if so, writing the information of a target board card into a connection tracking record established by the corresponding data stream, and sends it to the corresponding destination board card, otherwise generates the conversion table entry through the forwarding rule and writes it into the connection trace record of the corresponding data stream, converting the IPv6 message into an IPv4 message according to the conversion table entry, marking an NAT64 processing completion mark and continuing IPv4 forwarding processing, if the message is not the first message of the corresponding data stream, judging whether cross-card transmission is needed according to the connection tracking record of the corresponding data stream, if so, sending the message to the corresponding target board card, otherwise, converting the IPv6 message into an IPv4 message according to the conversion table entry in the connection tracking record of the corresponding data stream, marking an NAT64 processing completion mark and continuing IPv4 forwarding processing; when the board receives the IPv4 message and the IPv4 message carries the NAT64 mark: firstly, judging whether the IPv4 message is the first message of the corresponding data flow, if so, generating a conversion table entry through a forwarding rule and writing the conversion table entry into a connection tracking record of the corresponding data flow, converting the IPv4 message into an IPv6 message according to the conversion table entry, marking an NAT64 processing completion mark and continuing IPv6 forwarding processing, otherwise, converting the IPv4 message into an IPv6 message according to the conversion table entry in the connection tracking record of the corresponding data flow, marking an NAT64 processing completion mark and continuing IPv6 forwarding processing.
The message forwarding board card comprises a communication module, a conversion processing module and a judgment processing module, wherein the communication module is used for receiving an IPv4 message and an IPv6 message and forwarding an IPv4 message and an IPv6 message; the conversion processing module is used for generating a conversion table entry according to the control of the judgment writing module and converting the required IPv6 message into the IPv4 message or converting the required IPv4 message into the IPv6 message through a forwarding rule, or acquiring the conversion table entry from the connection tracking record of the corresponding data stream according to the control of the judgment processing module and converting the required IPv6 message into the IPv4 message or converting the required IPv4 message into the IPv6 message; the judgment processing module is used for: when the communication module receives an IPv6 message and the IPv6 message does not carry NAT64 marks, firstly, whether the IPv6 message is a header message of a corresponding data stream is judged, when the IPv6 message is the header message of the corresponding data stream, whether cross-card transmission is needed or not is continuously judged, if yes, the information of a target board card is written into a connection tracking record of the corresponding data stream and is forwarded to the corresponding target board card through the communication module, if not, a conversion processing module is controlled to generate a conversion table entry through a forwarding rule to convert the IPv6 message into an IPv4 message, the conversion table entry is written into the connection tracking record of the corresponding data stream, if not, the connection tracking record of the corresponding data stream is read, whether cross-card transmission is needed or not is judged according to the connection tracking record of the corresponding data stream, if yes, the connection tracking record of the corresponding data stream is forwarded to the corresponding target through the communication module, if not, controlling the conversion processing module to acquire a conversion table entry from the connection tracking record of the corresponding data flow to convert the IPv6 message into an IPv4 message, and marking a NAT64 processing completion mark; when the communication module receives the IPv4 message and the IPv4 message does not carry the NAT64 flag: judging whether the IPv4 message is the first message of the corresponding data flow, if so, controlling the conversion processing module to generate a conversion table entry through a forwarding rule to convert the IPv6 message into an IPv4 message, and writing the conversion table entry into a connection tracking record of the corresponding data flow, otherwise, controlling the conversion processing module to acquire the conversion table entry from the connection tracking record of the corresponding data flow to convert the IPv6 message into an IPv4 message, and marking a NAT64 processing completion mark.
Examples
The message forwarding method in the embodiment of the invention comprises the following steps:
when the board receives the IPv6 message and the IPv6 message does not carry the NAT64 flag, the flowchart thereof refers to fig. 1:
and A1, judging whether the IPv6 message is a header message of a corresponding data stream, if so, entering the step A2, and otherwise, entering the step A3.
And A2, judging whether the IPv6 message needs to be transmitted across cards, if so, writing the information of the target board card into a connection tracking record established for the corresponding data stream, sending the connection tracking record to the corresponding target board card, otherwise, generating a conversion table entry through a forwarding rule, writing the conversion table entry into the connection tracking record of the corresponding data stream, converting the IPv6 message into an IPv4 message according to the conversion table entry, marking a NAT64 completion mark, and continuing the IPv4 forwarding processing. In this step, the destination board information may be written into a certain identification field of the connection trace record established for the corresponding data stream.
In this step, the method for determining whether the IPv6 message needs to be transmitted across cards may be: and extracting the destination address of the converted IPv4 message according to the destination address of the IPv6 message, searching a destination route according to the destination address of the converted IPv4 message, and judging whether cross-card transmission is needed or not according to the destination route.
And the forwarding rule is preferably an NAT64 rule, then a conversion table entry is generated by the forwarding rule and written in the connection tracking record of the corresponding data flow, and the following specific steps can be performed to convert the IPv6 message into an IPv4 message according to the conversion table entry and process the message:
and obtaining the converted IPv4 quintuple according to the NAT64 rule, writing the quintuple into a connection tracking record corresponding to the data flow, generating an IPv4 connection tracking record, converting the IPv6 message into an IPv4 message, and marking a NAT64 processing completion mark for the IPv6 message.
And A3, judging whether cross-card transmission is needed according to the connection tracking record of the corresponding data flow, if so, sending the cross-card transmission to the corresponding target board card, otherwise, converting the IPv6 message into an IPv4 message according to the conversion table entry in the connection tracking record of the corresponding data flow, marking a NAT64 processing completion mark, and continuing IPv4 forwarding processing.
When the board receives the IPv4 message and the IPv4 message carries the NAT64 flag, the flow chart thereof is shown in fig. 2:
and B1, judging whether the IPv4 message is a header message of a corresponding data stream, if so, entering the step B2, and otherwise, entering the step BA 3.
And step B2, generating a conversion table entry through the forwarding rule, writing the conversion table entry into a connection tracking record established for the corresponding data flow, converting the IPv4 message into an IPv6 message according to the conversion table entry, marking a NAT64 completion mark, and continuing the IPv6 forwarding processing.
In this step, the forwarding rule is preferably an NAT64 rule, and then a conversion table entry is generated by the forwarding rule and written into the connection trace record of the corresponding data flow, the IPv4 message is converted into an IPv6 message according to the conversion table entry, and the NAT64 completion flag is marked and the IPv6 forwarding process is continued, which may be the following specific steps:
and obtaining the converted IPv6 quintuple according to the NAT64 rule, writing the quintuple into a connection tracking record corresponding to the data flow, generating an IPv6 connection tracking record, converting the IPv4 message into an IPv6 message, and marking a NAT64 processing completion mark for the IPv4 message.
And step B3, converting the IPv4 message into an IPv6 message according to the conversion table entry in the connection tracking record of the corresponding data flow and processing the IPv6 message.
Referring to fig. 3, a system block diagram of the board for forwarding a message in the embodiment of the present invention includes a communication module, a conversion processing module, and a determination processing module.
And the communication module is used for receiving the IPv4 message and the IPv6 message and forwarding the IPv4 message and the IPv6 message.
And the conversion processing module is used for generating a conversion table entry according to the control of the judgment writing module and converting the required IPv6 message into the IPv4 message or converting the required IPv4 message into the IPv6 message through the forwarding rule, or acquiring the conversion table entry from the connection tracking record of the corresponding data stream according to the control of the judgment processing module and converting the required IPv6 message into the IPv4 message or converting the required IPv4 message into the IPv6 message.
Here, the forwarding rule is preferably a NAT64 rule, and the specific step of generating a translation table entry through the forwarding rule to translate the IPv6 message into an IPv4 message and writing the translation table entry into the connection trace record of the corresponding data flow may be: obtaining a converted IPv4 quintuple according to NAT64 rules, writing the converted IPv4 quintuple into a connection tracking record corresponding to the data flow, generating an IPv4 connection tracking record, converting the IPv6 message into an IPv4 message, and marking a NAT64 processing completion mark for the IPv6 message; similarly, the specific steps of generating a conversion table entry through the forwarding rule to convert the IPv6 message into an IPv4 message, and writing the conversion table entry into the connection trace record of the corresponding data stream may also be: and obtaining the converted IPv6 quintuple according to the NAT64 rule, writing the quintuple into a connection tracking record corresponding to the data flow, generating an IPv6 connection tracking record, converting the IPv4 message into an IPv6 message, and marking a NAT64 processing completion mark for the IPv4 message.
A judgment processing module, configured to:
when the communication module receives the IPv6 message and the IPv6 message does not carry the NAT64 flag:
judging whether the IPv6 message is the head message of the corresponding data flow, and if the IPv6 message is the head message of the corresponding data flow, continuously judging whether the cross-card transmission is needed or not, if so, writing the target board card information into a connection tracking record established by the corresponding data stream, and forwards the message to a corresponding destination board card through the communication module, if the message is not needed, the conversion processing module is controlled to generate a conversion table entry through a forwarding rule so as to convert the IPv6 message into an IPv4 message, and writes the conversion table entry into the first connection trace record of the corresponding data stream, if it is not the first message, reads the first connection trace record of the corresponding data stream, judging whether cross-card transmission is needed or not according to the head connection tracking record of the corresponding data flow, if so, forwarding the cross-card transmission to the corresponding destination board card through the communication module, and if not, controlling the conversion processing module to acquire a conversion table entry from the head connection tracking record of the corresponding data flow so as to convert the IPv6 message into an IPv4 message;
here, the specific method for determining whether the IPv6 message needs to be transmitted across cards may be: and extracting the destination address of the converted IPv4 message according to the destination address of the IPv6 message, searching a destination route according to the destination address of the converted IPv4 message, and judging whether cross-card transmission is needed or not according to the destination route.
When the communication module receives the IPv4 message and the IPv4 message does not carry the NAT64 flag:
judging whether the IPv4 message is the first message of the corresponding data flow, if so, controlling the conversion processing module to generate a conversion table entry through a forwarding rule to convert the IPv6 message into the IPv4 message, and writing the conversion table entry into a connection tracking record established for the corresponding data flow, otherwise, controlling the conversion processing module to acquire the conversion table entry from the connection tracking record of the corresponding data flow to convert the IPv6 message into the IPv4 message.
In the embodiment of the present invention, a forwarding platform system composed of the two board cards for forwarding messages, the IPv6 host and the IPv4 host is taken as an example for explanation, a system block diagram of the forwarding platform system is shown in fig. 4, where the two board cards for forwarding messages are respectively designated as a board card 1 and a board card 2, the IPv6 host is connected to the board card 1, the IPv4 host is connected to the board card 2, and the board card 1 is connected to the board card 2.
Then, according to the method or the processing mode of the board card for forwarding the message, the following steps can be obtained: the IPv6 message sent by the IPv6 host inevitably needs to be sent to the board 2 by the board 1, the IPv4 message obtained by conversion is sent to the IPv4 host by the board 2, and the IPv4 message sent by the IPv4 host is converted into the IPv6 message in the board 2 and then is sent to the IPv6 host by the board 1.
From the whole view of the forwarding platform system, the matching identification of the message is realized by connection tracking management (corresponding functions of a judgment processing module and a conversion processing module), but not by the self-matching identification of each forwarding service in the prior art, and in the embodiment of the invention, the conversion table entry of each service (message) is also recorded in the connection tracking record of the corresponding data stream.
And the cross-card function is embodied as follows: when an IPv6 message is processed, the destination address of the IPv4 message after conversion is extracted according to the destination address of the IPv6 message, a destination route is found according to the destination address of the IPv4 message after conversion, whether cross-card transmission is needed or not is judged according to the destination route, if the cross-card transmission is needed, the information of a destination board card of the route is recorded in a connection tracking record corresponding to a data stream, then the cross-card is sent to the destination board card for processing, the connection tracking record corresponding to the data stream can be regenerated on the destination board card, and the new connection tracking record on the board card is a conversion table entry, so that when the message at the IPv4 side returns, the message can be corrected into the IPv6 message through the conversion table entry and is. In the embodiment of the invention, the accelerated processing of the cross-card scene is realized by that the cross-card route is used as the connection tracking record information of the corresponding data stream to be recorded on the board card 1, and the subsequent message of the message stream can search the connection tracking record of the corresponding data stream and directly send the connection tracking record to the target board card 2, thereby saving the route searching time.

Claims (10)

1. A message forwarding method comprises the following steps:
when the board card receives the IPv6 message and the IPv6 message does not carry the NAT64 flag:
step A1, judging whether the IPv6 message is a first message of a corresponding data flow, if so, entering step A2, otherwise, entering step A3;
step A2, judging whether the IPv6 message needs to be transmitted across cards, if so, writing the information of the target board card into a connection tracking record established for the corresponding data stream, and sending the connection tracking record to the corresponding target board card, otherwise, generating a conversion table entry through a forwarding rule, writing the conversion table entry into the connection tracking record of the corresponding data stream, converting the IPv6 message into an IPv4 message according to the conversion table entry, marking an NAT64 and continuing the forwarding processing of the IPv 4; the NAT64 mark is used for indicating that the IPv6 message is converted into the IPv4 message and is processed or the IPv4 message is converted into the IPv6 message and is processed;
step A3, judging whether cross-card transmission is needed according to the connection tracking record of the corresponding data flow, if so, sending the cross-card transmission to the corresponding target board card, otherwise, converting the IPv6 message into an IPv4 message according to the conversion table entry in the connection tracking record of the corresponding data flow, marking an NAT64 and continuing to forward the IPv 4;
when the board card receives the IPv4 message and the IPv4 message does not carry the NAT64 flag:
step B1, judging whether the IPv4 message is a first message of a corresponding data flow, if so, entering step B2, otherwise, entering step B3;
step B2, generating a conversion table entry through the forwarding rule, writing the conversion table entry into the connection tracking record of the corresponding data flow, converting the IPv4 message into an IPv6 message according to the conversion table entry, marking an NAT64 and continuing the IPv6 forwarding processing;
and step B3, converting the IPv4 message into an IPv6 message according to the conversion table entry in the connection tracking record corresponding to the data flow, marking the NAT64 and continuing the IPv6 forwarding processing.
2. The message forwarding method according to claim 1, wherein in step a2, the method for determining whether the IPv6 message needs to be transmitted across cards is: and extracting the destination address of the converted IPv4 message according to the destination address of the IPv6 message, searching a destination route according to the destination address of the converted IPv4 message, and judging whether cross-card transmission is needed or not according to the destination route.
3. The message forwarding method according to claim 1 or 2, wherein in step a2 and step B2, the forwarding rule is a NAT64 rule.
4. The message forwarding method according to claim 3, wherein in step a2, the step of generating the conversion table entry according to the forwarding rule and writing the conversion table entry into the connection trace record of the corresponding data flow, and converting the IPv6 message into the IPv4 message according to the conversion table entry and processing means: and obtaining the converted IPv4 quintuple according to NAT64 rules, writing the quintuple into a connection tracking record corresponding to the data flow, generating an IPv4 connection tracking record, converting the IPv6 message into an IPv4 message, and marking the IPv4 message with a NAT64 mark.
5. The message forwarding method according to claim 3, wherein in step B2, the step of generating the conversion table entry according to the forwarding rule and writing the conversion table entry into the connection trace record of the corresponding data flow, and converting the IPv4 message into the IPv6 message according to the conversion table entry and processing means: and obtaining the converted IPv6 quintuple according to NAT64 rules, writing the quintuple into a connection tracking record corresponding to the data flow, generating an IPv6 connection tracking record, converting the IPv4 message into an IPv6 message, and marking the IPv6 message with a NAT64 mark.
6. The board card for forwarding the message is characterized by comprising a communication module, a conversion processing module and a judgment processing module,
the communication module is used for receiving the IPv4 message and the IPv6 message and forwarding the IPv4 message and the IPv6 message;
the conversion processing module is used for generating a conversion table entry according to the control of the judgment writing module and converting the required IPv6 message into the IPv4 message or converting the required IPv4 message into the IPv6 message through a forwarding rule, or acquiring the conversion table entry from the connection tracking record according to the control of the judgment processing module and converting the required IPv6 message into the IPv4 message or converting the required IPv4 message into the IPv6 message;
the judgment processing module is used for: when the communication module receives the IPv6 message and the IPv6 message does not carry the NAT64 flag: judging whether the IPv6 message is the first message of the corresponding data flow, when the IPv6 message is the first message of the corresponding data flow, continuously judging whether the IPv6 message needs to be transmitted across the card, if so, writing the information of the target board card into the connection trace record of the corresponding data flow, and transmitting the information to the corresponding target board card through the communication module, if not, controlling the conversion processing module to generate a conversion table entry through a transmission rule to convert the IPv6 message into an IPv4 message, writing the conversion table entry into the connection trace record of the corresponding data flow, if not, reading the connection trace record of the corresponding data flow, judging whether the IPv6 message needs to be transmitted across the card, if so, transmitting the IPv6 message to the corresponding target board card through the communication module, if not, controlling the conversion processing module to acquire the conversion table entry from the connection trace record of the corresponding data flow to convert the IPv6 message into the IPv4 message, and marked with NAT 64; the NAT64 mark is used for indicating that the IPv6 message is converted into the IPv4 message and is processed or the IPv4 message is converted into the IPv6 message and is processed;
when the communication module receives the IPv4 message and the IPv4 message does not carry the NAT64 flag:
judging whether the IPv4 message is the first message of the corresponding data flow, if so, controlling the conversion processing module to generate a conversion table entry through a forwarding rule to convert the IPv6 message into an IPv4 message, and writing the conversion table entry into a connection tracking record, otherwise, controlling the conversion processing module to acquire the conversion table entry from the connection tracking record to convert the IPv6 message into the IPv4 message, and marking the IPv4 message with an NAT64 mark.
7. The board card for forwarding messages according to claim 6, wherein the determination of whether the IPv6 message needs to be transmitted across cards is: and extracting the destination address of the converted IPv4 message according to the destination address of the IPv6 message, searching a destination route according to the destination address of the converted IPv4 message, and judging whether cross-card transmission is needed or not according to the destination route.
8. The message forwarding board of claim 6 or 7, wherein the forwarding rule is a NAT64 rule.
9. The board for forwarding packets according to claim 8, wherein the generating a conversion table entry through the forwarding rule to convert the IPv6 packet into an IPv4 packet, and writing the conversion table entry into the connection trace record of the corresponding data flow includes: and obtaining the converted IPv4 quintuple according to NAT64 rules, writing the quintuple into a connection tracking record corresponding to the data flow, generating an IPv4 connection tracking record, converting the IPv6 message into an IPv4 message, and marking the IPv4 message with a NAT64 mark.
10. The board for forwarding packets according to claim 8, wherein the generating a conversion table entry through the forwarding rule to convert the IPv6 packet into an IPv4 packet, and writing the conversion table entry into the connection trace record includes: and obtaining the converted IPv6 quintuple according to NAT64 rules, writing the quintuple into a connection tracking record, generating an IPv6 connection tracking record, converting the IPv4 message into an IPv6 message, and marking the IPv6 message with a NAT64 mark.
CN201711331895.7A 2017-12-13 2017-12-13 Message forwarding method and board card Active CN107995117B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711331895.7A CN107995117B (en) 2017-12-13 2017-12-13 Message forwarding method and board card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711331895.7A CN107995117B (en) 2017-12-13 2017-12-13 Message forwarding method and board card

Publications (2)

Publication Number Publication Date
CN107995117A CN107995117A (en) 2018-05-04
CN107995117B true CN107995117B (en) 2021-03-16

Family

ID=62038373

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711331895.7A Active CN107995117B (en) 2017-12-13 2017-12-13 Message forwarding method and board card

Country Status (1)

Country Link
CN (1) CN107995117B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109561019B (en) * 2018-12-03 2021-02-19 迈普通信技术股份有限公司 Method for establishing session, graceful restart communication device and storage medium
CN111787010A (en) * 2020-07-01 2020-10-16 深信服科技股份有限公司 Message processing method, device, equipment and readable storage medium
CN112039690B (en) * 2020-07-28 2023-03-24 福建星云电子股份有限公司 System data flow tracking and monitoring method and system
CN113422843A (en) * 2021-06-21 2021-09-21 浪潮云信息技术股份公司 Method for realizing NAT64

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101087296B (en) * 2006-06-08 2011-06-15 上海亿人通信终端有限公司 Method for utilizing network processor to translate the IPv4/IPv6 network protocol
JP2011151606A (en) * 2010-01-21 2011-08-04 Oki Networks Co Ltd Translator apparatus, address system conversion method, address system conversion program and name resolution server
CN103179031A (en) * 2011-12-23 2013-06-26 上海博达数据通信有限公司 Multi-service transmission and processing method based on streaming mode
CN103636182A (en) * 2011-04-11 2014-03-12 斯凯普公司 System and method for translating network addresses
CN103685032A (en) * 2013-12-09 2014-03-26 福建星网锐捷网络有限公司 Message forwarding method and network address conversion server
CN104243631A (en) * 2014-10-13 2014-12-24 北京太一星晨信息技术有限公司 Method and device for stateful conversion between IPv4 address and IPv6 address

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101087296B (en) * 2006-06-08 2011-06-15 上海亿人通信终端有限公司 Method for utilizing network processor to translate the IPv4/IPv6 network protocol
JP2011151606A (en) * 2010-01-21 2011-08-04 Oki Networks Co Ltd Translator apparatus, address system conversion method, address system conversion program and name resolution server
CN103636182A (en) * 2011-04-11 2014-03-12 斯凯普公司 System and method for translating network addresses
CN103179031A (en) * 2011-12-23 2013-06-26 上海博达数据通信有限公司 Multi-service transmission and processing method based on streaming mode
CN103685032A (en) * 2013-12-09 2014-03-26 福建星网锐捷网络有限公司 Message forwarding method and network address conversion server
CN104243631A (en) * 2014-10-13 2014-12-24 北京太一星晨信息技术有限公司 Method and device for stateful conversion between IPv4 address and IPv6 address

Also Published As

Publication number Publication date
CN107995117A (en) 2018-05-04

Similar Documents

Publication Publication Date Title
CN107995117B (en) Message forwarding method and board card
US7310351B2 (en) Method and apparatus for translating protocol
RU2005136879A (en) SOURCE ID FOR FINDING A MAC ADDRESS
CN106992915B (en) Message de-encapsulation processing and data writing method and device
US20110032952A1 (en) Two stage internet protocol header compression
US20120243521A1 (en) Gateway device
US10462052B2 (en) Method and apparatus for incremental deployment of information centric network
CN114258052B (en) Data association system, data association method, device, equipment and medium
CN102143241B (en) Access method, device and system between hosts
CN114553615A (en) Multicast message forwarding method and device
CN102629944B (en) Method and device as well as system for network acceleration
CN108667735B (en) Method and device for forwarding multicast data
CN113163024A (en) Message processing method, server and storage medium
CN115361334B (en) SD-WAN traffic identification method based on deep packet inspection technology
CN101888336B (en) Access device realizes method and the access device of TDM business relaying
CN103036789A (en) Message sending method, message sending device and network output equipment
CN114793199B (en) Message processing method, device and network equipment
KR100849494B1 (en) Apparatus and Method for IPv6 Tunneling
CN105939398B (en) IPv6 transition method and device
CN103209128A (en) Datagram and virtual circuit simultaneously supporting data forwarding method and router
CN104394081B (en) A kind of data processing method and device
CN114024898A (en) Message transmission method, device, equipment and storage medium
WO2019142327A1 (en) Relay device and relay method
CN116996439B (en) SDN-based efficient routing addressing method and system
KR101121893B1 (en) Packet forwarding method, packet forwarding device and packet transfer system including the packet forwarding device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 610041 nine Xing Xing Road 16, hi tech Zone, Sichuan, Chengdu

Patentee after: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 610041, 17 floor, maple building, 1 building, 288 Tianfu street, Chengdu, Sichuan.

Patentee before: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.