WO2011140843A1 - 一种报文转发的方法、装置及系统 - Google Patents

一种报文转发的方法、装置及系统 Download PDF

Info

Publication number
WO2011140843A1
WO2011140843A1 PCT/CN2011/070711 CN2011070711W WO2011140843A1 WO 2011140843 A1 WO2011140843 A1 WO 2011140843A1 CN 2011070711 W CN2011070711 W CN 2011070711W WO 2011140843 A1 WO2011140843 A1 WO 2011140843A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
flow label
network address
ipv6
ipv6 packet
Prior art date
Application number
PCT/CN2011/070711
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 华为技术有限公司
Priority to EP11780065.6A priority Critical patent/EP2458799B1/en
Priority to KR1020127006300A priority patent/KR101455219B1/ko
Priority to JP2012530121A priority patent/JP5499391B2/ja
Publication of WO2011140843A1 publication Critical patent/WO2011140843A1/zh
Priority to US13/674,924 priority patent/US9100352B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/33Flow control; Congestion control using forward notification
    • 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/2514Translation of Internet protocol [IP] addresses between local and global IP addresses
    • 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/2557Translation policies or rules
    • 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/2592Translation of Internet protocol [IP] addresses using tunnelling or encapsulation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/167Adaptation for transition between two IP versions, e.g. between IPv4 and IPv6
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/686Types of network addresses using dual-stack hosts, e.g. in Internet protocol version 4 [IPv4]/Internet protocol version 6 [IPv6] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/52Multiprotocol routers

Definitions

  • IPv6 Internet Protocol Version 6, Version 6 Internet Protocol
  • IPv6 Internet Protocol Version 6, Version 6 Internet Protocol
  • IPv6 evolution there are mainly dual stack + NAT (Network Address Translation), 6RD (IPv6 Rapid Deployment), DS-LITE (Dual-Stack Lite, double) according to its network status and evolution.
  • Stack simplification scheme These evolution schemes, and the DS-LITE scheme is mainly for the middle and late stage of IPv6 evolution, that is, the IPv4 island traverses the IPv6 network to access the IPv4 Internet.
  • the DS-LITE scheme initiates tunneling (IPv4 over IPv6) to AFTR (Address Family Transition Router) on the CPE (Customer Premise Equipment), and terminates the AFTR in the AFTR. After the tunnel is tunneled, the IPv4 to IPv4 NAT is forwarded to the IPv4 network.
  • the current network generally follows the networking mode.
  • the terminal or the client device uses PPP0E (point to point protocol over Ethernet) to access the BNG (Broadband Network Gateway).
  • PPP0E point to point protocol over Ethernet
  • Authentication and accounting are performed using the Radius (Remote Authentication Dial In User Service) protocol and the AAA server (Authentication Authorization Accounting Server).
  • Radius Remote Authentication Dial In User Service
  • AAA server Authentication Authorization Accounting Server
  • the inventors have found that at least the following problems exist in the prior art: in the prior art IPv6 evolution, when the gateway and the local address switching router AFTR have multiple links corresponding to the same tunnel for network address translation, After the AFTR receives the packets sent by the gateway, it needs to distinguish the user equipment according to the IP address of the user equipment. If the IP address of the user equipment overlaps or is the same, the local address switching router cannot distinguish different end users. The end user of the text cannot receive feedback. Summary of the invention
  • the embodiment of the present invention provides a method, a device, and a system for forwarding a message.
  • multiple links between the gateway and the AFTR correspond to the same tunnel for network address translation, if the IP addresses of the terminal users overlap or are the same, Implementation can distinguish between different end users.
  • the embodiment of the present invention provides a packet forwarding method, where the method includes: receiving an IPv6 packet sent by a gateway, and acquiring a flow label of the IPv6 packet, where the flow label of the IPv6 packet is The link identifier of the client device is in one-to-one correspondence; decapsulating the IPv6 packet; performing network address translation on the decapsulated packet according to the flow label; and forwarding the decapsulated packet according to the converted network address Message.
  • the embodiment of the present invention provides a packet forwarding method, where the method includes: receiving an IPv4 packet sent by a user equipment, and acquiring a link identifier of the IPv4 packet;
  • the link identifier, the flow label of the IPv6 packet is obtained by the one-to-one correspondence between the flow label of the IPv6 packet and the link identifier of the user equipment, and the IPv4 packet is sent according to the flow label of the IPv6 packet.
  • the tunnel is encapsulated, and the encapsulated packets are sent to the local address switching router.
  • the embodiment of the present invention provides a device for forwarding a packet
  • the device includes: a first packet receiving unit, configured to receive an IPv6 packet sent by a gateway, and obtain a flow label of the IPv6 packet,
  • the flow label of the IPv6 packet has a one-to-one correspondence with the link identifier of the user equipment.
  • the first decapsulation unit is configured to decapsulate the IPv6 packet
  • the first address translation unit is configured to use the flow label according to the flow label.
  • the first packet sending unit is configured to forward the decapsulated packet according to the converted network address.
  • an embodiment of the present invention provides a device for forwarding a packet, where the device includes: a second packet receiving unit, configured to receive an IPv4 packet sent by a user equipment, and obtain a chain of the IPv4 packet.
  • the second information acquiring unit is configured to obtain the flow of the IPv6 packet by using a one-to-one correspondence between the flow label of the IPv6 packet and the link identifier of the user equipment according to the link identifier of the IPv4 packet.
  • the second encapsulating unit is configured to tunnel the IPv4 packet according to the flow label of the IPv6 packet, and the second packet sending unit is configured to send the encapsulated packet to the local address switching router.
  • the embodiment of the present invention provides a system for packet forwarding, where the system includes: a gateway, configured to receive an IPv4 packet sent by a user equipment, and obtain a link identifier of the IPv4 packet; The link identifier of the IPv4 packet, the flow label of the IPv6 packet is obtained by the one-to-one correspondence between the flow label of the IPv6 packet and the link identifier of the user equipment, and the flow label of the IPv6 packet is obtained according to the flow label of the IPv6 packet.
  • IPv4 packets are encapsulated in tunnels. The packet encapsulated by the tunnel is sent to the local address switching router.
  • the local address switching router is configured to receive the IPv6 packet sent by the gateway, and obtain the flow label of the IPv6 packet, where the flow label of the IPv6 packet is The link identifier of the client device is in one-to-one correspondence; decapsulating the IPv6 packet; performing network address translation on the decapsulated packet according to the flow label; and forwarding the decapsulated packet according to the converted network address Message.
  • the IPv6 packet sent by the receiving gateway is used, and the flow label of the IPv6 packet is obtained, wherein the flow label of the IPv6 packet has a one-to-one correspondence with the link identifier of the user equipment; Decapsulating the IPv6 packet; performing network address translation on the decapsulated packet according to the flow label; and forwarding the decapsulated packet according to the converted network address, so when the gateway and the AFTR When there are multiple links corresponding to the same tunnel for network address translation, if the IP addresses of the terminal users overlap or are the same, it is possible to distinguish different terminal users, so that the end users who send packets can receive feedback and improve user satisfaction. .
  • FIG. 1 is a flowchart of a method for forwarding a packet according to an embodiment of the present invention
  • FIG. 2 is a flowchart of another method for packet forwarding according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a network layout of a dual-stack simplified solution DS-LITE solution according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a network layout applied to another dual-stack simplified solution DS-LITE solution according to an embodiment of the present invention
  • 5 is a schematic diagram of a forward NAT table according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of a reverse NAT table according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of an apparatus for forwarding a message according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of another apparatus for packet forwarding according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of a system for packet forwarding according to an embodiment of the present invention.
  • BEST MODE FOR CARRYING OUT THE INVENTION The specific implementation process of the present invention will be exemplified below by way of examples. It will be apparent that the embodiments described below are a part of the embodiments of the invention, rather than all of the embodiments. Based on embodiments in the present invention, common in the art All other embodiments obtained by a skilled person without creative efforts are within the scope of the present invention.
  • a flowchart of a method for forwarding a packet includes:
  • IPv6 packet sent by the gateway, and obtain a flow label of the IPv6 packet, where the flow label of the IPv6 packet is in one-to-one correspondence with the link identifier of the user equipment.
  • the flow label of the foregoing IPv6 packet may include: a virtual local area network (VLAN) identifier, or an Ethernet-based point-to-point protocol PPPOE session identifier;
  • the link identifier of the user equipment may include the following One or more combinations of information: the access device slot number, the port number, and the tunnel identifier between the client device and the gateway.
  • the device After receiving the IPv6 packet sent by the gateway, the device can obtain the flow label of the IPv6 packet from the flow label field in the IPv6 packet header.
  • the value of the foregoing link identifier may be the same as the value of the foregoing flow label or calculated according to the flow label information.
  • the embodiment of the present invention is not limited thereto.
  • performing the network address translation on the decapsulated packet according to the foregoing flow label may include: performing network on the decapsulated packet according to the correspondence between the internal network address information and the external network address information. Address conversion; wherein, the foregoing internal network address information may at least include: one or more combinations of a flow label, a tunnel identifier, and an internal network port number of the IPv6 packet; the foregoing external network address information may include: an external network address and an external network The port number.
  • the decapsulated packet may be an IPv4 packet.
  • the foregoing method may further include: receiving a packet sent by the external network, acquiring external network address information of the packet, and performing network address translation on the packet according to the correspondence between the internal network address information and the external network address information.
  • the tunnel packet is encapsulated by the tunnel; the encapsulated packet is sent to the gateway according to the converted network address.
  • FIG. 2 is a flowchart of another method for packet forwarding according to an embodiment of the present invention, where the method includes:
  • the IPv4 packet is encapsulated by the flow label of the IPv6 packet, and the encapsulated packet is sent to an address family transition router (AFTR).
  • the foregoing method may further include: receiving an IPv6 packet sent by the local address switching router, and acquiring a flow label of the IPv6 packet; performing tunnel decapsulation on the IPv6 packet to obtain an IPv4 packet; And obtaining the link identifier of the user equipment by using a one-to-one correspondence between the flow label of the IPv6 packet and the link identifier of the user equipment, and forwarding the IPv4 packet according to the link identifier of the user equipment.
  • the gateway and the AFTR correspond to the same tunnel for network address translation
  • the IP addresses of the terminal users are overlapped or the same
  • the different terminal users can be distinguished and sent.
  • the end user of the message can receive feedback and improve user satisfaction.
  • FIG. 3 it is a schematic diagram of a network layout diagram applied to a dual-stack simplified solution DS-LITE solution according to an embodiment of the present invention.
  • the user equipment is a general reference, and the client equipment may include a host or a terminal and a CPE.
  • the hosts HostA, B, C, D, and each CPE may be user equipments, and the access equipments are digital.
  • the user equipment accesses the multiplexer DSLAM device.
  • the gateway uses the broadband network gateway BNG as an example to describe the following application scenarios.
  • the connections between the devices in Figure 3 are as follows:
  • the four hosts are HostA, HostB, HostC, and HostD.
  • Each host is connected to four CPEs.
  • Each CPE uses PPP0E to access the digital subscriber line.
  • the multiplexer DSLAM is connected to the broadband network gateway BNG; the BNG adopts the remote user dialing authentication system Radius protocol and the authentication, authorization and accounting server AAA server for authentication and charging; wherein, the client device is in the IPv4 private network, BNG and AFTR On an IPv6 network, the network on the right of the AFTR is the IPv4 public network, and the IP addresses of HostA and HostD may overlap or be the same.
  • Host D sends IPv4 packets to the BNG through the CPE and DSLAM.
  • the BNG receives the IPv4 packet sent by the HostD, and obtains the link identifier of the IPv4 packet.
  • the link identifier obtained here may be the session ID of the session identifier.
  • Host D uses PPP0E link dialing, and ijBNG is the PPP0E link.
  • the session ID of the PPP0E link of the unique client device is assigned, and the session identifier is 16 bits.
  • the BNG corresponds to the session ID of the IPv6 packet and the session ID of the client device according to the session ID of the IPv4 packet.
  • the BNG may not save the corresponding identifier. Relationships, which need to be established at this time, are saved after the establishment is successful, so that the next BNG receives the uplink IPv4 packet and then performs subsequent operations according to the saved correspondence.
  • the establishment of the correspondence can be manually set or automatically saved when the system starts.
  • the embodiment of the present invention does not limit the foregoing, and obtains the flow label Flow Label of the IPv6 packet.
  • the BNG tunnels the IPv4 packet according to the flow label Flow Label of the IPv6 packet, that is, adds an IPv6 packet header before the IPv4 packet.
  • the IPv6 packet header includes the IPv6 Flow Label field, and the BNG fills the obtained Flow Label value of the IPv6 packet into the Flow Label field corresponding to the IPv6 packet header, and sends the encapsulated packet to the AFTR. .
  • the AFTR receives the IPv6 packet sent by the BNG.
  • the forward NAT table in FIG. 5 and the reverse NAT table in FIG. 6 can be simultaneously generated. The content of the table will be performed below.
  • the flow label value of the flow label of the IPv6 packet is in one-to-one correspondence with the link identifier of the user equipment.
  • the AFTR decapsulates the IPv6 packet (that is, removes the IPv6 packet header and obtains the IPv4 packet).
  • the forward NAT table in FIG. 5 is used (according to the saved internal network address information (ie, the key of the forward NAT table in FIG.
  • the decapsulated IPv4 packet is forwarded to the corresponding IPv4 public network according to the converted network address (that is, the internal network address information of the IPv4 packet is converted into the external network address information).
  • the BNG has different access forms, such as PPP0E and VLAN.
  • the BNG allocates the link identifier of the link where the client device is located according to the access link. Assuming that the value of the link identifier is the same as the value of the flow label, the link label can be assigned a unique Flow Label value on the BNG according to a certain rule; for example, for the PPP0E link access, the value of the Flow Label can be For the PPPOE SESSION ID, the value of the Flow Label can be the VLAN ID for the VLAN access.
  • the BNG can also assign the value of the Flow Label to the device, ensure the uniqueness of the Flow Label, and facilitate the forwarding of the packet.
  • the link identifier includes one or more of the following information: an access device slot number, a port number, and a tunnel identifier between the client device and the gateway.
  • the AFTR receives the IPv6 packet sent by the BNG, obtains the flow label Flow Label value in the IPv6 packet, and according to the flow label Flow Label and the tunnel identifier ID (the tunnel identifier is the gateway and the AFTR) Inter-network port number), internal network port number (IPv6 internal network port number), and protocol type (IPv6 private network protocol type). Fill the above values into the internal network address information (that is, the key of the forward NAT table).
  • the external network address information ie, the content of the forward NAT table
  • the external network address information includes an external network IP address and an external network port number.
  • the generation of the table in FIG. 6 according to the external network port number generated in the table in FIG. 5, the external network IP address, and the protocol type of the IPv6 public network, the values of the items are respectively filled in the options corresponding to the Key of the reverse NAT table.
  • the correspondence between the key and the content of the reverse NAT table obtains the content of the reverse NAT table, that is, the internal network address information and the IP address of the internal network are obtained according to the external network address information and the protocol type of the external network.
  • the AFTR receives the IPv4 packet sent by the external network (that is, the IPv4 public network), obtains the external network address information contained in the IPv4 packet, and the protocol type of the IPv4 public network, and then the AFTR according to the reverse NAT table key and the reverse NAT table.
  • the external network that is, the IPv4 public network
  • the packet header where the IPv6 packet header contains the flow label of the IPv6 packet, and the stream label is the value of the flow label, and then obtains the packet encapsulated by the tunnel, that is, the IPV6 packet, and sends the packet to the packet.
  • BNG receives the IPV6 packet sent by the AFTR, obtains the flow label Flow Label value of the IPv6 packet, and decapsulates the IPv6 packet to obtain an IPv4 packet.
  • IPv6 packet header is removed and the IPv4 packet is obtained. And then, according to the one-to-one correspondence between the flow label and the link identifier of the user equipment, obtain the session ID of the user equipment, and then forward the IPv4 packet to the corresponding HostD according to the session ID.
  • the IP addresses of the HostA and the HostD may overlap or be the same, so that different terminal users can be distinguished and sent.
  • the end user HostD of the message can receive feedback and improve user satisfaction.
  • FIG. 4 it is a schematic diagram of a network layout applied to another DS-LITE solution of a dual-stack simplified solution according to an embodiment of the present invention.
  • the user terminal UE E dials a link through an eNode B (Evolved Node B, a mobile base station of a 3G network), and a PGW (Public Data Network gateway) is used for the chain.
  • eNode B Evolved Node B, a mobile base station of a 3G network
  • PGW Public Data Network gateway
  • a unique link identifier (TED) is assigned to the router.
  • the PGW sets the correspondence between the TEID and the flow label Flow Label of the tunnel in the DS-LITE to correspond to the Flow Label—the link identifier of the user equipment.
  • the link layer identifier also includes the identifier of the tunnel from the client device to the GATEWAY; the AFTR converts the Flow Label as part of the NAT table, and also applies to the case where the IP addresses of the user terminals may overlap or be the same.
  • FIG. 4 The flow of the IPv4 packet forwarding in FIG. 4 is basically the same as that in the embodiment of FIG. 3. Therefore, the embodiment of the present invention will be described herein simply by referring to FIG. 4:
  • the PGW receives the uplink IPv4 packet sent by the UE E, obtains the link identifier information TEID in the uplink IPv4 packet, and then tunnels the uplink IPv4 packet according to the corresponding relationship between the TEID and the Flow Label of the IPv6 packet.
  • Encapsulation that is, adding an IPv6 packet header before the IPv4 packet, the IPv6 packet header includes the IPv6 Flow Label field, BNG After the value of the Flow Label of the obtained IPv6 packet is filled in the Flow Label field corresponding to the IPv6 packet header, the generated IPv6 packet is sent to the AFTR.
  • the AFTR receives the IPv6 packet sent by the PGW, and obtains the flow label information Flow Label of the IPv6 packet in the IPv6 packet according to the link identifier information TEID; the AFTR decapsulates the IPv6 packet to obtain an IPv4 packet, according to FIG. 5
  • the mapping between the forward NAT table of the middle table that is, the correspondence between the internal network address information and the external network information), performing network address translation of the IPv4 packet, and forwarding the IPv4 packet to the network address after the transfer Corresponding IPv4 public network.
  • the flow in the downstream direction can refer to the process in the downlink direction described in the embodiment of Fig. 3, and will not be described in detail here.
  • the IP address of the terminal user is overlapped or the same, and the flow label information of the IPv6 packet can be distinguished according to the flow label information of the IPv6 packet.
  • End user Use the link ID to map the Flow Label so that the NAT is independent of the user source IP. It can support the end user IP address overlapping or the same situation.
  • using the Flow Label 20 bit and the tunnel ID 12 bits as indexes you can make a 32-bit index. Key) , so do not change the original NAT implementation (mainly size and index length), more compatible with the original NAT implementation.
  • FIG. 7 is a schematic structural diagram of a device for forwarding a message according to an embodiment of the present invention, where the device includes:
  • the first packet receiving unit 71 is configured to receive an IPv6 packet sent by the gateway, and obtain a flow label of the IPv6 packet, where the flow label of the IPv6 packet has a one-to-one correspondence with the link identifier of the user equipment;
  • the first decapsulating unit 72 is configured to decapsulate the IPv6 packet.
  • the first address conversion unit 73 is configured to perform network address translation on the decapsulated packet according to the flow label, and the first packet sending unit 75 is configured to forward the decapsulated report according to the converted network address. Text.
  • the first address conversion unit 73 is configured to perform network address translation on the decapsulated packet according to the correspondence between the internal network address information and the external network address information, where the internal network address information is at least
  • the method includes: one or more combinations of a flow label, a tunnel identifier, and an internal network port number of the IPv6 packet; the foregoing external network address information includes: an external network address and an external network port number.
  • the foregoing apparatus may further include: the first packet receiving unit 71 is further configured to receive a packet sent by an external network, and obtain external network address information of the packet; and the first address converting unit 73 is further used. Performing network address translation on the packet according to the correspondence between the internal network address information and the external network address information; The encapsulating unit 74 is configured to perform tunnel encapsulation on the packet. The first packet sending unit 75 is further configured to send the encapsulated packet to the gateway according to the converted network address.
  • the flow label of the foregoing IPv6 packet may include: a virtual local area network (VLAN) VLAN identifier, or an Ethernet-based point-to-point protocol PPP0E session identifier.
  • the link identifier of the user equipment includes one or more of the following information. Combination: The slot number of the access device, the port number, and the tunnel identifier between the client device and the gateway.
  • FIG. 8 is a schematic structural diagram of another apparatus for forwarding a message according to an embodiment of the present invention, where the apparatus includes:
  • the second packet receiving unit 81 is configured to receive an IPv4 packet sent by the user equipment, and obtain a link identifier of the IPv4 packet.
  • the second information acquiring unit 83 is configured to obtain, according to the link identifier of the IPv4 packet, a flow label of the IPv6 packet by using a one-to-one correspondence between the flow label of the IPv6 packet and the link identifier of the user equipment.
  • the second encapsulating unit 84 is configured to perform tunnel encapsulation on the IPv4 packet according to the flow label of the IPv6 packet
  • the second packet sending unit 85 is configured to send the encapsulated packet to the local address switching router.
  • the foregoing apparatus may further include: the second packet receiving unit 81, further configured to receive the IPv6 packet sent by the local address switching router, and obtain the flow label of the IPv6 packet; the second decapsulation unit 82, And the second information obtaining unit 83 is further configured to: use the flow label of the IPv6 packet and the link identifier of the user equipment according to the flow label according to the flow label.
  • the second packet sending unit 85 is further configured to forward the IPv4 packet according to the link identifier of the user equipment.
  • FIG. 9 a schematic diagram of a system for forwarding a message according to an embodiment of the present invention, where the system includes:
  • the gateway 91 is configured to receive the IPv4 packet sent by the user equipment, and obtain the link identifier of the IPv4 packet. According to the link identifier of the IPv4 packet, the flow label of the IPv6 packet and the chain of the user equipment The one-to-one correspondence of the path identifiers, the flow label of the IPv6 packet is obtained; the IPv4 packet is encapsulated according to the flow label of the IPv6 packet; and the encapsulated packet is sent to the local address switching router AFTR;
  • the local address switching router AFTR92 is configured to receive the IPv6 packet sent by the gateway, and obtain the flow label of the IPv6 packet, where the flow label of the IPv6 packet has a one-to-one correspondence with the link identifier of the user equipment; Decapsulating the IPv6 packet; performing network address translation on the decapsulated packet according to the flow label; and forwarding the decapsulated packet according to the converted network address.
  • the same tunnel corresponds to the same tunnel.
  • the implementation can distinguish different end users, so that the end users who send the packets can receive feedback and improve user satisfaction.
  • Use the link ID to map the Flow Label so that the NAT is independent of the user source IP. It can support the end user IP address overlapping or the same situation.
  • using the Flow Label 20 bit and the tunnel ID 12 bits as indexes you can make a 32-bit index. Key) , so do not change the original NAT implementation (mainly size and index length), more compatible with the original NAT implementation.
  • the present invention can be implemented by means of software plus a necessary hardware platform, and of course, all can be implemented by hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, all or part of the technical solution of the present invention contributing to the background art may be embodied in the form of a software product that can be used to perform the above-described method flow.
  • the computer software product can be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to perform various embodiments of the present invention.

Description

一种报文转发的方法、 装置及系统
本申请要求于 2010年 5月 11日提交中国专利局、 申请号为 201010171634. 5、发明 名称为 "一种报文转发的方法、 装置及系统"的中国专利申请的优先权, 其全部内容通 过引用结合在本申请中。 技术领域 本发明涉及网络技术领域, 尤其涉及一种报文转发的方法、 装置及系统。 背景技术
IPv6 ( Internet Protocol Version 6, 第 6版互联网协议) 被认为是下一代互联 网的核心, 得到各国政府和电信运营商的重视和推动。
在 IPv6 演进过程中, 根据其网络状况以及演进程度主要有双栈 +NAT ( Network Address Translation, 网络地址转换), 6RD ( IPv6 Rapid Deployment, IPv6快速部署), DS-LITE (Dual-Stack Lite, 双栈简化方案) 这几种演进方案, 而 DS-LITE方案主要是 针对 IPv6演进的中后期,即 IPv4孤岛穿越 IPv6的网络访问 IPv4的因特网( internet )。 DS-LITE方案对于 IPv4上行报文通常在 CPE ( Customer Premise Equipment, 用户端设 备) 上发起隧道 ( IPv4 over IPv6 ) 至 AFTR (Address Fami ly Transition Router, 本 地地址切换路由器), 并在 AFTR中终结该隧道 (tunnel ), 再做 IPv4至 IPv4 NAT后, 将上行报文转发到 IPv4网络。
现网一般遵循该组网方式, 如终端或用户端设备采用 PPP0E ( point to point protocol over Ethernet , 基于以太网的点到点协议) 的方式接入 BNG ( Broadband Network Gateway, 宽带网络网关); BNG采用 Radius ( Remote Authentication Dial In User Service , 远程用户拨号认证系统) 协议与 AAA server ( Authentication Authorization^ Accounting server, 验证、 授权和记账服务器) 进行认证和计费。 在 此组网方式中, 一般一个 BNG与 AFTR之间只建立一个或少量几个 DS-LITE隧道。
在实现本发明过程中,发明人发现现有技术中至少存在如下问题:在现有技术 IPv6 演进中, 当网关与本地地址切换路由器 AFTR存在多个链路对应同一个隧道进行网络地 址转换时, 由于 AFTR接收网关发送的报文之后, 需要根据用户端设备的 IP地址区分用 户端设备, 对于用户端设备的 IP地址重叠或相同的情况, 本地地址切换路由器则不能 区分不同终端用户, 导致发送报文的终端用户无法接收反馈。 发明内容
本发明实施例提供一种报文转发的方法、装置及系统, 当网关与 AFTR之间存在多个 链路对应同一个隧道进行网络地址转换时, 对于终端用户的 IP地址重叠或相同的情况, 实现能够区分不同终端用户。
一方面, 本发明实施例提供了一种报文转发的方法, 所述方法包括: 接收网关发送 的 IPv6报文, 并获取上述 IPv6报文的流标签, 其中, 上述 IPv6报文的流标签与用户端设 备的链路标识一一对应; 对上述 IPv6报文进行解封装; 根据上述流标签, 对解封装后 的报文进行网络地址转换; 根据转换后的网络地址, 转发上述解封装后的报文。
另一方面, 本发明实施例提供了一种报文转发的方法, 所述方法包括: 接收用户端 设备发送的 IPv4报文,并获取上述 IPv4报文的链路标识;根据上述 IPv4报文的链路标识, 通过 IPv6报文的流标签与上述用户端设备的链路标识的一一对应关系, 获取上述 IPv6报 文的流标签; 根据上述 IPv6报文的流标签, 将上述 IPv4报文进行隧道封装, 并将隧道封 装后的报文发送给本地地址切换路由器。
又一方面, 本发明实施例提供了一种报文转发的装置, 所述装置包括: 第一报文接 收单元,用于接收网关发送的 IPv6报文,并获取上述 IPv6报文的流标签,其中,上述 IPv6 报文的流标签与用户端设备的链路标识一一对应; 第一解封装单元, 用于对上述 IPv6 报文进行解封装; 第一地址转换单元, 用于根据上述流标签, 对解封装后的报文进行网 络地址转换; 第一报文发送单元, 用于根据转换后的网络地址, 转发上述解封装后的报 文。
又一方面, 本发明实施例提供了一种报文转发的装置, 所述装置包括: 第二报文接 收单元, 用于接收用户端设备发送的 IPv4报文, 并获取上述 IPv4报文的链路标识; 第二 信息获取单元, 用于根据上述 IPv4报文的链路标识, 通过 IPv6报文的流标签与上述用户 端设备的链路标识的一一对应关系, 获取上述 IPv6报文的流标签; 第二封装单元, 用于 根据上述 IPv6报文的流标签, 将上述 IPv4报文进行隧道封装; 第二报文发送单元, 用于 将隧道封装后的报文发送给本地地址切换路由器。
再一方面, 本发明实施例提供了一种报文转发的系统, 所述系统包括: 网关, 用于 接收用户端设备发送的 IPv4报文, 并获取上述 IPv4报文的链路标识; 根据上述 IPv4报文 的链路标识, 通过 IPv6报文的流标签与上述用户端设备的链路标识的一一对应关系, 获 取上述 IPv6报文的流标签;根据上述 IPv6报文的流标签,将上述 IPv4报文进行隧道封装; 将隧道封装后的报文发送给本地地址切换路由器; 本地地址切换路由器, 用于接收上述 网关发送的 IPv6报文, 并获取上述 IPv6报文的流标签, 其中, 上述 IPv6报文的流标签与 用户端设备的链路标识一一对应; 对上述 IPv6报文进行解封装; 根据上述流标签, 对解 封装后的报文进行网络地址转换; 根据转换后的网络地址, 转发上述解封装后的报文。
上述技术方案具有如下有益效果: 因为采用接收网关发送的 IPv6报文, 并获取上述 IPv6报文的流标签, 其中, 上述 IPv6报文的流标签与用户端设备的链路标识一一对应; 对上述 IPv6报文进行解封装; 根据上述流标签, 对解封装后的报文进行网络地址转换; 根据转换后的网络地址, 转发上述解封装后的报文的技术手段, 所以当网关与 AFTR之间 存在多个链路对应同一个隧道进行网络地址转换时,对于终端用户的 IP地址重叠或相同 的情况, 实现能够区分不同终端用户, 使发送报文的终端用户能够接收反馈, 提高用户 满意度。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实施例或现有 技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例一种报文转发的方法流程图;
图 2为本发明实施例另一种报文转发的方法流程图;
图 3为本发明实施例应用于一种双栈简化方案 DS-LITE方案的网络布局示意图; 图 4为本发明实施例应用于另一种双栈简化方案 DS-LITE方案的网络布局示意图; 图 5为本发明实施例正向 NAT表示意图;
图 6为本发明实施例反向 NAT表示意图;
图 7为本发明实施例一种报文转发的装置结构示意图;
图 8为本发明实施例另一种报文转发的装置结构示意图;
图 9为本发明实施例一种报文转发的系统示意图。 具体实施方式 下面通过实施例对本发明的具体实现过程进行举例说明。 显然, 下面所描述的实施 例是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通 技术人员在没有做出创造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的 范围。
如图 1所示, 为本发明实施例一种报文转发的方法流程图, 所述方法包括:
101、 接收网关发送的 IPv6报文, 并获取上述 IPv6报文的流标签, 其中, 上述 IPv6 报文的流标签与用户端设备的链路标识一一对应。
可选的, 上述 IPv6报文的流标签可以包括: 虚拟局域网 (Virtual Local Area Network, VLAN)标识, 或者基于以太网的点到点协议 PPPOE会话标识; 上述用户端设备 的链路标识可以包括如下信息中的一种或多种组合: 接入设备槽位号、 端口号、 上述用 户端设备与网关之间的隧道标识。 接收网关发送的 IPv6报文后, 可以从 IPv6报文头中的 流标签域中解析获取上述 IPv6报文的流标签。上述链路标识的值可以与上述流标签的值 相同或者根据上述流标签信息计算获得的, 本发明实施例并不以此为限。
102、 对上述 IPv6报文进行解封装。
103、 根据上述流标签, 对解封装后的报文进行网络地址转换。
可选的, 上述根据上述流标签, 对上述解封装后的报文进行网络地址转换具体可以 包括: 根据内部网络地址信息与外部网络地址信息的对应关系, 对上述解封装后的报文 进行网络地址转换; 其中, 上述内部网络地址信息至少可以包括: IPv6报文的流标签、 隧道标识和内部网络端口号的一种或多种组合; 上述外部网络地址信息可以包括: 外部 网络地址和外部网络端口号。
104、 根据转换后的网络地址, 转发上述解封装后的报文。
可选的, 上述解封装后的报文可以为 IPv4报文。 可选的, 上述方法还可以包括: 接 收外部网络发送的报文; 获取上述报文的外部网络地址信息; 根据内部网络地址信息与 外部网络地址信息的对应关系, 对上述报文进行网络地址转换; 并对上述报文进行隧道 封装; 根据转换后的网络地址, 将隧道封装后的报文发送给上述网关。
对应于图 1所述方法, 如图 2所示, 为本发明实施例另一种报文转发的方法流程图, 所述方法包括:
201、 接收用户端设备发送的 IPv4报文, 并获取上述 IPv4报文的链路标识。
202、 根据上述 IPv4报文的链路标识, 通过 IPv6报文的流标签与上述用户端设备的 链路标识的一一对应关系, 获取上述 IPv6报文的流标签。
203、 根据上述 IPv6报文的流标签, 将上述 IPv4报文进行隧道封装, 并将隧道封装 后的报文发送给本地地址切换路由器 (Address Family Transition Router, AFTR) 。 可选的, 上述方法还可以包括: 接收上述本地地址切换路由器发送的 IPv6报文, 获 取上述 IPv6报文的流标签; 将上述 IPv6报文进行隧道解封装, 获得 IPv4报文; 根据上述 流标签, 通过上述 IPv6报文的流标签与上述用户端设备的链路标识的一一对应关系, 获 取上述用户端设备的链路标识; 根据上述用户端设备的链路标识, 转发上述 IPv4报文。
本发明上述方法实施例中, 当网关与 AFTR之间存在多个链路对应同一个隧道进行网 络地址转换时,对于终端用户的 IP地址重叠或相同的情况,实现能够区分不同终端用户, 使发送报文的终端用户能够接收反馈, 提高用户满意度。
如图 3所示, 为本发明实施例应用于一种双栈简化方案 DS-LITE方案的网络布局示意 图的情况。
图 3中用户端设备为泛指, 该用户端设备可以包括主机或者终端以及 CPE, 本实时例 中主机 HostA、 B、 C、 D, 和各 CPE均可为用户端设备, 接入设备以数字用户线接入复接 器 DSLAM设备为例, 网关以宽带网络网关 BNG为例进行下面的应用场景的描述。
图 3中各个设备间的连接关系如下: 4个主机分别为 HostA、 HostB、 HostC和 HostD, 其中各个主机分别与 4个用户端设备 CPE连接, 各 CPE采用 PPP0E的方式, 通过数字用户 线接入复接器 DSLAM接入宽带网络网关 BNG; BNG采用远程用户拨号认证系统 Radius协议 与验证、 授权和记账服务器 AAA server进行认证和计费; 其中, 用户端设备在 IPv4私网 中, BNG与 AFTR为 IPv6网络, AFTR右侧的网络为 IPv4公网, 且 HostA与 HostD的 IP地址可 能重叠或者相同。
下面结合图 3对本发明实施例的网络地址转换进行详细描述:
上行方向:
HostD通过 CPE和 DSLAM, 将 IPv4报文, 发送到 BNG。 BNG接收 HostD发送的 IPv4报文, 并获取上述 IPv4报文的链路标识, 此处获取的链路标识可以为会话标识 Session ID (一 般 Host D采用 PPP0E链路拨号, 贝 ijBNG为该 PPP0E链路分配唯一的用户端设备的 PPP0E链路 的会话标识 Session ID, 该会话标识为 16位) 。 BNG根据上述 IPv4报文的 Session ID, 通过 IPv6报文的流标签 Flow Label与上述用户端设备的 Session ID的——对应关系 (如 果 BNG是第一次接收 IPV4报文, 则可能没有保存该对应关系, 这个时候需要建立, 建立 成功之后进行保存, 以便下一次 BNG接收上行 IPv4报文之后再根据保存的对应关系进行 后续操作。 该对应关系的建立可以人工设置, 或者在系统启动时自动建立保存本发明实 施例并不以此为限) , 获取上述 IPv6报文的流标签 Flow Label。 BNG根据上述 IPv6报文 的流标签 Flow Label ,将上述 IPv4报文进行隧道封装(即在 IPv4报文前增加 IPv6报文头, 该 IPv6报文头中包括 IPv6的 Flow Label域, BNG将获取的 IPv6报文的 Flow Label的值填 入 IPv6报文头对应的 Flow Label域中) , 并将隧道封装后的报文发送给 AFTR。
AFTR接收 BNG发送的 IPv6报文(在 AFTR接收 BNG发送的 IPv6报文的过程中, 可以同时 生成图 5中的正向 NAT表和图 6中的反向 NAT表, 表的内容将在下面进行详细介绍) , 并获 取上述 IPv6报文的流标签 Flow Label值, 其中, 上述 IPv6报文的流标签 Flow Label值与 用户端设备的链路标识一一对应。 AFTR对上述 IPv6报文进行解封装(即去除 IPv6报文头, 获取其中的 IPv4报文) 。 根据上述流标签 Flow Label , 利用图 5中的正向 NAT表 (根据保 存的上述内部网络地址信息 (即图 5中的正向 NAT表的 key) 与外部网络地址信息 (即图 5 中的正向 NAT表的内容, 包括外部网络 IP地址和 外部网络端口号)的对应关系)对解封 装后的 IPv4报文进行网络地址转换。 根据转换后的网络地址(即将上述 IPv4报文的内部 网络地址信息转换成外部网络地址信息) , 转发上述解封装后的 IPv4报文到对应的 IPv4 公网中。
需要说明的是, BNG有不同的接入形式, 如 PPP0E、 VLAN等, BNG对于接收的报文, 根据其接入链路进行客户端设备所在链路的链路标识分配。假设上述链路标识的值与上 述流标签的值相同,则可以按一定的规则给链路标识分配在 BNG上唯一对应的 Flow Label 值; 例如: 对于 PPP0E链路接入, Flow Label的值可以为 PPPOE SESSION ID; 对于 VLAN 接入, Flow Label的值可以为 VLAN ID; BNG也可以自己统一分配 Flow Label的值, 保证 Flow Label的唯一性, 以及报文转发的方便性, 所述用户端设备的链路标识包括如下信 息中的一种或多种:接入设备槽位号、端口号、所述用户端设备与网关之间的隧道标识。
在 AFTR获取 IPv6报文的过程中, 生成图 5—正向 NAT表和图 6—反向 NAT表的具体过程 如下:
图 5中表的生成: AFTR接收 BNG发送的 IPv6报文, 获取该 IPv6报文中的流标签 Flow Label值, 并根据所述流标签 Flow Label、 以及隧道标识 ID (该隧道标识为网关与 AFTR 之间的隧道标识) 、 内部网络端口号(IPv6内部网络端口号)和协议类型 (IPv6私网协议 类型) , 将上述值分别填入内部网络地址信息 (即为正向 NAT表的 Key) 的各选项中, 根 据内部网络地址信息与外部网络地址信息的对应关系, 获取外部网络地址信息(即正向 NAT表的内容) , 所述外部网络地址信息包括外部网络 IP地址以及外部网络端口号。 图 6中表的生成:根据图 5中表中生成的外部网络端口号、外部网络 IP地址,以及 IPv6 公网的协议类型, 将各项的值分别填入反向 NAT表的 Key对应的选项中, 根据反向 NAT表 的 key与反向 NAT表的内容的对应关系, 获得反向 NAT表的内容, 即根据外部网络地址信 息以及外部网络的协议类型, 获得内部网络地址信息以及内部网络的 IP地址。
下行方向:
AFTR接收外部网络 (即 IPv4公网)发送的 IPv4报文, 获取该 IPv4报文中包含的外部 网络地址信息以及 IPv4公网的协议类型, 然后 AFTR根据反向 NAT表的 key与反向 NAT表的 内容的对应关系(即内部网络地址信息与外部网络地址信息的对应关系),进行上述 IPv4 报文的网络地址转换, 然后将该 IPv4报文进行隧道封装(即在 IPv4报文前增加 IPv6报文 头, 其中该 IPv6报文头中包含 IPv6报文的流标签, 该流标签即为流标签的值)后, 获得 隧道封装后的报文, 即 IPV6报文, 将所述报文发送给 BNG。 BNG接收该 AFTR发送的 IPV6报 文,获取该 IPv6报文的流标签 Flow Label值,并将该 IPv6报文进行隧道解封装,获得 IPv4 报文 (去除 IPv6报文头, 获取其中的 IPv4报文) , 然后根据该 Flow Label与用户端设备 的链路标识 Session ID的一一对应关系, 获取上述用户端设备的 Session ID后, 根据所 述 Session ID转发该 IPv4报文给对应的 HostD。
本发明上述方法实施例当 BNG与 AFTR之间存在多个链路对应同一个隧道进行网络地 址转换时, 对于 HostA与 HostD的 IP地址可能重叠或者相同的情况, 实现能够区分不同终 端用户, 使发送报文的终端用户 HostD能够接收反馈, 提高用户满意度。
上述方法还适用于无线的场景, 例如图 4所示。 如图 4所示, 为本发明实施例应用于 另一种双栈简化方案 DS-LITE方案的网络布局示意图。 图 4中, 用户终端 UE E采用一链路 经过 eNode B (Evolved Node B, 演进型 Node B, 为 3G网络的移动基站)拨号, PGW (Public Data Network gateway , 公用数据网网关)有为该链路分配唯一的链路标识 TEID (PGW tunnel identity, TEID) , PGW设置 TEID与 DS-LITE中隧道的流标签 Flow Label对应关系, 使其与 Flow Label—一对应 (该用户端设备的链路标识, 即链路层标识也包括用户端设 备到 GATEWAY的隧道的标识) ; AFTR将该 Flow Label作为 NAT表的一部分进行转换, 也适 用于该用户终端的 IP地址可能重叠或者相同的情况。
由于该图 4的 IPv4报文转发的流程与图 3的实施例基本一样, 因此, 这里仅简单结合 图 4对本发明实施例进行描述:
上行方向:
PGW接收 UE E发送的上行 IPv4报文, 获取该上行 IPv4报文中的链路标识信息 TEID, 然后根据该 TEID与 IPv6报文的 Flow Label的——对应关系, 将该上行 IPv4报文进行隧道 封装(即在 IPv4报文前增加 IPv6报文头, 该 IPv6报文头中包括 IPv6的 Flow Label域, BNG 将获取的 IPv6报文的 Flow Label的值填入 IPv6报文头对应的 Flow Label域中) 后, 将生 成的 IPv6报文, 发送给 AFTR。
AFTR接收 PGW发送的 IPv6报文,根据该链路标识信息 TEID,获取该 IPv6报文中的 IPv6 报文的流标签信息 Flow Label ; AFTR将上述 IPv6报文解封装获得 IPv4报文, 根据图 5中 表的正向 NAT表的对应关系 (即内部网络地址信息与外部网络信息的对应关系) , 进行 上述 IPv4报文的网络地址转换, 根据转后后的网络地址, 将该 IPv4报文转发到对应的 IPv4公网中。
下行方向的流程可以参照图 3实施例描述的下行方向的过程, 这里就不再详细进行 描述了。
本发明方法实施例上述技术方案中当网关与 AFTR之间只有一个隧道,进行网络地址 转换时, 对于终端用户的 IP地址重叠或相同的情况, 实现能够根据 IPv6报文的流标签信 息来区分不同终端用户。 利用链路 ID映射 Flow Label , 使 NAT与用户源 IP无关, 可以支 持终端用户 IP地址 overlapping或相同的情况;另外,利用 Flow Label 20位和隧道 ID 12 位作为索引, 可以凑成 32位索引 (key) , 这样不用改变原有的 NAT实现 (主要是大小以 及索引长度) , 更兼容原有的 NAT实现。 对应于上述方法实施例, 如图 7所示, 为本发明实施例一种报文转发的装置结构示 意图, 所述装置包括:
第一报文接收单元 71, 用于接收网关发送的 IPv6报文, 并获取上述 IPv6报文的流标 签, 其中, 上述 IPv6报文的流标签与用户端设备的链路标识一一对应;
第一解封装单元 72, 用于对上述 IPv6报文进行解封装;
第一地址转换单元 73,用于根据上述流标签,对解封装后的报文进行网络地址转换; 第一报文发送单元 75, 用于根据转换后的网络地址, 转发上述解封装后的报文。 可选的, 上述第一址转换单元 73, 具体用于根据内部网络地址信息与外部网络地址 信息的对应关系, 对上述解封装后的报文进行网络地址转换; 其中, 上述内部网络地址 信息至少包括: IPv6报文的流标签、 隧道标识和内部网络端口号的一种或多种组合; 上 述外部网络地址信息包括: 外部网络地址和外部网络端口号。
可选的, 上述装置还可以包括: 上述第一报文接收单元 71, 还用于接收外部网络发 送的报文; 获取上述报文的外部网络地址信息; 上述第一地址转换单元 73, 还用于根据 内部网络地址信息与外部网络地址信息的对应关系, 对上述报文进行网络地址转换; 第 一封装单元 74, 用于对上述报文进行隧道封装; 上述第一报文发送单元 75, 还用于根据 转换后的网络地址, 将隧道封装后的报文发送给上述网关。
可选的, 上述 IPv6报文的流标签可以包括: 虚拟局域网 VLAN标识, 或者基于以太网 的点到点协议 PPP0E会话标识; 上述用户端设备的链路标识包括如下信息中的一种或多 种组合: 接入设备槽位号、 端口号、 上述用户端设备与网关之间的隧道标识。
对应于上述装置, 如图 8所示, 为本发明实施例另一种报文转发的装置结构示意图, 所述装置包括:
第二报文接收单元 81, 用于接收用户端设备发送的 IPv4报文, 并获取上述 IPv4报文 的链路标识;
第二信息获取单元 83, 用于根据上述 IPv4报文的链路标识, 通过 IPv6报文的流标签 与上述用户端设备的链路标识的一一对应关系, 获取上述 IPv6报文的流标签;
第二封装单元 84,用于根据上述 IPv6报文的流标签,将上述 IPv4报文进行隧道封装; 第二报文发送单元 85, 用于将隧道封装后的报文发送给本地地址切换路由器。 可选的, 上述装置还可以包括: 上述第二报文接收单元 81, 还用于接收上述本地地 址切换路由器发送的 IPv6报文, 获取上述 IPv6报文的流标签; 第二解封装单元 82, 用于 将上述 IPv6报文进行隧道解封装, 获得 IPv4报文; 上述第二信息获取单元 83, 还用于根 据上述流标签,通过上述 IPv6报文的流标签与上述用户端设备的链路标识的一一对应关 系, 获取上述用户端设备的链路标识; 第二报文发送单元 85, 还用于根据上述用户端设 备的链路标识, 转发上述 IPv4报文。
对应于上述装置, 如图 9所示, 为本发明实施例一种报文转发的系统示意图, 上述 系统包括:
网关 91, 用于接收用户端设备发送的 IPv4报文, 并获取上述 IPv4报文的链路标识; 根据上述 IPv4报文的链路标识,通过 IPv6报文的流标签与上述用户端设备的链路标识的 一一对应关系, 获取上述 IPv6报文的流标签; 根据上述 IPv6报文的流标签, 将上述 IPv4 报文进行隧道封装; 将隧道封装后的报文发送给本地地址切换路由器 AFTR;
本地地址切换路由器 AFTR92, 用于接收上述网关发送的 IPv6报文, 并获取上述 IPv6 报文的流标签, 其中, 上述 IPv6报文的流标签与用户端设备的链路标识一一对应; 对上 述 IPv6报文进行解封装; 根据上述流标签, 对解封装后的报文进行网络地址转换; 根据 转换后的网络地址, 转发上述解封装后的报文。
本发明上述装置或系统实施例中, 当网关与 AFTR之间存在多个链路对应同一个隧道 进行网络地址转换时, 对于终端用户的 IP地址重叠或相同的情况, 实现能够区分不同终 端用户, 使发送报文的终端用户能够接收反馈, 提高用户满意度。 利用链路 ID映射 Flow Label , 使 NAT与用户源 IP无关, 可以支持终端用户 IP地址 overlapping或相同的情况; 另外, 利用 Flow Label 20位和隧道 ID 12位作为索引, 可以凑成 32位索引 (key) , 这 样不用改变原有的 NAT实现 (主要是大小以及索引长度) , 更兼容原有的 NAT实现。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本发明可借助软 件加必需的硬件平台的方式来实现, 当然也可以全部通过硬件来实施, 但很多情况下前 者是更佳的实施方式。 基于这样的理解, 本发明的技术方案对背景技术做出贡献的全部 或者部分可以以软件产品的形式体现出来,所述的软件产品在可以用于执行上述的方法 流程。 该计算机软件产品可以存储在存储介质中, 如 R0M/RAM、 磁碟、 光盘等, 包括若 干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等)执行 本发明各个实施例或者实施例的某些部分所述的方法。
以上所述, 仅为本发明较佳的具体实施方式, 但本发明的保护范围并不局限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到的变化或替 换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护范围应该以权利要求的保 护范围为准。

Claims

权利要求
1、 一种报文转发的方法, 其特征在于, 所述方法包括:
接收网关发送的 IPv6报文, 并获取所述 IPv6报文的流标签, 其中, 所述 IPv6报文的 流标签与用户端设备的链路标识一一对应;
对所述 IPv6报文进行解封装;
根据所述流标签, 对解封装后的报文进行网络地址转换;
根据转换后的网络地址, 转发所述解封装后的报文。
2、 如权利要求 1所述方法, 其特征在于, 所述根据所述流标签, 对所述解封装后的 报文进行网络地址转换具体包括:
根据内部网络地址信息与外部网络地址信息的对应关系,对所述解封装后的报文进 行网络地址转换; 其中, 所述内部网络地址信息至少包括: IPv6报文的流标签、 隧道标 识和内部网络端口号的一种或多种组合; 所述外部网络地址信息包括: 外部网络地址和 外部网络端口号。
3、 如权利要求 1或 2所述方法, 其特征在于, 所述方法还包括:
接收外部网络发送的报文;
获取所述报文的外部网络地址信息;
根据内部网络地址信息与外部网络地址信息的对应关系,对所述报文进行网络地址 转换; 并对所述报文进行隧道封装;
根据转换后的网络地址, 将隧道封装后的报文发送给所述网关。
4、 如权利要求 1至 3任一项所述方法, 其特征在于, 所述 IPv6报文的流标签包括: 虚拟局域网 VLAN标识, 或者基于以太网的点到点协议 PPP0E会话标识; 所述用户端设备 的链路标识包括如下信息中的一种或多种组合: 接入设备槽位号、 端口号、 所述用户端 设备与网关之间的隧道标识。
5、 一种报文转发的方法, 其特征在于, 所述方法包括:
接收用户端设备发送的 IPv4报文, 并获取所述 IPv4报文的链路标识;
根据所述 IPv4报文的链路标识,通过 IPv6报文的流标签与所述用户端设备的链路标 识的一一对应关系, 获取所述 IPv6报文的流标签;
根据所述 IPv6报文的流标签, 将所述 IPv4报文进行隧道封装, 并将隧道封装后的报 文发送给本地地址切换路由器。
6、 如权利要求 5所述方法, 其特征在于, 所述方法还包括: 接收所述本地地址切换路由器发送的 IPv6报文, 获取所述 IPv6报文的流标签; 将所述 IPv6报文进行隧道解封装, 获得 IPv4报文;
根据所述流标签,通过所述 IPv6报文的流标签与所述用户端设备的链路标识的一一 对应关系, 获取所述用户端设备的链路标识;
根据所述用户端设备的链路标识, 转发所述 IPv4报文。
7、 一种报文转发的装置, 其特征在于, 所述装置包括:
第一报文接收单元,用于接收网关发送的 IPv6报文,并获取所述 IPv6报文的流标签, 其中, 所述 IPv6报文的流标签与用户端设备的链路标识一一对应;
第一解封装单元, 用于对所述 IPv6报文进行解封装;
第一地址转换单元, 用于根据所述流标签, 对解封装后的报文进行网络地址转换; 第一报文发送单元, 用于根据转换后的网络地址, 转发所述解封装后的报文。
8、 如权利要求 7所述装置, 其特征在于, 所地第一址转换单元, 具体用于根据内部 网络地址信息与外部网络地址信息的对应关系,对所述解封装后的报文进行网络地址转 换; 其中, 所述内部网络地址信息至少包括: IPv6报文的流标签、 隧道标识和内部网络 端口号的一种或多种组合; 所述外部网络地址信息包括: 外部网络地址和外部网络端口 号。
9、 如权利要求 7或 8所述装置, 其特征在于, 所述装置还包括:
所述第一报文接收单元, 还用于接收外部网络发送的报文; 获取所述报文的外部网 络地址信息;
所述第一地址转换单元,还用于根据内部网络地址信息与外部网络地址信息的对应 关系, 对所述报文进行网络地址转换;
第一封装单元, 用于对所述报文进行隧道封装;
所述第一报文发送单元, 还用于根据转换后的网络地址, 将隧道封装后的报文发送 给所述网关。
10、 如权利要求 7至 9任一项所述装置, 其特征在于, 所述 IPv6报文的流标签包括: 虚拟局域网 VLAN标识, 或者基于以太网的点到点协议 PPP0E会话标识; 所述用户端设备 的链路标识包括如下信息中的一种或多种组合: 接入设备槽位号、 端口号、 所述用户端 设备与网关之间的隧道标识。
11、 一种报文转发的装置, 其特征在于, 所述装置包括: 第二报文接收单元, 用于接收用户端设备发送的 IPv4报文, 并获取所述 IPv4报文的 链路标识;
第二信息获取单元, 用于根据所述 IPv4报文的链路标识, 通过 IPv6报文的流标签与 所述用户端设备的链路标识的一一对应关系, 获取所述 IPv6报文的流标签;
第二封装单元, 用于根据所述 IPv6报文的流标签, 将所述 IPv4报文进行隧道封装; 第二报文发送单元, 用于将隧道封装后的报文发送给本地地址切换路由器。
12、 如权利要求 11所述装置, 其特征在于, 所述装置还包括:
所述第二报文接收单元, 还用于接收所述本地地址切换路由器发送的 IPv6报文, 获 取所述 IPv6报文的流标签;
第二解封装单元, 用于将所述 IPv6报文进行隧道解封装, 获得 IPv4报文; 所述第二信息获取单元, 还用于根据所述流标签, 通过所述 IPv6报文的流标签与所 述用户端设备的链路标识的一一对应关系, 获取所述用户端设备的链路标识;
第二报文发送单元, 还用于根据所述用户端设备的链路标识, 转发所述 IPv4报文。
13、 一种报文转发的系统, 其特征在于, 所述系统包括:
网关, 用于接收用户端设备发送的 IPv4报文, 并获取所述 IPv4报文的链路标识; 根 据所述 IPv4报文的链路标识,通过 IPv6报文的流标签与所述用户端设备的链路标识的一 一对应关系, 获取所述 IPv6报文的流标签; 根据所述 IPv6报文的流标签, 将所述 IPv4报 文进行隧道封装; 将隧道封装后的报文发送给本地地址切换路由器;
本地地址切换路由器, 用于接收所述网关发送的 IPv6报文, 并获取所述 IPv6报文的 流标签, 其中, 所述 IPv6报文的流标签与用户端设备的链路标识一一对应; 对所述 IPv6 报文进行解封装; 根据所述流标签, 对解封装后的报文进行网络地址转换; 根据转换后 的网络地址, 转发所述解封装后的报文。
PCT/CN2011/070711 2010-05-11 2011-01-27 一种报文转发的方法、装置及系统 WO2011140843A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP11780065.6A EP2458799B1 (en) 2010-05-11 2011-01-27 Method, apparatus and system for forwarding messages
KR1020127006300A KR101455219B1 (ko) 2010-05-11 2011-01-27 패킷을 포워딩하기 위한 방법, 장치 및 시스템
JP2012530121A JP5499391B2 (ja) 2010-05-11 2011-01-27 メッセージを転送するための方法、装置およびシステム
US13/674,924 US9100352B2 (en) 2010-05-11 2012-11-12 Method, device, and system for forwarding packet

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010171634.5 2010-05-11
CN201010171634.5A CN102244688B (zh) 2010-05-11 2010-05-11 一种报文转发的方法、装置及系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/674,924 Continuation US9100352B2 (en) 2010-05-11 2012-11-12 Method, device, and system for forwarding packet

Publications (1)

Publication Number Publication Date
WO2011140843A1 true WO2011140843A1 (zh) 2011-11-17

Family

ID=44913891

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/070711 WO2011140843A1 (zh) 2010-05-11 2011-01-27 一种报文转发的方法、装置及系统

Country Status (6)

Country Link
US (1) US9100352B2 (zh)
EP (1) EP2458799B1 (zh)
JP (1) JP5499391B2 (zh)
KR (1) KR101455219B1 (zh)
CN (1) CN102244688B (zh)
WO (1) WO2011140843A1 (zh)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2695364A1 (de) * 2011-04-01 2014-02-12 Unify GmbH & Co. KG Verfahren zur adressierung von nachrichten in einem computernetzwerk
US8943000B2 (en) 2012-01-20 2015-01-27 Cisco Technology, Inc. Connectivity system for multi-tenant access networks
CN102761440B (zh) * 2012-06-28 2015-01-28 华为终端有限公司 管理IPv4终端的通道的建立方法及网络网关
US9553801B2 (en) * 2012-09-25 2017-01-24 Google Inc. Network device
CN104040987B (zh) * 2012-12-27 2017-05-24 华为技术有限公司 用户面数据传输方法、移动管理网元、演进型基站及系统
US9124525B2 (en) * 2013-06-24 2015-09-01 Cisco Technology, Inc. User-equipment-initiated framed routes on customer-premises equipment for wireless wide area networks
CN104283787B (zh) * 2013-07-12 2017-07-28 中国电信股份有限公司 一种路由方法和系统
CN103685032B (zh) * 2013-12-09 2017-06-23 福建星网锐捷网络有限公司 报文转发方法及网络地址转换服务器
CN104954336B (zh) * 2014-03-28 2019-05-17 中兴通讯股份有限公司 IPv6网络参数处理方法、装置、系统及AAA服务器
CN105282102B (zh) * 2014-06-30 2019-03-15 中国电信股份有限公司 数据流处理方法和系统以及IPv6数据处理设备
US9756013B2 (en) * 2014-07-10 2017-09-05 Cisco Technology, Inc. Distributed mapping of address and port (MAP) between a provider edge device and customer premise equipment devices
CN105681230A (zh) * 2014-11-21 2016-06-15 中兴通讯股份有限公司 一种业务链中的数据处理方法及设备
US9264370B1 (en) 2015-02-10 2016-02-16 Centripetal Networks, Inc. Correlating packets in communications networks
US9866576B2 (en) 2015-04-17 2018-01-09 Centripetal Networks, Inc. Rule-based network-threat detection
CN105897583B (zh) * 2016-05-31 2019-04-05 迈普通信技术股份有限公司 报文转发方法及装置
CN113518387B (zh) * 2020-04-10 2023-07-21 华为技术有限公司 一种基于网际协议版本IPv6的无线网络通信方法和通信设备
CN112291234B (zh) * 2020-10-28 2023-04-28 杭州迪普科技股份有限公司 流量回注方法、装置、设备及计算机可读存储介质
US20220368640A1 (en) * 2021-05-14 2022-11-17 Arris Enterprises Llc PRESERVING QUALITY OF SERVICE (QoS) MARKINGS FOR DOWNSTREAM FLOWS
CN113472666B (zh) * 2021-06-29 2023-08-18 新华三信息安全技术有限公司 报文转发方法及设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1578296A (zh) * 2003-07-29 2005-02-09 华为技术有限公司 双栈过渡的实现方法
CN1716954A (zh) * 2005-05-27 2006-01-04 清华大学 基于过渡机制的IPv6网和IPv4网间互通的方法
CN1798093A (zh) * 2004-12-29 2006-07-05 中兴通讯股份有限公司 一种穿越IPv6网络地址翻译建立虚拟隧道的方法
EP1722524A1 (en) * 2005-05-11 2006-11-15 Samsung Electronics Co., Ltd. Method and apparatus for processing packet in IPv4/IPv6 combination network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7088726B1 (en) * 1996-07-04 2006-08-08 Hitachi, Ltd. Translator for IP networks, network system using the translator, and IP network coupling method therefor
JP2002204252A (ja) * 2000-12-28 2002-07-19 Oki Electric Ind Co Ltd 重複プライベートアドレス変換システム
US7941512B2 (en) * 2004-12-13 2011-05-10 Cisco Technology, Inc. Use of IPv6 in access networks
KR100912299B1 (ko) * 2007-12-10 2009-08-17 한국전자통신연구원 IPv4 /IPv6 통합망에서의 데이터 포워딩 방법
US8687631B2 (en) 2009-10-16 2014-04-01 Cisco Technology, Inc. System and method for providing a translation mechanism in a network environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1578296A (zh) * 2003-07-29 2005-02-09 华为技术有限公司 双栈过渡的实现方法
CN1798093A (zh) * 2004-12-29 2006-07-05 中兴通讯股份有限公司 一种穿越IPv6网络地址翻译建立虚拟隧道的方法
EP1722524A1 (en) * 2005-05-11 2006-11-15 Samsung Electronics Co., Ltd. Method and apparatus for processing packet in IPv4/IPv6 combination network
CN1716954A (zh) * 2005-05-27 2006-01-04 清华大学 基于过渡机制的IPv6网和IPv4网间互通的方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2458799A4 *

Also Published As

Publication number Publication date
JP5499391B2 (ja) 2014-05-21
CN102244688A (zh) 2011-11-16
KR20120055647A (ko) 2012-05-31
US20130070770A1 (en) 2013-03-21
EP2458799B1 (en) 2014-07-09
US9100352B2 (en) 2015-08-04
EP2458799A4 (en) 2012-10-17
JP2013517637A (ja) 2013-05-16
CN102244688B (zh) 2014-07-16
KR101455219B1 (ko) 2014-12-16
EP2458799A1 (en) 2012-05-30

Similar Documents

Publication Publication Date Title
WO2011140843A1 (zh) 一种报文转发的方法、装置及系统
CN107995052B (zh) 用于针对有线和无线节点的公共控制协议的方法和设备
JP4527721B2 (ja) トンネリングを用いたリモートlanのコネクティビティを改善するための装置及び方法
US8687631B2 (en) System and method for providing a translation mechanism in a network environment
JP4801153B2 (ja) 通信ネットワーク内のIPv6ステートレスアドレス構成をサポートするアクセス装置、ルーティング装置およびその方法
WO2009021458A1 (fr) Procédé, appareil et système de connexion d'un réseau de couche 2 à un réseau de couche 3
WO2009059523A1 (en) An accessing method, system and equipment of layer-3 session
WO2015024168A1 (zh) 一种家庭网关服务功能的实现方法和服务器
WO2011160367A1 (zh) 网络地址转换转发方法及装置
WO2007109963A1 (fr) Passerelle de réseau privé virtuel et système de réseau ipv6 et système de réalisation de réseau privé virtuel mobile dans un réseau hybride et procédé correspondant
WO2012013133A1 (zh) 一种网络通信的方法和设备
US8724630B2 (en) Method and system for implementing network intercommunication
WO2014114058A1 (zh) 一种数据报文转发方法、用户驻地设备和系统
WO2012106935A1 (zh) 数据通信网络配置方法、网关网元及数据通信系统
WO2014183701A1 (zh) 端口块资源的获取、端口块资源的分配方法及装置
WO2012083657A1 (zh) 报文处理方法、系统和用户前端设备
WO2011032447A1 (zh) 新网与互联网互通的实现方法、系统及通信端
WO2011032450A1 (zh) 网络互通的实现方法和系统
KR101901341B1 (ko) 사용자 장치의 이동성을 지원하는 네트워크 접속 방법 및 장치
US6985935B1 (en) Method and system for providing network access to PPP clients
WO2008028383A1 (fr) Procédé d'identification de protocole de couche 3 dans une interconnexion à supports hétérogènes dans un réseau privé virtuel de protocole l2 et appareil et système correspondants
WO2007093095A1 (fr) Procédé pour mettre en oeuvre l'acheminement de messages mpls et équipement correspondant
WO2011032478A1 (zh) 一种获取终端身份标识的方法、装置及终端
WO2012041168A1 (zh) 用于IPv6网络的网络连接处理方法及其装置
JP2002271417A (ja) トンネリング装置

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: 11780065

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2011780065

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 476/KOLNP/2012

Country of ref document: IN

ENP Entry into the national phase

Ref document number: 20127006300

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 2012530121

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE