WO2016183926A1 - 一种运营商级网络地址转换的方法及装置 - Google Patents

一种运营商级网络地址转换的方法及装置 Download PDF

Info

Publication number
WO2016183926A1
WO2016183926A1 PCT/CN2015/084952 CN2015084952W WO2016183926A1 WO 2016183926 A1 WO2016183926 A1 WO 2016183926A1 CN 2015084952 W CN2015084952 W CN 2015084952W WO 2016183926 A1 WO2016183926 A1 WO 2016183926A1
Authority
WO
WIPO (PCT)
Prior art keywords
cgn
service packet
header
cgn service
encapsulated
Prior art date
Application number
PCT/CN2015/084952
Other languages
English (en)
French (fr)
Inventor
汪寅
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016183926A1 publication Critical patent/WO2016183926A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2521Translation architectures other than single NAT servers

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a carrier-class network address translation method and apparatus.
  • IPv4 Internet Protocol
  • IPv4 public network address IPv4 public network address
  • IPv4 private network address IPv4 private network address.
  • Carrier-class network address translation CGN, Carrier-Grade NAT
  • CGN Carrier-Grade NAT
  • CGN devices mainly include centralized and distributed.
  • the centralized deployment refers to attaching a stand-alone CGN device to the CGN service on the side of the backbone network inflow (CR), which requires CR to add ports to interface with CGN devices.
  • Distributed deployment refers to decentralizing CGN services to CGN services.
  • the full service router/broadband access server device provides a slot for the CGN service card from the full service router/broadband access server to complete the CGN service processing inside the device.
  • at least one device slot needs to be inserted into the CGN service board regardless of the amount of CGN traffic carried by the full-service router/broadband access server.
  • the processing rate of the existing CGN service board has reached 200G. When the CGN service volume is not large, the utilization rate of the service board is very low. However, in a distributed deployment, one device slot is required, which affects the overall device. Forwarding performance and bandwidth.
  • the purpose of the embodiments of the present invention is to provide a method and a device for performing a carrier-level network address translation, which can implement a CGN service processing function without separately inserting a CGN service card to improve device utilization and forwarding performance.
  • an embodiment of the present invention provides a carrier-level network address translation method, which is applied to a processor in a line card, and the method includes: receiving a carrier-class network forwarded by a network processor NP through a switch chip The address conversion CGN service message, wherein the CGN service message includes information required for performing the CGN; the CGN service message is converted and processed according to the information required for the CGN, and the converted CGN service message is encapsulated.
  • the encapsulated CGN service packet is sent to the NP through the switch chip, so that the NP sends the encapsulated CGN service packet.
  • the header of the CGN service packet that is received by the NP through the switch chip includes: a CPU parsing header and a first NP parsing header; and correspondingly, encapsulating the converted CGN service packet, including: after the conversion processing
  • the CGN service packet is encapsulated
  • the header of the encapsulated CGN service packet includes: a first NP parser, a first traffic management TM parsing header, and a first switch chip parsing header, where the first switch chip parsing header includes: NP The physical address, the physical address of the CPU packet sending interface, and the first virtual local area network identifier; correspondingly, the encapsulated CGN service message is sent to the NP through the switch chip, including: according to the physical address of the NP and the physical address of the CPU sending interface
  • the encapsulated CGN service packet is sent to the NP through the switch chip.
  • the conversion process of the CGN service message is performed according to the information required for the CGN, and the CGN service message is converted according to the correspondence between the different network addresses stored in advance and the information required for the CGN.
  • An embodiment of the present invention further provides a device for carrier-level network address translation, which is applied to a processor in a line card, and the device includes: a first receiving module configured to receive an operation of the network processor NP forwarding through the switch chip
  • the merchant network address translates the CGN service message, wherein the CGN service message includes information required for performing the CGN
  • the conversion module is configured to perform conversion processing on the CGN service message according to the information required for performing the CGN, and perform conversion processing.
  • the CGN service packet is encapsulated.
  • the first sending module is configured to send the encapsulated CGN service packet to the NP through the switch chip, so that the NP sends the encapsulated CGN service packet.
  • the header of the CGN service packet forwarded by the NP that is received by the first receiving module by the switching chip includes: a CPU parsing header and a first NP parsing header; and correspondingly, the converting module includes: a encapsulating unit, configured to be processed after the conversion
  • the CGN service packet is encapsulated
  • the header of the encapsulated CGN service packet includes: a first NP resolution header, a first traffic management TM resolution header, and a first switch chip parsing header, where the first switch chip parsing header includes: NP
  • the first sending module includes: a first sending unit, configured to be encapsulated according to the physical address of the NP and the physical address of the CPU sending interface
  • the CGN service packet is sent to the NP through the switch chip.
  • the conversion module includes: a conversion unit configured to perform conversion processing on the CGN service message according to the correspondence between the different network addresses stored in advance and the information required for performing the CGN.
  • Embodiments of the present invention also provide a processor in a line card, including the above-described carrier-level network address translation device.
  • An embodiment of the present invention further provides a carrier-level network address translation method, which is applied to a network processor in a line card, the method comprising: receiving a carrier-level network address translation CGN service message; and receiving the CGN
  • the service packet is encapsulated, and the encapsulated CGN service packet is processed, and the processed CGN service packet is forwarded to the CPU through the switch chip, so that the CPU converts the processed CGN service packet and passes the CPU.
  • Encapsulating the converted CGN service packet receiving the encapsulated CGN service packet sent by the CPU through the switch chip, and transmitting the encapsulated CGN service packet.
  • the header of the encapsulated CGN service packet includes: a second traffic management TM parsing header, a first network processor NP parsing header, a second switching chip parsing header, and a CPU parsing And the second NP parsing header, wherein the second TM parsing header includes: TM ingress queue information, and correspondingly, processing the encapsulated CGN service packet, specifically: sending the encapsulated CGN service packet to the traffic management
  • the TM and the switch board operate the encapsulated service packet according to the TM ingress queue information; receive the CGN service packet returned by the TM and the switch board after the TM is returned; and parse the CGN carried in the second NP parser
  • the service flow identifier confirms that the CGN service packet after the operation of the TM and the switch board is the CGN service traffic, and processes the CGN service packet after the operation of the TM and the switch board.
  • the header of the processed CGN service packet includes: a first NP resolution header, a second switch chip parsing header, and a CPU parsing header, wherein the second switch chip parsing header comprises: a physical address of the NP, a physical address of the CPU receiving interface, and a second virtual
  • the processed CGN service message is forwarded to the CPU through the switch chip, including: processing the processed chip according to the physical address of the NP, the physical address of the CPU receiving interface, and the second virtual local area network identifier.
  • the CGN service packet is forwarded to the CPU.
  • the encapsulated CGN service packet header sent by the receiving CPU through the switch chip includes: a first NP parser, a first traffic management TM parsing header, and a first switch chip parsing header, where the first switch chip parsing header includes: NP The physical address, the physical address of the CPU packet sending interface, and the first virtual local area network identifier; correspondingly, sending the encapsulated CGN service packet, specifically: parsing the first virtual local area network identifier in the parsing header of the first switching chip, Identifying the encapsulated CGN service packet as the service packet after the CGN; removing the first switch chip parsing header in the encapsulated CGN service packet, and removing the CGN service packet after the first switch chip parsing header Sending to the TM, the TM and the switch board operate on the CGN service packet after the first switch chip parsing header is removed; receive the CGN service packet returned by the TM and the switch board after the TM is returned, and according to the first NP par
  • An embodiment of the present invention further provides a device for carrier-level network address translation, which is applied to a network processor in a line card, the device comprising: a second receiving module, configured to receive a carrier-level network address translation CGN service report
  • the encapsulation module is configured to encapsulate the received CGN service packet, and process the encapsulated CGN service packet, and forward the processed CGN service packet to the CPU through the switch chip, so that the CPU passes the packet.
  • the processed CGN service packet is converted, and the converted CGN service packet is processed by the CPU.
  • the third receiving module is configured to receive the encapsulated CGN service packet sent by the CPU through the switch chip, and send the encapsulated CGN service packet.
  • the header of the CGN service packet encapsulated by the encapsulating module includes: a second traffic management TM parsing header, a first network processor NP parsing header, a second switching chip parsing header, a CPU parsing header, and a second NP parsing header.
  • the second TM parsing header includes: TM ingress queue information.
  • the encapsulating module includes: a second sending unit, configured to send the encapsulated CGN service packet to the traffic management TM, so that the TM and the switching board are configured according to the TM ingress queue. The information is used to process the encapsulated service packet.
  • the first receiving unit is configured to receive the CGN service packet returned by the TM and the switch board after the TM is returned.
  • the first parsing unit is configured to parse the second NP parser. Carrying the CGN service flow identifier, confirming that the CGN service packet after the operation of the TM and the switch board is the CGN service traffic, and processing the CGN service packet after the operation of the TM and the switch board, and processing the processed CGN service packet
  • the header includes: a first NP resolution header, a second switch chip parsing header, and a CPU parsing header, wherein the second switch chip parsing header includes: a physical address of the NP, and a substance of the CPU receiving interface
  • the address and the second virtual local area network identifier; correspondingly, the encapsulating module comprises: a forwarding unit, configured to process the processed CGN service packet by using the switching chip according to the physical address of the NP, the physical address of the CPU receiving interface, and the second virtual local area network identifier The text is forwarded to the CPU.
  • the encapsulated CGN service packet header sent by the CPU received by the third receiving module by using the switch chip includes: a first NP resolution header, a first traffic management TM resolution header, and a first switch chip parsing header, where the first switch chip
  • the parsing header includes: a physical address of the NP, a physical address of the CPU packet sending interface, and a first virtual local area network identifier.
  • the third receiving module includes: a second parsing unit configured to parse the first in the first switching chip parsing header
  • the virtual local area network identifier identifies that the encapsulated CGN service packet is a service packet after the CGN
  • the removing unit is configured to remove the first switch chip parsing header in the encapsulated CGN service packet, and remove the first exchange
  • the CGN service packet sent by the chip parsing header is sent to the TM, so that the TM and the switch board operate on the CGN service packet after the first switch chip parsing header is removed
  • the second receiving unit is configured to receive the TM returned TM and exchange.
  • Embodiments of the present invention also provide a network processor in a line card, including the above-described carrier-level network address translation device.
  • Embodiments of the present invention also provide a line card including the processor in the line card described above and the network processor in the line card described above.
  • the processor in the line card after receiving the CGN service message forwarded by the NP through the switch chip, receives the CGN service message according to the information required for the CGN in the CGN service message.
  • the conversion process is performed, and after the conversion, the converted CGN service message is encapsulated, and then the encapsulated CGN service message is sent to the NP through the switch chip, so that the NP is converted and packaged by the processor.
  • the CGN service message is sent out, that is, the core resource of the line card CPU is allocated reasonably, thereby virtualizing the CGN board, and implementing the CGN function by the processing resources of the line card CPU, so that the CGN service board is not inserted separately.
  • the CGN service processing function is implemented to improve device utilization and forwarding performance.
  • FIG. 1 is a flowchart of a method for carrier-class network address translation of a processor applied to a line card according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a processing path inside a line card before a CGN service packet is converted according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a processing path inside a line card after a CGN service packet is converted according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of an apparatus for carrier-class network address translation of a processor applied to a line card according to an embodiment of the present invention
  • FIG. 5 is a flowchart of a method for carrier-class network address translation of a network processor applied to a line card according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of an apparatus for carrier-class network address translation of a network processor applied to a line card according to an embodiment of the present invention.
  • the present invention provides a method for implementing carrier-level network address translation in the prior art that the CGN service processing function affects the utilization and forwarding performance of the full service router and the broadband access server device.
  • the device can implement the CGN service processing function without separately inserting the CGN service card to improve device utilization and forwarding performance.
  • an embodiment of the present invention provides a method for carrier-level network address translation, which is applied to a processor in a line card, and the method includes:
  • Step 11 The receiving network processor NP converts the CGN service message by using a carrier-grade network address forwarded by the switch chip, where the CGN service message includes information required for performing CGN.
  • Step 12 Perform conversion processing on the CGN service packet according to the information required for the CGN, and encapsulate the converted CGN service packet.
  • Step 13 The encapsulated CGN service packet is sent to the NP through the switch chip, so that the NP sends the encapsulated CGN service packet.
  • the processor CPU
  • the CGN service processing function is implemented on the premise of accessing the server device's utilization and forwarding performance.
  • the header of the CGN service packet forwarded by the CPU through the switch chip in step 11 includes: a CPU parsing header (SPH) and a first NP parsing header (NPH1), wherein the CPU parsing header includes performing The information required by the CGN and the egress queue information obtained after the NP queries the routing table.
  • the first NP parsing header includes the egress encapsulation information of the CGN service packet.
  • the specific step of converting the CGN service packet in the foregoing step 12 is: according to the correspondence between different network addresses stored in advance and the information required for performing CGN, the CGN The service message is converted.
  • the information required for performing the CGN described above includes content (for example, IP and port) to be converted.
  • content for example, IP and port
  • the corresponding relationship between the different network addresses is pre-stored in the CPU. Therefore, when the CGN service packet is received, the content to be converted is converted according to the correspondence between the different network addresses.
  • the step of encapsulating the converted CGN service packet in the step 12 is specifically: encapsulating the converted CGN service packet, as shown in FIG. 3
  • the header of the encapsulated CGN service packet includes: a first NP resolution header (NPH1), and a first traffic management The TM parsing header (TMH1) and the first switch chip parsing header (ETH1), wherein the first traffic management TM parsing header is obtained from the CPU parsing header, and includes the TM egress queue information, where the first switch chip parsing header includes: The physical address of the NP, the physical address of the CPU packet interface, and the first virtual local area network identifier.
  • the specific step of the step 13 in the first embodiment is: sending the encapsulated CGN service packet to the NP through the switch chip according to the physical address of the NP and the physical address of the CPU sending interface.
  • an embodiment of the present invention further provides a device for carrier-level network address translation, which is applied to a processor in a line card, and the device includes:
  • the first receiving module 41 is configured to receive a carrier-level network address translation CGN service message forwarded by the network processor NP through the switch chip, where the CGN service message includes information required for performing CGN;
  • the conversion module 42 is configured to perform conversion processing on the CGN service packet according to the information required for performing the CGN, and encapsulate the converted CGN service packet;
  • the first sending module 43 is configured to send the encapsulated CGN service packet to the NP through the switch chip, so that the NP sends the encapsulated CGN service packet.
  • the header of the CGN service packet forwarded by the NP received by the first receiving module 41 through the switch chip includes: a CPU parsing header and a first NP parsing header;
  • the conversion module 42 includes:
  • the encapsulation unit is configured to encapsulate the converted CGN service packet, and the encapsulated CGN service packet header includes: a first NP resolution header, a first traffic management TM resolution header, and a first switch chip parsing header.
  • the first switch chip parsing header includes: a physical address of the NP, a physical address of the CPU packet sending interface, and a first virtual local area network identifier;
  • the first sending module 43 includes:
  • the first sending unit is configured to send the encapsulated CGN service packet to the NP through the switch chip according to the physical address of the NP and the physical address of the CPU sending interface.
  • the conversion module 42 includes:
  • the converting unit is configured to perform conversion processing on the CGN service message according to the correspondence between the different network addresses stored in advance and the information required for performing the CGN.
  • the apparatus for carrier-class network address translation applied to the processor in the line card provided by the embodiment of the present invention is a device applying the method of the carrier-level network address translation applied to the processor in the line card. That is, all of the embodiments of the above methods are applicable to the device, and both achieve the same or similar benefits.
  • Embodiments of the present invention also provide a processor in a line card, including the above-described apparatus for carrier-grade network address translation applied to a processor in a line card.
  • an embodiment of the present invention further provides a method for carrier-level network address translation, which is applied to a network processor in a line card, and the method includes:
  • Step 51 Receive a carrier-level network address translation CGN service packet.
  • Step 52 Encapsulate the received CGN service packet, and process the encapsulated CGN service packet, and forward the processed CGN service packet to the CPU through the switch chip, so that the CPU processes the processed CGN service.
  • the packet is converted, and the converted CGN service packet is encapsulated by the CPU;
  • Step 53 Receive the encapsulated CGN service packet sent by the CPU through the switch chip, and send the encapsulated CGN service packet.
  • the NP determines whether the received service packet is a CGN service packet. After receiving the CGN service packet, the NP performs the CGN service packet.
  • the header of the encapsulated CGN service packet includes: a second traffic management TM parsing header (TMH2), a first network processor NP parsing header (NPH1), and a second switching chip parsing header (ETH2) a CPU parsing header (SPH) and a second NP parsing header (NPH2), wherein the second TM parsing header includes: TM ingress queue information, and the second switch chip parsing header includes: a physical address of the NP, and a physicality of the CPU receiving interface
  • the address and the second virtual local area network identifier, and the second NP resolution header includes: a CGN service flow identifier.
  • the encapsulated CGN service packet is processed.
  • the processing process specifically includes: the NP sends the encapsulated CGN service packet to the TM, as shown in FIG. 2, the TM sends the CGN service packet to the TM ingress queue according to the TM ingress queue information, and strips the second TM parsing header, at this time, CGN service packets enter the switch board, and the switch board will be based on the TM entry team.
  • the mapping between the column and the egress queue sends the CGN service packet to the TM egress queue. At this time, the CGN service packet enters the TM.
  • the TM returns it to the NP.
  • the NP identifies the CGN service flow identifier carried in the second NP resolution header, and identifies the CGN service packet as the CGN service traffic, and strips the second NP.
  • the header is parsed, and the CGN service packet after the second NP parser is stripped is sent to the switch chip.
  • the header of the CGN service packet at this time includes: a first NP parser header, a second switch chip parsing header, and a CPU parsing header.
  • the switch chip forwards the processed CGN service packet to the CPU through the switch chip according to the physical address of the NP, the physical address of the CPU receiving interface, and the second virtual local area network identifier.
  • the CPU converts the CGN service packet according to the information required for the CGN in the CPU parsing header, and encapsulates the converted CGN service packet. deal with.
  • the header of the CGN service packet encapsulated by the CPU includes a first NP resolution header, a first traffic management TM resolution header, and a first switch chip parsing header.
  • the CPU sends the encapsulated CGN service packet to the switch chip.
  • the switch chip sends the CGN service packet encapsulated by the CPU to the NP according to the information in the parsing header of the first switch chip.
  • the NP After receiving the CGN service packet encapsulated by the CPU, the NP parses the first virtual local area network identifier in the parsing header of the first switching chip, and identifies that the CGN service packet is a service packet after the CGN, and then strips the service packet.
  • the first switch chip parsing header is directly transparent.
  • the CGN service packet that is to be removed from the first switch chip parsing header is sent to the TM, so that the TM sends the CGN service packet to the TM ingress queue according to the egress queue information in the first traffic management TM parsing header, and strips the A traffic management TM parsing header, in which the CGN service packet enters the switch board, so that the switch board sends the CGN service packet to the TM egress queue according to the mapping relationship between the TM ingress queue and the egress queue, and the CGN service packet enters the TM at this time.
  • the TM performs traffic management and control on the CGN service packet, and returns the CGN service packet to the NP.
  • the NP After receiving the CGN service packet returned by the TM, the NP encapsulates the CGN service packet returned by the TM according to the egress encapsulation information of the CGN service packet carried in the first NP resolution header, and finally encapsulates the encapsulated CGN.
  • the service message is sent out.
  • the line card of the full service router/broadband access server device is taken as an example to describe the CGN service packet from the access device (full service router/broadband connection).
  • the access device full service router/broadband connection
  • the server to the specific process of the converted device (full service router / broadband access server).
  • the uplink NP microcode sequentially encapsulates the second traffic management TM resolution header (TMH2) and the first network.
  • TMH2 the second traffic management TM resolution header
  • the CGN service packet enters the uplink TM, and the uplink TM sends the CGN service packet to the ingress queue according to the ingress queue information carried in the TMH2, and strips the TMH2;
  • the packet enters the switch board, and the switch board sends the CGN service packet to the downlink TM queue (that is, the egress queue) according to the mapping relationship between the ingress queue and the egress queue.
  • the switch board sends the CGN service packet to the downlink TM queue (that is, the egress queue) according to the mapping relationship between the ingress queue and the egress queue.
  • the CGN service packet enters the downlink TM, and after the downlink TM completes the traffic management and control, the CGN service packet is sent to the downlink NP;
  • the CGN service packet enters the downlink NP.
  • the downlink NP identifies the CGN service packet as the CGN service traffic, strips the NPH2, and sends the CGN service packet to the control plane (that is, the switch chip and the processing).
  • the control plane that is, the switch chip and the processing.
  • the internal header encapsulation structure of the CGN service packet is ETH2+SPH+NPH1;
  • the CGN service packet is sent to the control plane switch chip, and the switch chip forwards the CGN service packet to the CPU network port according to the information in the ETH2.
  • the CGN service packet enters the CPU, and after the CPU receiving process is processed, the CGN service packet is sent to the CGN service processing process.
  • the internal header encapsulation structure of the packet is SPH+NPH1; the CGN processing process performs conversion processing on the CGN service packet according to the SPH (in which, for the multi-core CPU, one or more CPU core resources may be occupied in an exclusive exclusive manner to improve the CGN process.
  • SPH in which, for the multi-core CPU, one or more CPU core resources may be occupied in an exclusive exclusive manner to improve the CGN process.
  • the processing efficiency encapsulates ETH1 and TMH1, wherein the information included in ETH1 and TMH1 has been described in detail above, and will not be described herein;
  • the C100 service packet carrying the first NP parser (NPH1), the first traffic management TM parser (TMH1), and the first switch chip parsing header (ETH1) is encapsulated by the CPU. Send to the switch chip, so that the switch chip forwards according to ETH1;
  • the CGN service packet enters the uplink NP, and after the uplink NP resolves the ETH1, it is identified that the CGN service packet is a CGN service packet after the CGN, and therefore the ETH1 is directly transparently transmitted;
  • the CGN service packet enters the uplink TM, and the uplink TM chip sends the CGN service packet to the ingress queue according to the information in the TMH1, and strips the TMH1;
  • the CGN service packet enters the switch board.
  • the switch board sends the CGN service packet to the downlink TM queue (that is, the egress queue) according to the mapping relationship between the ingress queue and the egress queue.
  • the CGN service packet enters the downlink TM, and after the downlink TM completes the traffic management and control, the CGN service packet is sent to the downlink NP;
  • the CGN service packet enters the downlink NP, and the downlink NP completes the egress encapsulation of the CGN service packet according to the information carried by the NPH1, and finally the CGN service packet is sent out from the NP network side out port.
  • the embodiment of the present invention further provides a device for carrier-level network address translation, which is applied to a network processor in a line card, and the device includes:
  • the second receiving module 61 is configured to receive a carrier-level network address translation CGN service packet.
  • the encapsulating module 62 is configured to encapsulate the received CGN service packet, process the encapsulated CGN service packet, and forward the processed CGN service packet to the CPU through the switch chip, so that the CPU pair is processed.
  • the CGN service packet is converted, and the converted CGN service packet is encapsulated by the CPU;
  • the third receiving module 63 is configured to receive the encapsulated CGN service packet sent by the CPU through the switch chip, and send the encapsulated CGN service packet.
  • the header of the CGN service packet encapsulated by the encapsulating module 62 includes: a second traffic management TM parsing header, a first network processor NP parsing header, a second switching chip parsing header, a CPU parsing header, and a second NP parsing header.
  • the second TM parsing header includes: TM ingress queue information,
  • the package module 62 includes:
  • the second sending unit is configured to send the encapsulated CGN service packet to the traffic management TM, so that the TM and the switch board operate the encapsulated service packet according to the TM ingress queue information;
  • a first receiving unit configured to receive a CGN service message returned by the TM and the switch board after being returned by the TM;
  • the first parsing unit is configured to analyze the CGN service flow identifier carried in the second NP parser, and confirm that the CGN service packet after the operation of the TM and the switch board is the CGN service traffic, and after the operation of the TM and the switch board
  • the CGN service packet is processed, and the header of the processed CGN service packet includes: a first NP solution a header, a second switch chip parsing header, and a CPU parsing header, wherein the second switch chip parsing header comprises: a physical address of the NP, a physical address of the CPU receiving interface, and a second virtual local area network identifier;
  • the package module 62 includes:
  • the forwarding unit is configured to forward the processed CGN service packet to the CPU through the switch chip according to the physical address of the NP, the physical address of the CPU receiving interface, and the second virtual local area network identifier.
  • the encapsulated CGN service packet header sent by the CPU received by the third receiving module 63 through the switch chip includes: a first NP resolution header, a first traffic management TM resolution header, and a first switch chip parsing header, where the first exchange
  • the chip parsing header includes: a physical address of the NP, a physical address of the CPU packet sending interface, and a first virtual local area network identifier;
  • the third receiving module 63 includes:
  • the second parsing unit is configured to: after parsing the first virtual local area network identifier in the first switch chip parsing header, identify that the encapsulated CGN service packet is a service packet after passing the CGN;
  • the removing unit is configured to remove the first switching chip parsing header in the encapsulated CGN service packet, and send the CGN service packet after the first switching chip parsing header is removed to the TM, so that the TM and the switch board pair are removed first.
  • the CGN service packet after the chip is parsed by the chip is operated;
  • the second receiving unit is configured to receive the CGN service message returned by the TM and the switching board after the TM, and according to the egress encapsulation information of the CGN service message carried in the first NP parsing header, the CGN service report returned by the TM Encapsulation
  • the third sending unit is configured to send the encapsulated CGN service packet.
  • the apparatus for carrier-class network address translation applied to the network processor in the line card provided by the embodiment of the present invention is a method for applying the carrier-level network address translation applied to the network processor in the line card.
  • the apparatus i.e., all of the embodiments of the above methods, are applicable to the apparatus and all achieve the same or similar benefits.
  • Embodiments of the present invention also provide a network processor in a line card, including the apparatus for carrier-grade network address translation applied to a network processor in a line card.
  • Embodiments of the present invention also provide a line card including the processor in the line card described above and the network processor in the line card described above.
  • the CGN service processing function can be implemented on the premise of improving the utilization and forwarding performance of the full service router and the broadband access server device.

Landscapes

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

Abstract

本发明提供了一种运营商级网络地址转换的方法及装置,其中该方法包括:接收网络处理器NP通过交换芯片转发的运营商级网络地址转换CGN业务报文,其中CGN业务报文包括进行CGN所需要的信息;根据进行CGN所需要的信息,对CGN业务报文进行转换处理,并对经过转换处理后的CGN业务报文进行封装;将经过封装处理的CGN业务报文通过交换芯片发送给NP,使NP将经过封装的CGN业务报文发送出去。本发明的实施例能在提高全业务路由器和宽带接入服务器设备的利用率和转发性能的前提下,实现CGN业务处理功能。

Description

一种运营商级网络地址转换的方法及装置 技术领域
本发明涉及通信技术领域,特别涉及一种运营商级网络地址转换的方法及装置。
背景技术
在互联网协议的第四版(IPv4)向互联网协议的第六版(IPv6)过渡阶段,网络同时存在IPv6地址、IPv4公网地址和IPv4私网地址三个地址族。运营商级网络地址转换(CGN,Carrier-Grade NAT)作为运营商级NAT转换技术,以其大容量、高稳定、高可靠性的特点,为三种地址族的互联互通提供了解决方案,从而最终实现IPv4到IPv6的平滑过渡。
目前,从部署方式来看,CGN设备主要包含集中式和分布式两种。其中集中式部署是指在骨干网流入口(CR)旁挂接独立式CGN设备用于单独处理CGN业务,导致需要CR增加端口以和CGN设备对接;分布式部署是指将CGN业务处理下放给全业务路由器/宽带接入服务器设备,由全业务路由器/宽带接入服务器提供槽位给CGN业务板卡,在设备内部完成CGN业务处理。对于分布式部署,无论全业务路由器/宽带接入服务器承载的CGN业务量有多大,都需至少提供一个设备槽位用于插CGN业务板。现有的CGN业务板的处理速率已经达到200G,在CGN业务量并不大时,业务板的利用率很低,然而在分布式部署中还需要占用一个设备槽位,因此会影响设备整体的转发性能和带宽。
发明内容
本发明实施例的目的在于提供一种运营商级网络地址转换的方法及装置,能够在不单独插CGN业务板卡的情况下实现CGN业务处理功能,以提高设备利用率及转发性能。
为了达到上述目的,本发明的实施例提供了一种运营商级网络地址转换的方法,应用于线卡中的处理器,该方法包括:接收网络处理器NP通过交换芯片转发的运营商级网络地址转换CGN业务报文,其中CGN业务报文包括进行CGN所需要的信息;根据进行CGN所需要的信息,对CGN业务报文进行转换处理,并对经过转换处理后的CGN业务报文进行封装;将经过封装处理的CGN业务报文通过交换芯片发送给NP,使NP将经过封装的CGN业务报文发送出去。
其中,接收NP通过交换芯片转发的CGN业务报文的报头包括:CPU解析头和第一NP解析头;相应地,对经过转换处理后的CGN业务报文进行封装,包括:对经过转换处理后的CGN业务报文进行封装,封装后的CGN业务报文的报头包括:第一NP解析头、第一流量管理TM解析头以及第一交换芯片解析头,其中第一交换芯片解析头包括:NP的物理地址、CPU发包接口的物理地址和第一虚拟局域网标识;相应地,将经过封装处理的CGN业务报文通过交换芯片发送给NP,包括:根据NP的物理地址和CPU发包接口的物理地址,将经过封装处理的CGN业务报文通过交换芯片发送给NP。
其中,根据进行CGN所需要的信息,对CGN业务报文进行转换处理,包括:根据预先存储的不同网络地址之间的对应关系和进行CGN所需要的信息,对CGN业务报文进行转换处理。
本发明的实施例还提供了一种运营商级网络地址转换的装置,应用于线卡中的处理器,该装置包括:第一接收模块,设置为接收网络处理器NP通过交换芯片转发的运营商级网络地址转换CGN业务报文,其中CGN业务报文包括进行CGN所需要的信息;转换模块,设置为根据进行CGN所需要的信息,对CGN业务报文进行转换处理,并对经过转换处理后的CGN业务报文进行封装;第一发送模块,设置为将经过封装处理的CGN业务报文通过交换芯片发送给NP,使NP将经过封装的CGN业务报文发送出去。
其中,第一接收模块接收的NP通过交换芯片转发的CGN业务报文的报头包括:CPU解析头和第一NP解析头;相应地,转换模块包括:封装单元,设置为对经过转换处理后的CGN业务报文进行封装,封装后的CGN业务报文的报头包括:第一NP解析头、第一流量管理TM解析头以及第一交换芯片解析头,其中第一交换芯片解析头包括:NP的物理地址、CPU发包接口的物理地址和第一虚拟局域网标识;相应地,第一发送模块包括:第一发送单元,设置为根据NP的物理地址和CPU发包接口的物理地址,将经过封装处理的CGN业务报文通过交换芯片发送给NP。
其中,转换模块包括:转换单元,设置为根据预先存储的不同网络地址之间的对应关系和进行CGN所需要的信息,对CGN业务报文进行转换处理。
本发明的实施例还提供了一种线卡中的处理器,包括上述的运营商级网络地址转换的装置。
本发明的实施例还提供了一种运营商级网络地址转换的方法,应用于线卡中的网络处理器,该方法包括:接收运营商级网络地址转换CGN业务报文;对所接收的CGN 业务报文进行封装,并对封装后的CGN业务报文进行处理,并通过交换芯片将经过处理的CGN业务报文转发给CPU,使CPU对经过处理的CGN业务报文进行转换,并通过CPU对转换后的CGN业务报文进行封装;接收CPU通过交换芯片发送的经过封装的CGN业务报文,并将经过封装的CGN业务报文发送出去。
其中,对所接收的CGN业务报文进行封装,封装后的CGN业务报文的报头包括:第二流量管理TM解析头、第一网络处理器NP解析头、第二交换芯片解析头、CPU解析头以及第二NP解析头,其中第二TM解析头包括:TM入口队列信息,相应地,对封装后的CGN业务报文进行处理,具体包括:将经过封装的CGN业务报文发送给流量管理TM,使TM和交换板根据TM入口队列信息对经过封装的业务报文进行操作;接收TM返回的经过TM和交换板操作后的CGN业务报文;通过解析第二NP解析头中携带的CGN业务流标识,确认经过TM和交换板操作后的CGN业务报文为CGN业务流量,并对经过TM和交换板操作后的CGN业务报文进行处理,处理后的CGN业务报文的报头包括:第一NP解析头、第二交换芯片解析头以及CPU解析头,其中第二交换芯片解析头包括:NP的物理地址、CPU收包接口的物理地址以及第二虚拟局域网标识;相应地,通过交换芯片将经过处理的CGN业务报文转发给CPU,包括:根据NP的物理地址、CPU收包接口的物理地址以及第二虚拟局域网标识,通过交换芯片将经过处理的CGN业务报文转发给CPU。
其中,接收CPU通过交换芯片发送的经过封装的CGN业务报文报头包括:第一NP解析头、第一流量管理TM解析头以及第一交换芯片解析头,其中第一交换芯片解析头包括:NP的物理地址、CPU发包接口的物理地址和第一虚拟局域网标识;相应地,将经过封装的CGN业务报文发送出去,具体包括:通过解析第一交换芯片解析头中的第一虚拟局域网标识,识别出经过封装的CGN业务报文为经过CGN之后的业务报文;去除经过封装的CGN业务报文中的第一交换芯片解析头,并将去除第一交换芯片解析头后的CGN业务报文发送给TM,使TM和交换板对去除第一交换芯片解析头后的CGN业务报文进行操作;接收TM返回的经过TM和交换板操作后的CGN业务报文,并根据第一NP解析头中携带的CGN业务报文的出口封装信息,对TM返回的CGN业务报文进行封装;将封装后的CGN业务报文发送出去。
本发明的实施例还提供了一种运营商级网络地址转换的装置,应用于线卡中的网络处理器,该装置包括:第二接收模块,设置为接收运营商级网络地址转换CGN业务报文;封装模块,设置为对所接收的CGN业务报文进行封装,并对封装后的CGN业务报文进行处理,并通过交换芯片将经过处理的CGN业务报文转发给CPU,使CPU对经过处理的CGN业务报文进行转换,并通过CPU对转换后的CGN业务报文进行 封装;第三接收模块,设置为接收CPU通过交换芯片发送的经过封装的CGN业务报文,并将经过封装的CGN业务报文发送出去。
其中,经过封装模块封装后的CGN业务报文的报头包括:第二流量管理TM解析头、第一网络处理器NP解析头、第二交换芯片解析头、CPU解析头以及第二NP解析头,其中第二TM解析头包括:TM入口队列信息,相应地,封装模块包括:第二发送单元,设置为将经过封装的CGN业务报文发送给流量管理TM,使TM和交换板根据TM入口队列信息对经过封装的业务报文进行操作;第一接收单元,设置为接收TM返回的经过TM和交换板操作后的CGN业务报文;第一解析单元,设置为通过解析第二NP解析头中携带的CGN业务流标识,确认经过TM和交换板操作后的CGN业务报文为CGN业务流量,并对经过TM和交换板操作后的CGN业务报文进行处理,处理后的CGN业务报文的报头包括:第一NP解析头、第二交换芯片解析头以及CPU解析头,其中第二交换芯片解析头包括:NP的物理地址、CPU收包接口的物理地址以及第二虚拟局域网标识;相应地,封装模块包括:转发单元,设置为根据NP的物理地址、CPU收包接口的物理地址以及第二虚拟局域网标识,通过交换芯片将经过处理的CGN业务报文转发给CPU。
其中,第三接收模块接收的CPU通过交换芯片发送的经过封装的CGN业务报文报头包括:第一NP解析头、第一流量管理TM解析头以及第一交换芯片解析头,其中第一交换芯片解析头包括:NP的物理地址、CPU发包接口的物理地址和第一虚拟局域网标识;相应地,第三接收模块包括:第二解析单元,设置为通过解析第一交换芯片解析头中的第一虚拟局域网标识,识别出经过封装的CGN业务报文为经过CGN之后的业务报文;去除单元,设置为去除经过封装的CGN业务报文中的第一交换芯片解析头,并将去除第一交换芯片解析头后的CGN业务报文发送给TM,使TM和交换板对去除第一交换芯片解析头后的CGN业务报文进行操作;第二接收单元,设置为接收TM返回的经过TM和交换板操作后的CGN业务报文,并根据第一NP解析头中携带的CGN业务报文的出口封装信息,对TM返回的CGN业务报文进行封装;第三发送单元,设置为将封装后的CGN业务报文发送出去。
本发明的实施例还提供了一种线卡中的网络处理器,包括上述的运营商级网络地址转换的装置。
本发明的实施例还提供了一种线卡,包括上述的线卡中的处理器和上述的线卡中的网络处理器。
本发明的上述方案至少包括以下有益效果:
在本发明的实施例中,线卡中的处理器在接收到NP通过交换芯片转发的CGN业务报文后,会根据CGN业务报文中的进行CGN所需要的信息,对该CGN业务报文进行转换处理,且在转换之后,会接着对转换后的CGN业务报文进行封装处理,最后再通过交换芯片将经过封装处理的CGN业务报文发送给NP,使NP将经过处理器转换和封装的CGN业务报文发送出去,也就是对线卡CPU的核资源进行合理分配,从而虚拟出CGN板卡,依靠线卡CPU的处理资源实现CGN功能,使得能够在不单独插CGN业务板卡的情况下实现CGN业务处理功能,以提高设备利用率及转发性能。
附图说明
图1为本发明实施例中应用于线卡中的处理器的运营商级网络地址转换的方法的流程图;
图2为本发明实施例中CGN业务报文在转换前,在线卡内部的处理路径的示意图;
图3为本发明实施例中CGN业务报文在转换后,在线卡内部的处理路径的示意图;
图4为本发明实施例中应用于线卡中的处理器的运营商级网络地址转换的装置的示意图;
图5为本发明实施例中应用于线卡中的网络处理器的运营商级网络地址转换的方法的流程图;
图6为本发明实施例中应用于线卡中的网络处理器的运营商级网络地址转换的装置的示意图。
具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
本发明针对现有技术中实现CGN业务处理功能会影响全业务路由器和宽带接入服务器设备的利用率和转发性能的问题,提供了一种运营商级网络地址转换的方法及 装置,能够在不单独插CGN业务板卡的情况下实现CGN业务处理功能,以提高设备利用率及转发性能。
实施例一
如图1所示,本发明的实施例提供了一种运营商级网络地址转换的方法,应用于线卡中的处理器,该方法包括:
步骤11,接收网络处理器NP通过交换芯片转发的运营商级网络地址转换CGN业务报文,其中CGN业务报文包括进行CGN所需要的信息;
步骤12,根据进行CGN所需要的信息,对CGN业务报文进行转换处理,并对经过转换处理后的CGN业务报文进行封装;
步骤13,将经过封装处理的CGN业务报文通过交换芯片发送给NP,使NP将经过封装的CGN业务报文发送出去。
在本发明的实施例一中,通过对线卡中的处理器(CPU)的核资源进行合理分配,虚拟出CGN板卡,依靠CPU的处理资源实现CGN功能,从而在提高全业务路由器和宽带接入服务器设备的利用率和转发性能的前提下,实现CGN业务处理功能。
如图2所示,在步骤11中CPU接收到的NP通过交换芯片转发的CGN业务报文的报头包括:CPU解析头(SPH)和第一NP解析头(NPH1),其中CPU解析头包括进行CGN所需要的信息、NP查询路由表后获取的出口队列信息,第一NP解析头包括CGN业务报文的出口封装信息。
其中,在本发明的实施例一中,上述步骤12中对CGN业务报文进行转换处理的具体步骤为:根据预先存储的不同网络地址之间的对应关系和进行CGN所需要的信息,对CGN业务报文进行转换处理。
在本发明的实施例一中,上述进行CGN所需要的信息包括需要转换的内容(例如IP和端口)等。在进行CGN之前,CPU中会预先存储不同网络地址之间的对应关系,因此,当接收到CGN业务报文时,会根据不同网络地址之间的对应关系,对需要转换的内容进行转换。
其中,在本发明的实施例一中,上述步骤12中对经过转换处理后的CGN业务报文进行封装的步骤,具体为:对经过转换处理后的CGN业务报文进行封装,如图3所示,封装后的CGN业务报文的报头包括:第一NP解析头(NPH1)、第一流量管理 TM解析头(TMH1)以及第一交换芯片解析头(ETH1),其中第一流量管理TM解析头是从CPU解析头中的获取的,其包括TM出口队列信息,第一交换芯片解析头包括:NP的物理地址、CPU发包接口的物理地址和第一虚拟局域网标识。
相应地,上述实施例一中的步骤13的具体步骤为:根据NP的物理地址和CPU发包接口的物理地址,将经过封装处理的CGN业务报文通过交换芯片发送给NP。
实施例二
如图4所示,本发明的实施例还提供了一种运营商级网络地址转换的装置,应用于线卡中的处理器,该装置包括:
第一接收模块41,设置为接收网络处理器NP通过交换芯片转发的运营商级网络地址转换CGN业务报文,其中CGN业务报文包括进行CGN所需要的信息;
转换模块42,设置为根据进行CGN所需要的信息,对CGN业务报文进行转换处理,并对经过转换处理后的CGN业务报文进行封装;
第一发送模块43,设置为将经过封装处理的CGN业务报文通过交换芯片发送给NP,使NP将经过封装的CGN业务报文发送出去。
其中,第一接收模块41接收的NP通过交换芯片转发的CGN业务报文的报头包括:CPU解析头和第一NP解析头;
相应地,转换模块42包括:
封装单元,设置为对经过转换处理后的CGN业务报文进行封装,封装后的CGN业务报文的报头包括:第一NP解析头、第一流量管理TM解析头以及第一交换芯片解析头,其中第一交换芯片解析头包括:NP的物理地址、CPU发包接口的物理地址和第一虚拟局域网标识;
相应地,第一发送模块43包括:
第一发送单元,设置为根据NP的物理地址和CPU发包接口的物理地址,将经过封装处理的CGN业务报文通过交换芯片发送给NP。
其中,转换模块42包括:
转换单元,设置为根据预先存储的不同网络地址之间的对应关系和进行CGN所需要的信息,对CGN业务报文进行转换处理。
需要说明的是,本发明实施例提供的应用于线卡中的处理器的运营商级网络地址转换的装置是应用上述应用于线卡中的处理器的运营商级网络地址转换的方法的装置,即上述方法的所有实施例均适用于该装置,且均能达到相同或相似的有益效果。
实施例三
本发明的实施例还提供了一种线卡中的处理器,包括上述的应用于线卡中的处理器的运营商级网络地址转换的装置。
实施例四
如图5所示,本发明的实施例还提供了一种运营商级网络地址转换的方法,应用于线卡中的网络处理器,该方法包括:
步骤51,接收运营商级网络地址转换CGN业务报文;
步骤52,对所接收的CGN业务报文进行封装,并对封装后的CGN业务报文进行处理,并通过交换芯片将经过处理的CGN业务报文转发给CPU,使CPU对经过处理的CGN业务报文进行转换,并通过CPU对转换后的CGN业务报文进行封装;
步骤53,接收CPU通过交换芯片发送的经过封装的CGN业务报文,并将经过封装的CGN业务报文发送出去。
在本发明的实施例四中,NP在接收到业务报文后,会判断接收到的业务报文是否为CGN业务报文,当接收到CGN业务报文后,会对该CGN业务报文进行封装,如图2所示,封装后的CGN业务报文的报头包括:第二流量管理TM解析头(TMH2)、第一网络处理器NP解析头(NPH1)、第二交换芯片解析头(ETH2)、CPU解析头(SPH)以及第二NP解析头(NPH2),其中第二TM解析头包括:TM入口队列信息,第二交换芯片解析头包括:NP的物理地址、CPU收包接口的物理地址以及第二虚拟局域网标识,第二NP解析头包括:CGN业务流量标识。
相应地,当NP给接收到的CGN业务报文进行封装后,会对封装后的CGN业务报文进行处理。处理过程具体包括:NP会将经过封装处理的CGN业务报文发送给TM,如图2所示,TM会根据TM入口队列信息将该CGN业务报文送至TM入口队列,同时剥掉第二TM解析头,此时CGN业务报文进入交换板,交换板会根据TM入口队 列和出口队列的映射关系,将该CGN业务报文送入TM出口队列,此时CGN业务报文进入TM,TM对其完成流量管理、控制后,将其返回给NP。相应地,NP在接收到TM返回的CGN业务报文后,会通过解析第二NP解析头中携带的CGN业务流标识,识别出该CGN业务报文为CGN业务流量,同时剥掉第二NP解析头,并将剥掉第二NP解析头后的CGN业务报文送至交换芯片。此时的CGN业务报文的报头包括:第一NP解析头、第二交换芯片解析头以及CPU解析头。
相应地,交换芯片会根据NP的物理地址、CPU收包接口的物理地址以及第二虚拟局域网标识,通过交换芯片将经过处理的CGN业务报文转发给CPU。
相应地,当CPU接收到交换芯片转发的CGN业务报文后,会根据CPU解析头中的进行CGN所需要的信息,对CGN业务报文进行转换,并对转换后的CGN业务报文进行封装处理。如图3所示,经过CPU封装后的CGN业务报文的报头包括第一NP解析头、第一流量管理TM解析头以及第一交换芯片解析头。紧接着,CPU会将封装后的CGN业务报文发送给交换芯片。而此时交换芯片会根据第一交换芯片解析头中的信息,将经过CPU封装的CGN业务报文发送给NP。当NP在接收到通过CPU封装的CGN业务报文后,会解析第一交换芯片解析头中的第一虚拟局域网标识,识别出该CGN业务报文是经过CGN之后的业务报文,然后剥掉第一交换芯片解析头直接透传。即将去除第一交换芯片解析头后的CGN业务报文发送给TM,使TM根据第一流量管理TM解析头中的出口队列信息,将该CGN业务报文送至TM入口队列,同时剥掉第一流量管理TM解析头,此时CGN业务报文进入交换板,使交换板根据TM入口队列和出口队列的映射关系,将CGN业务报文送至TM出口队列,此时CGN业务报文进入TM,使TM对该CGN业务报文进行流量管理和控制,并将CGN业务报文返回给NP。
当NP接收到TM返回的CGN业务报文后,会根据第一NP解析头中携带的CGN业务报文的出口封装信息,对TM返回的CGN业务报文进行封装,最后再将封装后的CGN业务报文发送出去。
为了更好的阐述上述CGN业务报文在线卡内部的处理路径,在此以全业务路由器/宽带接入服务器设备的线卡为例,阐述CGN业务报文从进入设备(全业务路由器/宽带接入服务器)到经过转换后出设备(全业务路由器/宽带接入服务器)的具体流程。
如图2所示,在进行CGN之前的具体流程为:
第一步,当CGN业务报文从上行NP网络侧进入设备,且被上行NP识别为CGN业务报文后,上行NP微码依次封装第二流量管理TM解析头(TMH2)、第一网络处 理器NP解析头(NPH1)、第二交换芯片解析头(ETH2)、CPU解析头(SPH)以及第二NP解析头(NPH2)这几个内部头,其中这几个内部头包含的信息在上文已详细说明过,在此不再赘述;
第二步,CGN业务报文进入上行TM,上行TM根据TMH2内携带的入口队列信息将CGN业务报文送至入口队列,同时剥掉TMH2;
第三步,报文进入交换板,交换板根据TM入口队列和出口队列的映射关系,将CGN业务报文送入下行TM队列(即出口队列);
第四步,CGN业务报文进入下行TM,下行TM完成流量管理、控制后,将CGN业务报文送入下行NP;
第五步,CGN业务报文进入下行NP,下行NP在解析NPH2后,识别出CGN业务报文为CGN业务流量后剥掉NPH2,并将CGN业务报文送至控制面(即交换芯片和处理器CPU)。此时CGN业务报文的内部头封装结构为ETH2+SPH+NPH1;
第六步,CGN业务报文进入控制面交换芯片,交换芯片根据ETH2内的信息将CGN业务报文转发至CPU网口;
第七步,CGN业务报文进入CPU,CPU收包进程处理后,将CGN业务报文送至CGN业务处理进程。此时报文的内部头封装结构为SPH+NPH1;CGN处理进程根据SPH对CGN业务报文做转换处理(其中对于多核CPU,可采用独占排他的方式占用一个或多个CPU核资源以提高CGN进程的处理效率),并封装ETH1和TMH1,其中ETH1和TMH1包括的信息在上文已详细说明,在此不再赘述;
如图3所示,在进行CGN之后的具体流程为:
第八步,CPU将经过其封装的携带第一NP解析头(NPH1)、第一流量管理TM解析头(TMH1)以及第一交换芯片解析头(ETH1)这几个内部头的CGN业务报文发送给交换芯片,使交换芯片根据ETH1进行转发;
第九步,CGN业务报文进入上行NP,上行NP解析ETH1后,识别出该CGN业务报文是经过CGN之后的CGN业务报文,因此剥掉ETH1直接透传;
第十步,CGN业务报文进入上行TM,上行TM芯片根据TMH1内的信息将CGN业务报文送至入口队列,同时剥掉TMH1;
第十一步,CGN业务报文进入交换板。交换板根据TM入口队列和出口队列的映射关系,将CGN业务报文送入下行TM队列(即出口队列);
第十二步,CGN业务报文进入下行TM,下行TM完成流量管理、控制后,将CGN业务报文送入下行NP;
第十三步,CGN业务报文进入下行NP,下行NP根据NPH1携带的信息完成CGN业务报文的出口封装,最后CGN业务报文从NP网络侧出端口出设备。
实施例五
如图6所示,本发明的实施例还提供了一种运营商级网络地址转换的装置,应用于线卡中的网络处理器,该装置包括:
第二接收模块61,设置为接收运营商级网络地址转换CGN业务报文;
封装模块62,设置为对所接收的CGN业务报文进行封装,并对封装后的CGN业务报文进行处理,并通过交换芯片将经过处理的CGN业务报文转发给CPU,使CPU对经过处理的CGN业务报文进行转换,并通过CPU对转换后的CGN业务报文进行封装;
第三接收模块63,设置为接收CPU通过交换芯片发送的经过封装的CGN业务报文,并将经过封装的CGN业务报文发送出去。
其中,经过封装模块62封装后的CGN业务报文的报头包括:第二流量管理TM解析头、第一网络处理器NP解析头、第二交换芯片解析头、CPU解析头以及第二NP解析头,其中第二TM解析头包括:TM入口队列信息,
相应地,封装模块62包括:
第二发送单元,设置为将经过封装的CGN业务报文发送给流量管理TM,使TM和交换板根据TM入口队列信息对经过封装的业务报文进行操作;
第一接收单元,设置为接收TM返回的经过TM和交换板操作后的CGN业务报文;
第一解析单元,设置为通过解析第二NP解析头中携带的CGN业务流标识,确认经过TM和交换板操作后的CGN业务报文为CGN业务流量,并对经过TM和交换板操作后的CGN业务报文进行处理,处理后的CGN业务报文的报头包括:第一NP解 析头、第二交换芯片解析头以及CPU解析头,其中第二交换芯片解析头包括:NP的物理地址、CPU收包接口的物理地址以及第二虚拟局域网标识;
相应地,封装模块62包括:
转发单元,设置为根据NP的物理地址、CPU收包接口的物理地址以及第二虚拟局域网标识,通过交换芯片将经过处理的CGN业务报文转发给CPU。
其中,第三接收模块63接收的CPU通过交换芯片发送的经过封装的CGN业务报文报头包括:第一NP解析头、第一流量管理TM解析头以及第一交换芯片解析头,其中第一交换芯片解析头包括:NP的物理地址、CPU发包接口的物理地址和第一虚拟局域网标识;
相应地,第三接收模块63包括:
第二解析单元,设置为通过解析第一交换芯片解析头中的第一虚拟局域网标识,识别出经过封装的CGN业务报文为经过CGN之后的业务报文;
去除单元,设置为去除经过封装的CGN业务报文中的第一交换芯片解析头,并将去除第一交换芯片解析头后的CGN业务报文发送给TM,使TM和交换板对去除第一交换芯片解析头后的CGN业务报文进行操作;
第二接收单元,设置为接收TM返回的经过TM和交换板操作后的CGN业务报文,并根据第一NP解析头中携带的CGN业务报文的出口封装信息,对TM返回的CGN业务报文进行封装;
第三发送单元,设置为将封装后的CGN业务报文发送出去。
需要说明的是,本发明实施例提供的应用于线卡中的网络处理器的运营商级网络地址转换的装置是应用上述应用于线卡中的网络处理器的运营商级网络地址转换的方法的装置,即上述方法的所有实施例均适用于该装置,且均能达到相同或相似的有益效果。
实施例六
本发明的实施例还提供了一种线卡中的网络处理器,包括上述应用于线卡中的网络处理器的运营商级网络地址转换的装置。
实施例七
本发明的实施例还提供了一种线卡,包括上述的线卡中的处理器和上述的线卡中的网络处理器。
以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明所述原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。
工业实用性
如上所述,通过上述实施例及优选实施方式,能在提高全业务路由器和宽带接入服务器设备的利用率和转发性能的前提下,实现CGN业务处理功能。

Claims (15)

  1. 一种运营商级网络地址转换的方法,应用于线卡中的处理器,所述方法包括:
    接收网络处理器NP通过交换芯片转发的运营商级网络地址转换CGN业务报文,其中所述CGN业务报文包括进行CGN所需要的信息;
    根据所述进行CGN所需要的信息,对所述CGN业务报文进行转换处理,并对经过转换处理后的CGN业务报文进行封装;
    将经过封装处理的CGN业务报文通过所述交换芯片发送给NP,使NP将所述经过封装的CGN业务报文发送出去。
  2. 如权利要求1所述的方法,其中,所述接收NP通过交换芯片转发的CGN业务报文的报头包括:CPU解析头和第一NP解析头;
    相应地,所述对经过转换处理后的CGN业务报文进行封装,包括:
    对所述经过转换处理后的CGN业务报文进行封装,封装后的CGN业务报文的报头包括:第一NP解析头、第一流量管理TM解析头以及第一交换芯片解析头,其中所述第一交换芯片解析头包括:NP的物理地址、CPU发包接口的物理地址和第一虚拟局域网标识;
    相应地,所述将经过封装处理的CGN业务报文通过所述交换芯片发送给NP,包括:
    根据所述NP的物理地址和CPU发包接口的物理地址,将经过封装处理的CGN业务报文通过所述交换芯片发送给所述NP。
  3. 如权利要求1所述的方法,其中,所述根据所述进行CGN所需要的信息,对所述CGN业务报文进行转换处理,包括:
    根据预先存储的不同网络地址之间的对应关系和所述进行CGN所需要的信息,对所述CGN业务报文进行转换处理。
  4. 一种运营商级网络地址转换的装置,应用于线卡中的处理器,所述装置包括:
    第一接收模块,设置为接收网络处理器NP通过交换芯片转发的运营商级网络地址转换CGN业务报文,其中所述CGN业务报文包括进行CGN所需要的信息;
    转换模块,设置为根据所述进行CGN所需要的信息,对所述CGN业务报文进行转换处理,并对经过转换处理后的CGN业务报文进行封装;
    第一发送模块,设置为将经过封装处理的CGN业务报文通过所述交换芯片发送给NP,使NP将所述经过封装的CGN业务报文发送出去。
  5. 如权利要求4所述的装置,其中,所述第一接收模块接收的NP通过交换芯片转发的CGN业务报文的报头包括:CPU解析头和第一NP解析头;
    相应地,所述转换模块包括:
    封装单元,设置为对所述经过转换处理后的CGN业务报文进行封装,封装后的CGN业务报文的报头包括:第一NP解析头、第一流量管理TM解析头以及第一交换芯片解析头,其中所述第一交换芯片解析头包括:NP的物理地址、CPU发包接口的物理地址和第一虚拟局域网标识;
    相应地,所述第一发送模块包括:
    第一发送单元,设置为根据所述NP的物理地址和CPU发包接口的物理地址,将经过封装处理的CGN业务报文通过所述交换芯片发送给所述NP。
  6. 如权利要求4所述的装置,其中,所述转换模块包括:
    转换单元,设置为根据预先存储的不同网络地址之间的对应关系和所述进行CGN所需要的信息,对所述CGN业务报文进行转换处理。
  7. 一种线卡中的处理器,包括如权利要求4~6任一项所述的运营商级网络地址转换的装置。
  8. 一种运营商级网络地址转换的方法,应用于线卡中的网络处理器,所述方法包括:
    接收运营商级网络地址转换CGN业务报文;
    对所接收的CGN业务报文进行封装,并对封装后的CGN业务报文进行处理,并通过交换芯片将经过处理的CGN业务报文转发给CPU,使所述CPU对经过处理的CGN业务报文进行转换,并通过所述CPU对转换后的CGN业务报文进行封装;
    接收所述CPU通过交换芯片发送的经过封装的CGN业务报文,并将所述经过封装的CGN业务报文发送出去。
  9. 如权利要求8所述的方法,其中,所述对所接收的CGN业务报文进行封装,封装后的CGN业务报文的报头包括:第二流量管理TM解析头、第一网络处理器NP解析头、第二交换芯片解析头、CPU解析头以及第二NP解析头,其中所述第二TM解析头包括:TM入口队列信息,
    相应地,所述对封装后的CGN业务报文进行处理,具体包括:
    将经过封装的CGN业务报文发送给流量管理TM,使所述TM和交换板根据所述TM入口队列信息对所述经过封装的业务报文进行操作;
    接收所述TM返回的经过所述TM和交换板操作后的CGN业务报文;
    通过解析所述第二NP解析头中携带的CGN业务流标识,确认经过所述TM和交换板操作后的CGN业务报文为CGN业务流量,并对所述经过所述TM和交换板操作后的CGN业务报文进行处理,处理后的CGN业务报文的报头包括:第一NP解析头、第二交换芯片解析头以及CPU解析头,其中所述第二交换芯片解析头包括:NP的物理地址、CPU收包接口的物理地址以及第二虚拟局域网标识;
    相应地,所述通过交换芯片将经过处理的CGN业务报文转发给CPU,包括:
    根据所述NP的物理地址、CPU收包接口的物理地址以及第二虚拟局域网标识,通过所述交换芯片将经过处理的CGN业务报文转发给所述CPU。
  10. 如权利要求8所述的方法,其中,所述接收所述CPU通过交换芯片发送的经过封装的CGN业务报文报头包括:第一NP解析头、第一流量管理TM解析头以及第一交换芯片解析头,其中所述第一交换芯片解析头包括:NP的物理地址、CPU发包接口的物理地址和第一虚拟局域网标识;
    相应地,所述将所述经过封装的CGN业务报文发送出去,具体包括:
    通过解析所述第一交换芯片解析头中的第一虚拟局域网标识,识别出所述经过封装的CGN业务报文为经过CGN之后的业务报文;
    去除所述经过封装的CGN业务报文中的第一交换芯片解析头,并将去除所述第一交换芯片解析头后的CGN业务报文发送给TM,使所述TM和交换板对去除第一交换芯片解析头后的CGN业务报文进行操作;
    接收所述TM返回的经过所述TM和交换板操作后的CGN业务报文,并根据所述第一NP解析头中携带的CGN业务报文的出口封装信息,对所述TM返回的CGN业务报文进行封装;
    将封装后的CGN业务报文发送出去。
  11. 一种运营商级网络地址转换的装置,应用于线卡中的网络处理器,所述装置包括:
    第二接收模块,设置为接收运营商级网络地址转换CGN业务报文;
    封装模块,设置为对所接收的CGN业务报文进行封装,并对封装后的CGN业务报文进行处理,并通过交换芯片将经过处理的CGN业务报文转发给CPU,使所述CPU对经过处理的CGN业务报文进行转换,并通过所述CPU对转换后的CGN业务报文进行封装;
    第三接收模块,设置为接收所述CPU通过交换芯片发送的经过封装的CGN业务报文,并将所述经过封装的CGN业务报文发送出去。
  12. 如权利要求11所述的装置,其中,经过所述封装模块封装后的CGN业务报文的报头包括:第二流量管理TM解析头、第一网络处理器NP解析头、第二交换芯片解析头、CPU解析头以及第二NP解析头,其中所述第二TM解析头包括:TM入口队列信息,
    相应地,所述封装模块包括:
    第二发送单元,设置为将经过封装的CGN业务报文发送给流量管理TM,使所述TM和交换板根据所述TM入口队列信息对所述经过封装的业务报文进行操作;
    第一接收单元,设置为接收所述TM返回的经过所述TM和交换板操作后的CGN业务报文;
    第一解析单元,设置为通过解析所述第二NP解析头中携带的CGN业务流标识,确认经过所述TM和交换板操作后的CGN业务报文为CGN业务流量,并对所述经过所述TM和交换板操作后的CGN业务报文进行处理,处理后的CGN业务报文的报头包括:第一NP解析头、第二交换芯片解析头以及CPU解析头,其中所述第二交换芯片解析头包括:NP的物理地址、CPU收包接口的物理地址以及第二虚拟局域网标识;
    相应地,所述封装模块包括:
    转发单元,设置为根据所述NP的物理地址、CPU收包接口的物理地址以及第二虚拟局域网标识,通过所述交换芯片将经过处理的CGN业务报文转发给所述CPU。
  13. 如权利要求11所述的装置,其中,所述第三接收模块接收的所述CPU通过交换芯片发送的经过封装的CGN业务报文报头包括:第一NP解析头、第一流量管理TM解析头以及第一交换芯片解析头,其中所述第一交换芯片解析头包括:NP的物理地址、CPU发包接口的物理地址和第一虚拟局域网标识;
    相应地,所述第三接收模块包括:
    第二解析单元,设置为通过解析所述第一交换芯片解析头中的第一虚拟局域网标识,识别出所述经过封装的CGN业务报文为经过CGN之后的业务报文;
    去除单元,设置为去除所述经过封装的CGN业务报文中的第一交换芯片解析头,并将去除所述第一交换芯片解析头后的CGN业务报文发送给TM,使所述TM和交换板对去除第一交换芯片解析头后的CGN业务报文进行操作;
    第二接收单元,设置为接收所述TM返回的经过所述TM和交换板操作后的CGN业务报文,并根据所述第一NP解析头中携带的CGN业务报文的出口封装信息,对所述TM返回的CGN业务报文进行封装;
    第三发送单元,设置为将封装后的CGN业务报文发送出去。
  14. 一种线卡中的网络处理器,包括如权利要求11~13任一项所述的运营商级网络地址转换的装置。
  15. 一种线卡,包括如权利要求7所述的线卡中的处理器和如权利要求14所述的线卡中的网络处理器。
PCT/CN2015/084952 2015-05-18 2015-07-23 一种运营商级网络地址转换的方法及装置 WO2016183926A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510252548.X 2015-05-18
CN201510252548.XA CN106302841A (zh) 2015-05-18 2015-05-18 一种运营商级网络地址转换的方法及装置

Publications (1)

Publication Number Publication Date
WO2016183926A1 true WO2016183926A1 (zh) 2016-11-24

Family

ID=57319229

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/084952 WO2016183926A1 (zh) 2015-05-18 2015-07-23 一种运营商级网络地址转换的方法及装置

Country Status (2)

Country Link
CN (1) CN106302841A (zh)
WO (1) WO2016183926A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112217670A (zh) * 2020-09-29 2021-01-12 北京东土军悦科技有限公司 网络设备及网络设备的报文处理方法
CN112333098A (zh) * 2020-10-29 2021-02-05 杭州迪普科技股份有限公司 一种业务板卡间的报文转发方法及装置

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107547296B (zh) * 2017-05-10 2020-09-25 新华三信息安全技术有限公司 一种信息处理方法及装置
CN112929277B (zh) * 2019-12-06 2024-03-05 华为云计算技术有限公司 一种报文处理方法及装置
CN114448889A (zh) * 2020-10-21 2022-05-06 华为技术有限公司 数据处理方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102006337A (zh) * 2010-11-23 2011-04-06 华为技术有限公司 一种基于cgn实体的数据传输方法、cgn实体、网关及系统
CN102447751A (zh) * 2012-01-13 2012-05-09 中兴通讯股份有限公司 一种VoIP应用进行NAT穿越的方法及系统
US20130208597A1 (en) * 2012-02-14 2013-08-15 Cable Television Laboratories, Inc. Network address translation
CN103514043A (zh) * 2012-06-29 2014-01-15 华为技术有限公司 多处理器系统及该系统的数据处理方法
CN103797774A (zh) * 2013-11-05 2014-05-14 华为技术有限公司 一种网络地址转换设备及方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957754A (zh) * 2011-08-22 2013-03-06 中国电信股份有限公司 运营级网络地址转换方法、设备及网络系统
CN102546407B (zh) * 2011-12-29 2018-01-23 江苏悦达数梦技术有限公司 报文发送方法及装置
CN103580880B (zh) * 2012-08-03 2017-12-29 华为技术有限公司 一种快速通知cgn异常的方法、设备及系统
CN103780492B (zh) * 2012-10-25 2017-09-26 华为技术有限公司 报文转发的方法和相应设备
WO2014071605A1 (zh) * 2012-11-09 2014-05-15 华为技术有限公司 处理报文的方法、转发面装置及网络设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102006337A (zh) * 2010-11-23 2011-04-06 华为技术有限公司 一种基于cgn实体的数据传输方法、cgn实体、网关及系统
CN102447751A (zh) * 2012-01-13 2012-05-09 中兴通讯股份有限公司 一种VoIP应用进行NAT穿越的方法及系统
US20130208597A1 (en) * 2012-02-14 2013-08-15 Cable Television Laboratories, Inc. Network address translation
CN103514043A (zh) * 2012-06-29 2014-01-15 华为技术有限公司 多处理器系统及该系统的数据处理方法
CN103797774A (zh) * 2013-11-05 2014-05-14 华为技术有限公司 一种网络地址转换设备及方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112217670A (zh) * 2020-09-29 2021-01-12 北京东土军悦科技有限公司 网络设备及网络设备的报文处理方法
CN112333098A (zh) * 2020-10-29 2021-02-05 杭州迪普科技股份有限公司 一种业务板卡间的报文转发方法及装置

Also Published As

Publication number Publication date
CN106302841A (zh) 2017-01-04

Similar Documents

Publication Publication Date Title
US11128493B2 (en) Method for implementing residential gateway service function, and server
Xhonneux et al. Leveraging ebpf for programmable network functions with ipv6 segment routing
WO2016183926A1 (zh) 一种运营商级网络地址转换的方法及装置
CN111131037B (zh) 基于虚拟网关的数据传输方法、装置、介质与电子设备
US20230078123A1 (en) Method for Forwarding Packet in SRV6 Service Function Chain and SF Device
EP2482502B1 (en) Message handling method and apparatus
CN104202300B (zh) 基于网络隔离装置的数据通信方法和装置
CN104579954B (zh) 报文跨域转发方法、装置及通信设备
EP3139560A1 (en) Packet processing method, device and computer storage medium
EP3133797B1 (en) Message forwarding method, system, and relay agent device
WO2016062169A1 (zh) 一种报文传输方法及装置
WO2015127752A1 (zh) 数据报文处理方法及装置
WO2016086670A1 (zh) Vxlan报文传输方法及装置、存储介质
CN114301868B (zh) 快速生成虚拟容器浮动ip的方法及网络直通的方法和装置
CN112671628A (zh) 业务服务提供方法及系统
WO2016041379A1 (zh) Nni ping的实现方法及装置
CN112671938A (zh) 业务服务提供方法及系统、远端加速网关
CN114629816B (zh) 公网ip网络状态探测方法及系统
US20220210036A1 (en) Network Measurement System And Method, Device, And Storage Medium
CN105164973B (zh) 光纤到分配点设备及其通信方法
CN117714559A (zh) 报文处理方法、装置、电子设备及存储介质
WO2014063606A1 (zh) 报文转发的方法和相应设备
CN111385156B (zh) sFlow流采样方法、装置及系统
CN108833284B (zh) 一种云平台和idc网络的通信方法及装置
WO2022227484A1 (zh) 数据通信方法、装置、计算机设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15892304

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15892304

Country of ref document: EP

Kind code of ref document: A1